survey-react 1.11.6 → 1.11.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.6
2
+ * surveyjs - Survey JavaScript library v1.11.8
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -894,7 +894,7 @@ var BaseAction = /** @class */ (function (_super) {
894
894
  });
895
895
  Object.defineProperty(BaseAction.prototype, "canShrink", {
896
896
  get: function () {
897
- return !!this.iconName;
897
+ return !this.disableShrink && !!this.iconName;
898
898
  },
899
899
  enumerable: false,
900
900
  configurable: true
@@ -2298,6 +2298,8 @@ var Base = /** @class */ (function () {
2298
2298
  if (!prop || prop.isCustom && this.isCreating)
2299
2299
  return undefined;
2300
2300
  var dValue = prop.defaultValue;
2301
+ if (!!prop.defaultValueFunc)
2302
+ return dValue;
2301
2303
  if (!this.isPropertyEmpty(dValue) && !Array.isArray(dValue))
2302
2304
  return dValue;
2303
2305
  var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
@@ -2686,6 +2688,9 @@ var Base = /** @class */ (function () {
2686
2688
  }
2687
2689
  if (!!this.arraysInfo) {
2688
2690
  for (var key in this.arraysInfo) {
2691
+ var prop = this.getPropertyByName(key);
2692
+ if (!prop || !prop.isSerializable)
2693
+ continue;
2689
2694
  var items = this.getPropertyValue(key);
2690
2695
  if (!items || !items.length)
2691
2696
  continue;
@@ -8211,11 +8216,12 @@ var DropdownListModel = /** @class */ (function (_super) {
8211
8216
  _this.filterString = newValue;
8212
8217
  }
8213
8218
  };
8214
- _this.qustionPropertyChangedHandler = function (sender, options) {
8219
+ _this.questionPropertyChangedHandler = function (sender, options) {
8215
8220
  _this.onPropertyChangedHandler(sender, options);
8216
8221
  };
8217
8222
  _this.htmlCleanerElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_1__["DomDocumentHelper"].createElement("div");
8218
- question.onPropertyChanged.add(_this.qustionPropertyChangedHandler);
8223
+ _this.question.ariaExpanded = "false";
8224
+ question.onPropertyChanged.add(_this.questionPropertyChangedHandler);
8219
8225
  _this.showInputFieldComponent = _this.question.showInputFieldComponent;
8220
8226
  _this.listModel = _this.createListModel();
8221
8227
  _this.updateAfterListModelCreated(_this.listModel);
@@ -8325,6 +8331,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8325
8331
  _this.resetItemsSettings();
8326
8332
  }
8327
8333
  }
8334
+ _this.question.ariaExpanded = option.isVisible ? "true" : "false";
8328
8335
  _this.question.processPopupVisiblilityChanged(_this.popupModel, option.isVisible);
8329
8336
  });
8330
8337
  };
@@ -8632,7 +8639,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8632
8639
  return;
8633
8640
  this._popupModel.toggleVisibility();
8634
8641
  this.focusItemOnClickAndPopup();
8635
- this.question.focus();
8642
+ this.question.focusInputElement(false);
8636
8643
  };
8637
8644
  DropdownListModel.prototype.chevronPointerDown = function (event) {
8638
8645
  if (this._popupModel.isVisible) {
@@ -8800,8 +8807,8 @@ var DropdownListModel = /** @class */ (function (_super) {
8800
8807
  };
8801
8808
  DropdownListModel.prototype.dispose = function () {
8802
8809
  _super.prototype.dispose.call(this);
8803
- this.question && this.question.onPropertyChanged.remove(this.qustionPropertyChangedHandler);
8804
- this.qustionPropertyChangedHandler = undefined;
8810
+ this.question && this.question.onPropertyChanged.remove(this.questionPropertyChangedHandler);
8811
+ this.questionPropertyChangedHandler = undefined;
8805
8812
  if (!!this.listModel) {
8806
8813
  this.listModel.dispose();
8807
8814
  }
@@ -9953,8 +9960,8 @@ __webpack_require__.r(__webpack_exports__);
9953
9960
 
9954
9961
  var Version;
9955
9962
  var ReleaseDate;
9956
- Version = "" + "1.11.6";
9957
- ReleaseDate = "" + "2024-07-10";
9963
+ Version = "" + "1.11.8";
9964
+ ReleaseDate = "" + "2024-07-22";
9958
9965
  function checkLibraryVersion(ver, libraryName) {
9959
9966
  if (Version != ver) {
9960
9967
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -17080,7 +17087,11 @@ function getQuestionValueByContext(context, name) {
17080
17087
  }
17081
17088
  function displayValue(params) {
17082
17089
  var q = getQuestionValueByContext(this, params[0]);
17083
- return q ? q.displayValue : "";
17090
+ if (!q)
17091
+ return "";
17092
+ if (params.length > 1 && !!params[1])
17093
+ return q.getDisplayValue(true, params[1]);
17094
+ return q.displayValue;
17084
17095
  }
17085
17096
  FunctionFactory.Instance.register("displayValue", displayValue);
17086
17097
  function propertyValue(params) {
@@ -19590,9 +19601,10 @@ function property(options) {
19590
19601
  },
19591
19602
  set: function (val) {
19592
19603
  var newValue = processComputedUpdater(this, val);
19604
+ var prevValue = this.getPropertyValue(key);
19593
19605
  this.setPropertyValue(key, newValue);
19594
19606
  if (!!options && options.onSet) {
19595
- options.onSet(newValue, this);
19607
+ options.onSet(newValue, this, prevValue);
19596
19608
  }
19597
19609
  },
19598
19610
  });
@@ -19785,7 +19797,7 @@ var JsonObjectProperty = /** @class */ (function () {
19785
19797
  }
19786
19798
  if (this.isLocalizable)
19787
19799
  return value === null || value === undefined;
19788
- return ((value === false && (this.type == "boolean" || this.type == "switch")) ||
19800
+ return ((value === false && (this.type == "boolean" || this.type == "switch") && !this.defaultValueFunc) ||
19789
19801
  value === "" || _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value));
19790
19802
  };
19791
19803
  JsonObjectProperty.prototype.getSerializableValue = function (obj) {
@@ -30787,7 +30799,6 @@ var InputElementAdapter = /** @class */ (function () {
30787
30799
  this.clickHandler = function (event) {
30788
30800
  if (_this.inputElement.value == _this.inputMaskInstance.getMaskedValue("")) {
30789
30801
  _this.inputElement.setSelectionRange(0, 0);
30790
- event.preventDefault();
30791
30802
  }
30792
30803
  };
30793
30804
  this.beforeInputHandler = function (event) {
@@ -30799,6 +30810,10 @@ var InputElementAdapter = /** @class */ (function () {
30799
30810
  event.preventDefault();
30800
30811
  }
30801
30812
  };
30813
+ this.changeHandler = function (event) {
30814
+ var result = _this.inputMaskInstance.processInput({ prevValue: "", insertedChars: event.target.value, selectionStart: 0, selectionEnd: 0 });
30815
+ _this.inputElement.value = result.value;
30816
+ };
30802
30817
  var _value = value;
30803
30818
  if (_value === null || _value === undefined) {
30804
30819
  _value = "";
@@ -30832,6 +30847,7 @@ var InputElementAdapter = /** @class */ (function () {
30832
30847
  this.inputElement.addEventListener("beforeinput", this.beforeInputHandler);
30833
30848
  this.inputElement.addEventListener("click", this.clickHandler);
30834
30849
  this.inputElement.addEventListener("focus", this.clickHandler);
30850
+ this.inputElement.addEventListener("change", this.changeHandler);
30835
30851
  }
30836
30852
  };
30837
30853
  InputElementAdapter.prototype.removeInputEventListener = function () {
@@ -30839,6 +30855,7 @@ var InputElementAdapter = /** @class */ (function () {
30839
30855
  this.inputElement.removeEventListener("beforeinput", this.beforeInputHandler);
30840
30856
  this.inputElement.removeEventListener("click", this.clickHandler);
30841
30857
  this.inputElement.removeEventListener("focus", this.clickHandler);
30858
+ this.inputElement.removeEventListener("change", this.changeHandler);
30842
30859
  }
30843
30860
  };
30844
30861
  InputElementAdapter.prototype.dispose = function () {
@@ -32932,6 +32949,12 @@ var PageModel = /** @class */ (function (_super) {
32932
32949
  enumerable: false,
32933
32950
  configurable: true
32934
32951
  });
32952
+ PageModel.prototype.getMaxTimeToFinish = function () {
32953
+ if (this.maxTimeToFinish !== 0)
32954
+ return this.maxTimeToFinish;
32955
+ var res = !!this.survey ? this.survey.maxTimeToFinishPage : 0;
32956
+ return res > 0 ? res : 0;
32957
+ };
32935
32958
  PageModel.prototype.onNumChanged = function (value) { };
32936
32959
  PageModel.prototype.onVisibleChanged = function () {
32937
32960
  if (this.isRandomizing)
@@ -32993,6 +33016,82 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("page", [
32993
33016
  }, "panelbase");
32994
33017
 
32995
33018
 
33019
+ /***/ }),
33020
+
33021
+ /***/ "./src/panel-layout-column.ts":
33022
+ /*!************************************!*\
33023
+ !*** ./src/panel-layout-column.ts ***!
33024
+ \************************************/
33025
+ /*! exports provided: PanelLayoutColumnModel */
33026
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
33027
+
33028
+ "use strict";
33029
+ __webpack_require__.r(__webpack_exports__);
33030
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelLayoutColumnModel", function() { return PanelLayoutColumnModel; });
33031
+ /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
33032
+ /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
33033
+ var __extends = (undefined && undefined.__extends) || (function () {
33034
+ var extendStatics = function (d, b) {
33035
+ extendStatics = Object.setPrototypeOf ||
33036
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33037
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
33038
+ return extendStatics(d, b);
33039
+ };
33040
+ return function (d, b) {
33041
+ if (typeof b !== "function" && b !== null)
33042
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33043
+ extendStatics(d, b);
33044
+ function __() { this.constructor = d; }
33045
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33046
+ };
33047
+ })();
33048
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33049
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33050
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33051
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
33052
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33053
+ };
33054
+
33055
+
33056
+ var PanelLayoutColumnModel = /** @class */ (function (_super) {
33057
+ __extends(PanelLayoutColumnModel, _super);
33058
+ function PanelLayoutColumnModel(width, questionTitleWidth) {
33059
+ var _this = _super.call(this) || this;
33060
+ _this.effectiveWidth = width;
33061
+ _this.questionTitleWidth = questionTitleWidth;
33062
+ return _this;
33063
+ }
33064
+ PanelLayoutColumnModel.prototype.getType = function () {
33065
+ return "panellayoutcolumn";
33066
+ };
33067
+ PanelLayoutColumnModel.prototype.isEmpty = function () {
33068
+ return !this.width && !this.questionTitleWidth;
33069
+ };
33070
+ __decorate([
33071
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
33072
+ ], PanelLayoutColumnModel.prototype, "width", void 0);
33073
+ __decorate([
33074
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
33075
+ onSet: function (newValue, target, prevVal) {
33076
+ if (newValue !== prevVal) {
33077
+ target.width = newValue;
33078
+ }
33079
+ }
33080
+ })
33081
+ ], PanelLayoutColumnModel.prototype, "effectiveWidth", void 0);
33082
+ __decorate([
33083
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
33084
+ ], PanelLayoutColumnModel.prototype, "questionTitleWidth", void 0);
33085
+ return PanelLayoutColumnModel;
33086
+ }(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
33087
+
33088
+ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panellayoutcolumn", [
33089
+ { name: "effectiveWidth:number", isSerializable: false, minValue: 0 },
33090
+ { name: "width:number", visible: false },
33091
+ "questionTitleWidth",
33092
+ ], function (value) { return new PanelLayoutColumnModel(); });
33093
+
33094
+
32996
33095
  /***/ }),
32997
33096
 
32998
33097
  /***/ "./src/panel.ts":
@@ -33021,6 +33120,7 @@ __webpack_require__.r(__webpack_exports__);
33021
33120
  /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
33022
33121
  /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
33023
33122
  /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./page */ "./src/page.ts");
33123
+ /* harmony import */ var _panel_layout_column__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./panel-layout-column */ "./src/panel-layout-column.ts");
33024
33124
  var __extends = (undefined && undefined.__extends) || (function () {
33025
33125
  var extendStatics = function (d, b) {
33026
33126
  extendStatics = Object.setPrototypeOf ||
@@ -33061,6 +33161,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
33061
33161
 
33062
33162
 
33063
33163
 
33164
+
33064
33165
  var QuestionRowModel = /** @class */ (function (_super) {
33065
33166
  __extends(QuestionRowModel, _super);
33066
33167
  function QuestionRowModel(panel) {
@@ -33337,10 +33438,18 @@ var PanelModelBase = /** @class */ (function (_super) {
33337
33438
  var _this = _super.call(this, name) || this;
33338
33439
  _this.isQuestionsReady = false;
33339
33440
  _this.questionsValue = new Array();
33441
+ _this._columns = undefined;
33442
+ _this._columnsReady = false;
33340
33443
  _this.rowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getRowsAnimationOptions(), function (value) {
33341
33444
  _this.setPropertyValue("visibleRows", value);
33342
33445
  }, function () { return _this.visibleRows; });
33343
33446
  _this.isRandomizing = false;
33447
+ _this.onColumnPropertyValueChangedCallback = function (name, oldValue, newValue, sender, arrayChanges) {
33448
+ if (_this._columnsReady) {
33449
+ _this.updateColumnWidth(_this.layoutColumns);
33450
+ _this.updateRootStyle();
33451
+ }
33452
+ };
33344
33453
  _this.locCountRowUpdates = 0;
33345
33454
  _this.createNewArray("rows", function (el, index) { _this.onAddRow(el); }, function (el) { _this.onRemoveRow(el); });
33346
33455
  _this.createNewArray("visibleRows");
@@ -33381,7 +33490,8 @@ var PanelModelBase = /** @class */ (function (_super) {
33381
33490
  isAnimationEnabled: function () { return _this.animationAllowed; },
33382
33491
  getAnimatedElement: function (row) { return row.getRootElement(); },
33383
33492
  getLeaveOptions: function (_) {
33384
- return { cssClass: _this.cssClasses.rowFadeOut,
33493
+ return {
33494
+ cssClass: _this.cssClasses.rowFadeOut,
33385
33495
  onBeforeRunAnimation: beforeRunAnimation
33386
33496
  };
33387
33497
  },
@@ -33426,10 +33536,14 @@ var PanelModelBase = /** @class */ (function (_super) {
33426
33536
  this.releaseAnimations();
33427
33537
  };
33428
33538
  PanelModelBase.prototype.endLoadingFromJson = function () {
33539
+ var _this = this;
33429
33540
  _super.prototype.endLoadingFromJson.call(this);
33430
33541
  this.updateDescriptionVisibility(this.description);
33431
33542
  this.markQuestionListDirty();
33432
33543
  this.onRowsChanged();
33544
+ this.layoutColumns.forEach(function (col) {
33545
+ col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
33546
+ });
33433
33547
  };
33434
33548
  Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
33435
33549
  get: function () {
@@ -34017,6 +34131,23 @@ var PanelModelBase = /** @class */ (function (_super) {
34017
34131
  this.parent.validateContainerOnly();
34018
34132
  }
34019
34133
  };
34134
+ PanelModelBase.prototype.onQuestionValueChanged = function (el) {
34135
+ var index = this.questions.indexOf(el);
34136
+ if (index < 0)
34137
+ return;
34138
+ var dif = 5;
34139
+ var max = this.questions.length - 1;
34140
+ var start = index - dif > 0 ? index - dif : 0;
34141
+ var end = index + dif < max ? index + dif : max;
34142
+ for (var i = start; i <= end; i++) {
34143
+ if (i === index)
34144
+ continue;
34145
+ var q = this.questions[i];
34146
+ if (q.errors.length > 0 && q.validate(false)) {
34147
+ q.validate(true);
34148
+ }
34149
+ }
34150
+ };
34020
34151
  PanelModelBase.prototype.hasErrorsInPanels = function (rec) {
34021
34152
  var errors = [];
34022
34153
  this.hasRequiredError(rec, errors);
@@ -34195,6 +34326,51 @@ var PanelModelBase = /** @class */ (function (_super) {
34195
34326
  }
34196
34327
  }
34197
34328
  };
34329
+ PanelModelBase.prototype.calcMaxRowColSpan = function () {
34330
+ var maxRowColSpan = 0;
34331
+ this.rows.forEach(function (row) {
34332
+ var curRowSpan = 0;
34333
+ var userDefinedRow = false;
34334
+ row.elements.forEach(function (el) {
34335
+ if (!!el.width) {
34336
+ userDefinedRow = true;
34337
+ }
34338
+ curRowSpan += (el.colSpan || 1);
34339
+ });
34340
+ if (!userDefinedRow && curRowSpan > maxRowColSpan)
34341
+ maxRowColSpan = curRowSpan;
34342
+ });
34343
+ return maxRowColSpan;
34344
+ };
34345
+ PanelModelBase.prototype.updateColumnWidth = function (columns) {
34346
+ var remainingSpace = 0, remainingColCount = 0;
34347
+ columns.forEach(function (col) {
34348
+ if (!col.width) {
34349
+ remainingColCount++;
34350
+ }
34351
+ else {
34352
+ remainingSpace += col.width;
34353
+ col.setPropertyValue("effectiveWidth", col.width);
34354
+ }
34355
+ });
34356
+ if (!!remainingColCount) {
34357
+ var oneColumnWidth = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["roundTo2Decimals"])((100 - remainingSpace) / remainingColCount);
34358
+ for (var index = 0; index < columns.length; index++) {
34359
+ if (!columns[index].width) {
34360
+ columns[index].setPropertyValue("effectiveWidth", oneColumnWidth);
34361
+ }
34362
+ }
34363
+ }
34364
+ };
34365
+ PanelModelBase.prototype.updateColumns = function () {
34366
+ this._columns = undefined;
34367
+ this.updateRootStyle();
34368
+ };
34369
+ PanelModelBase.prototype.updateRootStyle = function () {
34370
+ var _a;
34371
+ _super.prototype.updateRootStyle.call(this);
34372
+ (_a = this.elements) === null || _a === void 0 ? void 0 : _a.forEach(function (el) { return el.updateRootStyle(); });
34373
+ };
34198
34374
  PanelModelBase.prototype.updateCustomWidgets = function () {
34199
34375
  for (var i = 0; i < this.elements.length; i++) {
34200
34376
  this.elements[i].updateCustomWidgets();
@@ -34255,6 +34431,69 @@ var PanelModelBase = /** @class */ (function (_super) {
34255
34431
  PanelModelBase.prototype.getQuestionTitleWidth = function () {
34256
34432
  return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
34257
34433
  };
34434
+ Object.defineProperty(PanelModelBase.prototype, "columns", {
34435
+ get: function () {
34436
+ if (!this._columns) {
34437
+ this.generateColumns();
34438
+ }
34439
+ return this._columns || [];
34440
+ },
34441
+ enumerable: false,
34442
+ configurable: true
34443
+ });
34444
+ PanelModelBase.prototype.generateColumns = function () {
34445
+ var maxRowColSpan = this.calcMaxRowColSpan();
34446
+ var columns = [].concat(this.layoutColumns);
34447
+ if (maxRowColSpan <= this.layoutColumns.length) {
34448
+ columns = this.layoutColumns.slice(0, maxRowColSpan);
34449
+ }
34450
+ else {
34451
+ for (var index = this.layoutColumns.length; index < maxRowColSpan; index++) {
34452
+ var newCol = new _panel_layout_column__WEBPACK_IMPORTED_MODULE_14__["PanelLayoutColumnModel"]();
34453
+ newCol.onPropertyValueChangedCallback = this.onColumnPropertyValueChangedCallback;
34454
+ columns.push(newCol);
34455
+ }
34456
+ }
34457
+ this._columns = columns;
34458
+ try {
34459
+ this._columnsReady = false;
34460
+ this.updateColumnWidth(columns);
34461
+ }
34462
+ finally {
34463
+ this._columnsReady = true;
34464
+ }
34465
+ this.layoutColumns = columns;
34466
+ };
34467
+ PanelModelBase.prototype.getColumsForElement = function (el) {
34468
+ var row = this.findRowByElement(el);
34469
+ if (!row || !this.survey || !this.survey.gridLayoutEnabled)
34470
+ return [];
34471
+ var lastExpandableElementIndex = row.elements.length - 1;
34472
+ while (lastExpandableElementIndex >= 0) {
34473
+ if (!row.elements[lastExpandableElementIndex].getPropertyValueWithoutDefault("colSpan")) {
34474
+ break;
34475
+ }
34476
+ lastExpandableElementIndex--;
34477
+ }
34478
+ var elementIndex = row.elements.indexOf(el);
34479
+ var startIndex = 0;
34480
+ for (var index = 0; index < elementIndex; index++) {
34481
+ startIndex += row.elements[index].colSpan;
34482
+ }
34483
+ var currentColSpan = el.getPropertyValueWithoutDefault("colSpan");
34484
+ if (!currentColSpan && elementIndex === lastExpandableElementIndex) {
34485
+ var usedSpans = 0;
34486
+ for (var index = 0; index < row.elements.length; index++) {
34487
+ if (index !== lastExpandableElementIndex) {
34488
+ usedSpans += row.elements[index].colSpan;
34489
+ }
34490
+ }
34491
+ currentColSpan = this.columns.length - usedSpans;
34492
+ }
34493
+ var result = this.columns.slice(startIndex, startIndex + (currentColSpan || 1));
34494
+ el.setPropertyValue("effectiveColSpan", result.length);
34495
+ return result;
34496
+ };
34258
34497
  PanelModelBase.prototype.getStartIndex = function () {
34259
34498
  if (!!this.parent)
34260
34499
  return this.parent.getQuestionStartIndex();
@@ -34339,6 +34578,7 @@ var PanelModelBase = /** @class */ (function (_super) {
34339
34578
  return;
34340
34579
  this.blockAnimations();
34341
34580
  this.setArrayPropertyDirectly("rows", this.buildRows());
34581
+ this.updateColumns();
34342
34582
  this.releaseAnimations();
34343
34583
  };
34344
34584
  PanelModelBase.prototype.blockRowsUpdates = function () {
@@ -34538,6 +34778,7 @@ var PanelModelBase = /** @class */ (function (_super) {
34538
34778
  if (!this.canBuildRows())
34539
34779
  return;
34540
34780
  this.updateRowsRemoveElementFromRow(element, this.findRowByElement(element));
34781
+ this.updateColumns();
34541
34782
  };
34542
34783
  PanelModelBase.prototype.updateRowsRemoveElementFromRow = function (element, row) {
34543
34784
  if (!row || !row.panel)
@@ -34765,6 +35006,7 @@ var PanelModelBase = /** @class */ (function (_super) {
34765
35006
  if (this.wasRendered) {
34766
35007
  element.onFirstRendering();
34767
35008
  }
35009
+ this.updateColumns();
34768
35010
  return true;
34769
35011
  };
34770
35012
  PanelModelBase.prototype.insertElement = function (element, dest, location) {
@@ -34881,6 +35123,7 @@ var PanelModelBase = /** @class */ (function (_super) {
34881
35123
  return false;
34882
35124
  }
34883
35125
  this.elements.splice(index, 1);
35126
+ this.updateColumns();
34884
35127
  return true;
34885
35128
  };
34886
35129
  PanelModelBase.prototype.removeQuestion = function (question) {
@@ -34993,6 +35236,16 @@ var PanelModelBase = /** @class */ (function (_super) {
34993
35236
  PanelModelBase.prototype.getCssError = function (cssClasses) {
34994
35237
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(cssClasses.error.root).toString();
34995
35238
  };
35239
+ PanelModelBase.prototype.getSerializableColumnsValue = function () {
35240
+ var tailIndex = -1;
35241
+ for (var index = this.layoutColumns.length - 1; index >= 0; index--) {
35242
+ if (!this.layoutColumns[index].isEmpty()) {
35243
+ tailIndex = index;
35244
+ break;
35245
+ }
35246
+ }
35247
+ return this.layoutColumns.slice(0, tailIndex + 1);
35248
+ };
34996
35249
  PanelModelBase.prototype.dispose = function () {
34997
35250
  _super.prototype.dispose.call(this);
34998
35251
  if (this.rows) {
@@ -35007,6 +35260,9 @@ var PanelModelBase = /** @class */ (function (_super) {
35007
35260
  this.elements.splice(0, this.elements.length);
35008
35261
  };
35009
35262
  PanelModelBase.panelCounter = 100;
35263
+ __decorate([
35264
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])()
35265
+ ], PanelModelBase.prototype, "layoutColumns", void 0);
35010
35266
  __decorate([
35011
35267
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
35012
35268
  ], PanelModelBase.prototype, "showTitle", void 0);
@@ -35038,6 +35294,10 @@ var PanelModel = /** @class */ (function (_super) {
35038
35294
  }
35039
35295
  });
35040
35296
  _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.onIndentChanged(); });
35297
+ _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
35298
+ _this.registerPropertyChangedHandlers(["title"], function () {
35299
+ _this.calcHasTextInTitle();
35300
+ });
35041
35301
  return _this;
35042
35302
  }
35043
35303
  PanelModel.prototype.getType = function () {
@@ -35057,13 +35317,25 @@ var PanelModel = /** @class */ (function (_super) {
35057
35317
  }
35058
35318
  return _super.prototype.getSurvey.call(this, live);
35059
35319
  };
35320
+ Object.defineProperty(PanelModel.prototype, "hasTextInTitle", {
35321
+ get: function () {
35322
+ return this.getPropertyValue("hasTextInTitle");
35323
+ },
35324
+ enumerable: false,
35325
+ configurable: true
35326
+ });
35327
+ PanelModel.prototype.calcHasTextInTitle = function () {
35328
+ this.setPropertyValue("hasTextInTitle", !!this.title);
35329
+ };
35060
35330
  PanelModel.prototype.onSurveyLoad = function () {
35061
35331
  _super.prototype.onSurveyLoad.call(this);
35062
35332
  this.onIndentChanged();
35333
+ this.calcHasTextInTitle();
35063
35334
  };
35064
35335
  PanelModel.prototype.onSetData = function () {
35065
35336
  _super.prototype.onSetData.call(this);
35066
35337
  this.onIndentChanged();
35338
+ this.calcHasTextInTitle();
35067
35339
  };
35068
35340
  Object.defineProperty(PanelModel.prototype, "isPanel", {
35069
35341
  get: function () {
@@ -35369,7 +35641,7 @@ var PanelModel = /** @class */ (function (_super) {
35369
35641
  get: function () {
35370
35642
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
35371
35643
  .append(this.getCssTitle(this.cssClasses.panel))
35372
- .append(this.cssClasses.panel.titleHidden, !this.title && this.isDesignMode)
35644
+ .append(this.cssClasses.panel.titleHidden, !this.hasTextInTitle && this.isDesignMode)
35373
35645
  .toString();
35374
35646
  },
35375
35647
  enumerable: false,
@@ -35473,6 +35745,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
35473
35745
  default: "default",
35474
35746
  choices: ["default", "top", "bottom", "left", "hidden"],
35475
35747
  },
35748
+ {
35749
+ name: "layoutColumns:panellayoutcolumns",
35750
+ className: "panellayoutcolumn", isArray: true,
35751
+ onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); }
35752
+ },
35476
35753
  { name: "title:text", serializationProperty: "locTitle" },
35477
35754
  { name: "description:text", serializationProperty: "locDescription" },
35478
35755
  {
@@ -35499,6 +35776,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panel", [
35499
35776
  "width",
35500
35777
  { name: "minWidth", defaultFunc: function () { return "auto"; } },
35501
35778
  { name: "maxWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].maxWidth; } },
35779
+ {
35780
+ name: "colSpan:number", visible: false,
35781
+ onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
35782
+ },
35783
+ { name: "effectiveColSpan:number", minValue: 1, isSerializable: false },
35502
35784
  { name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
35503
35785
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
35504
35786
  {
@@ -38819,6 +39101,7 @@ var Question = /** @class */ (function (_super) {
38819
39101
  _this.updateQuestionCss();
38820
39102
  });
38821
39103
  _this.registerPropertyChangedHandlers(["isMobile"], function () { _this.onMobileChanged(); });
39104
+ _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
38822
39105
  return _this;
38823
39106
  }
38824
39107
  Question.getQuestionId = function () {
@@ -39426,14 +39709,31 @@ var Question = /** @class */ (function (_super) {
39426
39709
  Object.defineProperty(Question.prototype, "titleWidth", {
39427
39710
  get: function () {
39428
39711
  if (this.getTitleLocation() === "left") {
39429
- if (!!this.parent)
39430
- return this.parent.getQuestionTitleWidth();
39712
+ var columns = this.parent.getColumsForElement(this);
39713
+ var columnCount = columns.length;
39714
+ if (columnCount !== 0 && !!columns[0].questionTitleWidth)
39715
+ return columns[0].questionTitleWidth;
39716
+ var percentWidth = this.getPercentQuestionTitleWidth();
39717
+ if (!percentWidth && !!this.parent) {
39718
+ var width = this.parent.getQuestionTitleWidth();
39719
+ if (width && !isNaN(width))
39720
+ width = width + "px";
39721
+ return width;
39722
+ }
39723
+ return (percentWidth / (columnCount || 1)) + "%";
39431
39724
  }
39432
39725
  return undefined;
39433
39726
  },
39434
39727
  enumerable: false,
39435
39728
  configurable: true
39436
39729
  });
39730
+ Question.prototype.getPercentQuestionTitleWidth = function () {
39731
+ var width = !!this.parent && this.parent.getQuestionTitleWidth();
39732
+ if (!!width && width[width.length - 1] === "%") {
39733
+ return parseInt(width);
39734
+ }
39735
+ return undefined;
39736
+ };
39437
39737
  /**
39438
39738
  * Returns title location calculated based on the question's `titleLocation` property and the `questionTitleLocation` property of the question's containers (survey, page, or panel).
39439
39739
  * @see titleLocation
@@ -40117,9 +40417,10 @@ var Question = /** @class */ (function (_super) {
40117
40417
  this.expandAllParents();
40118
40418
  this.survey.scrollElementToTop(this, this, null, this.id, scrollIfVisible);
40119
40419
  }
40120
- var id = !onError
40121
- ? this.getFirstInputElementId()
40122
- : this.getFirstErrorInputElementId();
40420
+ this.focusInputElement(onError);
40421
+ };
40422
+ Question.prototype.focusInputElement = function (onError) {
40423
+ var id = !onError ? this.getFirstInputElementId() : this.getFirstErrorInputElementId();
40123
40424
  if (_survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"].FocusElement(id)) {
40124
40425
  this.fireCallback(this.focusCallback);
40125
40426
  }
@@ -40569,14 +40870,23 @@ var Question = /** @class */ (function (_super) {
40569
40870
  Question.prototype.getFilteredName = function () { return this.getValueName(); };
40570
40871
  Object.defineProperty(Question.prototype, "valueForSurvey", {
40571
40872
  get: function () {
40572
- if (!!this.valueToDataCallback) {
40573
- return this.valueToDataCallback(this.value);
40574
- }
40575
- return this.value;
40873
+ return this.valueForSurveyCore(this.value);
40576
40874
  },
40577
40875
  enumerable: false,
40578
40876
  configurable: true
40579
40877
  });
40878
+ Question.prototype.valueForSurveyCore = function (val) {
40879
+ if (!!this.valueToDataCallback) {
40880
+ return this.valueToDataCallback(val);
40881
+ }
40882
+ return val;
40883
+ };
40884
+ Question.prototype.valueFromDataCore = function (val) {
40885
+ if (!!this.valueFromDataCallback) {
40886
+ return this.valueFromDataCallback(val);
40887
+ }
40888
+ return val;
40889
+ };
40580
40890
  /**
40581
40891
  * Sets the question's `value` and `comment` properties to `undefined`.
40582
40892
  * @see value
@@ -41398,6 +41708,9 @@ var Question = /** @class */ (function (_super) {
41398
41708
  this.updateQuestionCss();
41399
41709
  }
41400
41710
  this.isOldAnswered = undefined;
41711
+ if (this.parent) {
41712
+ this.parent.onQuestionValueChanged(this);
41713
+ }
41401
41714
  };
41402
41715
  Question.prototype.checkIsValueCorrect = function (val) {
41403
41716
  var res = this.isValueEmpty(val, !this.allowSpaceAsAnswer) || this.isNewValueCorrect(val);
@@ -41483,9 +41796,7 @@ var Question = /** @class */ (function (_super) {
41483
41796
  var _this = this;
41484
41797
  if (clearData === void 0) { clearData = false; }
41485
41798
  newValue = this.getUnbindValue(newValue);
41486
- if (!!this.valueFromDataCallback) {
41487
- newValue = this.valueFromDataCallback(newValue);
41488
- }
41799
+ newValue = this.valueFromDataCore(newValue);
41489
41800
  if (!this.checkIsValueCorrect(newValue))
41490
41801
  return;
41491
41802
  var isEmpty = this.isValueEmpty(newValue);
@@ -41841,13 +42152,6 @@ var Question = /** @class */ (function (_super) {
41841
42152
  enumerable: false,
41842
42153
  configurable: true
41843
42154
  });
41844
- Object.defineProperty(Question.prototype, "ariaExpanded", {
41845
- get: function () {
41846
- return null;
41847
- },
41848
- enumerable: false,
41849
- configurable: true
41850
- });
41851
42155
  Object.defineProperty(Question.prototype, "ariaErrormessage", {
41852
42156
  get: function () {
41853
42157
  if (this.isNewA11yStructure)
@@ -41934,6 +42238,9 @@ var Question = /** @class */ (function (_super) {
41934
42238
  __decorate([
41935
42239
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
41936
42240
  ], Question.prototype, "forceIsInputReadOnly", void 0);
42241
+ __decorate([
42242
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
42243
+ ], Question.prototype, "ariaExpanded", void 0);
41937
42244
  __decorate([
41938
42245
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true, onSet: function (val, target) { return target.calcRenderedCommentPlaceholder(); } })
41939
42246
  ], Question.prototype, "commentPlaceholder", void 0);
@@ -41968,6 +42275,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
41968
42275
  { name: "width" },
41969
42276
  { name: "minWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].minWidth; } },
41970
42277
  { name: "maxWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].maxWidth; } },
42278
+ {
42279
+ name: "colSpan:number", visible: false,
42280
+ onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
42281
+ },
42282
+ { name: "effectiveColSpan:number", minValue: 1, isSerializable: false },
41971
42283
  { name: "startWithNewLine:boolean", default: true, layout: "row" },
41972
42284
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], layout: "row" },
41973
42285
  {
@@ -44672,6 +44984,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("selectbase", [
44672
44984
  return !obj.choicesFromQuestion;
44673
44985
  },
44674
44986
  },
44987
+ { name: "defaultValue:value", visibleIf: function (obj) { return !obj.choicesFromQuestion; }, dependsOn: "choicesFromQuestion" },
44988
+ { name: "correctAnswer:value", visibleIf: function (obj) { return !obj.choicesFromQuestion; }, dependsOn: "choicesFromQuestion" },
44675
44989
  { name: "separateSpecialChoices:boolean", visible: false },
44676
44990
  { name: "showOtherItem:boolean", alternativeName: "hasOther" },
44677
44991
  { name: "showNoneItem:boolean", alternativeName: "hasNone" },
@@ -44731,8 +45045,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("selectbase", [
44731
45045
  default: "default",
44732
45046
  choices: ["default", true, false],
44733
45047
  visible: false,
44734
- },
44735
- // { name: "itemComponent", visible: false }
45048
+ }
44736
45049
  ], null, "question");
44737
45050
  _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("checkboxbase", [
44738
45051
  {
@@ -46389,7 +46702,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
46389
46702
  * @see allowResize
46390
46703
  */
46391
46704
  get: function () {
46392
- return this.getPropertyValue("autoGrow") || (this.survey && this.survey.autoGrowComment);
46705
+ return this.getPropertyValue("autoGrow");
46393
46706
  },
46394
46707
  set: function (val) {
46395
46708
  this.setPropertyValue("autoGrow", val);
@@ -46397,9 +46710,16 @@ var QuestionCommentModel = /** @class */ (function (_super) {
46397
46710
  enumerable: false,
46398
46711
  configurable: true
46399
46712
  });
46713
+ Object.defineProperty(QuestionCommentModel.prototype, "renderedAutoGrow", {
46714
+ get: function () {
46715
+ var autoGrow = this.autoGrow;
46716
+ return autoGrow === undefined && this.survey ? this.survey.autoGrowComment : !!autoGrow;
46717
+ },
46718
+ enumerable: false,
46719
+ configurable: true
46720
+ });
46400
46721
  Object.defineProperty(QuestionCommentModel.prototype, "allowResize", {
46401
46722
  /**
46402
- * Specifies whether to display a resize handle for the comment area.
46403
46723
  *
46404
46724
  * Default value: `true` (inherited from `SurveyModel`'s [`allowResizeComment`](https://surveyjs.io/form-library/documentation/surveymodel#allowResizeComment) property)
46405
46725
  * @see autoGrow
@@ -46415,7 +46735,9 @@ var QuestionCommentModel = /** @class */ (function (_super) {
46415
46735
  });
46416
46736
  Object.defineProperty(QuestionCommentModel.prototype, "renderedAllowResize", {
46417
46737
  get: function () {
46418
- return this.allowResize && (this.survey && this.survey.allowResizeComment) && !this.isPreviewStyle && !this.isReadOnlyStyle;
46738
+ var res = this.allowResize;
46739
+ var allowResize = res === undefined && this.survey ? this.survey.allowResizeComment : !!res;
46740
+ return allowResize && !this.isPreviewStyle && !this.isReadOnlyStyle;
46419
46741
  },
46420
46742
  enumerable: false,
46421
46743
  configurable: true
@@ -46438,7 +46760,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
46438
46760
  };
46439
46761
  QuestionCommentModel.prototype.updateElement = function () {
46440
46762
  var _this = this;
46441
- if (this.element && this.autoGrow) {
46763
+ if (this.element && this.renderedAutoGrow) {
46442
46764
  setTimeout(function () { return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["increaseHeightByContent"])(_this.element); }, 1);
46443
46765
  }
46444
46766
  };
@@ -46499,8 +46821,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("comment", [
46499
46821
  default: "default",
46500
46822
  choices: ["default", "onBlur", "onTyping"],
46501
46823
  },
46502
- { name: "autoGrow:boolean" },
46503
- { name: "allowResize:boolean", default: true },
46824
+ { name: "autoGrow:boolean", defaultFunc: function () { return undefined; } },
46825
+ { name: "allowResize:boolean", defaultFunc: function () { return undefined; } },
46504
46826
  { name: "acceptCarriageReturn:boolean", default: true, visible: false }
46505
46827
  ], function () {
46506
46828
  return new QuestionCommentModel("");
@@ -47005,6 +47327,10 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
47005
47327
  QuestionCustomModelBase.prototype.getQuestionTitleWidth = function () {
47006
47328
  return undefined;
47007
47329
  };
47330
+ QuestionCustomModelBase.prototype.getColumsForElement = function (el) {
47331
+ return [];
47332
+ };
47333
+ QuestionCustomModelBase.prototype.updateColumns = function () { };
47008
47334
  QuestionCustomModelBase.prototype.getQuestionStartIndex = function () {
47009
47335
  return this.getStartIndex();
47010
47336
  };
@@ -47028,6 +47354,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
47028
47354
  QuestionCustomModelBase.prototype.validateContainerOnly = function () {
47029
47355
  // do nothing
47030
47356
  };
47357
+ QuestionCustomModelBase.prototype.onQuestionValueChanged = function (el) {
47358
+ // do nothing
47359
+ };
47031
47360
  QuestionCustomModelBase.prototype.getQuestionErrorLocation = function () {
47032
47361
  return this.getErrorLocation();
47033
47362
  };
@@ -47964,14 +48293,6 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
47964
48293
  enumerable: false,
47965
48294
  configurable: true
47966
48295
  });
47967
- Object.defineProperty(QuestionDropdownModel.prototype, "ariaExpanded", {
47968
- get: function () {
47969
- var popupModel = this.popupModel;
47970
- return !!popupModel && popupModel.isVisible ? "true" : "false";
47971
- },
47972
- enumerable: false,
47973
- configurable: true
47974
- });
47975
48296
  QuestionDropdownModel.prototype.onOpenedCallBack = function () {
47976
48297
  this.onOpened.fire(this, { question: this, choices: this.choices });
47977
48298
  };
@@ -48019,6 +48340,12 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
48019
48340
  this.lastSelectedItemValue = null;
48020
48341
  (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
48021
48342
  };
48343
+ QuestionDropdownModel.prototype.afterRenderCore = function (el) {
48344
+ _super.prototype.afterRenderCore.call(this, el);
48345
+ if (!!this.dropdownListModelValue) {
48346
+ this.dropdownListModelValue.clear();
48347
+ }
48348
+ };
48022
48349
  QuestionDropdownModel.prototype.onClick = function (e) {
48023
48350
  !!this.onOpenedCallBack && this.onOpenedCallBack();
48024
48351
  };
@@ -53648,6 +53975,9 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
53648
53975
  enumerable: false,
53649
53976
  configurable: true
53650
53977
  });
53978
+ QuestionMatrixDropdownModelBase.prototype.isSelectCellType = function () {
53979
+ return _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].isDescendantOf(this.cellType, "selectbase");
53980
+ };
53651
53981
  QuestionMatrixDropdownModelBase.prototype.updateColumnsCellType = function () {
53652
53982
  for (var i = 0; i < this.columns.length; i++) {
53653
53983
  this.columns[i].defaultCellTypeChanged();
@@ -53802,13 +54132,17 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
53802
54132
  break;
53803
54133
  columnName = path[i] + columnName;
53804
54134
  }
54135
+ var question = undefined;
53805
54136
  var column = this.getColumnByName(columnName);
53806
- if (!column)
53807
- return null;
53808
- var question = column.createCellQuestion(null);
53809
- if (!question)
53810
- return null;
53811
- return question.getConditionJson(operator);
54137
+ if (!!column) {
54138
+ question = column.createCellQuestion(null);
54139
+ }
54140
+ else {
54141
+ if (this.detailPanelMode !== "none") {
54142
+ question = this.detailPanel.getQuestionByName(columnName);
54143
+ }
54144
+ }
54145
+ return !!question ? question.getConditionJson(operator) : null;
53812
54146
  };
53813
54147
  QuestionMatrixDropdownModelBase.prototype.clearIncorrectValues = function () {
53814
54148
  var rows = this.visibleRows;
@@ -54287,7 +54621,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
54287
54621
  return questionPlainData;
54288
54622
  };
54289
54623
  QuestionMatrixDropdownModelBase.prototype.addConditionObjectsByContext = function (objects, context) {
54290
- var hasColumnContext = !!context && this.columns.indexOf(context) > -1;
54624
+ var rowElements = [].concat(this.columns);
54625
+ if (this.detailPanelMode !== "none") {
54626
+ rowElements = rowElements.concat(this.detailPanel.questions);
54627
+ }
54628
+ var hasColumnContext = !!context && rowElements.indexOf(context) > -1;
54291
54629
  var hasContext = context === true || hasColumnContext;
54292
54630
  var rowsIndeces = this.getConditionObjectsRowIndeces();
54293
54631
  if (hasContext) {
@@ -54303,13 +54641,13 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
54303
54641
  var dot = hasQuestionPrefix && index === -1 ? "." : "";
54304
54642
  var prefixName = (hasQuestionPrefix ? this.getValueName() : "") + dot + rowName + ".";
54305
54643
  var prefixTitle = (hasQuestionPrefix ? this.processedTitle : "") + dot + rowText + ".";
54306
- for (var j = 0; j < this.columns.length; j++) {
54307
- var column = this.columns[j];
54308
- if (index === -1 && context === column)
54644
+ for (var j = 0; j < rowElements.length; j++) {
54645
+ var rowElement = rowElements[j];
54646
+ if (index === -1 && context === rowElement)
54309
54647
  continue;
54310
54648
  var obj = {
54311
- name: prefixName + column.name,
54312
- text: prefixTitle + column.fullTitle,
54649
+ name: prefixName + rowElement.name,
54650
+ text: prefixTitle + rowElement.fullTitle,
54313
54651
  question: this
54314
54652
  };
54315
54653
  if (index === -1 && context === true) {
@@ -54376,9 +54714,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
54376
54714
  var col = this.columns[i];
54377
54715
  if (!col.templateQuestion.hasInput)
54378
54716
  continue;
54717
+ var hasValue = !_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(rowValue[col.name]);
54718
+ if (!hasValue && !!col.templateQuestion.visibleIf)
54719
+ continue;
54379
54720
  res.questionCount += 1;
54380
54721
  res.requiredQuestionCount += col.isRequired;
54381
- var hasValue = !_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(rowValue[col.name]);
54382
54722
  res.answeredQuestionCount += hasValue ? 1 : 0;
54383
54723
  res.requiredAnsweredQuestionCount += hasValue && col.isRequired ? 1 : 0;
54384
54724
  }
@@ -55016,6 +55356,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownb
55016
55356
  { name: "horizontalScroll:boolean", visible: false, },
55017
55357
  {
55018
55358
  name: "choices:itemvalue[]", uniqueProperty: "value",
55359
+ visibleIf: function (obj) { return obj.isSelectCellType(); }
55019
55360
  },
55020
55361
  { name: "placeholder", alternativeName: "optionsCaption", serializationProperty: "locPlaceholder" },
55021
55362
  {
@@ -59617,6 +59958,10 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
59617
59958
  QuestionMultipleTextModel.prototype.getQuestionTitleWidth = function () {
59618
59959
  return undefined;
59619
59960
  };
59961
+ QuestionMultipleTextModel.prototype.getColumsForElement = function (el) {
59962
+ return [];
59963
+ };
59964
+ QuestionMultipleTextModel.prototype.updateColumns = function () { };
59620
59965
  QuestionMultipleTextModel.prototype.getQuestionStartIndex = function () {
59621
59966
  return this.getStartIndex();
59622
59967
  };
@@ -59640,6 +59985,9 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
59640
59985
  QuestionMultipleTextModel.prototype.validateContainerOnly = function () {
59641
59986
  // do nothing
59642
59987
  };
59988
+ QuestionMultipleTextModel.prototype.onQuestionValueChanged = function (el) {
59989
+ // do nothing
59990
+ };
59643
59991
  QuestionMultipleTextModel.prototype.getItemLabelCss = function (item) {
59644
59992
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]()
59645
59993
  .append(this.cssClasses.itemLabel)
@@ -63074,7 +63422,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
63074
63422
  _this.domNode = null;
63075
63423
  _this.onVisibleChoicesChanged = function () {
63076
63424
  _super.prototype.onVisibleChoicesChanged.call(_this);
63077
- if (_this.carryForwardStartUnranked && !_this.isValueSetByUser && !_this.selectToRankEnabled) {
63425
+ if (_this.carryForwardStartUnranked && !_this.isValueSetByUser && !_this.selectToRankEnabled && !_this.defaultValue) {
63078
63426
  _this.value = [];
63079
63427
  }
63080
63428
  // ranking question with only one choice doesn't make sense
@@ -64748,17 +65096,6 @@ var QuestionRatingModel = /** @class */ (function (_super) {
64748
65096
  QuestionRatingModel.prototype.getDesktopRenderAs = function () {
64749
65097
  return (this.displayMode == "dropdown") ? "dropdown" : "default";
64750
65098
  };
64751
- Object.defineProperty(QuestionRatingModel.prototype, "ariaExpanded", {
64752
- get: function () {
64753
- var _a;
64754
- var popupModel = (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
64755
- if (!popupModel)
64756
- return null;
64757
- return popupModel.isVisible ? "true" : "false";
64758
- },
64759
- enumerable: false,
64760
- configurable: true
64761
- });
64762
65099
  Object.defineProperty(QuestionRatingModel.prototype, "dropdownListModel", {
64763
65100
  get: function () {
64764
65101
  if (this.renderAs === "dropdown") {
@@ -65717,14 +66054,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
65717
66054
  enumerable: false,
65718
66055
  configurable: true
65719
66056
  });
65720
- Object.defineProperty(QuestionTagboxModel.prototype, "ariaExpanded", {
65721
- get: function () {
65722
- var popupModel = this.popupModel;
65723
- return !!popupModel && popupModel.isVisible ? "true" : "false";
65724
- },
65725
- enumerable: false,
65726
- configurable: true
65727
- });
65728
66057
  QuestionTagboxModel.prototype.getControlClass = function () {
65729
66058
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
65730
66059
  .append(this.cssClasses.control)
@@ -66379,6 +66708,24 @@ var QuestionTextModel = /** @class */ (function (_super) {
66379
66708
  this._inputValue = this.maskInstance.getMaskedValue(this.value);
66380
66709
  }
66381
66710
  };
66711
+ QuestionTextModel.prototype.hasToConvertToUTC = function (val) {
66712
+ return _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].storeUtcDates && this.isDateTimeLocaleType() && !!val;
66713
+ };
66714
+ QuestionTextModel.prototype.valueForSurveyCore = function (val) {
66715
+ if (this.hasToConvertToUTC(val)) {
66716
+ val = new Date(val).toISOString();
66717
+ }
66718
+ return _super.prototype.valueForSurveyCore.call(this, val);
66719
+ };
66720
+ QuestionTextModel.prototype.valueFromDataCore = function (val) {
66721
+ if (this.hasToConvertToUTC(val)) {
66722
+ var d = new Date(val);
66723
+ var locale_d = new Date(d.getTime() - d.getTimezoneOffset() * 60 * 1000);
66724
+ var res = locale_d.toISOString();
66725
+ val = res.substring(0, res.length - 2);
66726
+ }
66727
+ return _super.prototype.valueFromDataCore.call(this, val);
66728
+ };
66382
66729
  QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
66383
66730
  var _this = this;
66384
66731
  _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
@@ -66450,11 +66797,14 @@ var QuestionTextModel = /** @class */ (function (_super) {
66450
66797
  });
66451
66798
  Object.defineProperty(QuestionTextModel.prototype, "isDateInputType", {
66452
66799
  get: function () {
66453
- return this.inputType === "date" || this.inputType === "datetime-local";
66800
+ return this.inputType === "date" || this.isDateTimeLocaleType();
66454
66801
  },
66455
66802
  enumerable: false,
66456
66803
  configurable: true
66457
66804
  });
66805
+ QuestionTextModel.prototype.isDateTimeLocaleType = function () {
66806
+ return this.inputType === "datetime-local";
66807
+ };
66458
66808
  QuestionTextModel.prototype.getCalculatedMinMax = function (minMax) {
66459
66809
  if (this.isValueEmpty(minMax))
66460
66810
  return minMax;
@@ -66506,11 +66856,10 @@ var QuestionTextModel = /** @class */ (function (_super) {
66506
66856
  return this.maskTypeIsEmpty ? _super.prototype.getIsInputTextUpdate.call(this) : false;
66507
66857
  };
66508
66858
  QuestionTextModel.prototype.supportGoNextPageAutomatic = function () {
66509
- return !this.getIsInputTextUpdate() &&
66510
- ["date", "datetime-local"].indexOf(this.inputType) < 0;
66859
+ return !this.getIsInputTextUpdate() && !this.isDateInputType;
66511
66860
  };
66512
66861
  QuestionTextModel.prototype.supportGoNextPageError = function () {
66513
- return ["date", "datetime-local"].indexOf(this.inputType) < 0;
66862
+ return !this.isDateInputType;
66514
66863
  };
66515
66864
  Object.defineProperty(QuestionTextModel.prototype, "dataList", {
66516
66865
  /**
@@ -66551,9 +66900,13 @@ var QuestionTextModel = /** @class */ (function (_super) {
66551
66900
  QuestionTextModel.prototype.correctValueType = function (newValue) {
66552
66901
  if (!newValue)
66553
66902
  return newValue;
66554
- if (this.inputType == "number" || this.inputType == "range") {
66903
+ if (this.inputType === "number" || this.inputType === "range") {
66555
66904
  return _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isNumber(newValue) ? _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].getNumber(newValue) : "";
66556
66905
  }
66906
+ if (this.inputType === "month") {
66907
+ var d = new Date(newValue);
66908
+ return d.getFullYear() + "-" + (d.getMonth() + 1);
66909
+ }
66557
66910
  return newValue;
66558
66911
  };
66559
66912
  QuestionTextModel.prototype.hasPlaceholder = function () {
@@ -70878,7 +71231,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
70878
71231
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
70879
71232
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
70880
71233
  // @ts-ignore
70881
- disabled: this.question.isDisabledAttr, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
71234
+ disabled: this.question.isDisabledAttr, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
70882
71235
  dropdownListModel.showHintPrefix ?
70883
71236
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
70884
71237
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringPrefix))) : null,
@@ -70888,7 +71241,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
70888
71241
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
70889
71242
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
70890
71243
  valueElement,
70891
- 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-describedby": this.question.a11y_input_ariaDescribedBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isDisabledAttr, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
71244
+ 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, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isDisabledAttr, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
70892
71245
  this.createClearButton()));
70893
71246
  };
70894
71247
  SurveyQuestionDropdownBase.prototype.createClearButton = function () {
@@ -73232,7 +73585,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
73232
73585
  var rootStyle = question.getRootStyle();
73233
73586
  var questionContent = this.wrapQuestionContent(this.renderQuestionContent());
73234
73587
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
73235
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { ref: this.rootRef, id: question.id, className: question.getRootCss(), style: rootStyle, role: question.ariaRole, "aria-required": this.question.ariaRequired, "aria-invalid": this.question.ariaInvalid, "aria-labelledby": question.ariaLabelledBy, "aria-describedby": question.ariaDescribedBy, "aria-expanded": question.ariaExpanded === null ? undefined : question.ariaExpanded === "true" },
73588
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { ref: this.rootRef, id: question.id, className: question.getRootCss(), style: rootStyle, role: question.ariaRole, "aria-required": this.question.ariaRequired, "aria-invalid": this.question.ariaInvalid, "aria-labelledby": question.ariaLabelledBy, "aria-describedby": question.ariaDescribedBy, "aria-expanded": question.ariaExpanded },
73236
73589
  errorsAboveQuestion,
73237
73590
  headerTop,
73238
73591
  questionContent,
@@ -74723,7 +75076,8 @@ __webpack_require__.r(__webpack_exports__);
74723
75076
  /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
74724
75077
  /* harmony import */ var _components_loading_indicator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/loading-indicator */ "./src/react/components/loading-indicator.tsx");
74725
75078
  /* harmony import */ var _components_action_bar_action_bar_item__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/action-bar/action-bar-item */ "./src/react/components/action-bar/action-bar-item.tsx");
74726
- /* harmony import */ var _entries_react_ui_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../entries/react-ui-model */ "./src/entries/react-ui-model.ts");
75079
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
75080
+ /* harmony import */ var _components_file_file_choose_button__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/file/file-choose-button */ "./src/react/components/file/file-choose-button.tsx");
74727
75081
  var __extends = (undefined && undefined.__extends) || (function () {
74728
75082
  var extendStatics = function (d, b) {
74729
75083
  extendStatics = Object.setPrototypeOf ||
@@ -74747,6 +75101,8 @@ var __extends = (undefined && undefined.__extends) || (function () {
74747
75101
 
74748
75102
 
74749
75103
 
75104
+
75105
+ // import { ReactElementFactory, SurveyFileChooseButton } from "../entries/react-ui-model";
74750
75106
  var SurveyQuestionFile = /** @class */ (function (_super) {
74751
75107
  __extends(SurveyQuestionFile, _super);
74752
75108
  function SurveyQuestionFile(props) {
@@ -74804,7 +75160,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
74804
75160
  noFileChosen)));
74805
75161
  };
74806
75162
  SurveyQuestionFile.prototype.renderChooseButton = function () {
74807
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_entries_react_ui_model__WEBPACK_IMPORTED_MODULE_7__["SurveyFileChooseButton"], { data: { question: this.question } });
75163
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_file_file_choose_button__WEBPACK_IMPORTED_MODULE_8__["SurveyFileChooseButton"], { data: { question: this.question } });
74808
75164
  };
74809
75165
  SurveyQuestionFile.prototype.renderClearButton = function (className) {
74810
75166
  return !this.question.isUploading ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("button", { type: "button", onClick: this.question.doClean, className: className },
@@ -74812,7 +75168,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
74812
75168
  (!!this.question.cssClasses.removeButtonIconId) ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { iconName: this.question.cssClasses.removeButtonIconId, size: "auto", title: this.question.clearButtonCaption }) : null)) : null;
74813
75169
  };
74814
75170
  SurveyQuestionFile.prototype.renderPreview = function () {
74815
- return _entries_react_ui_model__WEBPACK_IMPORTED_MODULE_7__["ReactElementFactory"].Instance.createElement("sv-file-preview", { question: this.question });
75171
+ return _element_factory__WEBPACK_IMPORTED_MODULE_7__["ReactElementFactory"].Instance.createElement("sv-file-preview", { question: this.question });
74816
75172
  };
74817
75173
  SurveyQuestionFile.prototype.renderLoadingIndicator = function () {
74818
75174
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.loadingIndicator },
@@ -76791,7 +77147,7 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
76791
77147
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
76792
77148
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
76793
77149
  // @ts-ignore
76794
- disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
77150
+ disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
76795
77151
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.controlValue },
76796
77152
  items,
76797
77153
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_tagbox_filter__WEBPACK_IMPORTED_MODULE_4__["TagboxFilterString"], { model: dropdownMultiSelectListModel, question: this.question })),
@@ -77665,7 +78021,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
77665
78021
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
77666
78022
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
77667
78023
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringSuffix))) : null,
77668
- 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.filterReadOnly ? 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-describedby": this.question.a11y_input_ariaDescribedBy, "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); } }))));
78024
+ 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.filterReadOnly ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "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); } }))));
77669
78025
  };
77670
78026
  return TagboxFilterString;
77671
78027
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
@@ -78543,7 +78899,37 @@ var settings = {
78543
78899
  "a": /[a-zA-Z]/,
78544
78900
  "#": /[a-zA-Z0-9]/
78545
78901
  }
78546
- }
78902
+ },
78903
+ /**
78904
+ * Specifies whether to store date-time values in the following format: `"YYYY-MM-DDThh:mm:ss.sssZ"`. Applies only to form fields with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"datetime-local"`.
78905
+ *
78906
+ * Default value: `false`
78907
+ *
78908
+ * If you enable this setting, date-time values are converted from local time to UTC when they are saved to the survey's [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) object, while the question values remain in local time. Therefore, when you specify default values using a question's [`defaultValue`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#defaultValue) property, you need to use local time, but if you specify them using the `data` object, use a UTC date-time value in the following format: `"YYYY-MM-DDThh:mm:ss.sssZ"`.
78909
+ *
78910
+ * ```js
78911
+ * const surveyJson = {
78912
+ * "elements": [{
78913
+ * "name": "datetime",
78914
+ * "type": "text",
78915
+ * "title": "Select a date and time",
78916
+ * "inputType": "datetime-local",
78917
+ * "defaultValue": "2024-07-16T12:15:00" // Local date-time value
78918
+ * }]
78919
+ * }
78920
+ * ```
78921
+ *
78922
+ * ```js
78923
+ * import { Model } from "survey-core";
78924
+ * const surveyJson = { ... }
78925
+ * const survey = new Model(surveyJson);
78926
+ *
78927
+ * survey.data = {
78928
+ * datetime: "2024-07-16T12:15:00.000Z" // UTC date-time value
78929
+ * }
78930
+ * ```
78931
+ */
78932
+ storeUtcDates: false
78547
78933
  };
78548
78934
 
78549
78935
 
@@ -79236,6 +79622,7 @@ var SurveyElement = /** @class */ (function (_super) {
79236
79622
  _this.registerPropertyChangedHandlers(["isReadOnly"], function () { _this.onReadOnlyChanged(); });
79237
79623
  _this.registerPropertyChangedHandlers(["errors"], function () { _this.updateVisibleErrors(); });
79238
79624
  _this.registerPropertyChangedHandlers(["isSingleInRow"], function () { _this.updateElementCss(false); });
79625
+ _this.registerPropertyChangedHandlers(["minWidth", "maxWidth", "renderWidth", "allowRootStyle", "parent"], function () { _this.updateRootStyle(); });
79239
79626
  return _this;
79240
79627
  }
79241
79628
  SurveyElement.getProgressInfoByElements = function (children, isRequired) {
@@ -79330,6 +79717,16 @@ var SurveyElement = /** @class */ (function (_super) {
79330
79717
  }
79331
79718
  return false;
79332
79719
  };
79720
+ Object.defineProperty(SurveyElement.prototype, "colSpan", {
79721
+ get: function () {
79722
+ return this.getPropertyValue("colSpan", 1);
79723
+ },
79724
+ set: function (val) {
79725
+ this.setPropertyValue("colSpan", val);
79726
+ },
79727
+ enumerable: false,
79728
+ configurable: true
79729
+ });
79333
79730
  SurveyElement.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
79334
79731
  _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
79335
79732
  if (name === "state") {
@@ -80175,12 +80572,24 @@ var SurveyElement = /** @class */ (function (_super) {
80175
80572
  enumerable: false,
80176
80573
  configurable: true
80177
80574
  });
80178
- Object.defineProperty(SurveyElement.prototype, "rootStyle", {
80179
- get: function () {
80180
- var style = {};
80575
+ SurveyElement.prototype.updateRootStyle = function () {
80576
+ var style = {};
80577
+ var _width;
80578
+ if (!!this.parent) {
80579
+ var columns = this.parent.getColumsForElement(this);
80580
+ _width = columns.reduce(function (sum, col) { return col.effectiveWidth + sum; }, 0);
80581
+ if (!!_width && _width !== 100) {
80582
+ style["flexGrow"] = 0;
80583
+ style["flexShrink"] = 0;
80584
+ style["flexBasis"] = _width + "%";
80585
+ style["minWidth"] = undefined;
80586
+ style["maxWidth"] = undefined;
80587
+ }
80588
+ }
80589
+ if (Object.keys(style).length == 0) {
80181
80590
  var minWidth = this.minWidth;
80182
80591
  if (minWidth != "auto")
80183
- minWidth = "min(100%, " + this.minWidth + ")";
80592
+ minWidth = "min(100%, " + minWidth + ")";
80184
80593
  if (this.allowRootStyle && this.renderWidth) {
80185
80594
  // style["width"] = this.renderWidth;
80186
80595
  style["flexGrow"] = 1;
@@ -80189,11 +80598,9 @@ var SurveyElement = /** @class */ (function (_super) {
80189
80598
  style["minWidth"] = minWidth;
80190
80599
  style["maxWidth"] = this.maxWidth;
80191
80600
  }
80192
- return style;
80193
- },
80194
- enumerable: false,
80195
- configurable: true
80196
- });
80601
+ }
80602
+ this.rootStyle = style;
80603
+ };
80197
80604
  SurveyElement.prototype.isContainsSelection = function (el) {
80198
80605
  var elementWithSelection = undefined;
80199
80606
  var _document = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].getDocument();
@@ -80347,7 +80754,8 @@ var SurveyElement = /** @class */ (function (_super) {
80347
80754
  },
80348
80755
  getLeaveOptions: function () {
80349
80756
  var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
80350
- return { cssClass: cssClasses.contentFadeOut,
80757
+ return {
80758
+ cssClass: cssClasses.contentFadeOut,
80351
80759
  onBeforeRunAnimation: beforeRunAnimation,
80352
80760
  onAfterRunAnimation: afterRunAnimation
80353
80761
  };
@@ -80403,6 +80811,13 @@ var SurveyElement = /** @class */ (function (_super) {
80403
80811
  __decorate([
80404
80812
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
80405
80813
  ], SurveyElement.prototype, "isDragMe", void 0);
80814
+ __decorate([
80815
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
80816
+ onSet: function (newValue, target) {
80817
+ target.colSpan = newValue;
80818
+ }
80819
+ })
80820
+ ], SurveyElement.prototype, "effectiveColSpan", void 0);
80406
80821
  __decorate([
80407
80822
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
80408
80823
  ], SurveyElement.prototype, "hasVisibleErrors", void 0);
@@ -80412,6 +80827,9 @@ var SurveyElement = /** @class */ (function (_super) {
80412
80827
  __decorate([
80413
80828
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
80414
80829
  ], SurveyElement.prototype, "allowRootStyle", void 0);
80830
+ __decorate([
80831
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
80832
+ ], SurveyElement.prototype, "rootStyle", void 0);
80415
80833
  __decorate([
80416
80834
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
80417
80835
  ], SurveyElement.prototype, "_renderedIsExpanded", void 0);
@@ -83753,7 +84171,8 @@ var SurveyModel = /** @class */ (function (_super) {
83753
84171
  }
83754
84172
  if (data) {
83755
84173
  for (var key in data) {
83756
- this.setDataValueCore(this.valuesHash, key, data[key]);
84174
+ var dataKey = typeof key === "string" ? key.trim() : key;
84175
+ this.setDataValueCore(this.valuesHash, dataKey, data[key]);
83757
84176
  }
83758
84177
  }
83759
84178
  this.updateAllQuestionsValue(clearData);
@@ -84265,7 +84684,9 @@ var SurveyModel = /** @class */ (function (_super) {
84265
84684
  });
84266
84685
  SurveyModel.prototype.updateActivePage = function () {
84267
84686
  var newPage = this.isShowStartingPage ? this.startedPage : this.currentPage;
84268
- this.setPropertyValue("activePage", newPage);
84687
+ if (newPage !== this.activePage) {
84688
+ this.setPropertyValue("activePage", newPage);
84689
+ }
84269
84690
  };
84270
84691
  SurveyModel.prototype.onStateAndCurrentPageChanged = function () {
84271
84692
  this.updateActivePage();
@@ -85340,7 +85761,11 @@ var SurveyModel = /** @class */ (function (_super) {
85340
85761
  return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
85341
85762
  };
85342
85763
  SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage, isFirstLoad) {
85764
+ var _this = this;
85343
85765
  this.questionHashesClear();
85766
+ if (this.firstPageIsStarted && this.pages.length > 0) {
85767
+ this.pages[0].questions.forEach(function (q) { return _this.questionHashesAdded(q); });
85768
+ }
85344
85769
  this.isLockingUpdateOnPageModes = !isFirstLoad;
85345
85770
  var startIndex = this.getPageStartIndex();
85346
85771
  _super.prototype.startLoadingFromJson.call(this);
@@ -85484,7 +85909,7 @@ var SurveyModel = /** @class */ (function (_super) {
85484
85909
  if (this.isFirstPage || !this.showPrevButton || this.state !== "running")
85485
85910
  return false;
85486
85911
  var page = this.visiblePages[this.currentPageNo - 1];
85487
- return this.getPageMaxTimeToFinish(page) <= 0;
85912
+ return page && page.getMaxTimeToFinish() <= 0;
85488
85913
  };
85489
85914
  SurveyModel.prototype.calcIsShowNextButton = function () {
85490
85915
  return this.state === "running" && !this.isLastPage && !this.canBeCompletedByTrigger;
@@ -87138,19 +87563,19 @@ var SurveyModel = /** @class */ (function (_super) {
87138
87563
  this.onLoadingSurveyFromService();
87139
87564
  if (clientId) {
87140
87565
  this.createSurveyService().getSurveyJsonAndIsCompleted(this.surveyId, this.clientId, function (success, json, isCompleted, response) {
87141
- self.isLoading = false;
87142
87566
  if (success) {
87143
87567
  self.isCompletedBefore = isCompleted == "completed";
87144
87568
  self.loadSurveyFromServiceJson(json);
87145
87569
  }
87570
+ self.isLoading = false;
87146
87571
  });
87147
87572
  }
87148
87573
  else {
87149
87574
  this.createSurveyService().loadSurvey(this.surveyId, function (success, result, response) {
87150
- self.isLoading = false;
87151
87575
  if (success) {
87152
87576
  self.loadSurveyFromServiceJson(result);
87153
87577
  }
87578
+ self.isLoading = false;
87154
87579
  });
87155
87580
  }
87156
87581
  };
@@ -88254,7 +88679,7 @@ var SurveyModel = /** @class */ (function (_super) {
88254
88679
  return { spent: 0, limit: 0 };
88255
88680
  var pageSpent = page.timeSpent;
88256
88681
  var surveySpent = this.timeSpent;
88257
- var pageLimitSec = this.getPageMaxTimeToFinish(page);
88682
+ var pageLimitSec = page.getMaxTimeToFinish();
88258
88683
  var surveyLimit = this.maxTimeToFinish;
88259
88684
  if (this.showTimerPanelMode == "page") {
88260
88685
  return { spent: pageSpent, limit: pageLimitSec };
@@ -88283,7 +88708,7 @@ var SurveyModel = /** @class */ (function (_super) {
88283
88708
  return "";
88284
88709
  var pageSpent = this.getDisplayTime(page.timeSpent);
88285
88710
  var surveySpent = this.getDisplayTime(this.timeSpent);
88286
- var pageLimitSec = this.getPageMaxTimeToFinish(page);
88711
+ var pageLimitSec = page.getMaxTimeToFinish();
88287
88712
  var pageLimit = this.getDisplayTime(pageLimitSec);
88288
88713
  var surveyLimit = this.getDisplayTime(this.maxTimeToFinish);
88289
88714
  if (this.showTimerPanelMode == "page")
@@ -88304,7 +88729,7 @@ var SurveyModel = /** @class */ (function (_super) {
88304
88729
  return "";
88305
88730
  };
88306
88731
  SurveyModel.prototype.getTimerInfoPageText = function (page, pageSpent, pageLimit) {
88307
- return this.getPageMaxTimeToFinish(page) > 0
88732
+ return !!page && page.getMaxTimeToFinish() > 0
88308
88733
  ? this.getLocalizationFormatString("timerLimitPage", pageSpent, pageLimit)
88309
88734
  : this.getLocalizationFormatString("timerSpentPage", pageSpent, pageLimit);
88310
88735
  };
@@ -88429,20 +88854,14 @@ var SurveyModel = /** @class */ (function (_super) {
88429
88854
  enumerable: false,
88430
88855
  configurable: true
88431
88856
  });
88432
- SurveyModel.prototype.getPageMaxTimeToFinish = function (page) {
88433
- if (!page || page.maxTimeToFinish < 0)
88434
- return 0;
88435
- return page.maxTimeToFinish > 0
88436
- ? page.maxTimeToFinish
88437
- : this.maxTimeToFinishPage;
88438
- };
88439
88857
  SurveyModel.prototype.doTimer = function (page) {
88440
88858
  this.onTimer.fire(this, {});
88441
- if (this.maxTimeToFinish > 0 && this.maxTimeToFinish == this.timeSpent) {
88859
+ if (this.maxTimeToFinish > 0 && this.maxTimeToFinish <= this.timeSpent) {
88860
+ this.timeSpent = this.maxTimeToFinish;
88442
88861
  this.completeLastPage();
88443
88862
  }
88444
88863
  if (page) {
88445
- var pageLimit = this.getPageMaxTimeToFinish(page);
88864
+ var pageLimit = page.getMaxTimeToFinish();
88446
88865
  if (pageLimit > 0 && pageLimit == page.timeSpent) {
88447
88866
  if (this.isLastPage) {
88448
88867
  this.completeLastPage();
@@ -88825,10 +89244,21 @@ var SurveyModel = /** @class */ (function (_super) {
88825
89244
  this.disposeCallback();
88826
89245
  }
88827
89246
  };
89247
+ // private _lastScrollTop = 0;
89248
+ SurveyModel.prototype._isElementShouldBeSticky = function (selector) {
89249
+ if (!selector)
89250
+ return false;
89251
+ var topStickyContainer = this.rootElement.querySelector(selector);
89252
+ if (!!topStickyContainer) {
89253
+ // const scrollDirection = this.rootElement.scrollTop > this._lastScrollTop ? "down" : "up";
89254
+ // this._lastScrollTop = this.rootElement.scrollTop;
89255
+ return this.rootElement.scrollTop > 0 && topStickyContainer.getBoundingClientRect().y <= this.rootElement.getBoundingClientRect().y;
89256
+ }
89257
+ return false;
89258
+ };
88828
89259
  SurveyModel.prototype.onScroll = function () {
88829
89260
  if (!!this.rootElement) {
88830
- var topStickyContainer = this.rootElement.querySelector(".sv-components-container-center");
88831
- if (!!topStickyContainer && topStickyContainer.getBoundingClientRect().y <= this.rootElement.getBoundingClientRect().y) {
89261
+ if (this._isElementShouldBeSticky(".sv-components-container-center")) {
88832
89262
  this.rootElement.classList && this.rootElement.classList.add("sv-root--sticky-top");
88833
89263
  }
88834
89264
  else {
@@ -88966,6 +89396,9 @@ var SurveyModel = /** @class */ (function (_super) {
88966
89396
  __decorate([
88967
89397
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
88968
89398
  ], SurveyModel.prototype, "rootCss", void 0);
89399
+ __decorate([
89400
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
89401
+ ], SurveyModel.prototype, "gridLayoutEnabled", void 0);
88969
89402
  __decorate([
88970
89403
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
88971
89404
  ], SurveyModel.prototype, "calculatedWidthMode", void 0);
@@ -89263,6 +89696,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
89263
89696
  default: "auto",
89264
89697
  choices: ["auto", "static", "responsive"],
89265
89698
  },
89699
+ { name: "gridLayoutEnabled:boolean", default: false, visible: false },
89266
89700
  { name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
89267
89701
  { name: "fitToContainer:boolean", default: true, visible: false },
89268
89702
  { name: "headerView", default: "basic", choices: ["basic", "advanced"], visible: false },
@@ -89571,7 +90005,7 @@ var SurveyTimerModel = /** @class */ (function (_super) {
89571
90005
  this.survey.onCurrentPageChanged.add(function () {
89572
90006
  _this.update();
89573
90007
  });
89574
- this.timerFunc = function () { _this.doTimer(); };
90008
+ this.timerFunc = function (sender, options) { _this.doTimer(options.seconds); };
89575
90009
  this.setIsRunning(true);
89576
90010
  this.update();
89577
90011
  _surveytimer__WEBPACK_IMPORTED_MODULE_1__["SurveyTimer"].instance.start(this.timerFunc);
@@ -89596,12 +90030,16 @@ var SurveyTimerModel = /** @class */ (function (_super) {
89596
90030
  this.updateText();
89597
90031
  this.updateProgress();
89598
90032
  };
89599
- SurveyTimerModel.prototype.doTimer = function () {
90033
+ SurveyTimerModel.prototype.doTimer = function (seconds) {
89600
90034
  var page = this.survey.currentPage;
89601
90035
  if (page) {
89602
- page.timeSpent = page.timeSpent + 1;
90036
+ var pageMaxTime = page.getMaxTimeToFinish();
90037
+ if (pageMaxTime > 0 && pageMaxTime < page.timeSpent + seconds) {
90038
+ seconds = pageMaxTime - page.timeSpent;
90039
+ }
90040
+ page.timeSpent = page.timeSpent + seconds;
89603
90041
  }
89604
- this.spent = this.spent + 1;
90042
+ this.spent = this.spent + seconds;
89605
90043
  this.update();
89606
90044
  if (this.onTimer) {
89607
90045
  this.onTimer(page);
@@ -89887,13 +90325,14 @@ var surveyTimerFunctions = {
89887
90325
  else {
89888
90326
  return setTimeout(func, delay);
89889
90327
  }
89890
- }
90328
+ },
90329
+ now: function () { return Date.now(); }
89891
90330
  };
89892
90331
  var SurveyTimer = /** @class */ (function () {
89893
90332
  function SurveyTimer() {
89894
90333
  this.listenerCounter = 0;
89895
90334
  this.timerId = -1;
89896
- this.onTimer = new _base__WEBPACK_IMPORTED_MODULE_0__["Event"]();
90335
+ this.onTimer = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
89897
90336
  }
89898
90337
  Object.defineProperty(SurveyTimer, "instance", {
89899
90338
  get: function () {
@@ -89911,6 +90350,7 @@ var SurveyTimer = /** @class */ (function () {
89911
90350
  if (func) {
89912
90351
  this.onTimer.add(func);
89913
90352
  }
90353
+ this.prevTimeInMs = surveyTimerFunctions.now();
89914
90354
  if (this.timerId < 0) {
89915
90355
  this.timerId = surveyTimerFunctions.setTimeout(function () {
89916
90356
  _this.doTimer();
@@ -89936,8 +90376,14 @@ var SurveyTimer = /** @class */ (function () {
89936
90376
  }
89937
90377
  if (this.timerId < 0)
89938
90378
  return;
90379
+ var newTimer = surveyTimerFunctions.now();
90380
+ var seconds = Math.floor((newTimer - this.prevTimeInMs) / 1000);
90381
+ this.prevTimeInMs = newTimer;
90382
+ if (seconds < 0) {
90383
+ seconds = 1;
90384
+ }
89939
90385
  var prevItem = this.timerId;
89940
- this.onTimer.fire(this, {});
90386
+ this.onTimer.fire(this, { seconds: seconds });
89941
90387
  //We have to check that we have the same timerId
89942
90388
  //It could be changed during events execution and it will lead to double timer events
89943
90389
  if (prevItem !== this.timerId)
@@ -92293,7 +92739,7 @@ function debounce(func) {
92293
92739
  /*!****************************!*\
92294
92740
  !*** ./src/utils/utils.ts ***!
92295
92741
  \****************************/
92296
- /*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, compareArrays, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles */
92742
+ /*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, compareArrays, roundTo2Decimals, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles */
92297
92743
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92298
92744
 
92299
92745
  "use strict";
@@ -92309,6 +92755,7 @@ __webpack_require__.r(__webpack_exports__);
92309
92755
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
92310
92756
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
92311
92757
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareArrays", function() { return compareArrays; });
92758
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "roundTo2Decimals", function() { return roundTo2Decimals; });
92312
92759
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
92313
92760
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
92314
92761
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
@@ -92477,7 +92924,7 @@ function navigateToUrl(url) {
92477
92924
  var location = _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].getLocation();
92478
92925
  if (!url || !location)
92479
92926
  return;
92480
- location.href = url;
92927
+ location.href = encodeURIComponent(url);
92481
92928
  }
92482
92929
  function wrapUrlForBackgroundImage(url) {
92483
92930
  return !!url ? ["url(", url, ")"].join("") : "";
@@ -92873,6 +93320,9 @@ function compareArrays(oldValue, newValue, getKey) {
92873
93320
  });
92874
93321
  return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
92875
93322
  }
93323
+ function roundTo2Decimals(number) {
93324
+ return Math.round(number * 100) / 100;
93325
+ }
92876
93326
 
92877
93327
 
92878
93328