survey-react 1.11.7 → 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/defaultV2.css +3 -2
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +80 -9
- package/survey.react.js +397 -69
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.11.
|
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
|
@@ -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.
|
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.
|
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.
|
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.
|
8806
|
-
this.
|
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.
|
9959
|
-
ReleaseDate = "" + "2024-07-
|
9963
|
+
Version = "" + "1.11.8";
|
9964
|
+
ReleaseDate = "" + "2024-07-22";
|
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
|
-
|
17090
|
+
if (!q)
|
17091
|
+
return "";
|
17092
|
+
if (params.length > 1 && !!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
|
});
|
@@ -30789,7 +30799,6 @@ var InputElementAdapter = /** @class */ (function () {
|
|
30789
30799
|
this.clickHandler = function (event) {
|
30790
30800
|
if (_this.inputElement.value == _this.inputMaskInstance.getMaskedValue("")) {
|
30791
30801
|
_this.inputElement.setSelectionRange(0, 0);
|
30792
|
-
event.preventDefault();
|
30793
30802
|
}
|
30794
30803
|
};
|
30795
30804
|
this.beforeInputHandler = function (event) {
|
@@ -33007,6 +33016,82 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("page", [
|
|
33007
33016
|
}, "panelbase");
|
33008
33017
|
|
33009
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
|
+
|
33010
33095
|
/***/ }),
|
33011
33096
|
|
33012
33097
|
/***/ "./src/panel.ts":
|
@@ -33035,6 +33120,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
33035
33120
|
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
|
33036
33121
|
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
|
33037
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");
|
33038
33124
|
var __extends = (undefined && undefined.__extends) || (function () {
|
33039
33125
|
var extendStatics = function (d, b) {
|
33040
33126
|
extendStatics = Object.setPrototypeOf ||
|
@@ -33075,6 +33161,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
33075
33161
|
|
33076
33162
|
|
33077
33163
|
|
33164
|
+
|
33078
33165
|
var QuestionRowModel = /** @class */ (function (_super) {
|
33079
33166
|
__extends(QuestionRowModel, _super);
|
33080
33167
|
function QuestionRowModel(panel) {
|
@@ -33351,10 +33438,18 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33351
33438
|
var _this = _super.call(this, name) || this;
|
33352
33439
|
_this.isQuestionsReady = false;
|
33353
33440
|
_this.questionsValue = new Array();
|
33441
|
+
_this._columns = undefined;
|
33442
|
+
_this._columnsReady = false;
|
33354
33443
|
_this.rowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getRowsAnimationOptions(), function (value) {
|
33355
33444
|
_this.setPropertyValue("visibleRows", value);
|
33356
33445
|
}, function () { return _this.visibleRows; });
|
33357
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
|
+
};
|
33358
33453
|
_this.locCountRowUpdates = 0;
|
33359
33454
|
_this.createNewArray("rows", function (el, index) { _this.onAddRow(el); }, function (el) { _this.onRemoveRow(el); });
|
33360
33455
|
_this.createNewArray("visibleRows");
|
@@ -33395,7 +33490,8 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33395
33490
|
isAnimationEnabled: function () { return _this.animationAllowed; },
|
33396
33491
|
getAnimatedElement: function (row) { return row.getRootElement(); },
|
33397
33492
|
getLeaveOptions: function (_) {
|
33398
|
-
return {
|
33493
|
+
return {
|
33494
|
+
cssClass: _this.cssClasses.rowFadeOut,
|
33399
33495
|
onBeforeRunAnimation: beforeRunAnimation
|
33400
33496
|
};
|
33401
33497
|
},
|
@@ -33440,10 +33536,14 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33440
33536
|
this.releaseAnimations();
|
33441
33537
|
};
|
33442
33538
|
PanelModelBase.prototype.endLoadingFromJson = function () {
|
33539
|
+
var _this = this;
|
33443
33540
|
_super.prototype.endLoadingFromJson.call(this);
|
33444
33541
|
this.updateDescriptionVisibility(this.description);
|
33445
33542
|
this.markQuestionListDirty();
|
33446
33543
|
this.onRowsChanged();
|
33544
|
+
this.layoutColumns.forEach(function (col) {
|
33545
|
+
col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
|
33546
|
+
});
|
33447
33547
|
};
|
33448
33548
|
Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
|
33449
33549
|
get: function () {
|
@@ -34226,6 +34326,51 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34226
34326
|
}
|
34227
34327
|
}
|
34228
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
|
+
};
|
34229
34374
|
PanelModelBase.prototype.updateCustomWidgets = function () {
|
34230
34375
|
for (var i = 0; i < this.elements.length; i++) {
|
34231
34376
|
this.elements[i].updateCustomWidgets();
|
@@ -34286,6 +34431,69 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34286
34431
|
PanelModelBase.prototype.getQuestionTitleWidth = function () {
|
34287
34432
|
return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
|
34288
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
|
+
};
|
34289
34497
|
PanelModelBase.prototype.getStartIndex = function () {
|
34290
34498
|
if (!!this.parent)
|
34291
34499
|
return this.parent.getQuestionStartIndex();
|
@@ -34370,6 +34578,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34370
34578
|
return;
|
34371
34579
|
this.blockAnimations();
|
34372
34580
|
this.setArrayPropertyDirectly("rows", this.buildRows());
|
34581
|
+
this.updateColumns();
|
34373
34582
|
this.releaseAnimations();
|
34374
34583
|
};
|
34375
34584
|
PanelModelBase.prototype.blockRowsUpdates = function () {
|
@@ -34569,6 +34778,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34569
34778
|
if (!this.canBuildRows())
|
34570
34779
|
return;
|
34571
34780
|
this.updateRowsRemoveElementFromRow(element, this.findRowByElement(element));
|
34781
|
+
this.updateColumns();
|
34572
34782
|
};
|
34573
34783
|
PanelModelBase.prototype.updateRowsRemoveElementFromRow = function (element, row) {
|
34574
34784
|
if (!row || !row.panel)
|
@@ -34796,6 +35006,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34796
35006
|
if (this.wasRendered) {
|
34797
35007
|
element.onFirstRendering();
|
34798
35008
|
}
|
35009
|
+
this.updateColumns();
|
34799
35010
|
return true;
|
34800
35011
|
};
|
34801
35012
|
PanelModelBase.prototype.insertElement = function (element, dest, location) {
|
@@ -34912,6 +35123,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
34912
35123
|
return false;
|
34913
35124
|
}
|
34914
35125
|
this.elements.splice(index, 1);
|
35126
|
+
this.updateColumns();
|
34915
35127
|
return true;
|
34916
35128
|
};
|
34917
35129
|
PanelModelBase.prototype.removeQuestion = function (question) {
|
@@ -35024,6 +35236,16 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
35024
35236
|
PanelModelBase.prototype.getCssError = function (cssClasses) {
|
35025
35237
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(cssClasses.error.root).toString();
|
35026
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
|
+
};
|
35027
35249
|
PanelModelBase.prototype.dispose = function () {
|
35028
35250
|
_super.prototype.dispose.call(this);
|
35029
35251
|
if (this.rows) {
|
@@ -35038,6 +35260,9 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
35038
35260
|
this.elements.splice(0, this.elements.length);
|
35039
35261
|
};
|
35040
35262
|
PanelModelBase.panelCounter = 100;
|
35263
|
+
__decorate([
|
35264
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])()
|
35265
|
+
], PanelModelBase.prototype, "layoutColumns", void 0);
|
35041
35266
|
__decorate([
|
35042
35267
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
|
35043
35268
|
], PanelModelBase.prototype, "showTitle", void 0);
|
@@ -35069,6 +35294,10 @@ var PanelModel = /** @class */ (function (_super) {
|
|
35069
35294
|
}
|
35070
35295
|
});
|
35071
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
|
+
});
|
35072
35301
|
return _this;
|
35073
35302
|
}
|
35074
35303
|
PanelModel.prototype.getType = function () {
|
@@ -35088,13 +35317,25 @@ var PanelModel = /** @class */ (function (_super) {
|
|
35088
35317
|
}
|
35089
35318
|
return _super.prototype.getSurvey.call(this, live);
|
35090
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
|
+
};
|
35091
35330
|
PanelModel.prototype.onSurveyLoad = function () {
|
35092
35331
|
_super.prototype.onSurveyLoad.call(this);
|
35093
35332
|
this.onIndentChanged();
|
35333
|
+
this.calcHasTextInTitle();
|
35094
35334
|
};
|
35095
35335
|
PanelModel.prototype.onSetData = function () {
|
35096
35336
|
_super.prototype.onSetData.call(this);
|
35097
35337
|
this.onIndentChanged();
|
35338
|
+
this.calcHasTextInTitle();
|
35098
35339
|
};
|
35099
35340
|
Object.defineProperty(PanelModel.prototype, "isPanel", {
|
35100
35341
|
get: function () {
|
@@ -35400,7 +35641,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
35400
35641
|
get: function () {
|
35401
35642
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
35402
35643
|
.append(this.getCssTitle(this.cssClasses.panel))
|
35403
|
-
.append(this.cssClasses.panel.titleHidden, !this.
|
35644
|
+
.append(this.cssClasses.panel.titleHidden, !this.hasTextInTitle && this.isDesignMode)
|
35404
35645
|
.toString();
|
35405
35646
|
},
|
35406
35647
|
enumerable: false,
|
@@ -35504,6 +35745,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
|
|
35504
35745
|
default: "default",
|
35505
35746
|
choices: ["default", "top", "bottom", "left", "hidden"],
|
35506
35747
|
},
|
35748
|
+
{
|
35749
|
+
name: "layoutColumns:panellayoutcolumns",
|
35750
|
+
className: "panellayoutcolumn", isArray: true,
|
35751
|
+
onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); }
|
35752
|
+
},
|
35507
35753
|
{ name: "title:text", serializationProperty: "locTitle" },
|
35508
35754
|
{ name: "description:text", serializationProperty: "locDescription" },
|
35509
35755
|
{
|
@@ -35530,6 +35776,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panel", [
|
|
35530
35776
|
"width",
|
35531
35777
|
{ name: "minWidth", defaultFunc: function () { return "auto"; } },
|
35532
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 },
|
35533
35784
|
{ name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
|
35534
35785
|
{ name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
|
35535
35786
|
{
|
@@ -38850,6 +39101,7 @@ var Question = /** @class */ (function (_super) {
|
|
38850
39101
|
_this.updateQuestionCss();
|
38851
39102
|
});
|
38852
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(); });
|
38853
39105
|
return _this;
|
38854
39106
|
}
|
38855
39107
|
Question.getQuestionId = function () {
|
@@ -39457,18 +39709,31 @@ var Question = /** @class */ (function (_super) {
|
|
39457
39709
|
Object.defineProperty(Question.prototype, "titleWidth", {
|
39458
39710
|
get: function () {
|
39459
39711
|
if (this.getTitleLocation() === "left") {
|
39460
|
-
|
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) {
|
39461
39718
|
var width = this.parent.getQuestionTitleWidth();
|
39462
39719
|
if (width && !isNaN(width))
|
39463
39720
|
width = width + "px";
|
39464
39721
|
return width;
|
39465
39722
|
}
|
39723
|
+
return (percentWidth / (columnCount || 1)) + "%";
|
39466
39724
|
}
|
39467
39725
|
return undefined;
|
39468
39726
|
},
|
39469
39727
|
enumerable: false,
|
39470
39728
|
configurable: true
|
39471
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
|
+
};
|
39472
39737
|
/**
|
39473
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).
|
39474
39739
|
* @see titleLocation
|
@@ -40152,9 +40417,10 @@ var Question = /** @class */ (function (_super) {
|
|
40152
40417
|
this.expandAllParents();
|
40153
40418
|
this.survey.scrollElementToTop(this, this, null, this.id, scrollIfVisible);
|
40154
40419
|
}
|
40155
|
-
|
40156
|
-
|
40157
|
-
|
40420
|
+
this.focusInputElement(onError);
|
40421
|
+
};
|
40422
|
+
Question.prototype.focusInputElement = function (onError) {
|
40423
|
+
var id = !onError ? this.getFirstInputElementId() : this.getFirstErrorInputElementId();
|
40158
40424
|
if (_survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"].FocusElement(id)) {
|
40159
40425
|
this.fireCallback(this.focusCallback);
|
40160
40426
|
}
|
@@ -41886,13 +42152,6 @@ var Question = /** @class */ (function (_super) {
|
|
41886
42152
|
enumerable: false,
|
41887
42153
|
configurable: true
|
41888
42154
|
});
|
41889
|
-
Object.defineProperty(Question.prototype, "ariaExpanded", {
|
41890
|
-
get: function () {
|
41891
|
-
return null;
|
41892
|
-
},
|
41893
|
-
enumerable: false,
|
41894
|
-
configurable: true
|
41895
|
-
});
|
41896
42155
|
Object.defineProperty(Question.prototype, "ariaErrormessage", {
|
41897
42156
|
get: function () {
|
41898
42157
|
if (this.isNewA11yStructure)
|
@@ -41979,6 +42238,9 @@ var Question = /** @class */ (function (_super) {
|
|
41979
42238
|
__decorate([
|
41980
42239
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
41981
42240
|
], Question.prototype, "forceIsInputReadOnly", void 0);
|
42241
|
+
__decorate([
|
42242
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
42243
|
+
], Question.prototype, "ariaExpanded", void 0);
|
41982
42244
|
__decorate([
|
41983
42245
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true, onSet: function (val, target) { return target.calcRenderedCommentPlaceholder(); } })
|
41984
42246
|
], Question.prototype, "commentPlaceholder", void 0);
|
@@ -42013,6 +42275,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
|
|
42013
42275
|
{ name: "width" },
|
42014
42276
|
{ name: "minWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].minWidth; } },
|
42015
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 },
|
42016
42283
|
{ name: "startWithNewLine:boolean", default: true, layout: "row" },
|
42017
42284
|
{ name: "indent:number", default: 0, choices: [0, 1, 2, 3], layout: "row" },
|
42018
42285
|
{
|
@@ -47060,6 +47327,10 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
47060
47327
|
QuestionCustomModelBase.prototype.getQuestionTitleWidth = function () {
|
47061
47328
|
return undefined;
|
47062
47329
|
};
|
47330
|
+
QuestionCustomModelBase.prototype.getColumsForElement = function (el) {
|
47331
|
+
return [];
|
47332
|
+
};
|
47333
|
+
QuestionCustomModelBase.prototype.updateColumns = function () { };
|
47063
47334
|
QuestionCustomModelBase.prototype.getQuestionStartIndex = function () {
|
47064
47335
|
return this.getStartIndex();
|
47065
47336
|
};
|
@@ -48022,14 +48293,6 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
48022
48293
|
enumerable: false,
|
48023
48294
|
configurable: true
|
48024
48295
|
});
|
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
48296
|
QuestionDropdownModel.prototype.onOpenedCallBack = function () {
|
48034
48297
|
this.onOpened.fire(this, { question: this, choices: this.choices });
|
48035
48298
|
};
|
@@ -48077,6 +48340,12 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
48077
48340
|
this.lastSelectedItemValue = null;
|
48078
48341
|
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
|
48079
48342
|
};
|
48343
|
+
QuestionDropdownModel.prototype.afterRenderCore = function (el) {
|
48344
|
+
_super.prototype.afterRenderCore.call(this, el);
|
48345
|
+
if (!!this.dropdownListModelValue) {
|
48346
|
+
this.dropdownListModelValue.clear();
|
48347
|
+
}
|
48348
|
+
};
|
48080
48349
|
QuestionDropdownModel.prototype.onClick = function (e) {
|
48081
48350
|
!!this.onOpenedCallBack && this.onOpenedCallBack();
|
48082
48351
|
};
|
@@ -59689,6 +59958,10 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
59689
59958
|
QuestionMultipleTextModel.prototype.getQuestionTitleWidth = function () {
|
59690
59959
|
return undefined;
|
59691
59960
|
};
|
59961
|
+
QuestionMultipleTextModel.prototype.getColumsForElement = function (el) {
|
59962
|
+
return [];
|
59963
|
+
};
|
59964
|
+
QuestionMultipleTextModel.prototype.updateColumns = function () { };
|
59692
59965
|
QuestionMultipleTextModel.prototype.getQuestionStartIndex = function () {
|
59693
59966
|
return this.getStartIndex();
|
59694
59967
|
};
|
@@ -64823,17 +65096,6 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
64823
65096
|
QuestionRatingModel.prototype.getDesktopRenderAs = function () {
|
64824
65097
|
return (this.displayMode == "dropdown") ? "dropdown" : "default";
|
64825
65098
|
};
|
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
65099
|
Object.defineProperty(QuestionRatingModel.prototype, "dropdownListModel", {
|
64838
65100
|
get: function () {
|
64839
65101
|
if (this.renderAs === "dropdown") {
|
@@ -65792,14 +66054,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
65792
66054
|
enumerable: false,
|
65793
66055
|
configurable: true
|
65794
66056
|
});
|
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
66057
|
QuestionTagboxModel.prototype.getControlClass = function () {
|
65804
66058
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
|
65805
66059
|
.append(this.cssClasses.control)
|
@@ -70977,7 +71231,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
70977
71231
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
|
70978
71232
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
70979
71233
|
// @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
|
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 },
|
70981
71235
|
dropdownListModel.showHintPrefix ?
|
70982
71236
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
|
70983
71237
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringPrefix))) : null,
|
@@ -70987,7 +71241,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
70987
71241
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
|
70988
71242
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
|
70989
71243
|
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
|
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 })),
|
70991
71245
|
this.createClearButton()));
|
70992
71246
|
};
|
70993
71247
|
SurveyQuestionDropdownBase.prototype.createClearButton = function () {
|
@@ -73331,7 +73585,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
|
|
73331
73585
|
var rootStyle = question.getRootStyle();
|
73332
73586
|
var questionContent = this.wrapQuestionContent(this.renderQuestionContent());
|
73333
73587
|
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
|
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 },
|
73335
73589
|
errorsAboveQuestion,
|
73336
73590
|
headerTop,
|
73337
73591
|
questionContent,
|
@@ -76893,7 +77147,7 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
|
|
76893
77147
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
|
76894
77148
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
76895
77149
|
// @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
|
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 },
|
76897
77151
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.controlValue },
|
76898
77152
|
items,
|
76899
77153
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_tagbox_filter__WEBPACK_IMPORTED_MODULE_4__["TagboxFilterString"], { model: dropdownMultiSelectListModel, question: this.question })),
|
@@ -77767,7 +78021,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
77767
78021
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
|
77768
78022
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
|
77769
78023
|
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
|
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); } }))));
|
77771
78025
|
};
|
77772
78026
|
return TagboxFilterString;
|
77773
78027
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|
@@ -78646,6 +78900,35 @@ var settings = {
|
|
78646
78900
|
"#": /[a-zA-Z0-9]/
|
78647
78901
|
}
|
78648
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
|
+
*/
|
78649
78932
|
storeUtcDates: false
|
78650
78933
|
};
|
78651
78934
|
|
@@ -79339,6 +79622,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
79339
79622
|
_this.registerPropertyChangedHandlers(["isReadOnly"], function () { _this.onReadOnlyChanged(); });
|
79340
79623
|
_this.registerPropertyChangedHandlers(["errors"], function () { _this.updateVisibleErrors(); });
|
79341
79624
|
_this.registerPropertyChangedHandlers(["isSingleInRow"], function () { _this.updateElementCss(false); });
|
79625
|
+
_this.registerPropertyChangedHandlers(["minWidth", "maxWidth", "renderWidth", "allowRootStyle", "parent"], function () { _this.updateRootStyle(); });
|
79342
79626
|
return _this;
|
79343
79627
|
}
|
79344
79628
|
SurveyElement.getProgressInfoByElements = function (children, isRequired) {
|
@@ -79433,6 +79717,16 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
79433
79717
|
}
|
79434
79718
|
return false;
|
79435
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
|
+
});
|
79436
79730
|
SurveyElement.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
|
79437
79731
|
_super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
|
79438
79732
|
if (name === "state") {
|
@@ -80278,12 +80572,24 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
80278
80572
|
enumerable: false,
|
80279
80573
|
configurable: true
|
80280
80574
|
});
|
80281
|
-
|
80282
|
-
|
80283
|
-
|
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) {
|
80284
80590
|
var minWidth = this.minWidth;
|
80285
80591
|
if (minWidth != "auto")
|
80286
|
-
minWidth = "min(100%, " +
|
80592
|
+
minWidth = "min(100%, " + minWidth + ")";
|
80287
80593
|
if (this.allowRootStyle && this.renderWidth) {
|
80288
80594
|
// style["width"] = this.renderWidth;
|
80289
80595
|
style["flexGrow"] = 1;
|
@@ -80292,11 +80598,9 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
80292
80598
|
style["minWidth"] = minWidth;
|
80293
80599
|
style["maxWidth"] = this.maxWidth;
|
80294
80600
|
}
|
80295
|
-
|
80296
|
-
|
80297
|
-
|
80298
|
-
configurable: true
|
80299
|
-
});
|
80601
|
+
}
|
80602
|
+
this.rootStyle = style;
|
80603
|
+
};
|
80300
80604
|
SurveyElement.prototype.isContainsSelection = function (el) {
|
80301
80605
|
var elementWithSelection = undefined;
|
80302
80606
|
var _document = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].getDocument();
|
@@ -80450,7 +80754,8 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
80450
80754
|
},
|
80451
80755
|
getLeaveOptions: function () {
|
80452
80756
|
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
80453
|
-
return {
|
80757
|
+
return {
|
80758
|
+
cssClass: cssClasses.contentFadeOut,
|
80454
80759
|
onBeforeRunAnimation: beforeRunAnimation,
|
80455
80760
|
onAfterRunAnimation: afterRunAnimation
|
80456
80761
|
};
|
@@ -80506,6 +80811,13 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
80506
80811
|
__decorate([
|
80507
80812
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
80508
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);
|
80509
80821
|
__decorate([
|
80510
80822
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
80511
80823
|
], SurveyElement.prototype, "hasVisibleErrors", void 0);
|
@@ -80515,6 +80827,9 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
80515
80827
|
__decorate([
|
80516
80828
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
|
80517
80829
|
], SurveyElement.prototype, "allowRootStyle", void 0);
|
80830
|
+
__decorate([
|
80831
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
80832
|
+
], SurveyElement.prototype, "rootStyle", void 0);
|
80518
80833
|
__decorate([
|
80519
80834
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
80520
80835
|
], SurveyElement.prototype, "_renderedIsExpanded", void 0);
|
@@ -83856,7 +84171,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
83856
84171
|
}
|
83857
84172
|
if (data) {
|
83858
84173
|
for (var key in data) {
|
83859
|
-
|
84174
|
+
var dataKey = typeof key === "string" ? key.trim() : key;
|
84175
|
+
this.setDataValueCore(this.valuesHash, dataKey, data[key]);
|
83860
84176
|
}
|
83861
84177
|
}
|
83862
84178
|
this.updateAllQuestionsValue(clearData);
|
@@ -85445,7 +85761,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
85445
85761
|
return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
|
85446
85762
|
};
|
85447
85763
|
SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage, isFirstLoad) {
|
85764
|
+
var _this = this;
|
85448
85765
|
this.questionHashesClear();
|
85766
|
+
if (this.firstPageIsStarted && this.pages.length > 0) {
|
85767
|
+
this.pages[0].questions.forEach(function (q) { return _this.questionHashesAdded(q); });
|
85768
|
+
}
|
85449
85769
|
this.isLockingUpdateOnPageModes = !isFirstLoad;
|
85450
85770
|
var startIndex = this.getPageStartIndex();
|
85451
85771
|
_super.prototype.startLoadingFromJson.call(this);
|
@@ -89076,6 +89396,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
89076
89396
|
__decorate([
|
89077
89397
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
89078
89398
|
], SurveyModel.prototype, "rootCss", void 0);
|
89399
|
+
__decorate([
|
89400
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
89401
|
+
], SurveyModel.prototype, "gridLayoutEnabled", void 0);
|
89079
89402
|
__decorate([
|
89080
89403
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
89081
89404
|
], SurveyModel.prototype, "calculatedWidthMode", void 0);
|
@@ -89373,6 +89696,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
89373
89696
|
default: "auto",
|
89374
89697
|
choices: ["auto", "static", "responsive"],
|
89375
89698
|
},
|
89699
|
+
{ name: "gridLayoutEnabled:boolean", default: false, visible: false },
|
89376
89700
|
{ name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
|
89377
89701
|
{ name: "fitToContainer:boolean", default: true, visible: false },
|
89378
89702
|
{ name: "headerView", default: "basic", choices: ["basic", "advanced"], visible: false },
|
@@ -92415,7 +92739,7 @@ function debounce(func) {
|
|
92415
92739
|
/*!****************************!*\
|
92416
92740
|
!*** ./src/utils/utils.ts ***!
|
92417
92741
|
\****************************/
|
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 */
|
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 */
|
92419
92743
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
92420
92744
|
|
92421
92745
|
"use strict";
|
@@ -92431,6 +92755,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
92431
92755
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
|
92432
92756
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
|
92433
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; });
|
92434
92759
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
|
92435
92760
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
|
92436
92761
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
|
@@ -92995,6 +93320,9 @@ function compareArrays(oldValue, newValue, getKey) {
|
|
92995
93320
|
});
|
92996
93321
|
return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
|
92997
93322
|
}
|
93323
|
+
function roundTo2Decimals(number) {
|
93324
|
+
return Math.round(number * 100) / 100;
|
93325
|
+
}
|
92998
93326
|
|
92999
93327
|
|
93000
93328
|
|