survey-react 1.9.114 → 1.9.116

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.114
2
+ * surveyjs - Survey JavaScript library v1.9.116
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
  */
@@ -1062,6 +1062,8 @@ var Action = /** @class */ (function (_super) {
1062
1062
  this._enabled = val;
1063
1063
  };
1064
1064
  Action.prototype.getEnabled = function () {
1065
+ if (this.enabledIf)
1066
+ return this.enabledIf();
1065
1067
  return this._enabled;
1066
1068
  };
1067
1069
  Action.prototype.setComponent = function (val) {
@@ -5592,6 +5594,7 @@ var defaultV2Css = {
5592
5594
  root: "sd-input sd-text",
5593
5595
  small: "sd-row__question--small",
5594
5596
  controlDisabled: "sd-input--disabled",
5597
+ constrolWithCharacterCounter: "sd-text__character-counter",
5595
5598
  content: "sd-text__content sd-question__content",
5596
5599
  remainingCharacterCounter: "sd-remaining-character-counter",
5597
5600
  onError: "sd-input--error"
@@ -5603,6 +5606,7 @@ var defaultV2Css = {
5603
5606
  itemLabelOnError: "sd-multipletext__item-container--error",
5604
5607
  itemLabelAllowFocus: "sd-multipletext__item-container--allow-focus",
5605
5608
  itemLabelAnswered: "sd-multipletext__item-container--answered",
5609
+ itemWithCharacterCounter: "sd-multipletext-item__character-counter",
5606
5610
  item: "sd-multipletext__item",
5607
5611
  itemTitle: "sd-multipletext__item-title",
5608
5612
  content: "sd-multipletext__content sd-question__content",
@@ -5700,6 +5704,7 @@ var defaultV2Css = {
5700
5704
  rootScroll: "sd-question--scroll",
5701
5705
  root: "sd-table sd-matrixdropdown",
5702
5706
  noHeader: "sd-table--no-header",
5707
+ hasFooter: "sd-table--has-footer",
5703
5708
  rootVerticalAlignTop: "sd-table--align-top",
5704
5709
  rootVerticalAlignMiddle: "sd-table--align-middle",
5705
5710
  tableWrapper: "sd-table-wrapper",
@@ -5710,6 +5715,9 @@ var defaultV2Css = {
5710
5715
  errorsCellBottom: "sd-table__cell--error-bottom",
5711
5716
  itemCell: "sd-table__cell--item",
5712
5717
  row: "sd-table__row",
5718
+ expandedRow: "sd-table__row--expanded",
5719
+ rowHasPanel: "sd-table__row--has-panel",
5720
+ rowHasEndActions: "sd-table__row--has-end-actions",
5713
5721
  headerCell: "sd-table__cell sd-table__cell--header",
5714
5722
  rowTextCell: "sd-table__cell sd-table__cell--row-text",
5715
5723
  columnTitleCell: "sd-table__cell--column-title",
@@ -5721,6 +5729,8 @@ var defaultV2Css = {
5721
5729
  detailIconId: "icon-expanddetail",
5722
5730
  detailIconExpandedId: "icon-collapsedetail",
5723
5731
  detailPanelCell: "sd-table__cell--detail-panel",
5732
+ detailRowCell: "sd-table__cell--detail",
5733
+ actionsCellPrefix: "sd-table__cell-action",
5724
5734
  actionsCell: "sd-table__cell sd-table__cell--actions",
5725
5735
  actionsCellDrag: "sd-table__cell--drag",
5726
5736
  emptyCell: "sd-table__cell--empty",
@@ -5734,10 +5744,14 @@ var defaultV2Css = {
5734
5744
  empty: "sd-question--empty",
5735
5745
  root: "sd-table sd-matrixdynamic",
5736
5746
  noHeader: "sd-table--no-header",
5747
+ hasFooter: "sd-table--has-footer",
5737
5748
  tableWrapper: "sd-table-wrapper",
5738
5749
  content: "sd-matrixdynamic__content sd-question__content",
5739
5750
  cell: "sd-table__cell",
5740
5751
  row: "sd-table__row",
5752
+ rowHasPanel: "sd-table__row--has-panel",
5753
+ rowHasEndActions: "sd-table__row--has-end-actions",
5754
+ expandedRow: "sd-table__row--expanded",
5741
5755
  itemCell: "sd-table__cell--item",
5742
5756
  headerCell: "sd-table__cell sd-table__cell--header",
5743
5757
  rowTextCell: "sd-table__cell sd-table__cell--row-text",
@@ -5752,6 +5766,8 @@ var defaultV2Css = {
5752
5766
  detailIconId: "icon-expanddetail",
5753
5767
  detailIconExpandedId: "icon-collapsedetail",
5754
5768
  detailPanelCell: "sd-table__cell--detail-panel",
5769
+ detailRowCell: "sd-table__cell--detail",
5770
+ actionsCellPrefix: "sd-table__cell-action",
5755
5771
  actionsCell: "sd-table__cell sd-table__cell--actions",
5756
5772
  actionsCellDrag: "sd-table__cell--drag",
5757
5773
  buttonAdd: "sd-matrixdynamic__add-btn",
@@ -5863,6 +5879,7 @@ var defaultV2Css = {
5863
5879
  removeFileButton: "sd-context-btn--negative sd-file__remove-file-button",
5864
5880
  dragAreaPlaceholder: "sd-file__drag-area-placeholder",
5865
5881
  imageWrapper: "sd-file__image-wrapper",
5882
+ imageWrapperDefaultImage: "sd-file__image-wrapper--default-image",
5866
5883
  single: "sd-file--single",
5867
5884
  singleImage: "sd-file--single-image",
5868
5885
  mobile: "sd-file--mobile",
@@ -6871,6 +6888,11 @@ __webpack_require__.r(__webpack_exports__);
6871
6888
  /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/utils */ "./src/utils/utils.ts");
6872
6889
  /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/devices */ "./src/utils/devices.ts");
6873
6890
  /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../settings */ "./src/settings.ts");
6891
+ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
6892
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
6893
+ to[j] = from[i];
6894
+ return to;
6895
+ };
6874
6896
 
6875
6897
 
6876
6898
 
@@ -6941,11 +6963,12 @@ var DragDropDOMAdapter = /** @class */ (function () {
6941
6963
  if (_utils_devices__WEBPACK_IMPORTED_MODULE_1__["IsTouch"]) {
6942
6964
  _this.savedTargetNode.style.cssText = null;
6943
6965
  _this.savedTargetNode && _this.savedTargetNode.parentElement.removeChild(_this.savedTargetNode);
6944
- _this.savedTargetNodeParent.appendChild(_this.savedTargetNode);
6966
+ _this.insertNodeToParentAtIndex(_this.savedTargetNodeParent, _this.savedTargetNode, _this.savedTargetNodeIndex);
6945
6967
  DragDropDOMAdapter.PreventScrolling = false;
6946
6968
  }
6947
6969
  _this.savedTargetNode = null;
6948
6970
  _this.savedTargetNodeParent = null;
6971
+ _this.savedTargetNodeIndex = null;
6949
6972
  _this.returnUserSelectBack();
6950
6973
  };
6951
6974
  this.drop = function () {
@@ -6991,6 +7014,7 @@ var DragDropDOMAdapter = /** @class */ (function () {
6991
7014
  _this.savedTargetNode.style.cssText =
6992
7015
  "\n position: absolute;\n height: 1px!important;\n width: 1px!important;\n overflow: hidden;\n clip: rect(1px 1px 1px 1px);\n clip: rect(1px, 1px, 1px, 1px);\n ";
6993
7016
  _this.savedTargetNodeParent = _this.savedTargetNode.parentElement;
7017
+ _this.savedTargetNodeIndex = _this.getNodeIndexInParent(_this.savedTargetNode);
6994
7018
  _this.rootElement.appendChild(_this.savedTargetNode);
6995
7019
  }
6996
7020
  _this.stopLongTap();
@@ -7148,6 +7172,12 @@ var DragDropDOMAdapter = /** @class */ (function () {
7148
7172
  }
7149
7173
  this.doStartDrag(event, draggedElement, parentElement, draggedElementNode);
7150
7174
  };
7175
+ DragDropDOMAdapter.prototype.getNodeIndexInParent = function (node) {
7176
+ return __spreadArray([], node.parentElement.childNodes).indexOf(node);
7177
+ };
7178
+ DragDropDOMAdapter.prototype.insertNodeToParentAtIndex = function (parent, node, index) {
7179
+ parent.insertBefore(node, parent.childNodes[index]);
7180
+ };
7151
7181
  DragDropDOMAdapter.PreventScrolling = false;
7152
7182
  return DragDropDOMAdapter;
7153
7183
  }());
@@ -8124,7 +8154,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8124
8154
  var _a;
8125
8155
  var focusedItem = this.listModel.focusedItem;
8126
8156
  if (!focusedItem && this.question.selectedItem) {
8127
- if (_itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getItemByValue(this.question.choices, this.question.value)) {
8157
+ if (_itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].getItemByValue(this.question.visibleChoices, this.question.value)) {
8128
8158
  this.listModel.focusedItem = this.question.selectedItem;
8129
8159
  }
8130
8160
  }
@@ -9340,8 +9370,8 @@ __webpack_require__.r(__webpack_exports__);
9340
9370
  //import "../../modern.scss";
9341
9371
  var Version;
9342
9372
  var ReleaseDate;
9343
- Version = "" + "1.9.114";
9344
- ReleaseDate = "" + "2023-10-25";
9373
+ Version = "" + "1.9.116";
9374
+ ReleaseDate = "" + "2023-11-07";
9345
9375
  function checkLibraryVersion(ver, libraryName) {
9346
9376
  if (Version != ver) {
9347
9377
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -15153,6 +15183,15 @@ var UnaryOperand = /** @class */ (function (_super) {
15153
15183
  var uOp = op;
15154
15184
  return uOp.operator == this.operator && this.areOperatorsEquals(this.expression, uOp.expression);
15155
15185
  };
15186
+ UnaryOperand.prototype.hasFunction = function () {
15187
+ return this.expression.hasFunction();
15188
+ };
15189
+ UnaryOperand.prototype.hasAsyncFunction = function () {
15190
+ return this.expression.hasAsyncFunction();
15191
+ };
15192
+ UnaryOperand.prototype.addToAsyncList = function (list) {
15193
+ this.expression.addToAsyncList(list);
15194
+ };
15156
15195
  UnaryOperand.prototype.evaluate = function (processValue) {
15157
15196
  var value = this.expression.evaluate(processValue);
15158
15197
  return this.consumer.call(this, value);
@@ -18383,7 +18422,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
18383
18422
  /*!***************************!*\
18384
18423
  !*** ./src/jsonobject.ts ***!
18385
18424
  \***************************/
18386
- /*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonObject, Serializer */
18425
+ /*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonObject, Serializer */
18387
18426
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
18388
18427
 
18389
18428
  "use strict";
@@ -18400,6 +18439,7 @@ __webpack_require__.r(__webpack_exports__);
18400
18439
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonMissingTypeError", function() { return JsonMissingTypeError; });
18401
18440
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return JsonIncorrectTypeError; });
18402
18441
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return JsonRequiredPropertyError; });
18442
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredArrayPropertyError", function() { return JsonRequiredArrayPropertyError; });
18403
18443
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return JsonObject; });
18404
18444
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
18405
18445
  /* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
@@ -19299,6 +19339,10 @@ var JsonMetadataClass = /** @class */ (function () {
19299
19339
  }
19300
19340
  if (propInfo.baseClassName) {
19301
19341
  prop.baseClassName = propInfo.baseClassName;
19342
+ prop.isArray = true;
19343
+ }
19344
+ if (prop.isArray === true) {
19345
+ prop.isArray = true;
19302
19346
  }
19303
19347
  if (propInfo.classNamePart) {
19304
19348
  prop.classNamePart = propInfo.classNamePart;
@@ -19942,6 +19986,17 @@ var JsonRequiredPropertyError = /** @class */ (function (_super) {
19942
19986
  return JsonRequiredPropertyError;
19943
19987
  }(JsonError));
19944
19988
 
19989
+ var JsonRequiredArrayPropertyError = /** @class */ (function (_super) {
19990
+ __extends(JsonRequiredArrayPropertyError, _super);
19991
+ function JsonRequiredArrayPropertyError(propertyName, className) {
19992
+ var _this = _super.call(this, "arrayproperty", "The property '" + propertyName + "' should be an array in '" + className + "'.") || this;
19993
+ _this.propertyName = propertyName;
19994
+ _this.className = className;
19995
+ return _this;
19996
+ }
19997
+ return JsonRequiredArrayPropertyError;
19998
+ }(JsonError));
19999
+
19945
20000
  var JsonObject = /** @class */ (function () {
19946
20001
  function JsonObject() {
19947
20002
  this.errors = new Array();
@@ -19997,7 +20052,7 @@ var JsonObject = /** @class */ (function () {
19997
20052
  }
19998
20053
  continue;
19999
20054
  }
20000
- this.valueToObj(jsonObj[key], obj, property);
20055
+ this.valueToObj(jsonObj[key], obj, property, jsonObj);
20001
20056
  }
20002
20057
  if (obj.endLoadingFromJson) {
20003
20058
  obj.endLoadingFromJson();
@@ -20071,7 +20126,7 @@ var JsonObject = /** @class */ (function () {
20071
20126
  }
20072
20127
  }
20073
20128
  };
20074
- JsonObject.prototype.valueToObj = function (value, obj, property) {
20129
+ JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj) {
20075
20130
  if (value === null || value === undefined)
20076
20131
  return;
20077
20132
  this.removePos(property, value);
@@ -20079,6 +20134,11 @@ var JsonObject = /** @class */ (function () {
20079
20134
  property.setValue(obj, value, this);
20080
20135
  return;
20081
20136
  }
20137
+ if (property.isArray && !Array.isArray(value) && !!value) {
20138
+ value = [value];
20139
+ var propName = !!jsonObj && property.alternativeName && !!jsonObj[property.alternativeName] ? property.alternativeName : property.name;
20140
+ this.addNewError(new JsonRequiredArrayPropertyError(propName, obj.getType()), !!jsonObj ? jsonObj : value, obj);
20141
+ }
20082
20142
  if (this.isValueArray(value)) {
20083
20143
  this.valueToArray(value, obj, property.name, property);
20084
20144
  return;
@@ -22452,6 +22512,8 @@ var englishStrings = {
22452
22512
  emptyRowsText: "There are no rows.",
22453
22513
  addPanel: "Add new",
22454
22514
  removePanel: "Remove",
22515
+ showDetails: "Show Details",
22516
+ hideDetails: "Hide Details",
22455
22517
  choices_Item: "item",
22456
22518
  matrix_column: "Column",
22457
22519
  matrix_row: "Row",
@@ -28287,9 +28349,11 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
28287
28349
  return true;
28288
28350
  };
28289
28351
  QuestionMatrixBaseModel.prototype.getTableCss = function () {
28352
+ var _a;
28290
28353
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
28291
28354
  .append(this.cssClasses.root)
28292
28355
  .append(this.cssClasses.noHeader, !this.showHeader)
28356
+ .append(this.cssClasses.hasFooter, !!((_a = this.renderedTable) === null || _a === void 0 ? void 0 : _a.showAddRowOnBottom))
28293
28357
  .append(this.cssClasses.rootAlternateRows, this.alternateRows)
28294
28358
  .append(this.cssClasses.rootVerticalAlignTop, (this.verticalAlign === "top"))
28295
28359
  .append(this.cssClasses.rootVerticalAlignMiddle, (this.verticalAlign === "middle")).toString();
@@ -28301,7 +28365,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
28301
28365
  * @see width
28302
28366
  */
28303
28367
  get: function () {
28304
- return this.getPropertyValue("columnMinWidth", "");
28368
+ return this.getPropertyValue("columnMinWidth") || "";
28305
28369
  },
28306
28370
  set: function (val) {
28307
28371
  this.setPropertyValue("columnMinWidth", val);
@@ -28314,7 +28378,7 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
28314
28378
  * A width for the column that displays row titles (first column). Accepts CSS values.
28315
28379
  */
28316
28380
  get: function () {
28317
- return this.getPropertyValue("rowTitleWidth", "");
28381
+ return this.getPropertyValue("rowTitleWidth") || "";
28318
28382
  },
28319
28383
  set: function (val) {
28320
28384
  this.setPropertyValue("rowTitleWidth", val);
@@ -35700,7 +35764,7 @@ var Question = /** @class */ (function (_super) {
35700
35764
  if (!!this.comment) {
35701
35765
  this.comment = undefined;
35702
35766
  }
35703
- this.isValueChangedDirectly = false;
35767
+ this.setValueChangedDirectly(false);
35704
35768
  };
35705
35769
  Question.prototype.unbindValue = function () {
35706
35770
  this.clearValue();
@@ -35764,7 +35828,7 @@ var Question = /** @class */ (function (_super) {
35764
35828
  Question.prototype.clearValueIfInvisibleCore = function (reason) {
35765
35829
  if (this.canClearValueAsInvisible(reason)) {
35766
35830
  this.clearValue();
35767
- this.isValueChangedDirectly = undefined;
35831
+ this.setValueChangedDirectly(undefined);
35768
35832
  }
35769
35833
  };
35770
35834
  Object.defineProperty(Question.prototype, "clearIfInvisible", {
@@ -36116,13 +36180,16 @@ var Question = /** @class */ (function (_super) {
36116
36180
  };
36117
36181
  Question.prototype.setDefaultValue = function () {
36118
36182
  var _this = this;
36119
- this.defaultValueRunner = this.getDefaultRunner(this.defaultValueRunner, this.defaultValueExpression);
36120
- this.setValueAndRunExpression(this.defaultValueRunner, this.getUnbindValue(this.defaultValue), function (val) {
36183
+ this.setDefaultValueCore(function (val) {
36121
36184
  if (!_this.isTwoValueEquals(_this.value, val)) {
36122
36185
  _this.value = val;
36123
36186
  }
36124
36187
  });
36125
36188
  };
36189
+ Question.prototype.setDefaultValueCore = function (func) {
36190
+ this.defaultValueRunner = this.getDefaultRunner(this.defaultValueRunner, this.defaultValueExpression);
36191
+ this.setValueAndRunExpression(this.defaultValueRunner, this.getUnbindValue(this.defaultValue), function (val) { return func(val); });
36192
+ };
36126
36193
  Question.prototype.isValueExpression = function (val) {
36127
36194
  return !!val && typeof val == "string" && val.length > 0 && val[0] == "=";
36128
36195
  };
@@ -36563,31 +36630,46 @@ var Question = /** @class */ (function (_super) {
36563
36630
  };
36564
36631
  //IQuestion
36565
36632
  Question.prototype.updateValueFromSurvey = function (newValue) {
36633
+ var _this = this;
36566
36634
  newValue = this.getUnbindValue(newValue);
36567
36635
  if (!!this.valueFromDataCallback) {
36568
36636
  newValue = this.valueFromDataCallback(newValue);
36569
36637
  }
36570
36638
  if (!this.checkIsValueCorrect(newValue))
36571
36639
  return;
36572
- this.isChangingViaDefaultValue = this.isValueEmpty(newValue);
36573
- this.setQuestionValue(this.valueFromData(newValue));
36574
- this.isChangingViaDefaultValue = false;
36640
+ var isEmpty = this.isValueEmpty(newValue);
36641
+ if (!isEmpty && this.defaultValueExpression) {
36642
+ this.setDefaultValueCore(function (val) {
36643
+ _this.updateValueFromSurveyCore(newValue, _this.isTwoValueEquals(newValue, val));
36644
+ });
36645
+ }
36646
+ else {
36647
+ this.updateValueFromSurveyCore(newValue, isEmpty);
36648
+ }
36575
36649
  this.updateDependedQuestions();
36576
36650
  this.updateIsAnswered();
36577
36651
  };
36652
+ Question.prototype.updateValueFromSurveyCore = function (newValue, viaDefaultVal) {
36653
+ this.isChangingViaDefaultValue = viaDefaultVal;
36654
+ this.setQuestionValue(this.valueFromData(newValue));
36655
+ this.isChangingViaDefaultValue = false;
36656
+ };
36578
36657
  Question.prototype.updateCommentFromSurvey = function (newValue) {
36579
36658
  this.questionComment = newValue;
36580
36659
  };
36581
36660
  Question.prototype.onChangeQuestionValue = function (newValue) { };
36582
- Question.prototype.setValueChangedDirectly = function () {
36583
- this.isValueChangedDirectly = true;
36661
+ Question.prototype.setValueChangedDirectly = function (val) {
36662
+ this.isValueChangedDirectly = val;
36663
+ if (!!this.setValueChangedDirectlyCallback) {
36664
+ this.setValueChangedDirectlyCallback(val);
36665
+ }
36584
36666
  };
36585
36667
  Question.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
36586
36668
  if (updateIsAnswered === void 0) { updateIsAnswered = true; }
36587
36669
  newValue = this.convertToCorrectValue(newValue);
36588
36670
  var isEqual = this.isTwoValueEquals(this.questionValue, newValue);
36589
- if (!isEqual && !this.isChangingViaDefaultValue) {
36590
- this.setValueChangedDirectly();
36671
+ if (!isEqual && !this.isChangingViaDefaultValue && !this.isParentChangingViaDefaultValue) {
36672
+ this.setValueChangedDirectly(true);
36591
36673
  }
36592
36674
  this.questionValue = newValue;
36593
36675
  if (!isEqual) {
@@ -36598,6 +36680,14 @@ var Question = /** @class */ (function (_super) {
36598
36680
  if (updateIsAnswered)
36599
36681
  this.updateIsAnswered();
36600
36682
  };
36683
+ Object.defineProperty(Question.prototype, "isParentChangingViaDefaultValue", {
36684
+ get: function () {
36685
+ var _a;
36686
+ return ((_a = this.data) === null || _a === void 0 ? void 0 : _a.isChangingViaDefaultValue) === true;
36687
+ },
36688
+ enumerable: false,
36689
+ configurable: true
36690
+ });
36601
36691
  Question.prototype.onSurveyValueChanged = function (newValue) { };
36602
36692
  Question.prototype.setVisibleIndex = function (val) {
36603
36693
  if (!this.isVisible ||
@@ -37060,7 +37150,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
37060
37150
  "enableIf:condition",
37061
37151
  "resetValueIf:condition",
37062
37152
  "setValueIf:condition",
37063
- { name: "setValueExpression:expression", visibleIf: function (obj) { return !!obj.setValueIf; } },
37153
+ "setValueExpression:expression",
37064
37154
  "defaultValue:value",
37065
37155
  {
37066
37156
  name: "defaultValueExpression:expression",
@@ -40919,7 +41009,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
40919
41009
  * @see autoGrow
40920
41010
  */
40921
41011
  get: function () {
40922
- return this.getPropertyValue("allowResize") && (this.survey && this.survey.allowResizeComment);
41012
+ return this.getPropertyValue("allowResize");
40923
41013
  },
40924
41014
  set: function (val) {
40925
41015
  this.setPropertyValue("allowResize", val);
@@ -40927,9 +41017,16 @@ var QuestionCommentModel = /** @class */ (function (_super) {
40927
41017
  enumerable: false,
40928
41018
  configurable: true
40929
41019
  });
41020
+ Object.defineProperty(QuestionCommentModel.prototype, "renderedAllowResize", {
41021
+ get: function () {
41022
+ return this.allowResize && (this.survey && this.survey.allowResizeComment);
41023
+ },
41024
+ enumerable: false,
41025
+ configurable: true
41026
+ });
40930
41027
  Object.defineProperty(QuestionCommentModel.prototype, "resizeStyle", {
40931
41028
  get: function () {
40932
- return this.allowResize ? "both" : "none";
41029
+ return this.renderedAllowResize ? "both" : "none";
40933
41030
  },
40934
41031
  enumerable: false,
40935
41032
  configurable: true
@@ -40967,6 +41064,11 @@ var QuestionCommentModel = /** @class */ (function (_super) {
40967
41064
  event.stopPropagation();
40968
41065
  }
40969
41066
  };
41067
+ QuestionCommentModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
41068
+ if (updateIsAnswered === void 0) { updateIsAnswered = true; }
41069
+ _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
41070
+ this.updateElement();
41071
+ };
40970
41072
  QuestionCommentModel.prototype.onValueChanged = function () {
40971
41073
  _super.prototype.onValueChanged.call(this);
40972
41074
  this.updateElement();
@@ -41530,6 +41632,7 @@ var QuestionCustomModel = /** @class */ (function (_super) {
41530
41632
  _this.onUpdateQuestionCssClasses(res, css);
41531
41633
  };
41532
41634
  res.hasCssErrorCallback = function () { return _this.errors.length > 0; };
41635
+ res.setValueChangedDirectlyCallback = function (val) { _this.setValueChangedDirectly(val); };
41533
41636
  }
41534
41637
  return res;
41535
41638
  };
@@ -41597,6 +41700,16 @@ var QuestionCustomModel = /** @class */ (function (_super) {
41597
41700
  return this.getContentQuestionValue();
41598
41701
  return _super.prototype.getValueCore.call(this);
41599
41702
  };
41703
+ QuestionCustomModel.prototype.setValueChangedDirectly = function (val) {
41704
+ if (this.isSettingValueChanged)
41705
+ return;
41706
+ this.isSettingValueChanged = true;
41707
+ _super.prototype.setValueChangedDirectly.call(this, val);
41708
+ if (!!this.contentQuestion) {
41709
+ this.contentQuestion.setValueChangedDirectly(val);
41710
+ }
41711
+ this.isSettingValueChanged = false;
41712
+ };
41600
41713
  QuestionCustomModel.prototype.initElement = function (el) {
41601
41714
  var _this = this;
41602
41715
  _super.prototype.initElement.call(this, el);
@@ -43037,6 +43150,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
43037
43150
 
43038
43151
 
43039
43152
 
43153
+
43040
43154
  /**
43041
43155
  * A class that describes the File Upload question type.
43042
43156
  *
@@ -43184,6 +43298,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
43184
43298
  iconSize: "auto",
43185
43299
  title: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.takePhotoCaption; }),
43186
43300
  showTitle: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return !_this.isAnswered; }),
43301
+ enabledIf: function () { return !_this.isInputReadOnly; },
43187
43302
  action: function () {
43188
43303
  _this.startVideo();
43189
43304
  }
@@ -43194,6 +43309,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
43194
43309
  iconSize: "auto",
43195
43310
  title: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.clearButtonCaption; }),
43196
43311
  showTitle: false,
43312
+ enabledIf: function () { return !_this.isInputReadOnly; },
43197
43313
  innerCss: new _base__WEBPACK_IMPORTED_MODULE_3__["ComputedUpdater"](function () { return _this.cssClasses.removeButton; }),
43198
43314
  action: function () {
43199
43315
  _this.doClean();
@@ -43202,10 +43318,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
43202
43318
  [_this.closeCameraAction, _this.changeCameraAction, _this.takePictureAction].forEach(function (action) {
43203
43319
  action.cssClasses = {};
43204
43320
  });
43205
- _this.registerFunctionOnPropertiesValueChanged(["currentMode", "isAnswered"], function () {
43206
- _this.updateActions();
43321
+ _this.registerFunctionOnPropertiesValueChanged(["sourceType", "currentMode", "isAnswered"], function () {
43322
+ _this.updateActionsVisibility();
43207
43323
  });
43208
- _this.updateActions();
43209
43324
  _this.actionsContainer.actions = [_this.chooseFileAction, _this.startCameraAction, _this.cleanAction];
43210
43325
  _this.fileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
43211
43326
  return _this;
@@ -43233,8 +43348,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
43233
43348
  var isUploading = this.isUploading;
43234
43349
  var isPlayingVideo = this.isPlayingVideo;
43235
43350
  var isDefaultV2Theme = this.isDefaultV2Theme;
43236
- var isReadOnly = this.isInputReadOnly;
43237
- return !isUploading && !isPlayingVideo && !isReadOnly && isDefaultV2Theme;
43351
+ return !isUploading && !isPlayingVideo && isDefaultV2Theme;
43238
43352
  },
43239
43353
  enumerable: false,
43240
43354
  configurable: true
@@ -43270,7 +43384,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
43270
43384
  if (!stream) {
43271
43385
  _this.stopVideo();
43272
43386
  }
43273
- }, this.imageWidth, this.imageHeight);
43387
+ }, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["getRenderedSize"])(this.imageWidth), Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["getRenderedSize"])(this.imageHeight));
43274
43388
  };
43275
43389
  QuestionFileModel.prototype.stopVideo = function () {
43276
43390
  this.setIsPlayingVideo(false);
@@ -43576,9 +43690,10 @@ var QuestionFileModel = /** @class */ (function (_super) {
43576
43690
  }
43577
43691
  }
43578
43692
  };
43579
- QuestionFileModel.prototype.updateActions = function () {
43580
- this.chooseFileAction.visible = this.hasFileUI;
43581
- this.startCameraAction.visible = this.hasVideoUI;
43693
+ QuestionFileModel.prototype.updateActionsVisibility = function () {
43694
+ var isDesignMode = this.isDesignMode;
43695
+ this.chooseFileAction.visible = (!isDesignMode && this.hasFileUI) || (isDesignMode && this.sourceType !== "camera");
43696
+ this.startCameraAction.visible = (!isDesignMode && this.hasVideoUI) || (isDesignMode && this.sourceType !== "file");
43582
43697
  this.cleanAction.visible = !!this.isAnswered;
43583
43698
  };
43584
43699
  Object.defineProperty(QuestionFileModel.prototype, "inputTitle", {
@@ -43755,7 +43870,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
43755
43870
  if (_this.survey) {
43756
43871
  _this.survey.uploadFiles(_this, _this.name, files, function (status, data) {
43757
43872
  if (status === "error") {
43873
+ _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](data, _this));
43758
43874
  _this.stateChanged("error");
43875
+ _this.stateChanged("loaded");
43759
43876
  }
43760
43877
  if (status === "success") {
43761
43878
  _this.value = (_this.value || []).concat(data.map(function (r) {
@@ -43908,6 +44025,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
43908
44025
  }
43909
44026
  return questionPlainData;
43910
44027
  };
44028
+ QuestionFileModel.prototype.getImageWrapperCss = function (data) {
44029
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(this.cssClasses.imageWrapper).append(this.cssClasses.imageWrapperDefaultImage, this.defaultImage(data)).toString();
44030
+ };
43911
44031
  QuestionFileModel.prototype.getActionsContainerCss = function (css) {
43912
44032
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
43913
44033
  .append(css.actionsContainer)
@@ -43995,7 +44115,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
43995
44115
  QuestionFileModel.prototype.endLoadingFromJson = function () {
43996
44116
  _super.prototype.endLoadingFromJson.call(this);
43997
44117
  this.updateCurrentMode();
43998
- this.updateActions();
44118
+ this.updateActionsVisibility();
43999
44119
  this.loadPreview(this.value);
44000
44120
  };
44001
44121
  QuestionFileModel.prototype.needResponsiveness = function () {
@@ -44752,6 +44872,8 @@ var ImageItemValue = /** @class */ (function (_super) {
44752
44872
  },
44753
44873
  set: function (val) {
44754
44874
  this.setLocalizableStringText("imageLink", val);
44875
+ this.imageNotLoaded = false;
44876
+ this.videoNotLoaded = false;
44755
44877
  },
44756
44878
  enumerable: false,
44757
44879
  configurable: true
@@ -47416,7 +47538,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
47416
47538
  };
47417
47539
  QuestionMatrixDropdownModelBase.prototype.onStartRowAddingRemoving = function () {
47418
47540
  this.lockResetRenderedTable = true;
47419
- this.setValueChangedDirectly();
47541
+ this.setValueChangedDirectly(true);
47420
47542
  };
47421
47543
  QuestionMatrixDropdownModelBase.prototype.onEndRowAdding = function () {
47422
47544
  this.lockResetRenderedTable = false;
@@ -48825,7 +48947,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
48825
48947
  _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownbase", [
48826
48948
  {
48827
48949
  name: "columns:matrixdropdowncolumns",
48828
- className: "matrixdropdowncolumn",
48950
+ className: "matrixdropdowncolumn", isArray: true
48829
48951
  },
48830
48952
  {
48831
48953
  name: "columnLayout",
@@ -49776,7 +49898,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownc
49776
49898
  "requiredIf:condition",
49777
49899
  "resetValueIf:condition",
49778
49900
  "setValueIf:condition",
49779
- { name: "setValueExpression:expression", visibleIf: function (obj) { return !!obj.setValueIf; } },
49901
+ "setValueExpression:expression",
49780
49902
  {
49781
49903
  name: "showInMultipleColumns:boolean",
49782
49904
  dependsOn: "cellType",
@@ -49881,6 +50003,7 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
49881
50003
  this.isActionsCell = false;
49882
50004
  this.isErrorsCell = false;
49883
50005
  this.isDragHandlerCell = false;
50006
+ this.isDetailRowCell = false;
49884
50007
  this.classNameValue = "";
49885
50008
  this.idValue = QuestionMatrixDropdownRenderedCell.counter++;
49886
50009
  }
@@ -50041,6 +50164,7 @@ var QuestionMatrixDropdownRenderedRow = /** @class */ (function (_super) {
50041
50164
  var _this = _super.call(this) || this;
50042
50165
  _this.cssClasses = cssClasses;
50043
50166
  _this.isDetailRow = isDetailRow;
50167
+ _this.hasEndActions = false;
50044
50168
  _this.isErrorsRow = false;
50045
50169
  _this.cells = [];
50046
50170
  _this.idValue = QuestionMatrixDropdownRenderedRow.counter++;
@@ -50064,9 +50188,13 @@ var QuestionMatrixDropdownRenderedRow = /** @class */ (function (_super) {
50064
50188
  });
50065
50189
  Object.defineProperty(QuestionMatrixDropdownRenderedRow.prototype, "className", {
50066
50190
  get: function () {
50191
+ var _a, _b;
50067
50192
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
50068
50193
  .append(this.cssClasses.row)
50069
50194
  .append(this.cssClasses.detailRow, this.isDetailRow)
50195
+ .append(this.cssClasses.rowHasPanel, (_a = this.row) === null || _a === void 0 ? void 0 : _a.hasPanel)
50196
+ .append(this.cssClasses.expandedRow, ((_b = this.row) === null || _b === void 0 ? void 0 : _b.isDetailPanelShowing) && !this.isDetailRow)
50197
+ .append(this.cssClasses.rowHasEndActions, this.hasEndActions)
50070
50198
  .append(this.cssClasses.ghostRow, this.isGhostRow)
50071
50199
  .append(this.cssClasses.rowAdditional, this.isAdditionalClasses)
50072
50200
  .toString();
@@ -50419,7 +50547,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50419
50547
  this.footerRow.cells.push(this.createHeaderCell(null));
50420
50548
  }
50421
50549
  if (this.hasActionCellInRows("start")) {
50422
- this.footerRow.cells.push(this.createHeaderCell(null));
50550
+ this.footerRow.cells.push(this.createHeaderCell(null, "action"));
50423
50551
  }
50424
50552
  if (this.matrix.hasRowText) {
50425
50553
  this.footerRow.cells.push(this.createTextCell(this.matrix.getFooterText()));
@@ -50441,7 +50569,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50441
50569
  }
50442
50570
  }
50443
50571
  if (this.hasActionCellInRows("end")) {
50444
- this.footerRow.cells.push(this.createHeaderCell(null));
50572
+ this.footerRow.cells.push(this.createHeaderCell(null, "action"));
50445
50573
  }
50446
50574
  };
50447
50575
  QuestionMatrixDropdownRenderedTable.prototype.buildRows = function () {
@@ -50511,10 +50639,25 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50511
50639
  return cell;
50512
50640
  };
50513
50641
  QuestionMatrixDropdownRenderedTable.prototype.getActionsCellClassName = function (cell) {
50642
+ var _this = this;
50514
50643
  if (cell === void 0) { cell = null; }
50515
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(this.cssClasses.actionsCell).append(this.cssClasses.actionsCellDrag, cell === null || cell === void 0 ? void 0 : cell.isDragHandlerCell).append(this.cssClasses.verticalCell, !this.matrix.isColumnLayoutHorizontal).toString();
50644
+ var classBuilder = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
50645
+ .append(this.cssClasses.actionsCell)
50646
+ .append(this.cssClasses.actionsCellDrag, cell === null || cell === void 0 ? void 0 : cell.isDragHandlerCell)
50647
+ .append(this.cssClasses.detailRowCell, cell === null || cell === void 0 ? void 0 : cell.isDetailRowCell)
50648
+ .append(this.cssClasses.verticalCell, !this.matrix.isColumnLayoutHorizontal);
50649
+ if (cell.isActionsCell) {
50650
+ var actions = cell.item.value.actions;
50651
+ if (this.cssClasses.actionsCellPrefix) {
50652
+ actions.forEach(function (action) {
50653
+ classBuilder.append(_this.cssClasses.actionsCellPrefix + "--" + action.id);
50654
+ });
50655
+ }
50656
+ }
50657
+ return classBuilder.toString();
50516
50658
  };
50517
- QuestionMatrixDropdownRenderedTable.prototype.getRowActionsCell = function (rowIndex, location) {
50659
+ QuestionMatrixDropdownRenderedTable.prototype.getRowActionsCell = function (rowIndex, location, isDetailRow) {
50660
+ if (isDetailRow === void 0) { isDetailRow = false; }
50518
50661
  var rowActions = this.getRowActions(rowIndex, location);
50519
50662
  if (!this.isValueEmpty(rowActions)) {
50520
50663
  var cell = new QuestionMatrixDropdownRenderedCell();
@@ -50527,6 +50670,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50527
50670
  cell.item = itemValue;
50528
50671
  cell.isActionsCell = true;
50529
50672
  cell.isDragHandlerCell = false;
50673
+ cell.isDetailRowCell = isDetailRow;
50530
50674
  cell.className = this.getActionsCellClassName(cell);
50531
50675
  cell.row = this.matrix.visibleRows[rowIndex];
50532
50676
  return cell;
@@ -50560,6 +50704,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50560
50704
  configurable: true
50561
50705
  });
50562
50706
  QuestionMatrixDropdownRenderedTable.prototype.setDefaultRowActions = function (row, actions) {
50707
+ var _this = this;
50563
50708
  var matrix = this.matrix;
50564
50709
  if (this.hasRemoveRows && this.canRemoveRow(row)) {
50565
50710
  if (!this.showRemoveButtonAsIcon) {
@@ -50590,14 +50735,28 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50590
50735
  }
50591
50736
  }
50592
50737
  if (row.hasPanel) {
50593
- actions.push(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
50594
- id: "show-detail",
50595
- title: this.matrix.getLocalizationString("editText"),
50596
- showTitle: false,
50597
- location: "start",
50598
- component: "sv-matrix-detail-button",
50599
- data: { row: row, question: this.matrix },
50600
- }));
50738
+ if (this.matrix.isMobile) {
50739
+ actions.unshift(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
50740
+ id: "show-detail-mobile",
50741
+ title: "Show Details",
50742
+ showTitle: true,
50743
+ location: "end",
50744
+ action: function (context) {
50745
+ context.title = row.isDetailPanelShowing ? _this.matrix.getLocalizationString("showDetails") : _this.matrix.getLocalizationString("hideDetails");
50746
+ row.showHideDetailPanelClick();
50747
+ },
50748
+ }));
50749
+ }
50750
+ else {
50751
+ actions.push(new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
50752
+ id: "show-detail",
50753
+ title: this.matrix.getLocalizationString("editText"),
50754
+ showTitle: false,
50755
+ location: "start",
50756
+ component: "sv-matrix-detail-button",
50757
+ data: { row: row, question: this.matrix },
50758
+ }));
50759
+ }
50601
50760
  }
50602
50761
  };
50603
50762
  QuestionMatrixDropdownRenderedTable.prototype.createErrorRow = function (row) {
@@ -50665,13 +50824,15 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50665
50824
  QuestionMatrixDropdownRenderedTable.prototype.addRowActionsCell = function (row, renderedRow, location) {
50666
50825
  var rowIndex = this.matrix.visibleRows.indexOf(row);
50667
50826
  if (this.hasActionCellInRows(location)) {
50668
- var actions = this.getRowActionsCell(rowIndex, location);
50827
+ var actions = this.getRowActionsCell(rowIndex, location, renderedRow.isDetailRow);
50669
50828
  if (!!actions) {
50670
50829
  renderedRow.cells.push(actions);
50830
+ renderedRow.hasEndActions = true;
50671
50831
  }
50672
50832
  else {
50673
50833
  var cell = new QuestionMatrixDropdownRenderedCell();
50674
50834
  cell.isEmpty = true;
50835
+ cell.isDetailRowCell = renderedRow.isDetailRow;
50675
50836
  renderedRow.cells.push(cell);
50676
50837
  }
50677
50838
  }
@@ -50701,7 +50862,12 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
50701
50862
  cell.className = this.cssClasses.detailPanelCell;
50702
50863
  res.cells.push(cell);
50703
50864
  if (!!actionsCell) {
50704
- res.cells.push(actionsCell);
50865
+ if (this.matrix.isMobile) {
50866
+ this.addRowActionsCell(row, res, "end");
50867
+ }
50868
+ else {
50869
+ res.cells.push(actionsCell);
50870
+ }
50705
50871
  }
50706
50872
  if (typeof this.matrix.onCreateDetailPanelRenderedRowCallback === "function") {
50707
50873
  this.matrix.onCreateDetailPanelRenderedRowCallback(res);
@@ -52144,7 +52310,7 @@ var MultipleTextEditorModel = /** @class */ (function (_super) {
52144
52310
  /**
52145
52311
  * A class that describes an item in a [Multiple Textboxes](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model) question.
52146
52312
  *
52147
- * [View Demo](/form-library/examples/multiple-text-box-question/)
52313
+ * [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/)
52148
52314
  */
52149
52315
  var MultipleTextItemModel = /** @class */ (function (_super) {
52150
52316
  __extends(MultipleTextItemModel, _super);
@@ -52372,6 +52538,19 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
52372
52538
  enumerable: false,
52373
52539
  configurable: true
52374
52540
  });
52541
+ Object.defineProperty(MultipleTextItemModel.prototype, "defaultValueExpression", {
52542
+ /**
52543
+ * An expression used to calculate the [defaultValue](https://surveyjs.io/form-library/documentation/question#defaultValue).
52544
+ */
52545
+ get: function () {
52546
+ return this.editor.defaultValueExpression;
52547
+ },
52548
+ set: function (val) {
52549
+ this.editor.defaultValueExpression = val;
52550
+ },
52551
+ enumerable: false,
52552
+ configurable: true
52553
+ });
52375
52554
  Object.defineProperty(MultipleTextItemModel.prototype, "minValueExpression", {
52376
52555
  /**
52377
52556
  * The minimum value specified as an expression. For example, `"minValueExpression": "today(-1)"` sets the minimum value to yesterday.
@@ -52985,6 +53164,7 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
52985
53164
  .append(this.cssClasses.itemLabelAnswered, item.editor.isAnswered)
52986
53165
  .append(this.cssClasses.itemLabelAllowFocus, !this.isDesignMode)
52987
53166
  .append(this.cssClasses.itemLabelOnError, item.editor.errors.length > 0)
53167
+ .append(this.cssClasses.itemWithCharacterCounter, !!item.getMaxLength())
52988
53168
  .toString();
52989
53169
  };
52990
53170
  QuestionMultipleTextModel.prototype.getItemCss = function () {
@@ -53090,6 +53270,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
53090
53270
  name: "requiredErrorText:text",
53091
53271
  serializationProperty: "locRequiredErrorText",
53092
53272
  },
53273
+ { name: "defaultValueExpression:expression", visible: false },
53093
53274
  {
53094
53275
  name: "minValueExpression:expression",
53095
53276
  category: "logic",
@@ -53115,7 +53296,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
53115
53296
  return new MultipleTextItemModel("");
53116
53297
  });
53117
53298
  _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletext", [
53118
- { name: "!items:textitems", className: "multipletextitem" },
53299
+ { name: "!items:textitems", className: "multipletextitem", isArray: true },
53119
53300
  { name: "itemSize:number", minValue: 0 },
53120
53301
  { name: "colCount:number", default: 1, choices: [1, 2, 3, 4, 5] },
53121
53302
  { name: "itemErrorLocation", default: "default", choices: ["default", "top", "bottom"], visible: false }
@@ -53610,7 +53791,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
53610
53791
  *
53611
53792
  * If you want to customize individual tab titles, handle `SurveyModel`'s [`onGetDynamicPanelTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetDynamicPanelTabTitle) event.
53612
53793
  *
53613
- * [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
53794
+ * [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
53614
53795
  * @see templateTitle
53615
53796
  * @see renderMode
53616
53797
  */
@@ -54397,7 +54578,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
54397
54578
  * - `"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/)
54398
54579
  * - `"progressBottom"` - Renders each panel panel as a card and displays a progress bar at the bottom.
54399
54580
  * - `"progressTopBottom"` - Renders each panel as a card and displays a progress bar at the top and bottom.
54400
- * - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles. [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/)
54581
+ * - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles. [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/)
54401
54582
  */
54402
54583
  get: function () {
54403
54584
  return this.getPropertyValue("renderMode");
@@ -56151,14 +56332,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
56151
56332
  get: function () {
56152
56333
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
56153
56334
  .append(this.cssClasses.root)
56154
- .append(this.cssClasses.rootMobileMod, _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsMobile"])
56335
+ .append(this.cssClasses.rootMobileMod, this.isMobileMode())
56155
56336
  .append(this.cssClasses.rootDisabled, this.isReadOnly)
56156
56337
  .append(this.cssClasses.rootDesignMode, !!this.isDesignMode)
56157
56338
  .append(this.cssClasses.itemOnError, this.hasCssError())
56158
56339
  .append(this.cssClasses.rootDragHandleAreaIcon, _src_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].rankingDragHandleArea === "icon")
56159
56340
  .append(this.cssClasses.rootSelectToRankMod, this.selectToRankEnabled)
56160
- .append(this.cssClasses.rootSelectToRankAlignHorizontal, this.selectToRankEnabled && this.selectToRankAreasLayout === "horizontal")
56161
- .append(this.cssClasses.rootSelectToRankAlignVertical, this.selectToRankEnabled && this.selectToRankAreasLayout === "vertical")
56341
+ .append(this.cssClasses.rootSelectToRankAlignHorizontal, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "horizontal")
56342
+ .append(this.cssClasses.rootSelectToRankAlignVertical, this.selectToRankEnabled && this.renderedSelectToRankAreasLayout === "vertical")
56162
56343
  .toString();
56163
56344
  },
56164
56345
  enumerable: false,
@@ -56491,9 +56672,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
56491
56672
  * @see selectToRankAreasLayout
56492
56673
  */
56493
56674
  get: function () {
56494
- if (_utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsMobile"])
56495
- return "vertical";
56496
- return this.getPropertyValue("selectToRankAreasLayout", "horizontal");
56675
+ return this.getPropertyValue("selectToRankAreasLayout");
56497
56676
  },
56498
56677
  set: function (val) {
56499
56678
  this.setPropertyValue("selectToRankAreasLayout", val);
@@ -56501,6 +56680,18 @@ var QuestionRankingModel = /** @class */ (function (_super) {
56501
56680
  enumerable: false,
56502
56681
  configurable: true
56503
56682
  });
56683
+ Object.defineProperty(QuestionRankingModel.prototype, "renderedSelectToRankAreasLayout", {
56684
+ get: function () {
56685
+ if (this.isMobileMode())
56686
+ return "vertical";
56687
+ return this.selectToRankAreasLayout;
56688
+ },
56689
+ enumerable: false,
56690
+ configurable: true
56691
+ });
56692
+ QuestionRankingModel.prototype.isMobileMode = function () {
56693
+ return _utils_devices__WEBPACK_IMPORTED_MODULE_7__["IsMobile"];
56694
+ };
56504
56695
  Object.defineProperty(QuestionRankingModel.prototype, "useFullItemSizeForShortcut", {
56505
56696
  get: function () {
56506
56697
  return this.getPropertyValue("useFullItemSizeForShortcut");
@@ -56870,7 +57061,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
56870
57061
  *
56871
57062
  * If you do not specify the `rateValues` property, rate values are generated automatically based upon the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin), [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax), [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep), and [`rateCount`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateCount) property values.
56872
57063
  *
56873
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
57064
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
56874
57065
  */
56875
57066
  get: function () {
56876
57067
  return this.getPropertyValue("rateValues");
@@ -56888,7 +57079,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
56888
57079
  *
56889
57080
  * Default value: 1
56890
57081
  *
56891
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
57082
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
56892
57083
  * @see rateMax
56893
57084
  * @see rateStep
56894
57085
  * @see rateCount
@@ -56908,7 +57099,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
56908
57099
  *
56909
57100
  * Default value: 5
56910
57101
  *
56911
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
57102
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
56912
57103
  * @see rateMin
56913
57104
  * @see rateStep
56914
57105
  * @see rateCount
@@ -56928,7 +57119,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
56928
57119
  *
56929
57120
  * Default value: 1
56930
57121
  *
56931
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
57122
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
56932
57123
  * @see rateMin
56933
57124
  * @see rateMax
56934
57125
  * @see rateCount
@@ -57755,24 +57946,6 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
57755
57946
 
57756
57947
  var defaultWidth = 300;
57757
57948
  var defaultHeight = 200;
57758
- function resizeCanvas(canvas) {
57759
- var context = canvas.getContext("2d");
57760
- var devicePixelRatio = window.devicePixelRatio || 1;
57761
- var backingStoreRatio = context.webkitBackingStorePixelRatio ||
57762
- context.mozBackingStorePixelRatio ||
57763
- context.msBackingStorePixelRatio ||
57764
- context.oBackingStorePixelRatio ||
57765
- context.backingStorePixelRatio ||
57766
- 1;
57767
- var ratio = devicePixelRatio / backingStoreRatio;
57768
- var oldWidth = canvas.width;
57769
- var oldHeight = canvas.height;
57770
- canvas.width = oldWidth * ratio;
57771
- canvas.height = oldHeight * ratio;
57772
- canvas.style.width = oldWidth + "px";
57773
- canvas.style.height = oldHeight + "px";
57774
- context.scale(ratio, ratio);
57775
- }
57776
57949
  /**
57777
57950
  * A class that describes the Signature question type.
57778
57951
  *
@@ -57781,7 +57954,13 @@ function resizeCanvas(canvas) {
57781
57954
  var QuestionSignaturePadModel = /** @class */ (function (_super) {
57782
57955
  __extends(QuestionSignaturePadModel, _super);
57783
57956
  function QuestionSignaturePadModel(name) {
57784
- return _super.call(this, name) || this;
57957
+ var _this = _super.call(this, name) || this;
57958
+ _this.valueIsUpdatingInternally = false;
57959
+ _this.updateValueHandler = function () {
57960
+ _this.scaleCanvas(false, true);
57961
+ _this.refreshCanvas();
57962
+ };
57963
+ return _this;
57785
57964
  }
57786
57965
  QuestionSignaturePadModel.prototype.getPenColorFromTheme = function () {
57787
57966
  var _survey = this.survey;
@@ -57807,7 +57986,9 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
57807
57986
  var format = this.dataFormat === "jpeg" ? "image/jpeg" :
57808
57987
  (this.dataFormat === "svg" ? "image/svg+xml" : "");
57809
57988
  var data = this.signaturePad.toDataURL(format);
57989
+ this.valueIsUpdatingInternally = true;
57810
57990
  this.value = data;
57991
+ this.valueIsUpdatingInternally = false;
57811
57992
  }
57812
57993
  };
57813
57994
  QuestionSignaturePadModel.prototype.getType = function () {
@@ -57829,10 +58010,44 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
57829
58010
  this.updateColors(this.signaturePad);
57830
58011
  }
57831
58012
  };
58013
+ QuestionSignaturePadModel.prototype.resizeCanvas = function () {
58014
+ this.canvas.width = this.containerWidth;
58015
+ this.canvas.height = this.containerHeight;
58016
+ };
58017
+ QuestionSignaturePadModel.prototype.scaleCanvas = function (refresh, resize) {
58018
+ if (refresh === void 0) { refresh = true; }
58019
+ if (resize === void 0) { resize = false; }
58020
+ var canvas = this.canvas;
58021
+ var scale = canvas.offsetWidth / this.containerWidth;
58022
+ if (this.scale != scale || resize) {
58023
+ this.scale = scale;
58024
+ canvas.style.width = this.renderedCanvasWidth;
58025
+ this.resizeCanvas();
58026
+ this.signaturePad.minWidth = this.penMinWidth * scale;
58027
+ this.signaturePad.maxWidth = this.penMaxWidth * scale;
58028
+ canvas.getContext("2d").scale(1 / scale, 1 / scale);
58029
+ if (refresh)
58030
+ this.refreshCanvas();
58031
+ }
58032
+ };
58033
+ QuestionSignaturePadModel.prototype.refreshCanvas = function () {
58034
+ var data = this.value;
58035
+ var canvas = this.canvas;
58036
+ if (!data) {
58037
+ canvas.getContext("2d").clearRect(0, 0, canvas.width * this.scale, canvas.height * this.scale);
58038
+ this.signaturePad.clear();
58039
+ }
58040
+ else {
58041
+ this.signaturePad.fromDataURL(data, { width: canvas.width * this.scale, height: canvas.height * this.scale });
58042
+ }
58043
+ };
57832
58044
  QuestionSignaturePadModel.prototype.initSignaturePad = function (el) {
57833
58045
  var _this = this;
57834
58046
  var canvas = el.getElementsByTagName("canvas")[0];
58047
+ this.canvas = canvas;
58048
+ this.resizeCanvas();
57835
58049
  var signaturePad = new signature_pad__WEBPACK_IMPORTED_MODULE_3__["default"](canvas, { backgroundColor: "#ffffff" });
58050
+ this.signaturePad = signaturePad;
57836
58051
  if (this.isInputReadOnly) {
57837
58052
  signaturePad.off();
57838
58053
  }
@@ -57846,6 +58061,7 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
57846
58061
  };
57847
58062
  this.updateColors(signaturePad);
57848
58063
  signaturePad.addEventListener("beginStroke", function () {
58064
+ _this.scaleCanvas();
57849
58065
  _this.isDrawingValue = true;
57850
58066
  canvas.focus();
57851
58067
  }, { once: false });
@@ -57853,24 +58069,12 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
57853
58069
  _this.isDrawingValue = false;
57854
58070
  _this.updateValue();
57855
58071
  }, { once: false });
57856
- var updateValueHandler = function () {
57857
- var data = _this.value;
57858
- canvas.width = _this.signatureWidth || defaultWidth;
57859
- canvas.height = _this.signatureHeight || defaultHeight;
57860
- resizeCanvas(canvas);
57861
- if (!data) {
57862
- signaturePad.clear();
57863
- }
57864
- else {
57865
- signaturePad.fromDataURL(data);
57866
- }
57867
- };
57868
- updateValueHandler();
58072
+ this.updateValueHandler();
57869
58073
  this.readOnlyChangedCallback();
57870
- this.signaturePad = signaturePad;
57871
58074
  var propertyChangedHandler = function (sender, options) {
57872
58075
  if (options.name === "signatureWidth" || options.name === "signatureHeight" || options.name === "value") {
57873
- updateValueHandler();
58076
+ if (!_this.valueIsUpdatingInternally)
58077
+ _this.updateValueHandler();
57874
58078
  }
57875
58079
  };
57876
58080
  this.onPropertyChanged.add(propertyChangedHandler);
@@ -57929,6 +58133,27 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
57929
58133
  enumerable: false,
57930
58134
  configurable: true
57931
58135
  });
58136
+ Object.defineProperty(QuestionSignaturePadModel.prototype, "containerHeight", {
58137
+ get: function () {
58138
+ return this.signatureHeight || defaultHeight;
58139
+ },
58140
+ enumerable: false,
58141
+ configurable: true
58142
+ });
58143
+ Object.defineProperty(QuestionSignaturePadModel.prototype, "containerWidth", {
58144
+ get: function () {
58145
+ return this.signatureWidth || defaultWidth;
58146
+ },
58147
+ enumerable: false,
58148
+ configurable: true
58149
+ });
58150
+ Object.defineProperty(QuestionSignaturePadModel.prototype, "renderedCanvasWidth", {
58151
+ get: function () {
58152
+ return this.signatureAutoScaleEnabled ? "100%" : this.containerWidth + "px";
58153
+ },
58154
+ enumerable: false,
58155
+ configurable: true
58156
+ });
57932
58157
  Object.defineProperty(QuestionSignaturePadModel.prototype, "height", {
57933
58158
  //todo: need to remove this property
57934
58159
  get: function () {
@@ -58049,6 +58274,15 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
58049
58274
  __decorate([
58050
58275
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
58051
58276
  ], QuestionSignaturePadModel.prototype, "isDrawingValue", void 0);
58277
+ __decorate([
58278
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
58279
+ ], QuestionSignaturePadModel.prototype, "signatureAutoScaleEnabled", void 0);
58280
+ __decorate([
58281
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 0.5 })
58282
+ ], QuestionSignaturePadModel.prototype, "penMinWidth", void 0);
58283
+ __decorate([
58284
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 2.5 })
58285
+ ], QuestionSignaturePadModel.prototype, "penMaxWidth", void 0);
58052
58286
  __decorate([
58053
58287
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
58054
58288
  ], QuestionSignaturePadModel.prototype, "showPlaceholder", void 0);
@@ -58077,6 +58311,21 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("signaturepad",
58077
58311
  category: "general",
58078
58312
  default: 200,
58079
58313
  },
58314
+ {
58315
+ name: "signatureAutoScaleEnabled:boolean",
58316
+ category: "general",
58317
+ default: false,
58318
+ },
58319
+ {
58320
+ name: "penMinWidth:number",
58321
+ category: "general",
58322
+ default: 0.5,
58323
+ },
58324
+ {
58325
+ name: "penMaxWidth:number",
58326
+ category: "general",
58327
+ default: 2.5,
58328
+ },
58080
58329
  //need to remove this property
58081
58330
  {
58082
58331
  name: "height:number",
@@ -58089,10 +58338,13 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("signaturepad",
58089
58338
  default: true,
58090
58339
  },
58091
58340
  { name: "showPlaceholder:boolean", category: "general", default: true },
58092
- { name: "placeholder:text",
58341
+ {
58342
+ name: "placeholder:text",
58093
58343
  serializationProperty: "locPlaceholder",
58094
58344
  category: "general",
58095
- dependsOn: "showPlaceholder", visibleIf: function (obj) { return obj.showPlaceholder; } },
58345
+ dependsOn: "showPlaceholder",
58346
+ visibleIf: function (obj) { return obj.showPlaceholder; }
58347
+ },
58096
58348
  {
58097
58349
  name: "backgroundImage:file",
58098
58350
  category: "general",
@@ -58353,8 +58605,9 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
58353
58605
  }
58354
58606
  };
58355
58607
  QuestionTagboxModel.prototype.clearValue = function () {
58608
+ var _a;
58356
58609
  _super.prototype.clearValue.call(this);
58357
- this.dropdownListModel.clear();
58610
+ (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
58358
58611
  };
58359
58612
  Object.defineProperty(QuestionTagboxModel.prototype, "showClearButton", {
58360
58613
  get: function () {
@@ -58967,6 +59220,10 @@ var QuestionTextModel = /** @class */ (function (_super) {
58967
59220
  QuestionTextModel.prototype.hasPlaceholder = function () {
58968
59221
  return !this.isReadOnly && this.inputType !== "range";
58969
59222
  };
59223
+ QuestionTextModel.prototype.getControlCssClassBuilder = function () {
59224
+ return _super.prototype.getControlCssClassBuilder.call(this)
59225
+ .append(this.cssClasses.constrolWithCharacterCounter, !!this.getMaxLength());
59226
+ };
58970
59227
  QuestionTextModel.prototype.isReadOnlyRenderDiv = function () {
58971
59228
  return this.isReadOnly && _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].readOnly.textRenderMode === "div";
58972
59229
  };
@@ -59395,12 +59652,14 @@ var QuestionTextBase = /** @class */ (function (_super) {
59395
59652
  }
59396
59653
  }
59397
59654
  };
59398
- QuestionTextBase.prototype.getControlClass = function () {
59655
+ QuestionTextBase.prototype.getControlCssClassBuilder = function () {
59399
59656
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
59400
59657
  .append(this.cssClasses.root)
59401
59658
  .append(this.cssClasses.onError, this.hasCssError())
59402
- .append(this.cssClasses.controlDisabled, this.isReadOnly)
59403
- .toString();
59659
+ .append(this.cssClasses.controlDisabled, this.isReadOnly);
59660
+ };
59661
+ QuestionTextBase.prototype.getControlClass = function () {
59662
+ return this.getControlCssClassBuilder().toString();
59404
59663
  };
59405
59664
  Object.defineProperty(QuestionTextBase.prototype, "isNewA11yStructure", {
59406
59665
  //a11y
@@ -59630,6 +59889,20 @@ var QuestionNonValue = /** @class */ (function (_super) {
59630
59889
  if (path === void 0) { path = null; }
59631
59890
  return null;
59632
59891
  };
59892
+ Object.defineProperty(QuestionNonValue.prototype, "ariaRole", {
59893
+ get: function () {
59894
+ return null;
59895
+ },
59896
+ enumerable: false,
59897
+ configurable: true
59898
+ });
59899
+ Object.defineProperty(QuestionNonValue.prototype, "ariaRequired", {
59900
+ get: function () {
59901
+ return null;
59902
+ },
59903
+ enumerable: false,
59904
+ configurable: true
59905
+ });
59633
59906
  return QuestionNonValue;
59634
59907
  }(_question__WEBPACK_IMPORTED_MODULE_0__["Question"]));
59635
59908
 
@@ -60086,7 +60359,7 @@ var SurveyActionBarItem = /** @class */ (function (_super) {
60086
60359
  var title = this.item.tooltip || this.item.title;
60087
60360
  var buttonContent = this.renderButtonContent();
60088
60361
  var tabIndex = this.item.disableTabStop ? -1 : undefined;
60089
- var button = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onClick: function (args) { return _this.item.action(_this.item, _this.item.getIsTrusted(args)); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), null, { processEsc: false });
60362
+ var button = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onClick: function (args) { return _this.item.action(_this.item, _this.item.getIsTrusted(args)); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
60090
60363
  return button;
60091
60364
  };
60092
60365
  return SurveyActionBarItem;
@@ -60465,7 +60738,7 @@ var SurveyFileChooseButton = /** @class */ (function (_super) {
60465
60738
  configurable: true
60466
60739
  });
60467
60740
  SurveyFileChooseButton.prototype.render = function () {
60468
- return Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_1__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { role: "button", tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText },
60741
+ return Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_1__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { tabIndex: 0, className: this.question.getChooseFileCss(), htmlFor: this.question.inputId, "aria-label": this.question.chooseButtonText },
60469
60742
  (!!this.question.cssClasses.chooseFileIconId) ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { title: this.question.chooseButtonText, iconName: this.question.cssClasses.chooseFileIconId, size: "auto" }) : null,
60470
60743
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, this.question.chooseButtonText)));
60471
60744
  };
@@ -60541,7 +60814,7 @@ var SurveyFilePreview = /** @class */ (function (_super) {
60541
60814
  return null;
60542
60815
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.preview, style: { display: _this.question.isPreviewVisible(index) ? undefined : "none" } },
60543
60816
  _this.renderFileSign(_this.question.cssClasses.fileSign, val),
60544
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.cssClasses.imageWrapper },
60817
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getImageWrapperCss(val) },
60545
60818
  _this.question.canPreviewImage(val) ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img", { src: val.content, style: { height: _this.question.imageHeight, width: _this.question.imageWidth }, alt: "File preview" })) : (_this.question.cssClasses.defaultImage ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { iconName: _this.question.cssClasses.defaultImageIconId, size: "auto", className: _this.question.cssClasses.defaultImage })) : null),
60546
60819
  val.name && !_this.question.isReadOnly ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getRemoveButtonCss(), onClick: function () { return _this.question.doRemoveFile(val); } },
60547
60820
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: _this.question.cssClasses.removeFile }, _this.question.removeFileCaption),
@@ -60790,7 +61063,7 @@ var ListItem = /** @class */ (function (_super) {
60790
61063
  content.push(newElement);
60791
61064
  }
60792
61065
  }
60793
- var contentWrap = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody }, content);
61066
+ var contentWrap = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText }, content);
60794
61067
  var separator = this.item.needSeparator ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;
60795
61068
  var isVisible = this.model.isItemVisible(this.item);
60796
61069
  var style = {
@@ -62901,7 +63174,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
62901
63174
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
62902
63175
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
62903
63176
  valueElement,
62904
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: !dropdownListModel.searchEnabled ? true : undefined, tabIndex: dropdownListModel.inputReadOnly ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
63177
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: !dropdownListModel.searchEnabled ? true : undefined, tabIndex: dropdownListModel.inputReadOnly ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
62905
63178
  this.createClearButton()));
62906
63179
  };
62907
63180
  SurveyQuestionDropdownBase.prototype.createClearButton = function () {
@@ -63638,7 +63911,7 @@ var SurveyQuestionImagePicker = /** @class */ (function (_super) {
63638
63911
  SurveyQuestionImagePicker.prototype.renderElement = function () {
63639
63912
  var cssClasses = this.question.cssClasses;
63640
63913
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss() },
63641
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { role: "radio", "aria-label": this.question.locTitle.renderedHtml }),
63914
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
63642
63915
  this.question.hasColumns ? this.getColumns(cssClasses) : this.getItems(cssClasses)));
63643
63916
  };
63644
63917
  SurveyQuestionImagePicker.prototype.getColumns = function (cssClasses) {
@@ -65607,7 +65880,7 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
65607
65880
  var _this = this;
65608
65881
  var cssClasses = this.question.cssClasses;
65609
65882
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy },
65610
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { role: "presentation", className: "sv-hidden" }),
65883
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
65611
65884
  this.getHeader(),
65612
65885
  this.question.hasColumns
65613
65886
  ? this.getColumnedBody(cssClasses)
@@ -65787,7 +66060,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
65787
66060
  var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
65788
66061
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
65789
66062
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
65790
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name, value: this.item.value != "selectall" ? this.item.value : undefined, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: onItemChanged }),
66063
+ 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 }),
65791
66064
  this.cssClasses.materialDecorator ?
65792
66065
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
65793
66066
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
@@ -66903,7 +67176,7 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
66903
67176
  headers)));
66904
67177
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
66905
67178
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", null,
66906
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { "aria-label": this.question.locTitle.renderedHtml }),
67179
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
66907
67180
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("table", { className: this.question.getTableCss() },
66908
67181
  header,
66909
67182
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tbody", null, rows)))));
@@ -67226,8 +67499,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
67226
67499
  matrixrow.push(this.renderCell(cells[i], i, cssClasses, reason));
67227
67500
  }
67228
67501
  var key = "row" + keyValue;
67229
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], { key: key },
67230
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_matrix_row__WEBPACK_IMPORTED_MODULE_7__["MatrixRow"], { model: row, parentMatrix: this.question }, matrixrow)));
67502
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], { key: key }, (reason == "row-footer") ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", null, matrixrow) : react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_matrix_row__WEBPACK_IMPORTED_MODULE_7__["MatrixRow"], { model: row, parentMatrix: this.question }, matrixrow)));
67231
67503
  };
67232
67504
  SurveyQuestionMatrixDropdownBase.prototype.renderCell = function (cell, index, cssClasses, reason) {
67233
67505
  var key = "cell" + index;
@@ -69007,7 +69279,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
69007
69279
  var _this = this;
69008
69280
  var cssClasses = this.question.cssClasses;
69009
69281
  var clearButton = this.renderCleanButton();
69010
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.root, ref: function (root) { return (_this.setControl(root)); }, style: { height: this.question.signatureHeight, width: this.question.signatureWidth } },
69282
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.root, ref: function (root) { return (_this.setControl(root)); }, style: { width: this.question.renderedCanvasWidth } },
69011
69283
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.placeholder, style: { display: this.question.needShowPlaceholder() ? "" : "none" } }, this.renderLocString(this.question.locPlaceholder)),
69012
69284
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
69013
69285
  this.renderBackgroundImage(),
@@ -69017,7 +69289,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
69017
69289
  SurveyQuestionSignaturePad.prototype.renderBackgroundImage = function () {
69018
69290
  if (!this.question.backgroundImage)
69019
69291
  return null;
69020
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: this.question.cssClasses.backgroundImage, src: this.question.backgroundImage, width: this.question.signatureWidth, height: this.question.signatureHeight });
69292
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: this.question.cssClasses.backgroundImage, src: this.question.backgroundImage, style: { width: this.question.renderedCanvasWidth } });
69021
69293
  };
69022
69294
  SurveyQuestionSignaturePad.prototype.renderCleanButton = function () {
69023
69295
  var _this = this;
@@ -69331,7 +69603,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
69331
69603
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
69332
69604
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
69333
69605
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringSuffix))) : null,
69334
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
69606
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: !this.model.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
69335
69607
  };
69336
69608
  return TagboxFilterString;
69337
69609
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
@@ -72377,16 +72649,16 @@ var SurveyModel = /** @class */ (function (_super) {
72377
72649
  *
72378
72650
  * For information on event handler parameters, refer to descriptions within the interface.
72379
72651
  *
72380
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
72652
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
72381
72653
  * @see css
72382
72654
  */
72383
72655
  _this.onUpdateQuestionCssClasses = _this.addEvent();
72384
72656
  /**
72385
- * An event that is raised before rendering a standalone panel and panels within [Dynamic Panel](/form-library/examples/duplicate-group-of-fields-in-form/). Use it to override default panel CSS classes.
72657
+ * An event that is raised before rendering a standalone panel and panels within [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/). Use it to override default panel CSS classes.
72386
72658
  *
72387
72659
  * For information on event handler parameters, refer to descriptions within the interface.
72388
72660
  *
72389
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
72661
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
72390
72662
  * @see css
72391
72663
  */
72392
72664
  _this.onUpdatePanelCssClasses = _this.addEvent();
@@ -72395,7 +72667,7 @@ var SurveyModel = /** @class */ (function (_super) {
72395
72667
  *
72396
72668
  * For information on event handler parameters, refer to descriptions within the interface.
72397
72669
  *
72398
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
72670
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
72399
72671
  * @see css
72400
72672
  */
72401
72673
  _this.onUpdatePageCssClasses = _this.addEvent();
@@ -72404,7 +72676,7 @@ var SurveyModel = /** @class */ (function (_super) {
72404
72676
  *
72405
72677
  * For information on event handler parameters, refer to descriptions within the interface.
72406
72678
  *
72407
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
72679
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
72408
72680
  * @see css
72409
72681
  */
72410
72682
  _this.onUpdateChoiceItemCss = _this.addEvent();
@@ -72496,7 +72768,7 @@ var SurveyModel = /** @class */ (function (_super) {
72496
72768
  */
72497
72769
  _this.onMatrixRowAdding = _this.addEvent();
72498
72770
  /**
72499
- * This event is obsolete. Use the [`onMatrixRowAdding`](/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
72771
+ * This event is obsolete. Use the [`onMatrixRowAdding`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
72500
72772
  */
72501
72773
  _this.onMatrixBeforeRowAdded = _this.onMatrixRowAdding;
72502
72774
  /**
@@ -72516,7 +72788,7 @@ var SurveyModel = /** @class */ (function (_super) {
72516
72788
  */
72517
72789
  _this.onMatrixRenderRemoveButton = _this.addEvent();
72518
72790
  /**
72519
- * This event is obsolete. Use the [`onMatrixRenderRemoveButton`](/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
72791
+ * This event is obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
72520
72792
  */
72521
72793
  _this.onMatrixAllowRemoveRow = _this.onMatrixRenderRemoveButton;
72522
72794
  /**
@@ -72535,7 +72807,7 @@ var SurveyModel = /** @class */ (function (_super) {
72535
72807
  */
72536
72808
  _this.onAfterRenderMatrixCell = _this.addEvent();
72537
72809
  /**
72538
- * This event is obsolete. Use the [`onAfterRenderMatrixCell`](/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
72810
+ * This event is obsolete. Use the [`onAfterRenderMatrixCell`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
72539
72811
  */
72540
72812
  _this.onMatrixAfterCellRender = _this.onAfterRenderMatrixCell;
72541
72813
  /**
@@ -72593,7 +72865,7 @@ var SurveyModel = /** @class */ (function (_super) {
72593
72865
  *
72594
72866
  * For information on event handler parameters, refer to descriptions within the interface.
72595
72867
  *
72596
- * [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
72868
+ * [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
72597
72869
  */
72598
72870
  _this.onGetDynamicPanelTabTitle = _this.addEvent();
72599
72871
  /**
@@ -73022,7 +73294,7 @@ var SurveyModel = /** @class */ (function (_super) {
73022
73294
  /**
73023
73295
  * Gets or sets an object in which keys are UI elements and values are CSS classes applied to them.
73024
73296
  *
73025
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
73297
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
73026
73298
  */
73027
73299
  get: function () {
73028
73300
  if (!this.cssValue) {
@@ -79820,6 +80092,11 @@ var SurveyModel = /** @class */ (function (_super) {
79820
80092
  }
79821
80093
  }
79822
80094
  }
80095
+ else if (isStrCiEqual(layoutElement.id, "advanced-header")) {
80096
+ if (this.state === "running" && layoutElement.container === container) {
80097
+ containerLayoutElements.push(layoutElement);
80098
+ }
80099
+ }
79823
80100
  else {
79824
80101
  if (Array.isArray(layoutElement.container) && layoutElement.container.indexOf(container) !== -1 || layoutElement.container === container) {
79825
80102
  containerLayoutElements.push(layoutElement);
@@ -79834,8 +80111,8 @@ var SurveyModel = /** @class */ (function (_super) {
79834
80111
  /**
79835
80112
  * Applies a specified theme to the survey.
79836
80113
  *
79837
- * [Themes & Styles](/form-library/documentation/manage-default-themes-and-styles (linkStyle))
79838
- * @param theme An [`ITheme`](/form-library/documentation/api-reference/itheme) object with theme settings.
80114
+ * [Themes & Styles](https://surveyjs.io/form-library/documentation/manage-default-themes-and-styles (linkStyle))
80115
+ * @param theme An [`ITheme`](https://surveyjs.io/form-library/documentation/api-reference/itheme) object with theme settings.
79839
80116
  */
79840
80117
  SurveyModel.prototype.applyTheme = function (theme) {
79841
80118
  var _this = this;
@@ -79843,15 +80120,15 @@ var SurveyModel = /** @class */ (function (_super) {
79843
80120
  return;
79844
80121
  Object.keys(theme).forEach(function (key) {
79845
80122
  if (key === "header") {
79846
- _this.removeLayoutElement("cover");
79847
- var newCoverModel_1 = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
79848
- newCoverModel_1.fromTheme(theme);
80123
+ _this.removeLayoutElement("advanced-header");
80124
+ var advHeader_1 = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
80125
+ advHeader_1.fromTheme(theme);
79849
80126
  _this.layoutElements.push({
79850
- id: "cover",
80127
+ id: "advanced-header",
79851
80128
  container: "header",
79852
80129
  component: "sv-header",
79853
- data: newCoverModel_1,
79854
- processResponsiveness: function (width) { return newCoverModel_1.processResponsiveness(width); }
80130
+ data: advHeader_1,
80131
+ processResponsiveness: function (width) { return advHeader_1.processResponsiveness(width); }
79855
80132
  });
79856
80133
  }
79857
80134
  if (key === "isPanelless") {
@@ -79940,27 +80217,27 @@ var SurveyModel = /** @class */ (function (_super) {
79940
80217
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
79941
80218
  onSet: function (newValue, target) {
79942
80219
  if (newValue === "advanced") {
79943
- var layoutElement = target.layoutElements.filter(function (a) { return a.id === "cover"; })[0];
80220
+ var layoutElement = target.layoutElements.filter(function (a) { return a.id === "advanced-header"; })[0];
79944
80221
  if (!layoutElement) {
79945
- var cover = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
79946
- cover.logoPositionX = target.logoPosition === "right" ? "right" : "left";
79947
- cover.logoPositionY = "middle";
79948
- cover.titlePositionX = target.logoPosition === "right" ? "left" : "right";
79949
- cover.titlePositionY = "middle";
79950
- cover.descriptionPositionX = target.logoPosition === "right" ? "left" : "right";
79951
- cover.descriptionPositionY = "middle";
79952
- cover.survey = target;
80222
+ var advHeader = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
80223
+ advHeader.logoPositionX = target.logoPosition === "right" ? "right" : "left";
80224
+ advHeader.logoPositionY = "middle";
80225
+ advHeader.titlePositionX = target.logoPosition === "right" ? "left" : "right";
80226
+ advHeader.titlePositionY = "middle";
80227
+ advHeader.descriptionPositionX = target.logoPosition === "right" ? "left" : "right";
80228
+ advHeader.descriptionPositionY = "middle";
80229
+ advHeader.survey = target;
79953
80230
  target.layoutElements.unshift({
79954
- id: "cover",
80231
+ id: "advanced-header",
79955
80232
  container: "header",
79956
80233
  component: "sv-header",
79957
- data: cover,
79958
- processResponsiveness: function (width) { return cover.processResponsiveness(width); }
80234
+ data: advHeader,
80235
+ processResponsiveness: function (width) { return advHeader.processResponsiveness(width); }
79959
80236
  });
79960
80237
  }
79961
80238
  }
79962
80239
  else {
79963
- target.removeLayoutElement("cover");
80240
+ target.removeLayoutElement("advanced-header");
79964
80241
  }
79965
80242
  }
79966
80243
  })
@@ -80059,13 +80336,13 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
80059
80336
  },
80060
80337
  {
80061
80338
  name: "completedHtmlOnCondition:htmlconditions",
80062
- className: "htmlconditionitem",
80339
+ className: "htmlconditionitem", isArray: true
80063
80340
  },
80064
80341
  { name: "loadingHtml:html", serializationProperty: "locLoadingHtml" },
80065
- { name: "pages:surveypages", className: "page" },
80342
+ { name: "pages:surveypages", className: "page", isArray: true },
80066
80343
  {
80067
- name: "questions",
80068
- alternativeName: "elements",
80344
+ name: "elements",
80345
+ alternativeName: "questions",
80069
80346
  baseClassName: "question",
80070
80347
  visible: false,
80071
80348
  isLightSerializable: false,
@@ -80085,7 +80362,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
80085
80362
  },
80086
80363
  {
80087
80364
  name: "calculatedValues:calculatedvalues",
80088
- className: "calculatedvalue",
80365
+ className: "calculatedvalue", isArray: true
80089
80366
  },
80090
80367
  { name: "surveyId", visible: false },
80091
80368
  { name: "surveyPostId", visible: false },
@@ -80104,7 +80381,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
80104
80381
  "navigateToUrl",
80105
80382
  {
80106
80383
  name: "navigateToUrlOnCondition:urlconditions",
80107
- className: "urlconditionitem",
80384
+ className: "urlconditionitem", isArray: true
80108
80385
  },
80109
80386
  {
80110
80387
  name: "questionsOrder",
@@ -81967,7 +82244,7 @@ var Camera = /** @class */ (function () {
81967
82244
  this.hasCameraCallback(callback);
81968
82245
  }
81969
82246
  };
81970
- Camera.prototype.getMediaConstraints = function (videoEl) {
82247
+ Camera.prototype.getMediaConstraints = function (videoSize) {
81971
82248
  var devices = Camera.cameraList;
81972
82249
  if (!Array.isArray(devices) || devices.length < 1)
81973
82250
  return undefined;
@@ -81981,9 +82258,13 @@ var Camera = /** @class */ (function () {
81981
82258
  else {
81982
82259
  videoConstraints.facingMode = Camera.cameraFacingMode;
81983
82260
  }
81984
- if (videoEl) {
81985
- videoConstraints.width = { exact: videoEl.width ? videoEl.width : videoEl.scrollWidth };
81986
- videoConstraints.height = { exact: videoEl.height ? videoEl.height : videoEl.scrollHeight };
82261
+ if (videoSize) {
82262
+ if (videoSize === null || videoSize === void 0 ? void 0 : videoSize.height) {
82263
+ videoConstraints.height = { ideal: videoSize.height };
82264
+ }
82265
+ if (videoSize === null || videoSize === void 0 ? void 0 : videoSize.width) {
82266
+ videoConstraints.width = { ideal: videoSize.width };
82267
+ }
81987
82268
  }
81988
82269
  return {
81989
82270
  video: videoConstraints,
@@ -81998,19 +82279,11 @@ var Camera = /** @class */ (function () {
81998
82279
  callback(undefined);
81999
82280
  return;
82000
82281
  }
82001
- if (imageWidth) {
82002
- videoEl.width = imageWidth;
82003
- }
82004
- else {
82005
- videoEl.style.width = "100%";
82006
- }
82007
- if (imageHeight) {
82008
- videoEl.height = imageHeight;
82009
- }
82010
- else {
82011
- videoEl.style.height = "100%";
82012
- }
82013
- var mediaConstraints = this.getMediaConstraints(videoEl);
82282
+ videoEl.style.width = "100%";
82283
+ videoEl.style.height = "auto";
82284
+ videoEl.style.height = "100%";
82285
+ videoEl.style.objectFit = "contain";
82286
+ var mediaConstraints = this.getMediaConstraints({ width: imageWidth, height: imageHeight });
82014
82287
  navigator.mediaDevices.getUserMedia(mediaConstraints).then(function (stream) {
82015
82288
  var _a;
82016
82289
  videoEl.srcObject = stream;
@@ -82025,6 +82298,9 @@ var Camera = /** @class */ (function () {
82025
82298
  callback(undefined);
82026
82299
  });
82027
82300
  };
82301
+ Camera.prototype.getImageSize = function (videoEl) {
82302
+ return { width: videoEl.videoWidth, height: videoEl.videoHeight };
82303
+ };
82028
82304
  Camera.prototype.snap = function (videoElementId, callback) {
82029
82305
  if ("undefined" === typeof document)
82030
82306
  return false;
@@ -82033,8 +82309,9 @@ var Camera = /** @class */ (function () {
82033
82309
  if (!videoEl)
82034
82310
  return false;
82035
82311
  var canvasEl = root.createElement("canvas");
82036
- canvasEl.height = videoEl.scrollHeight;
82037
- canvasEl.width = videoEl.scrollWidth;
82312
+ var imageSize = this.getImageSize(videoEl);
82313
+ canvasEl.height = imageSize.height;
82314
+ canvasEl.width = imageSize.width;
82038
82315
  var context = canvasEl.getContext("2d");
82039
82316
  /*
82040
82317
  if(this._facingMode == 'user'){
@@ -82894,7 +83171,9 @@ function increaseHeightByContent(element, getComputedStyle) {
82894
83171
  getComputedStyle = function (elt) { return window.getComputedStyle(elt); };
82895
83172
  var style = getComputedStyle(element);
82896
83173
  element.style.height = "auto";
82897
- element.style.height = (element.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth)) + "px";
83174
+ if (!!element.scrollHeight) {
83175
+ element.style.height = (element.scrollHeight + parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth)) + "px";
83176
+ }
82898
83177
  }
82899
83178
  function getOriginalEvent(event) {
82900
83179
  return event.originalEvent || event;