survey-react 1.11.7 → 1.11.9

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.7
2
+ * surveyjs - Survey JavaScript library v1.11.9
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
@@ -2688,6 +2688,9 @@ var Base = /** @class */ (function () {
2688
2688
  }
2689
2689
  if (!!this.arraysInfo) {
2690
2690
  for (var key in this.arraysInfo) {
2691
+ var prop = this.getPropertyByName(key);
2692
+ if (!prop || !prop.isSerializable)
2693
+ continue;
2691
2694
  var items = this.getPropertyValue(key);
2692
2695
  if (!items || !items.length)
2693
2696
  continue;
@@ -8213,11 +8216,12 @@ var DropdownListModel = /** @class */ (function (_super) {
8213
8216
  _this.filterString = newValue;
8214
8217
  }
8215
8218
  };
8216
- _this.qustionPropertyChangedHandler = function (sender, options) {
8219
+ _this.questionPropertyChangedHandler = function (sender, options) {
8217
8220
  _this.onPropertyChangedHandler(sender, options);
8218
8221
  };
8219
8222
  _this.htmlCleanerElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_1__["DomDocumentHelper"].createElement("div");
8220
- question.onPropertyChanged.add(_this.qustionPropertyChangedHandler);
8223
+ _this.question.ariaExpanded = "false";
8224
+ question.onPropertyChanged.add(_this.questionPropertyChangedHandler);
8221
8225
  _this.showInputFieldComponent = _this.question.showInputFieldComponent;
8222
8226
  _this.listModel = _this.createListModel();
8223
8227
  _this.updateAfterListModelCreated(_this.listModel);
@@ -8327,6 +8331,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8327
8331
  _this.resetItemsSettings();
8328
8332
  }
8329
8333
  }
8334
+ _this.question.ariaExpanded = option.isVisible ? "true" : "false";
8330
8335
  _this.question.processPopupVisiblilityChanged(_this.popupModel, option.isVisible);
8331
8336
  });
8332
8337
  };
@@ -8634,7 +8639,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8634
8639
  return;
8635
8640
  this._popupModel.toggleVisibility();
8636
8641
  this.focusItemOnClickAndPopup();
8637
- this.question.focus();
8642
+ this.question.focusInputElement(false);
8638
8643
  };
8639
8644
  DropdownListModel.prototype.chevronPointerDown = function (event) {
8640
8645
  if (this._popupModel.isVisible) {
@@ -8802,8 +8807,8 @@ var DropdownListModel = /** @class */ (function (_super) {
8802
8807
  };
8803
8808
  DropdownListModel.prototype.dispose = function () {
8804
8809
  _super.prototype.dispose.call(this);
8805
- this.question && this.question.onPropertyChanged.remove(this.qustionPropertyChangedHandler);
8806
- this.qustionPropertyChangedHandler = undefined;
8810
+ this.question && this.question.onPropertyChanged.remove(this.questionPropertyChangedHandler);
8811
+ this.questionPropertyChangedHandler = undefined;
8807
8812
  if (!!this.listModel) {
8808
8813
  this.listModel.dispose();
8809
8814
  }
@@ -9955,8 +9960,8 @@ __webpack_require__.r(__webpack_exports__);
9955
9960
 
9956
9961
  var Version;
9957
9962
  var ReleaseDate;
9958
- Version = "" + "1.11.7";
9959
- ReleaseDate = "" + "2024-07-16";
9963
+ Version = "" + "1.11.9";
9964
+ ReleaseDate = "" + "2024-07-30";
9960
9965
  function checkLibraryVersion(ver, libraryName) {
9961
9966
  if (Version != ver) {
9962
9967
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -17082,7 +17087,11 @@ function getQuestionValueByContext(context, name) {
17082
17087
  }
17083
17088
  function displayValue(params) {
17084
17089
  var q = getQuestionValueByContext(this, params[0]);
17085
- return q ? q.displayValue : "";
17090
+ if (!q)
17091
+ return "";
17092
+ if (params.length > 1 && !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(params[1]))
17093
+ return q.getDisplayValue(true, params[1]);
17094
+ return q.displayValue;
17086
17095
  }
17087
17096
  FunctionFactory.Instance.register("displayValue", displayValue);
17088
17097
  function propertyValue(params) {
@@ -19592,9 +19601,10 @@ function property(options) {
19592
19601
  },
19593
19602
  set: function (val) {
19594
19603
  var newValue = processComputedUpdater(this, val);
19604
+ var prevValue = this.getPropertyValue(key);
19595
19605
  this.setPropertyValue(key, newValue);
19596
19606
  if (!!options && options.onSet) {
19597
- options.onSet(newValue, this);
19607
+ options.onSet(newValue, this, prevValue);
19598
19608
  }
19599
19609
  },
19600
19610
  });
@@ -20513,13 +20523,10 @@ var JsonMetadataClass = /** @class */ (function () {
20513
20523
  return prop;
20514
20524
  };
20515
20525
  JsonMetadataClass.prototype.addDependsOnProperties = function (prop, dependsOn) {
20516
- if (Array.isArray(dependsOn)) {
20517
- for (var i = 0; i < dependsOn.length; i++) {
20518
- this.addDependsOnProperty(prop, dependsOn[i]);
20519
- }
20520
- }
20521
- else {
20522
- this.addDependsOnProperty(prop, dependsOn);
20526
+ var dArray = Array.isArray(dependsOn) ? dependsOn : [dependsOn];
20527
+ prop.dependsOn = dArray;
20528
+ for (var i = 0; i < dArray.length; i++) {
20529
+ this.addDependsOnProperty(prop, dArray[i]);
20523
20530
  }
20524
20531
  };
20525
20532
  JsonMetadataClass.prototype.addDependsOnProperty = function (prop, dependsOn) {
@@ -21227,27 +21234,43 @@ var JsonObject = /** @class */ (function () {
21227
21234
  }
21228
21235
  properties = this.addDynamicProperties(obj, jsonObj, properties);
21229
21236
  this.options = options;
21237
+ var processedProps = {};
21238
+ processedProps[JsonObject.typePropertyName] = true;
21239
+ var parentProps = {};
21230
21240
  for (var key in jsonObj) {
21231
- if (key === JsonObject.typePropertyName)
21232
- continue;
21233
- if (key === JsonObject.positionPropertyName) {
21234
- obj[key] = jsonObj[key];
21235
- continue;
21236
- }
21237
- var property = this.findProperty(properties, key);
21238
- if (!property) {
21239
- if (needAddErrors) {
21240
- this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj, obj);
21241
- }
21242
- continue;
21243
- }
21244
- this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
21241
+ this.setPropertyValueToObj(jsonObj, obj, key, properties, processedProps, parentProps, objType, needAddErrors, options);
21245
21242
  }
21246
21243
  this.options = undefined;
21247
21244
  if (obj.endLoadingFromJson) {
21248
21245
  obj.endLoadingFromJson();
21249
21246
  }
21250
21247
  };
21248
+ JsonObject.prototype.setPropertyValueToObj = function (jsonObj, obj, key, properties, processedProps, parentProps, objType, needAddErrors, options) {
21249
+ var _this = this;
21250
+ if (processedProps[key])
21251
+ return;
21252
+ if (key === JsonObject.positionPropertyName) {
21253
+ obj[key] = jsonObj[key];
21254
+ return;
21255
+ }
21256
+ var property = this.findProperty(properties, key);
21257
+ if (!property && needAddErrors) {
21258
+ this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj, obj);
21259
+ }
21260
+ if (property) {
21261
+ var dProps = property.dependsOn;
21262
+ if (Array.isArray(dProps)) {
21263
+ parentProps[key] = true;
21264
+ dProps.forEach(function (propKey) {
21265
+ if (!parentProps[propKey]) {
21266
+ _this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType, needAddErrors, options);
21267
+ }
21268
+ });
21269
+ }
21270
+ this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
21271
+ processedProps[key] = true;
21272
+ }
21273
+ };
21251
21274
  JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
21252
21275
  if (!obj || !obj.getType)
21253
21276
  return obj;
@@ -30789,7 +30812,6 @@ var InputElementAdapter = /** @class */ (function () {
30789
30812
  this.clickHandler = function (event) {
30790
30813
  if (_this.inputElement.value == _this.inputMaskInstance.getMaskedValue("")) {
30791
30814
  _this.inputElement.setSelectionRange(0, 0);
30792
- event.preventDefault();
30793
30815
  }
30794
30816
  };
30795
30817
  this.beforeInputHandler = function (event) {
@@ -33007,6 +33029,82 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("page", [
33007
33029
  }, "panelbase");
33008
33030
 
33009
33031
 
33032
+ /***/ }),
33033
+
33034
+ /***/ "./src/panel-layout-column.ts":
33035
+ /*!************************************!*\
33036
+ !*** ./src/panel-layout-column.ts ***!
33037
+ \************************************/
33038
+ /*! exports provided: PanelLayoutColumnModel */
33039
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
33040
+
33041
+ "use strict";
33042
+ __webpack_require__.r(__webpack_exports__);
33043
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelLayoutColumnModel", function() { return PanelLayoutColumnModel; });
33044
+ /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
33045
+ /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
33046
+ var __extends = (undefined && undefined.__extends) || (function () {
33047
+ var extendStatics = function (d, b) {
33048
+ extendStatics = Object.setPrototypeOf ||
33049
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
33050
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
33051
+ return extendStatics(d, b);
33052
+ };
33053
+ return function (d, b) {
33054
+ if (typeof b !== "function" && b !== null)
33055
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33056
+ extendStatics(d, b);
33057
+ function __() { this.constructor = d; }
33058
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
33059
+ };
33060
+ })();
33061
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
33062
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
33063
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
33064
+ 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;
33065
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
33066
+ };
33067
+
33068
+
33069
+ var PanelLayoutColumnModel = /** @class */ (function (_super) {
33070
+ __extends(PanelLayoutColumnModel, _super);
33071
+ function PanelLayoutColumnModel(width, questionTitleWidth) {
33072
+ var _this = _super.call(this) || this;
33073
+ _this.effectiveWidth = width;
33074
+ _this.questionTitleWidth = questionTitleWidth;
33075
+ return _this;
33076
+ }
33077
+ PanelLayoutColumnModel.prototype.getType = function () {
33078
+ return "panellayoutcolumn";
33079
+ };
33080
+ PanelLayoutColumnModel.prototype.isEmpty = function () {
33081
+ return !this.width && !this.questionTitleWidth;
33082
+ };
33083
+ __decorate([
33084
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
33085
+ ], PanelLayoutColumnModel.prototype, "width", void 0);
33086
+ __decorate([
33087
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
33088
+ onSet: function (newValue, target, prevVal) {
33089
+ if (newValue !== prevVal) {
33090
+ target.width = newValue;
33091
+ }
33092
+ }
33093
+ })
33094
+ ], PanelLayoutColumnModel.prototype, "effectiveWidth", void 0);
33095
+ __decorate([
33096
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
33097
+ ], PanelLayoutColumnModel.prototype, "questionTitleWidth", void 0);
33098
+ return PanelLayoutColumnModel;
33099
+ }(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
33100
+
33101
+ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panellayoutcolumn", [
33102
+ { name: "effectiveWidth:number", isSerializable: false, minValue: 0 },
33103
+ { name: "width:number", visible: false },
33104
+ "questionTitleWidth",
33105
+ ], function (value) { return new PanelLayoutColumnModel(); });
33106
+
33107
+
33010
33108
  /***/ }),
33011
33109
 
33012
33110
  /***/ "./src/panel.ts":
@@ -33035,6 +33133,7 @@ __webpack_require__.r(__webpack_exports__);
33035
33133
  /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
33036
33134
  /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
33037
33135
  /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./page */ "./src/page.ts");
33136
+ /* harmony import */ var _panel_layout_column__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./panel-layout-column */ "./src/panel-layout-column.ts");
33038
33137
  var __extends = (undefined && undefined.__extends) || (function () {
33039
33138
  var extendStatics = function (d, b) {
33040
33139
  extendStatics = Object.setPrototypeOf ||
@@ -33075,6 +33174,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
33075
33174
 
33076
33175
 
33077
33176
 
33177
+
33078
33178
  var QuestionRowModel = /** @class */ (function (_super) {
33079
33179
  __extends(QuestionRowModel, _super);
33080
33180
  function QuestionRowModel(panel) {
@@ -33351,10 +33451,18 @@ var PanelModelBase = /** @class */ (function (_super) {
33351
33451
  var _this = _super.call(this, name) || this;
33352
33452
  _this.isQuestionsReady = false;
33353
33453
  _this.questionsValue = new Array();
33454
+ _this._columns = undefined;
33455
+ _this._columnsReady = false;
33354
33456
  _this.rowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getRowsAnimationOptions(), function (value) {
33355
33457
  _this.setPropertyValue("visibleRows", value);
33356
33458
  }, function () { return _this.visibleRows; });
33357
33459
  _this.isRandomizing = false;
33460
+ _this.onColumnPropertyValueChangedCallback = function (name, oldValue, newValue, sender, arrayChanges) {
33461
+ if (_this._columnsReady) {
33462
+ _this.updateColumnWidth(_this.layoutColumns);
33463
+ _this.updateRootStyle();
33464
+ }
33465
+ };
33358
33466
  _this.locCountRowUpdates = 0;
33359
33467
  _this.createNewArray("rows", function (el, index) { _this.onAddRow(el); }, function (el) { _this.onRemoveRow(el); });
33360
33468
  _this.createNewArray("visibleRows");
@@ -33395,7 +33503,8 @@ var PanelModelBase = /** @class */ (function (_super) {
33395
33503
  isAnimationEnabled: function () { return _this.animationAllowed; },
33396
33504
  getAnimatedElement: function (row) { return row.getRootElement(); },
33397
33505
  getLeaveOptions: function (_) {
33398
- return { cssClass: _this.cssClasses.rowFadeOut,
33506
+ return {
33507
+ cssClass: _this.cssClasses.rowFadeOut,
33399
33508
  onBeforeRunAnimation: beforeRunAnimation
33400
33509
  };
33401
33510
  },
@@ -33440,10 +33549,14 @@ var PanelModelBase = /** @class */ (function (_super) {
33440
33549
  this.releaseAnimations();
33441
33550
  };
33442
33551
  PanelModelBase.prototype.endLoadingFromJson = function () {
33552
+ var _this = this;
33443
33553
  _super.prototype.endLoadingFromJson.call(this);
33444
33554
  this.updateDescriptionVisibility(this.description);
33445
33555
  this.markQuestionListDirty();
33446
33556
  this.onRowsChanged();
33557
+ this.layoutColumns.forEach(function (col) {
33558
+ col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
33559
+ });
33447
33560
  };
33448
33561
  Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
33449
33562
  get: function () {
@@ -34226,6 +34339,51 @@ var PanelModelBase = /** @class */ (function (_super) {
34226
34339
  }
34227
34340
  }
34228
34341
  };
34342
+ PanelModelBase.prototype.calcMaxRowColSpan = function () {
34343
+ var maxRowColSpan = 0;
34344
+ this.rows.forEach(function (row) {
34345
+ var curRowSpan = 0;
34346
+ var userDefinedRow = false;
34347
+ row.elements.forEach(function (el) {
34348
+ if (!!el.width) {
34349
+ userDefinedRow = true;
34350
+ }
34351
+ curRowSpan += (el.colSpan || 1);
34352
+ });
34353
+ if (!userDefinedRow && curRowSpan > maxRowColSpan)
34354
+ maxRowColSpan = curRowSpan;
34355
+ });
34356
+ return maxRowColSpan;
34357
+ };
34358
+ PanelModelBase.prototype.updateColumnWidth = function (columns) {
34359
+ var remainingSpace = 0, remainingColCount = 0;
34360
+ columns.forEach(function (col) {
34361
+ if (!col.width) {
34362
+ remainingColCount++;
34363
+ }
34364
+ else {
34365
+ remainingSpace += col.width;
34366
+ col.setPropertyValue("effectiveWidth", col.width);
34367
+ }
34368
+ });
34369
+ if (!!remainingColCount) {
34370
+ var oneColumnWidth = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["roundTo2Decimals"])((100 - remainingSpace) / remainingColCount);
34371
+ for (var index = 0; index < columns.length; index++) {
34372
+ if (!columns[index].width) {
34373
+ columns[index].setPropertyValue("effectiveWidth", oneColumnWidth);
34374
+ }
34375
+ }
34376
+ }
34377
+ };
34378
+ PanelModelBase.prototype.updateColumns = function () {
34379
+ this._columns = undefined;
34380
+ this.updateRootStyle();
34381
+ };
34382
+ PanelModelBase.prototype.updateRootStyle = function () {
34383
+ var _a;
34384
+ _super.prototype.updateRootStyle.call(this);
34385
+ (_a = this.elements) === null || _a === void 0 ? void 0 : _a.forEach(function (el) { return el.updateRootStyle(); });
34386
+ };
34229
34387
  PanelModelBase.prototype.updateCustomWidgets = function () {
34230
34388
  for (var i = 0; i < this.elements.length; i++) {
34231
34389
  this.elements[i].updateCustomWidgets();
@@ -34286,6 +34444,69 @@ var PanelModelBase = /** @class */ (function (_super) {
34286
34444
  PanelModelBase.prototype.getQuestionTitleWidth = function () {
34287
34445
  return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
34288
34446
  };
34447
+ Object.defineProperty(PanelModelBase.prototype, "columns", {
34448
+ get: function () {
34449
+ if (!this._columns) {
34450
+ this.generateColumns();
34451
+ }
34452
+ return this._columns || [];
34453
+ },
34454
+ enumerable: false,
34455
+ configurable: true
34456
+ });
34457
+ PanelModelBase.prototype.generateColumns = function () {
34458
+ var maxRowColSpan = this.calcMaxRowColSpan();
34459
+ var columns = [].concat(this.layoutColumns);
34460
+ if (maxRowColSpan <= this.layoutColumns.length) {
34461
+ columns = this.layoutColumns.slice(0, maxRowColSpan);
34462
+ }
34463
+ else {
34464
+ for (var index = this.layoutColumns.length; index < maxRowColSpan; index++) {
34465
+ var newCol = new _panel_layout_column__WEBPACK_IMPORTED_MODULE_14__["PanelLayoutColumnModel"]();
34466
+ newCol.onPropertyValueChangedCallback = this.onColumnPropertyValueChangedCallback;
34467
+ columns.push(newCol);
34468
+ }
34469
+ }
34470
+ this._columns = columns;
34471
+ try {
34472
+ this._columnsReady = false;
34473
+ this.updateColumnWidth(columns);
34474
+ }
34475
+ finally {
34476
+ this._columnsReady = true;
34477
+ }
34478
+ this.layoutColumns = columns;
34479
+ };
34480
+ PanelModelBase.prototype.getColumsForElement = function (el) {
34481
+ var row = this.findRowByElement(el);
34482
+ if (!row || !this.survey || !this.survey.gridLayoutEnabled)
34483
+ return [];
34484
+ var lastExpandableElementIndex = row.elements.length - 1;
34485
+ while (lastExpandableElementIndex >= 0) {
34486
+ if (!row.elements[lastExpandableElementIndex].getPropertyValueWithoutDefault("colSpan")) {
34487
+ break;
34488
+ }
34489
+ lastExpandableElementIndex--;
34490
+ }
34491
+ var elementIndex = row.elements.indexOf(el);
34492
+ var startIndex = 0;
34493
+ for (var index = 0; index < elementIndex; index++) {
34494
+ startIndex += row.elements[index].colSpan;
34495
+ }
34496
+ var currentColSpan = el.getPropertyValueWithoutDefault("colSpan");
34497
+ if (!currentColSpan && elementIndex === lastExpandableElementIndex) {
34498
+ var usedSpans = 0;
34499
+ for (var index = 0; index < row.elements.length; index++) {
34500
+ if (index !== lastExpandableElementIndex) {
34501
+ usedSpans += row.elements[index].colSpan;
34502
+ }
34503
+ }
34504
+ currentColSpan = this.columns.length - usedSpans;
34505
+ }
34506
+ var result = this.columns.slice(startIndex, startIndex + (currentColSpan || 1));
34507
+ el.setPropertyValue("effectiveColSpan", result.length);
34508
+ return result;
34509
+ };
34289
34510
  PanelModelBase.prototype.getStartIndex = function () {
34290
34511
  if (!!this.parent)
34291
34512
  return this.parent.getQuestionStartIndex();
@@ -34370,6 +34591,7 @@ var PanelModelBase = /** @class */ (function (_super) {
34370
34591
  return;
34371
34592
  this.blockAnimations();
34372
34593
  this.setArrayPropertyDirectly("rows", this.buildRows());
34594
+ this.updateColumns();
34373
34595
  this.releaseAnimations();
34374
34596
  };
34375
34597
  PanelModelBase.prototype.blockRowsUpdates = function () {
@@ -34569,6 +34791,7 @@ var PanelModelBase = /** @class */ (function (_super) {
34569
34791
  if (!this.canBuildRows())
34570
34792
  return;
34571
34793
  this.updateRowsRemoveElementFromRow(element, this.findRowByElement(element));
34794
+ this.updateColumns();
34572
34795
  };
34573
34796
  PanelModelBase.prototype.updateRowsRemoveElementFromRow = function (element, row) {
34574
34797
  if (!row || !row.panel)
@@ -34796,6 +35019,7 @@ var PanelModelBase = /** @class */ (function (_super) {
34796
35019
  if (this.wasRendered) {
34797
35020
  element.onFirstRendering();
34798
35021
  }
35022
+ this.updateColumns();
34799
35023
  return true;
34800
35024
  };
34801
35025
  PanelModelBase.prototype.insertElement = function (element, dest, location) {
@@ -34912,6 +35136,7 @@ var PanelModelBase = /** @class */ (function (_super) {
34912
35136
  return false;
34913
35137
  }
34914
35138
  this.elements.splice(index, 1);
35139
+ this.updateColumns();
34915
35140
  return true;
34916
35141
  };
34917
35142
  PanelModelBase.prototype.removeQuestion = function (question) {
@@ -35024,6 +35249,16 @@ var PanelModelBase = /** @class */ (function (_super) {
35024
35249
  PanelModelBase.prototype.getCssError = function (cssClasses) {
35025
35250
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(cssClasses.error.root).toString();
35026
35251
  };
35252
+ PanelModelBase.prototype.getSerializableColumnsValue = function () {
35253
+ var tailIndex = -1;
35254
+ for (var index = this.layoutColumns.length - 1; index >= 0; index--) {
35255
+ if (!this.layoutColumns[index].isEmpty()) {
35256
+ tailIndex = index;
35257
+ break;
35258
+ }
35259
+ }
35260
+ return this.layoutColumns.slice(0, tailIndex + 1);
35261
+ };
35027
35262
  PanelModelBase.prototype.dispose = function () {
35028
35263
  _super.prototype.dispose.call(this);
35029
35264
  if (this.rows) {
@@ -35038,6 +35273,9 @@ var PanelModelBase = /** @class */ (function (_super) {
35038
35273
  this.elements.splice(0, this.elements.length);
35039
35274
  };
35040
35275
  PanelModelBase.panelCounter = 100;
35276
+ __decorate([
35277
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])()
35278
+ ], PanelModelBase.prototype, "layoutColumns", void 0);
35041
35279
  __decorate([
35042
35280
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
35043
35281
  ], PanelModelBase.prototype, "showTitle", void 0);
@@ -35069,6 +35307,10 @@ var PanelModel = /** @class */ (function (_super) {
35069
35307
  }
35070
35308
  });
35071
35309
  _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.onIndentChanged(); });
35310
+ _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
35311
+ _this.registerPropertyChangedHandlers(["title"], function () {
35312
+ _this.calcHasTextInTitle();
35313
+ });
35072
35314
  return _this;
35073
35315
  }
35074
35316
  PanelModel.prototype.getType = function () {
@@ -35088,13 +35330,25 @@ var PanelModel = /** @class */ (function (_super) {
35088
35330
  }
35089
35331
  return _super.prototype.getSurvey.call(this, live);
35090
35332
  };
35333
+ Object.defineProperty(PanelModel.prototype, "hasTextInTitle", {
35334
+ get: function () {
35335
+ return this.getPropertyValue("hasTextInTitle");
35336
+ },
35337
+ enumerable: false,
35338
+ configurable: true
35339
+ });
35340
+ PanelModel.prototype.calcHasTextInTitle = function () {
35341
+ this.setPropertyValue("hasTextInTitle", !!this.title);
35342
+ };
35091
35343
  PanelModel.prototype.onSurveyLoad = function () {
35092
35344
  _super.prototype.onSurveyLoad.call(this);
35093
35345
  this.onIndentChanged();
35346
+ this.calcHasTextInTitle();
35094
35347
  };
35095
35348
  PanelModel.prototype.onSetData = function () {
35096
35349
  _super.prototype.onSetData.call(this);
35097
35350
  this.onIndentChanged();
35351
+ this.calcHasTextInTitle();
35098
35352
  };
35099
35353
  Object.defineProperty(PanelModel.prototype, "isPanel", {
35100
35354
  get: function () {
@@ -35400,7 +35654,7 @@ var PanelModel = /** @class */ (function (_super) {
35400
35654
  get: function () {
35401
35655
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
35402
35656
  .append(this.getCssTitle(this.cssClasses.panel))
35403
- .append(this.cssClasses.panel.titleHidden, !this.title && this.isDesignMode)
35657
+ .append(this.cssClasses.panel.titleHidden, !this.hasTextInTitle && this.isDesignMode)
35404
35658
  .toString();
35405
35659
  },
35406
35660
  enumerable: false,
@@ -35504,6 +35758,12 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
35504
35758
  default: "default",
35505
35759
  choices: ["default", "top", "bottom", "left", "hidden"],
35506
35760
  },
35761
+ {
35762
+ name: "layoutColumns:panellayoutcolumns",
35763
+ className: "panellayoutcolumn", isArray: true,
35764
+ onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); },
35765
+ visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
35766
+ },
35507
35767
  { name: "title:text", serializationProperty: "locTitle" },
35508
35768
  { name: "description:text", serializationProperty: "locDescription" },
35509
35769
  {
@@ -35530,6 +35790,14 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panel", [
35530
35790
  "width",
35531
35791
  { name: "minWidth", defaultFunc: function () { return "auto"; } },
35532
35792
  { name: "maxWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].maxWidth; } },
35793
+ {
35794
+ name: "colSpan:number", visible: false,
35795
+ onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
35796
+ },
35797
+ {
35798
+ name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
35799
+ visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
35800
+ },
35533
35801
  { name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
35534
35802
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
35535
35803
  {
@@ -38580,9 +38848,10 @@ var ProgressButtons = /** @class */ (function (_super) {
38580
38848
  if (!listContainerElement)
38581
38849
  return;
38582
38850
  var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
38583
- var circleWidth = this.showItemNumbers ? 17 : 5;
38584
- var sideCorrection = this.survey.isMobile ? 0 : listContainerElement.children[0].clientWidth;
38585
- var connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
38851
+ var circleWidth = this.showItemNumbers ? 36 : 20;
38852
+ // const sideCorrection = this.survey.isMobile ? circleWidth : listContainerElement.children[0].clientWidth;
38853
+ // const connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
38854
+ var connectorWidth = (listContainerElement.clientWidth - circleWidth) / (listContainerElement.children.length - 1) - circleWidth;
38586
38855
  for (var i = 0; i < listContainerElements.length; i++) {
38587
38856
  listContainerElements[i].style.width = connectorWidth + "px";
38588
38857
  }
@@ -38664,6 +38933,7 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
38664
38933
  this.canShowItemTitles = true;
38665
38934
  this.processResponsiveness = function (model, options) {
38666
38935
  _this.viewModel.onUpdateScroller(model.isListContainerHasScroller(_this.element));
38936
+ _this.model.clearConnectorsWidth(_this.element);
38667
38937
  if (!model.showItemTitles) {
38668
38938
  _this.model.adjustConnectors(_this.element);
38669
38939
  return;
@@ -38675,7 +38945,6 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
38675
38945
  _this.viewModel.onResize(_this.canShowItemTitles);
38676
38946
  return;
38677
38947
  }
38678
- _this.model.clearConnectorsWidth(_this.element);
38679
38948
  if (_this.timer !== undefined) {
38680
38949
  clearTimeout(_this.timer);
38681
38950
  }
@@ -38780,9 +39049,6 @@ var TriggerExpressionInfo = /** @class */ (function () {
38780
39049
  }
38781
39050
  return TriggerExpressionInfo;
38782
39051
  }());
38783
- function querySelectorIncludingSelf(el, selector) {
38784
- return el.querySelector(selector) || el != _global_variables_utils__WEBPACK_IMPORTED_MODULE_14__["DomWindowHelper"].getWindow() && el.matches(selector) && el;
38785
- }
38786
39052
  /**
38787
39053
  * A base class for all questions.
38788
39054
  */
@@ -38850,6 +39116,7 @@ var Question = /** @class */ (function (_super) {
38850
39116
  _this.updateQuestionCss();
38851
39117
  });
38852
39118
  _this.registerPropertyChangedHandlers(["isMobile"], function () { _this.onMobileChanged(); });
39119
+ _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
38853
39120
  return _this;
38854
39121
  }
38855
39122
  Question.getQuestionId = function () {
@@ -39457,18 +39724,31 @@ var Question = /** @class */ (function (_super) {
39457
39724
  Object.defineProperty(Question.prototype, "titleWidth", {
39458
39725
  get: function () {
39459
39726
  if (this.getTitleLocation() === "left") {
39460
- if (!!this.parent) {
39727
+ var columns = this.parent.getColumsForElement(this);
39728
+ var columnCount = columns.length;
39729
+ if (columnCount !== 0 && !!columns[0].questionTitleWidth)
39730
+ return columns[0].questionTitleWidth;
39731
+ var percentWidth = this.getPercentQuestionTitleWidth();
39732
+ if (!percentWidth && !!this.parent) {
39461
39733
  var width = this.parent.getQuestionTitleWidth();
39462
39734
  if (width && !isNaN(width))
39463
39735
  width = width + "px";
39464
39736
  return width;
39465
39737
  }
39738
+ return (percentWidth / (columnCount || 1)) + "%";
39466
39739
  }
39467
39740
  return undefined;
39468
39741
  },
39469
39742
  enumerable: false,
39470
39743
  configurable: true
39471
39744
  });
39745
+ Question.prototype.getPercentQuestionTitleWidth = function () {
39746
+ var width = !!this.parent && this.parent.getQuestionTitleWidth();
39747
+ if (!!width && width[width.length - 1] === "%") {
39748
+ return parseInt(width);
39749
+ }
39750
+ return undefined;
39751
+ };
39472
39752
  /**
39473
39753
  * Returns title location calculated based on the question's `titleLocation` property and the `questionTitleLocation` property of the question's containers (survey, page, or panel).
39474
39754
  * @see titleLocation
@@ -40152,9 +40432,10 @@ var Question = /** @class */ (function (_super) {
40152
40432
  this.expandAllParents();
40153
40433
  this.survey.scrollElementToTop(this, this, null, this.id, scrollIfVisible);
40154
40434
  }
40155
- var id = !onError
40156
- ? this.getFirstInputElementId()
40157
- : this.getFirstErrorInputElementId();
40435
+ this.focusInputElement(onError);
40436
+ };
40437
+ Question.prototype.focusInputElement = function (onError) {
40438
+ var id = !onError ? this.getFirstInputElementId() : this.getFirstErrorInputElementId();
40158
40439
  if (_survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"].FocusElement(id)) {
40159
40440
  this.fireCallback(this.focusCallback);
40160
40441
  }
@@ -41725,7 +42006,7 @@ var Question = /** @class */ (function (_super) {
41725
42006
  var scrollableSelector_1 = this.getObservedElementSelector();
41726
42007
  if (!scrollableSelector_1)
41727
42008
  return;
41728
- var defaultRootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
42009
+ var defaultRootEl = el.querySelector(scrollableSelector_1);
41729
42010
  if (!defaultRootEl)
41730
42011
  return;
41731
42012
  var isProcessed_1 = false;
@@ -41737,7 +42018,7 @@ var Question = /** @class */ (function (_super) {
41737
42018
  isProcessed_1 = false;
41738
42019
  }
41739
42020
  var callback = function () {
41740
- var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
42021
+ var rootEl = el.querySelector(scrollableSelector_1);
41741
42022
  if (!requiredWidth_1 && _this.isDefaultRendering()) {
41742
42023
  requiredWidth_1 = rootEl.scrollWidth;
41743
42024
  }
@@ -41762,10 +42043,8 @@ var Question = /** @class */ (function (_super) {
41762
42043
  });
41763
42044
  this.onMobileChangedCallback = function () {
41764
42045
  setTimeout(function () {
41765
- var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
41766
- if (rootEl) {
41767
- _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
41768
- }
42046
+ var rootEl = el.querySelector(scrollableSelector_1);
42047
+ _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
41769
42048
  }, 0);
41770
42049
  };
41771
42050
  this.resizeObserver.observe(el);
@@ -41886,13 +42165,6 @@ var Question = /** @class */ (function (_super) {
41886
42165
  enumerable: false,
41887
42166
  configurable: true
41888
42167
  });
41889
- Object.defineProperty(Question.prototype, "ariaExpanded", {
41890
- get: function () {
41891
- return null;
41892
- },
41893
- enumerable: false,
41894
- configurable: true
41895
- });
41896
42168
  Object.defineProperty(Question.prototype, "ariaErrormessage", {
41897
42169
  get: function () {
41898
42170
  if (this.isNewA11yStructure)
@@ -41979,6 +42251,9 @@ var Question = /** @class */ (function (_super) {
41979
42251
  __decorate([
41980
42252
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
41981
42253
  ], Question.prototype, "forceIsInputReadOnly", void 0);
42254
+ __decorate([
42255
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
42256
+ ], Question.prototype, "ariaExpanded", void 0);
41982
42257
  __decorate([
41983
42258
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true, onSet: function (val, target) { return target.calcRenderedCommentPlaceholder(); } })
41984
42259
  ], Question.prototype, "commentPlaceholder", void 0);
@@ -42013,6 +42288,14 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
42013
42288
  { name: "width" },
42014
42289
  { name: "minWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].minWidth; } },
42015
42290
  { name: "maxWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].maxWidth; } },
42291
+ {
42292
+ name: "colSpan:number", visible: false,
42293
+ onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
42294
+ },
42295
+ {
42296
+ name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
42297
+ visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
42298
+ },
42016
42299
  { name: "startWithNewLine:boolean", default: true, layout: "row" },
42017
42300
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], layout: "row" },
42018
42301
  {
@@ -42398,7 +42681,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
42398
42681
  _this.isUpdatingChoicesDependedQuestions = false;
42399
42682
  _this.headItemsCount = 0;
42400
42683
  _this.footItemsCount = 0;
42401
- _this.allowMultiColumns = true;
42402
42684
  _this.prevIsOtherSelected = false;
42403
42685
  _this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
42404
42686
  _this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
@@ -44419,23 +44701,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
44419
44701
  enumerable: false,
44420
44702
  configurable: true
44421
44703
  });
44422
- QuestionSelectBase.prototype.getObservedElementSelector = function () {
44423
- return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["classesToSelector"])(this.cssClasses.mainRoot);
44424
- };
44425
- QuestionSelectBase.prototype.supportResponsiveness = function () {
44426
- return true;
44427
- };
44428
- QuestionSelectBase.prototype.onBeforeSetCompactRenderer = function () {
44429
- _super.prototype.onBeforeSetDesktopRenderer.call(this);
44430
- this.allowMultiColumns = false;
44431
- };
44432
- QuestionSelectBase.prototype.onBeforeSetDesktopRenderer = function () {
44433
- _super.prototype.onBeforeSetDesktopRenderer.call(this);
44434
- this.allowMultiColumns = true;
44435
- };
44436
44704
  Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
44437
44705
  get: function () {
44438
- return !this.isMobile && this.allowMultiColumns &&
44706
+ return !this.isMobile &&
44439
44707
  (this.getCurrentColCount() > 1);
44440
44708
  },
44441
44709
  enumerable: false,
@@ -44593,9 +44861,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
44593
44861
  __decorate([
44594
44862
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
44595
44863
  ], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
44596
- __decorate([
44597
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
44598
- ], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
44599
44864
  return QuestionSelectBase;
44600
44865
  }(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
44601
44866
 
@@ -47049,6 +47314,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
47049
47314
  QuestionCustomModelBase.prototype.findQuestionByName = function (name) {
47050
47315
  return !!this.data ? this.data.findQuestionByName(name) : null;
47051
47316
  };
47317
+ QuestionCustomModelBase.prototype.getEditingSurveyElement = function () {
47318
+ return undefined;
47319
+ };
47052
47320
  //IPanel
47053
47321
  QuestionCustomModelBase.prototype.addElement = function (element, index) { };
47054
47322
  QuestionCustomModelBase.prototype.removeElement = function (element) {
@@ -47060,6 +47328,10 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
47060
47328
  QuestionCustomModelBase.prototype.getQuestionTitleWidth = function () {
47061
47329
  return undefined;
47062
47330
  };
47331
+ QuestionCustomModelBase.prototype.getColumsForElement = function (el) {
47332
+ return [];
47333
+ };
47334
+ QuestionCustomModelBase.prototype.updateColumns = function () { };
47063
47335
  QuestionCustomModelBase.prototype.getQuestionStartIndex = function () {
47064
47336
  return this.getStartIndex();
47065
47337
  };
@@ -47427,6 +47699,40 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
47427
47699
  this.contentPanel.updateElementCss(reNew);
47428
47700
  }
47429
47701
  };
47702
+ QuestionCompositeModel.prototype.dispose = function () {
47703
+ this.unConnectEditingObj();
47704
+ _super.prototype.dispose.call(this);
47705
+ };
47706
+ QuestionCompositeModel.prototype.updateEditingObj = function () {
47707
+ var _this = this;
47708
+ var _a;
47709
+ var obj = (_a = this.data) === null || _a === void 0 ? void 0 : _a.getEditingSurveyElement();
47710
+ if (!obj)
47711
+ return undefined;
47712
+ var newObj = obj[this.getValueName()];
47713
+ if (!!newObj && !newObj.onPropertyChanged) {
47714
+ newObj = undefined;
47715
+ }
47716
+ if (newObj !== this.editingObjValue) {
47717
+ this.unConnectEditingObj();
47718
+ this.editingObjValue = newObj;
47719
+ if (!!newObj) {
47720
+ this.onEditingObjPropertyChanged = function (sender, options) {
47721
+ _this.setNewValueIntoQuestion(options.name, _this.editingObjValue[options.name]);
47722
+ };
47723
+ newObj.onPropertyChanged.add(this.onEditingObjPropertyChanged);
47724
+ }
47725
+ }
47726
+ return this.editingObjValue;
47727
+ };
47728
+ QuestionCompositeModel.prototype.unConnectEditingObj = function () {
47729
+ if (!!this.editingObjValue && !this.editingObjValue.isDisposed) {
47730
+ this.editingObjValue.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
47731
+ }
47732
+ };
47733
+ QuestionCompositeModel.prototype.getEditingSurveyElement = function () {
47734
+ return this.editingObjValue;
47735
+ };
47430
47736
  QuestionCompositeModel.prototype.getTextProcessor = function () {
47431
47737
  return this.textProcessing;
47432
47738
  };
@@ -47486,6 +47792,11 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
47486
47792
  }
47487
47793
  _super.prototype.onReadOnlyChanged.call(this);
47488
47794
  };
47795
+ QuestionCompositeModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
47796
+ if (clearData === void 0) { clearData = false; }
47797
+ this.updateEditingObj();
47798
+ _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
47799
+ };
47489
47800
  QuestionCompositeModel.prototype.onSurveyLoad = function () {
47490
47801
  this.isSettingValOnLoading = true;
47491
47802
  if (!!this.contentPanel) {
@@ -47657,7 +47968,7 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
47657
47968
  var key = questions[i].getValueName();
47658
47969
  var val = !!newValue ? newValue[key] : undefined;
47659
47970
  var q = questions[i];
47660
- if (!this.isTwoValueEquals(q.value, val)) {
47971
+ if (!this.isTwoValueEquals(q.value, val) && (val !== undefined || !q.isEmpty())) {
47661
47972
  q.value = val;
47662
47973
  }
47663
47974
  }
@@ -48022,14 +48333,6 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
48022
48333
  enumerable: false,
48023
48334
  configurable: true
48024
48335
  });
48025
- Object.defineProperty(QuestionDropdownModel.prototype, "ariaExpanded", {
48026
- get: function () {
48027
- var popupModel = this.popupModel;
48028
- return !!popupModel && popupModel.isVisible ? "true" : "false";
48029
- },
48030
- enumerable: false,
48031
- configurable: true
48032
- });
48033
48336
  QuestionDropdownModel.prototype.onOpenedCallBack = function () {
48034
48337
  this.onOpened.fire(this, { question: this, choices: this.choices });
48035
48338
  };
@@ -48077,6 +48380,12 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
48077
48380
  this.lastSelectedItemValue = null;
48078
48381
  (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
48079
48382
  };
48383
+ QuestionDropdownModel.prototype.afterRenderCore = function (el) {
48384
+ _super.prototype.afterRenderCore.call(this, el);
48385
+ if (!!this.dropdownListModelValue) {
48386
+ this.dropdownListModelValue.clear();
48387
+ }
48388
+ };
48080
48389
  QuestionDropdownModel.prototype.onClick = function (e) {
48081
48390
  !!this.onOpenedCallBack && this.onOpenedCallBack();
48082
48391
  };
@@ -49381,9 +49690,11 @@ var QuestionFileModel = /** @class */ (function (_super) {
49381
49690
  });
49382
49691
  QuestionFileModel.prototype.chooseFile = function (event) {
49383
49692
  var _this = this;
49384
- if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].isAvailable())
49693
+ if (!this.rootElement)
49694
+ return;
49695
+ var inputElement = this.rootElement.querySelector("#" + this.inputId);
49696
+ if (!inputElement)
49385
49697
  return;
49386
- var inputElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].getDocument().getElementById(this.inputId);
49387
49698
  event.preventDefault();
49388
49699
  event.stopImmediatePropagation();
49389
49700
  if (inputElement) {
@@ -49930,9 +50241,11 @@ var QuestionFileModel = /** @class */ (function (_super) {
49930
50241
  return false;
49931
50242
  };
49932
50243
  QuestionFileModel.prototype.canDragDrop = function () { return !this.isInputReadOnly && this.currentMode !== "camera" && !this.isPlayingVideo; };
49933
- QuestionFileModel.prototype.afterRender = function (el) {
50244
+ QuestionFileModel.prototype.afterRenderQuestionElement = function (el) {
49934
50245
  this.rootElement = el;
49935
- _super.prototype.afterRender.call(this, el);
50246
+ };
50247
+ QuestionFileModel.prototype.beforeDestroyQuestionElement = function (el) {
50248
+ this.rootElement = undefined;
49936
50249
  };
49937
50250
  QuestionFileModel.prototype.clearFilesCore = function () {
49938
50251
  if (this.rootElement) {
@@ -52879,6 +53192,7 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
52879
53192
  var survey = this.getSurvey();
52880
53193
  return !!survey ? survey.getQuestionByName(name) : null;
52881
53194
  };
53195
+ MatrixDropdownRowModelBase.prototype.getEditingSurveyElement = function () { return undefined; };
52882
53196
  MatrixDropdownRowModelBase.prototype.setValueCore = function (name, newColumnValue, isComment) {
52883
53197
  if (this.isSettingValue)
52884
53198
  return;
@@ -56226,30 +56540,34 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownc
56226
56540
  },
56227
56541
  {
56228
56542
  name: "totalType",
56543
+ visibleIf: function (obj) { return !obj.isShowInMultipleColumns; },
56229
56544
  default: "none",
56230
56545
  choices: ["none", "sum", "count", "min", "max", "avg"],
56231
56546
  },
56232
- "totalExpression:expression",
56233
- { name: "totalFormat", serializationProperty: "locTotalFormat" },
56547
+ { name: "totalExpression:expression", visibleIf: function (obj) { return !obj.isShowInMultipleColumns; } },
56548
+ { name: "totalFormat", serializationProperty: "locTotalFormat", visibleIf: function (obj) { return obj.hasTotal; } },
56234
56549
  {
56235
56550
  name: "totalDisplayStyle",
56551
+ visibleIf: function (obj) { return obj.hasTotal; },
56236
56552
  default: "none",
56237
56553
  choices: ["none", "decimal", "currency", "percent"],
56238
56554
  },
56239
56555
  {
56240
56556
  name: "totalAlignment",
56557
+ visibleIf: function (obj) { return obj.hasTotal; },
56241
56558
  default: "auto",
56242
56559
  choices: ["auto", "left", "center", "right"],
56243
56560
  },
56244
56561
  {
56245
56562
  name: "totalCurrency",
56563
+ visibleIf: function (obj) { return obj.hasTotal; },
56246
56564
  choices: function () {
56247
56565
  return Object(_question_expression__WEBPACK_IMPORTED_MODULE_2__["getCurrecyCodes"])();
56248
56566
  },
56249
56567
  default: "USD",
56250
56568
  },
56251
- { name: "totalMaximumFractionDigits:number", default: -1 },
56252
- { name: "totalMinimumFractionDigits:number", default: -1 },
56569
+ { name: "totalMaximumFractionDigits:number", default: -1, visibleIf: function (obj) { return obj.hasTotal; } },
56570
+ { name: "totalMinimumFractionDigits:number", default: -1, visibleIf: function (obj) { return obj.hasTotal; } },
56253
56571
  { name: "renderAs", default: "default", visible: false },
56254
56572
  ], function () {
56255
56573
  return new MatrixDropdownColumn("");
@@ -59186,6 +59504,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
59186
59504
  var survey = this.getSurvey();
59187
59505
  return !!survey ? survey.getQuestionByName(name) : null;
59188
59506
  };
59507
+ MultipleTextItemModel.prototype.getEditingSurveyElement = function () { return undefined; };
59189
59508
  //IValidatorOwner
59190
59509
  MultipleTextItemModel.prototype.getValidatorTitle = function () {
59191
59510
  return this.title;
@@ -59689,6 +60008,10 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
59689
60008
  QuestionMultipleTextModel.prototype.getQuestionTitleWidth = function () {
59690
60009
  return undefined;
59691
60010
  };
60011
+ QuestionMultipleTextModel.prototype.getColumsForElement = function (el) {
60012
+ return [];
60013
+ };
60014
+ QuestionMultipleTextModel.prototype.updateColumns = function () { };
59692
60015
  QuestionMultipleTextModel.prototype.getQuestionStartIndex = function () {
59693
60016
  return this.getStartIndex();
59694
60017
  };
@@ -60115,6 +60438,7 @@ var QuestionPanelDynamicItem = /** @class */ (function () {
60115
60438
  var survey = this.getSurvey();
60116
60439
  return !!survey ? survey.getQuestionByName(name) : null;
60117
60440
  };
60441
+ QuestionPanelDynamicItem.prototype.getEditingSurveyElement = function () { return undefined; };
60118
60442
  QuestionPanelDynamicItem.prototype.getAllValues = function () {
60119
60443
  return this.data.getPanelItemData(this);
60120
60444
  };
@@ -64823,17 +65147,6 @@ var QuestionRatingModel = /** @class */ (function (_super) {
64823
65147
  QuestionRatingModel.prototype.getDesktopRenderAs = function () {
64824
65148
  return (this.displayMode == "dropdown") ? "dropdown" : "default";
64825
65149
  };
64826
- Object.defineProperty(QuestionRatingModel.prototype, "ariaExpanded", {
64827
- get: function () {
64828
- var _a;
64829
- var popupModel = (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
64830
- if (!popupModel)
64831
- return null;
64832
- return popupModel.isVisible ? "true" : "false";
64833
- },
64834
- enumerable: false,
64835
- configurable: true
64836
- });
64837
65150
  Object.defineProperty(QuestionRatingModel.prototype, "dropdownListModel", {
64838
65151
  get: function () {
64839
65152
  if (this.renderAs === "dropdown") {
@@ -65792,14 +66105,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
65792
66105
  enumerable: false,
65793
66106
  configurable: true
65794
66107
  });
65795
- Object.defineProperty(QuestionTagboxModel.prototype, "ariaExpanded", {
65796
- get: function () {
65797
- var popupModel = this.popupModel;
65798
- return !!popupModel && popupModel.isVisible ? "true" : "false";
65799
- },
65800
- enumerable: false,
65801
- configurable: true
65802
- });
65803
66108
  QuestionTagboxModel.prototype.getControlClass = function () {
65804
66109
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
65805
66110
  .append(this.cssClasses.control)
@@ -66053,6 +66358,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
66053
66358
  _this.updateRemainingCharacterCounter(event.target.value);
66054
66359
  };
66055
66360
  _this.onKeyDown = function (event) {
66361
+ _this.updateDateValidationMessage(event);
66056
66362
  _this.onKeyDownPreprocess && _this.onKeyDownPreprocess(event);
66057
66363
  if (_this.isInputTextUpdate) {
66058
66364
  _this._isWaitingForEnter = event.keyCode === 229;
@@ -66060,6 +66366,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
66060
66366
  _this.onTextKeyDownHandler(event);
66061
66367
  };
66062
66368
  _this.onChange = function (event) {
66369
+ _this.updateDateValidationMessage(event);
66063
66370
  var elementIsFocused = event.target === _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].environment.root.activeElement;
66064
66371
  if (elementIsFocused) {
66065
66372
  if (_this.isInputTextUpdate) {
@@ -66491,6 +66798,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
66491
66798
  };
66492
66799
  errors.push(maxError);
66493
66800
  }
66801
+ if (!!this.dateValidationMessage) {
66802
+ errors.push(new _error__WEBPACK_IMPORTED_MODULE_5__["CustomError"](this.dateValidationMessage, this));
66803
+ }
66494
66804
  var valName = this.getValidatorTitle();
66495
66805
  var emailValidator = new _validator__WEBPACK_IMPORTED_MODULE_4__["EmailValidator"]();
66496
66806
  if (this.inputType === "email" &&
@@ -66641,6 +66951,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
66641
66951
  };
66642
66952
  QuestionTextModel.prototype.setNewValue = function (newValue) {
66643
66953
  newValue = this.correctValueType(newValue);
66954
+ if (!!newValue) {
66955
+ this.dateValidationMessage = undefined;
66956
+ }
66644
66957
  _super.prototype.setNewValue.call(this, newValue);
66645
66958
  };
66646
66959
  QuestionTextModel.prototype.correctValueType = function (newValue) {
@@ -66691,6 +67004,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
66691
67004
  this.inputValue = newValue;
66692
67005
  }
66693
67006
  };
67007
+ QuestionTextModel.prototype.updateDateValidationMessage = function (event) {
67008
+ this.dateValidationMessage = this.isDateInputType && !!event.target ? event.target.validationMessage : undefined;
67009
+ };
66694
67010
  QuestionTextModel.prototype.afterRenderQuestionElement = function (el) {
66695
67011
  if (!!el) {
66696
67012
  this.input = el instanceof HTMLInputElement ? el : el.querySelector("input");
@@ -66889,7 +67205,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
66889
67205
  name: "maskSettings:masksettings",
66890
67206
  className: "masksettings",
66891
67207
  visibleIndex: 1,
66892
- dependsOn: "inputType",
67208
+ dependsOn: ["inputType", "maskType"],
66893
67209
  visibleIf: function (obj) {
66894
67210
  return obj.inputType === "text" || obj.inputType === "tel";
66895
67211
  },
@@ -68822,6 +69138,18 @@ var List = /** @class */ (function (_super) {
68822
69138
  this.model.initListContainerHtmlElement(this.listContainerRef.current);
68823
69139
  }
68824
69140
  };
69141
+ List.prototype.componentDidUpdate = function (prevProps, prevState) {
69142
+ var _a;
69143
+ _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
69144
+ if (this.model !== prevProps.model) {
69145
+ if (this.model && !!((_a = this.listContainerRef) === null || _a === void 0 ? void 0 : _a.current)) {
69146
+ this.model.initListContainerHtmlElement(this.listContainerRef.current);
69147
+ }
69148
+ if (prevProps.model) {
69149
+ prevProps.model.initListContainerHtmlElement(undefined);
69150
+ }
69151
+ }
69152
+ };
68825
69153
  List.prototype.componentWillUnmount = function () {
68826
69154
  _super.prototype.componentWillUnmount.call(this);
68827
69155
  if (!!this.model) {
@@ -70977,7 +71305,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
70977
71305
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
70978
71306
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
70979
71307
  // @ts-ignore
70980
- 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 },
71308
+ 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 },
70981
71309
  dropdownListModel.showHintPrefix ?
70982
71310
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
70983
71311
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringPrefix))) : null,
@@ -70987,7 +71315,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
70987
71315
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
70988
71316
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
70989
71317
  valueElement,
70990
- 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 })),
71318
+ 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 })),
70991
71319
  this.createClearButton()));
70992
71320
  };
70993
71321
  SurveyQuestionDropdownBase.prototype.createClearButton = function () {
@@ -73331,7 +73659,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
73331
73659
  var rootStyle = question.getRootStyle();
73332
73660
  var questionContent = this.wrapQuestionContent(this.renderQuestionContent());
73333
73661
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
73334
- 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" },
73662
+ 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 },
73335
73663
  errorsAboveQuestion,
73336
73664
  headerTop,
73337
73665
  questionContent,
@@ -74528,19 +74856,19 @@ var SurveyQuestionElementBase = /** @class */ (function (_super) {
74528
74856
  SurveyQuestionElementBase.prototype.componentWillUnmount = function () {
74529
74857
  _super.prototype.componentWillUnmount.call(this);
74530
74858
  if (!!this.questionBase) {
74531
- var el = this.control;
74532
- this.questionBase.beforeDestroyQuestionElement(el);
74533
- if (!!el) {
74534
- el.removeAttribute("data-rendered");
74859
+ var contentElement = this.content || this.control;
74860
+ this.questionBase.beforeDestroyQuestionElement(contentElement);
74861
+ if (!!contentElement) {
74862
+ contentElement.removeAttribute("data-rendered");
74535
74863
  }
74536
74864
  }
74537
74865
  };
74538
74866
  SurveyQuestionElementBase.prototype.updateDomElement = function () {
74539
- var el = this.control;
74540
- if (!!el) {
74541
- if (el.getAttribute("data-rendered") !== "r") {
74542
- el.setAttribute("data-rendered", "r");
74543
- this.questionBase.afterRenderQuestionElement(el);
74867
+ var contentElement = this.content || this.control;
74868
+ if (!!contentElement) {
74869
+ if (contentElement.getAttribute("data-rendered") !== "r") {
74870
+ contentElement.setAttribute("data-rendered", "r");
74871
+ this.questionBase.afterRenderQuestionElement(contentElement);
74544
74872
  }
74545
74873
  }
74546
74874
  };
@@ -74598,6 +74926,11 @@ var SurveyQuestionElementBase = /** @class */ (function (_super) {
74598
74926
  this.control = element;
74599
74927
  }
74600
74928
  };
74929
+ SurveyQuestionElementBase.prototype.setContent = function (element) {
74930
+ if (!!element) {
74931
+ this.content = element;
74932
+ }
74933
+ };
74601
74934
  return SurveyQuestionElementBase;
74602
74935
  }(SurveyElementBase));
74603
74936
 
@@ -74883,7 +75216,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
74883
75216
  else {
74884
75217
  fileInput = null;
74885
75218
  }
74886
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss },
75219
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss, ref: function (el) { return (_this.setContent(el)); } },
74887
75220
  fileInput,
74888
75221
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.dragArea, onDrop: this.question.onDrop, onDragOver: this.question.onDragOver, onDragLeave: this.question.onDragLeave, onDragEnter: this.question.onDragEnter },
74889
75222
  fileDecorator,
@@ -76893,7 +77226,7 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
76893
77226
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
76894
77227
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
76895
77228
  // @ts-ignore
76896
- 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 },
77229
+ 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 },
76897
77230
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.controlValue },
76898
77231
  items,
76899
77232
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_tagbox_filter__WEBPACK_IMPORTED_MODULE_4__["TagboxFilterString"], { model: dropdownMultiSelectListModel, question: this.question })),
@@ -77767,7 +78100,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
77767
78100
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
77768
78101
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
77769
78102
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringSuffix))) : null,
77770
- 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); } }))));
78103
+ 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); } }))));
77771
78104
  };
77772
78105
  return TagboxFilterString;
77773
78106
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
@@ -78646,6 +78979,35 @@ var settings = {
78646
78979
  "#": /[a-zA-Z0-9]/
78647
78980
  }
78648
78981
  },
78982
+ /**
78983
+ * 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"`.
78984
+ *
78985
+ * Default value: `false`
78986
+ *
78987
+ * 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"`.
78988
+ *
78989
+ * ```js
78990
+ * const surveyJson = {
78991
+ * "elements": [{
78992
+ * "name": "datetime",
78993
+ * "type": "text",
78994
+ * "title": "Select a date and time",
78995
+ * "inputType": "datetime-local",
78996
+ * "defaultValue": "2024-07-16T12:15:00" // Local date-time value
78997
+ * }]
78998
+ * }
78999
+ * ```
79000
+ *
79001
+ * ```js
79002
+ * import { Model } from "survey-core";
79003
+ * const surveyJson = { ... }
79004
+ * const survey = new Model(surveyJson);
79005
+ *
79006
+ * survey.data = {
79007
+ * datetime: "2024-07-16T12:15:00.000Z" // UTC date-time value
79008
+ * }
79009
+ * ```
79010
+ */
78649
79011
  storeUtcDates: false
78650
79012
  };
78651
79013
 
@@ -79339,6 +79701,7 @@ var SurveyElement = /** @class */ (function (_super) {
79339
79701
  _this.registerPropertyChangedHandlers(["isReadOnly"], function () { _this.onReadOnlyChanged(); });
79340
79702
  _this.registerPropertyChangedHandlers(["errors"], function () { _this.updateVisibleErrors(); });
79341
79703
  _this.registerPropertyChangedHandlers(["isSingleInRow"], function () { _this.updateElementCss(false); });
79704
+ _this.registerPropertyChangedHandlers(["minWidth", "maxWidth", "renderWidth", "allowRootStyle", "parent"], function () { _this.updateRootStyle(); });
79342
79705
  return _this;
79343
79706
  }
79344
79707
  SurveyElement.getProgressInfoByElements = function (children, isRequired) {
@@ -79433,6 +79796,16 @@ var SurveyElement = /** @class */ (function (_super) {
79433
79796
  }
79434
79797
  return false;
79435
79798
  };
79799
+ Object.defineProperty(SurveyElement.prototype, "colSpan", {
79800
+ get: function () {
79801
+ return this.getPropertyValue("colSpan", 1);
79802
+ },
79803
+ set: function (val) {
79804
+ this.setPropertyValue("colSpan", val);
79805
+ },
79806
+ enumerable: false,
79807
+ configurable: true
79808
+ });
79436
79809
  SurveyElement.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
79437
79810
  _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
79438
79811
  if (name === "state") {
@@ -80278,12 +80651,24 @@ var SurveyElement = /** @class */ (function (_super) {
80278
80651
  enumerable: false,
80279
80652
  configurable: true
80280
80653
  });
80281
- Object.defineProperty(SurveyElement.prototype, "rootStyle", {
80282
- get: function () {
80283
- var style = {};
80654
+ SurveyElement.prototype.updateRootStyle = function () {
80655
+ var style = {};
80656
+ var _width;
80657
+ if (!!this.parent) {
80658
+ var columns = this.parent.getColumsForElement(this);
80659
+ _width = columns.reduce(function (sum, col) { return col.effectiveWidth + sum; }, 0);
80660
+ if (!!_width && _width !== 100) {
80661
+ style["flexGrow"] = 0;
80662
+ style["flexShrink"] = 0;
80663
+ style["flexBasis"] = _width + "%";
80664
+ style["minWidth"] = undefined;
80665
+ style["maxWidth"] = undefined;
80666
+ }
80667
+ }
80668
+ if (Object.keys(style).length == 0) {
80284
80669
  var minWidth = this.minWidth;
80285
80670
  if (minWidth != "auto")
80286
- minWidth = "min(100%, " + this.minWidth + ")";
80671
+ minWidth = "min(100%, " + minWidth + ")";
80287
80672
  if (this.allowRootStyle && this.renderWidth) {
80288
80673
  // style["width"] = this.renderWidth;
80289
80674
  style["flexGrow"] = 1;
@@ -80292,11 +80677,9 @@ var SurveyElement = /** @class */ (function (_super) {
80292
80677
  style["minWidth"] = minWidth;
80293
80678
  style["maxWidth"] = this.maxWidth;
80294
80679
  }
80295
- return style;
80296
- },
80297
- enumerable: false,
80298
- configurable: true
80299
- });
80680
+ }
80681
+ this.rootStyle = style;
80682
+ };
80300
80683
  SurveyElement.prototype.isContainsSelection = function (el) {
80301
80684
  var elementWithSelection = undefined;
80302
80685
  var _document = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].getDocument();
@@ -80450,7 +80833,8 @@ var SurveyElement = /** @class */ (function (_super) {
80450
80833
  },
80451
80834
  getLeaveOptions: function () {
80452
80835
  var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
80453
- return { cssClass: cssClasses.contentFadeOut,
80836
+ return {
80837
+ cssClass: cssClasses.contentFadeOut,
80454
80838
  onBeforeRunAnimation: beforeRunAnimation,
80455
80839
  onAfterRunAnimation: afterRunAnimation
80456
80840
  };
@@ -80506,6 +80890,13 @@ var SurveyElement = /** @class */ (function (_super) {
80506
80890
  __decorate([
80507
80891
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
80508
80892
  ], SurveyElement.prototype, "isDragMe", void 0);
80893
+ __decorate([
80894
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
80895
+ onSet: function (newValue, target) {
80896
+ target.colSpan = newValue;
80897
+ }
80898
+ })
80899
+ ], SurveyElement.prototype, "effectiveColSpan", void 0);
80509
80900
  __decorate([
80510
80901
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
80511
80902
  ], SurveyElement.prototype, "hasVisibleErrors", void 0);
@@ -80515,6 +80906,9 @@ var SurveyElement = /** @class */ (function (_super) {
80515
80906
  __decorate([
80516
80907
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
80517
80908
  ], SurveyElement.prototype, "allowRootStyle", void 0);
80909
+ __decorate([
80910
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
80911
+ ], SurveyElement.prototype, "rootStyle", void 0);
80518
80912
  __decorate([
80519
80913
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
80520
80914
  ], SurveyElement.prototype, "_renderedIsExpanded", void 0);
@@ -81413,8 +81807,8 @@ var SurveyModel = /** @class */ (function (_super) {
81413
81807
  _this.isNavigationButtonPressed = false;
81414
81808
  _this.mouseDownPage = null;
81415
81809
  _this.isCalculatingProgressText = false;
81416
- _this.isFirstPageRendering = true;
81417
81810
  _this.isCurrentPageRendering = true;
81811
+ _this.isCurrentPageRendered = undefined;
81418
81812
  _this.isTriggerIsRunning = false;
81419
81813
  _this.triggerValues = null;
81420
81814
  _this.triggerKeys = null;
@@ -83856,7 +84250,8 @@ var SurveyModel = /** @class */ (function (_super) {
83856
84250
  }
83857
84251
  if (data) {
83858
84252
  for (var key in data) {
83859
- this.setDataValueCore(this.valuesHash, key, data[key]);
84253
+ var dataKey = typeof key === "string" ? key.trim() : key;
84254
+ this.setDataValueCore(this.valuesHash, dataKey, data[key]);
83860
84255
  }
83861
84256
  }
83862
84257
  this.updateAllQuestionsValue(clearData);
@@ -83956,9 +84351,7 @@ var SurveyModel = /** @class */ (function (_super) {
83956
84351
  var _this = this;
83957
84352
  if (this.editingObj == val)
83958
84353
  return;
83959
- if (!!this.editingObj) {
83960
- this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
83961
- }
84354
+ this.unConnectEditingObj();
83962
84355
  this.editingObjValue = val;
83963
84356
  if (this.isDisposed)
83964
84357
  return;
@@ -83984,6 +84377,11 @@ var SurveyModel = /** @class */ (function (_super) {
83984
84377
  enumerable: false,
83985
84378
  configurable: true
83986
84379
  });
84380
+ SurveyModel.prototype.unConnectEditingObj = function () {
84381
+ if (!!this.editingObj && !this.editingObj.isDisposed) {
84382
+ this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
84383
+ }
84384
+ };
83987
84385
  Object.defineProperty(SurveyModel.prototype, "isEditingSurveyElement", {
83988
84386
  get: function () {
83989
84387
  return !!this.editingObj;
@@ -84661,6 +85059,9 @@ var SurveyModel = /** @class */ (function (_super) {
84661
85059
  oldValue.passed = true;
84662
85060
  }
84663
85061
  }
85062
+ if (this.isCurrentPageRendered === true) {
85063
+ this.isCurrentPageRendered = false;
85064
+ }
84664
85065
  this.onCurrentPageChanged.fire(this, options);
84665
85066
  };
84666
85067
  SurveyModel.prototype.notifyQuestionsOnHidingContent = function (page) {
@@ -85445,7 +85846,11 @@ var SurveyModel = /** @class */ (function (_super) {
85445
85846
  return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
85446
85847
  };
85447
85848
  SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage, isFirstLoad) {
85849
+ var _this = this;
85448
85850
  this.questionHashesClear();
85851
+ if (this.firstPageIsStarted && this.pages.length > 0) {
85852
+ this.pages[0].questions.forEach(function (q) { return _this.questionHashesAdded(q); });
85853
+ }
85449
85854
  this.isLockingUpdateOnPageModes = !isFirstLoad;
85450
85855
  var startIndex = this.getPageStartIndex();
85451
85856
  _super.prototype.startLoadingFromJson.call(this);
@@ -86113,11 +86518,11 @@ var SurveyModel = /** @class */ (function (_super) {
86113
86518
  SurveyModel.prototype.afterRenderPage = function (htmlElement) {
86114
86519
  var _this = this;
86115
86520
  if (!this.isDesignMode && !this.focusingQuestionInfo) {
86116
- var doScroll_1 = !this.isFirstPageRendering;
86521
+ var doScroll_1 = this.isCurrentPageRendered === false;
86117
86522
  setTimeout(function () { return _this.scrollToTopOnPageChange(doScroll_1); }, 1);
86118
86523
  }
86119
86524
  this.focusQuestionInfo();
86120
- this.isFirstPageRendering = false;
86525
+ this.isCurrentPageRendered = true;
86121
86526
  if (this.onAfterRenderPage.isEmpty)
86122
86527
  return;
86123
86528
  this.onAfterRenderPage.fire(this, {
@@ -86655,6 +87060,7 @@ var SurveyModel = /** @class */ (function (_super) {
86655
87060
  SurveyModel.prototype.findQuestionByName = function (name) {
86656
87061
  return this.getQuestionByName(name);
86657
87062
  };
87063
+ SurveyModel.prototype.getEditingSurveyElement = function () { return this.editingObjValue; };
86658
87064
  /**
86659
87065
  * Returns a question with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName).
86660
87066
  *
@@ -88899,6 +89305,7 @@ var SurveyModel = /** @class */ (function (_super) {
88899
89305
  * Call this method to release resources if your application contains multiple survey models or if you re-create a survey model at runtime.
88900
89306
  */
88901
89307
  SurveyModel.prototype.dispose = function () {
89308
+ this.unConnectEditingObj();
88902
89309
  this.removeScrollEventListener();
88903
89310
  this.destroyResizeObserver();
88904
89311
  this.rootElement = undefined;
@@ -89076,6 +89483,9 @@ var SurveyModel = /** @class */ (function (_super) {
89076
89483
  __decorate([
89077
89484
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
89078
89485
  ], SurveyModel.prototype, "rootCss", void 0);
89486
+ __decorate([
89487
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
89488
+ ], SurveyModel.prototype, "gridLayoutEnabled", void 0);
89079
89489
  __decorate([
89080
89490
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
89081
89491
  ], SurveyModel.prototype, "calculatedWidthMode", void 0);
@@ -89373,6 +89783,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
89373
89783
  default: "auto",
89374
89784
  choices: ["auto", "static", "responsive"],
89375
89785
  },
89786
+ { name: "gridLayoutEnabled:boolean", default: false },
89376
89787
  { name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
89377
89788
  { name: "fitToContainer:boolean", default: true, visible: false },
89378
89789
  { name: "headerView", default: "basic", choices: ["basic", "advanced"], visible: false },
@@ -91806,6 +92217,8 @@ function _setIsTouch(val) {
91806
92217
  function detectMouseSupport(matchMedia) {
91807
92218
  if (!matchMedia)
91808
92219
  return false;
92220
+ if (IsMobile)
92221
+ return false;
91809
92222
  var pointerQuery = matchMedia("(pointer:fine)");
91810
92223
  var hoverQuery = matchMedia("(any-hover:hover)");
91811
92224
  return !!pointerQuery && pointerQuery.matches || !!hoverQuery && hoverQuery.matches;
@@ -92415,7 +92828,7 @@ function debounce(func) {
92415
92828
  /*!****************************!*\
92416
92829
  !*** ./src/utils/utils.ts ***!
92417
92830
  \****************************/
92418
- /*! 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 */
92831
+ /*! 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 */
92419
92832
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92420
92833
 
92421
92834
  "use strict";
@@ -92431,6 +92844,7 @@ __webpack_require__.r(__webpack_exports__);
92431
92844
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
92432
92845
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
92433
92846
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareArrays", function() { return compareArrays; });
92847
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "roundTo2Decimals", function() { return roundTo2Decimals; });
92434
92848
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
92435
92849
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
92436
92850
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
@@ -92995,6 +93409,9 @@ function compareArrays(oldValue, newValue, getKey) {
92995
93409
  });
92996
93410
  return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
92997
93411
  }
93412
+ function roundTo2Decimals(number) {
93413
+ return Math.round(number * 100) / 100;
93414
+ }
92998
93415
 
92999
93416
 
93000
93417