survey-core 1.9.137 → 1.9.138
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 +43 -23
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +43 -23
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +1 -1
- package/modern.css.map +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +134 -67
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.css.map +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/dragdrop/matrix-rows.d.ts +2 -1
- package/ts3.4/typings/mask/input_element_adapter.d.ts +1 -0
- package/ts3.4/typings/mask/mask_datetime.d.ts +12 -2
- package/ts3.4/typings/mask/mask_numeric.d.ts +1 -1
- package/ts3.4/typings/question_custom.d.ts +2 -0
- package/ts3.4/typings/question_imagepicker.d.ts +36 -6
- package/ts3.4/typings/question_matrixdynamic.d.ts +1 -0
- package/typings/dragdrop/matrix-rows.d.ts +2 -1
- package/typings/mask/input_element_adapter.d.ts +1 -0
- package/typings/mask/mask_datetime.d.ts +12 -2
- package/typings/mask/mask_numeric.d.ts +1 -1
- package/typings/question_custom.d.ts +2 -0
- package/typings/question_imagepicker.d.ts +36 -6
- package/typings/question_matrixdynamic.d.ts +2 -0
package/modern.fontless.min.css
CHANGED
package/modern.min.css
CHANGED
package/package.json
CHANGED
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.138
|
|
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
|
*/
|
|
@@ -6933,7 +6933,7 @@ var DragDropCore = /** @class */ (function () {
|
|
|
6933
6933
|
return (this.dropTarget === this.prevDropTarget && newIsBottom === this.isBottom);
|
|
6934
6934
|
};
|
|
6935
6935
|
DragDropCore.prototype.getShortcutText = function (draggedElement) {
|
|
6936
|
-
return draggedElement.shortcutText;
|
|
6936
|
+
return draggedElement === null || draggedElement === void 0 ? void 0 : draggedElement.shortcutText;
|
|
6937
6937
|
};
|
|
6938
6938
|
DragDropCore.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
|
|
6939
6939
|
var draggedElementShortcut = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomDocumentHelper"].createElement("div");
|
|
@@ -7470,8 +7470,12 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
|
|
|
7470
7470
|
dropTargetRenderedRow = matrix.renderedTable.rows.filter(function (renderedRow) { return renderedRow.row && renderedRow.row.id === dataAttributeValue; })[0];
|
|
7471
7471
|
return dropTargetRenderedRow.row;
|
|
7472
7472
|
};
|
|
7473
|
+
DragDropMatrixRows.prototype.canInsertIntoThisRow = function (row) {
|
|
7474
|
+
var lockedRows = this.parentElement.lockedRowCount;
|
|
7475
|
+
return lockedRows <= 0 || row.rowIndex > lockedRows;
|
|
7476
|
+
};
|
|
7473
7477
|
DragDropMatrixRows.prototype.isDropTargetValid = function (dropTarget, dropTargetNode) {
|
|
7474
|
-
return
|
|
7478
|
+
return this.canInsertIntoThisRow(dropTarget);
|
|
7475
7479
|
};
|
|
7476
7480
|
DragDropMatrixRows.prototype.calculateIsBottom = function (clientY) {
|
|
7477
7481
|
var rendreredRows = this.parentElement.renderedTable.rows;
|
|
@@ -9559,8 +9563,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9559
9563
|
|
|
9560
9564
|
var Version;
|
|
9561
9565
|
var ReleaseDate;
|
|
9562
|
-
Version = "" + "1.9.
|
|
9563
|
-
ReleaseDate = "" + "2024-04-
|
|
9566
|
+
Version = "" + "1.9.138";
|
|
9567
|
+
ReleaseDate = "" + "2024-04-09";
|
|
9564
9568
|
function checkLibraryVersion(ver, libraryName) {
|
|
9565
9569
|
if (Version != ver) {
|
|
9566
9570
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -21556,6 +21560,12 @@ var InputElementAdapter = /** @class */ (function () {
|
|
|
21556
21560
|
_this.inputElement.value = maskedValue;
|
|
21557
21561
|
}
|
|
21558
21562
|
};
|
|
21563
|
+
this.clickHandler = function (event) {
|
|
21564
|
+
if (_this.inputElement.value == _this.inputMaskInstance.getMaskedValue("")) {
|
|
21565
|
+
_this.inputElement.setSelectionRange(0, 0);
|
|
21566
|
+
event.preventDefault();
|
|
21567
|
+
}
|
|
21568
|
+
};
|
|
21559
21569
|
this.beforeInputHandler = function (event) {
|
|
21560
21570
|
var args = _this.createArgs(event);
|
|
21561
21571
|
var result = _this.inputMaskInstance.processInput(args);
|
|
@@ -21599,11 +21609,15 @@ var InputElementAdapter = /** @class */ (function () {
|
|
|
21599
21609
|
InputElementAdapter.prototype.addInputEventListener = function () {
|
|
21600
21610
|
if (!!this.inputElement) {
|
|
21601
21611
|
this.inputElement.addEventListener("beforeinput", this.beforeInputHandler);
|
|
21612
|
+
this.inputElement.addEventListener("click", this.clickHandler);
|
|
21613
|
+
this.inputElement.addEventListener("focus", this.clickHandler);
|
|
21602
21614
|
}
|
|
21603
21615
|
};
|
|
21604
21616
|
InputElementAdapter.prototype.removeInputEventListener = function () {
|
|
21605
21617
|
if (!!this.inputElement) {
|
|
21606
21618
|
this.inputElement.removeEventListener("beforeinput", this.beforeInputHandler);
|
|
21619
|
+
this.inputElement.removeEventListener("click", this.clickHandler);
|
|
21620
|
+
this.inputElement.removeEventListener("focus", this.clickHandler);
|
|
21607
21621
|
}
|
|
21608
21622
|
};
|
|
21609
21623
|
InputElementAdapter.prototype.dispose = function () {
|
|
@@ -22038,12 +22052,20 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
22038
22052
|
});
|
|
22039
22053
|
};
|
|
22040
22054
|
InputMaskDateTime.prototype.getISO_8601Format = function (dateTime) {
|
|
22041
|
-
|
|
22042
|
-
|
|
22043
|
-
|
|
22044
|
-
|
|
22045
|
-
|
|
22046
|
-
|
|
22055
|
+
var date = [];
|
|
22056
|
+
if (dateTime.year !== undefined) {
|
|
22057
|
+
var year = this.getPlaceholder(4, dateTime.year.toString(), "0") + dateTime.year;
|
|
22058
|
+
date.push(year);
|
|
22059
|
+
}
|
|
22060
|
+
if (dateTime.month !== undefined && dateTime.year !== undefined) {
|
|
22061
|
+
var month = this.getPlaceholder(2, dateTime.month.toString(), "0") + dateTime.month;
|
|
22062
|
+
date.push(month);
|
|
22063
|
+
}
|
|
22064
|
+
if (dateTime.day !== undefined && dateTime.month !== undefined && dateTime.year !== undefined) {
|
|
22065
|
+
var day = this.getPlaceholder(2, dateTime.day.toString(), "0") + dateTime.day;
|
|
22066
|
+
date.push(day);
|
|
22067
|
+
}
|
|
22068
|
+
return date.join("-");
|
|
22047
22069
|
};
|
|
22048
22070
|
InputMaskDateTime.prototype.isYearValid = function (dateTime) {
|
|
22049
22071
|
if (dateTime.min === undefined && dateTime.max === undefined)
|
|
@@ -22086,13 +22108,36 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
22086
22108
|
data = data.slice(0, data.length - 1);
|
|
22087
22109
|
}
|
|
22088
22110
|
}
|
|
22089
|
-
|
|
22111
|
+
dateTime[propertyName] = parseInt(data);
|
|
22112
|
+
if (propertyName === "year" && !this.isYearValid(dateTime)) {
|
|
22090
22113
|
data = data.slice(0, data.length - 1);
|
|
22091
22114
|
}
|
|
22092
22115
|
else if ((propertyName === "day" && parseInt(data[0]) > 3) || (propertyName === "month" && parseInt(data[0]) > 1)) {
|
|
22116
|
+
if (this.isDateValid(dateTime)) {
|
|
22117
|
+
newItem.isCompleted = true;
|
|
22118
|
+
}
|
|
22119
|
+
else {
|
|
22120
|
+
data = data.slice(0, data.length - 1);
|
|
22121
|
+
}
|
|
22122
|
+
}
|
|
22123
|
+
else if ((propertyName === "day" && parseInt(data[0]) <= 3 && parseInt(data[0]) !== 0) || (propertyName === "month" && parseInt(data[0]) <= 1 && parseInt(data[0]) !== 0)) {
|
|
22124
|
+
var prevValue = dateTime[propertyName];
|
|
22125
|
+
var tempValue = prevValue * 10;
|
|
22126
|
+
var maxValue = propertyName === "month" ? 3 : 10;
|
|
22093
22127
|
newItem.isCompleted = true;
|
|
22128
|
+
for (var index = 0; index < maxValue; index++) {
|
|
22129
|
+
dateTime[propertyName] = tempValue + index;
|
|
22130
|
+
if (this.isDateValid(dateTime)) {
|
|
22131
|
+
newItem.isCompleted = false;
|
|
22132
|
+
break;
|
|
22133
|
+
}
|
|
22134
|
+
}
|
|
22135
|
+
dateTime[propertyName] = prevValue;
|
|
22136
|
+
if (newItem.isCompleted && !this.isDateValid(dateTime)) {
|
|
22137
|
+
data = data.slice(0, data.length - 1);
|
|
22138
|
+
}
|
|
22094
22139
|
}
|
|
22095
|
-
newItem.value = data;
|
|
22140
|
+
newItem.value = data || undefined;
|
|
22096
22141
|
dateTime[propertyName] = parseInt(data) > 0 ? parseInt(data) : undefined;
|
|
22097
22142
|
};
|
|
22098
22143
|
InputMaskDateTime.prototype.getCorrectDatePartFormat = function (inputData, matchWholeMask) {
|
|
@@ -22139,6 +22184,11 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
22139
22184
|
var result = "";
|
|
22140
22185
|
var prevSeparator = "";
|
|
22141
22186
|
var prevIsCompleted = false;
|
|
22187
|
+
var lastItemWithDataIndex = this.inputDateTimeData.length - 1;
|
|
22188
|
+
if (!matchWholeMask) {
|
|
22189
|
+
var arr = this.inputDateTimeData.filter(function (item) { return !!item.value; });
|
|
22190
|
+
lastItemWithDataIndex = this.inputDateTimeData.indexOf(arr[arr.length - 1]);
|
|
22191
|
+
}
|
|
22142
22192
|
for (var index = 0; index < this.inputDateTimeData.length; index++) {
|
|
22143
22193
|
var inputData = this.inputDateTimeData[index];
|
|
22144
22194
|
switch (inputData.lexem.type) {
|
|
@@ -22150,7 +22200,8 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
22150
22200
|
return result;
|
|
22151
22201
|
}
|
|
22152
22202
|
else {
|
|
22153
|
-
var
|
|
22203
|
+
var _matchWholeMask = matchWholeMask || lastItemWithDataIndex !== index;
|
|
22204
|
+
var data = this.getCorrectDatePartFormat(inputData, _matchWholeMask);
|
|
22154
22205
|
result += (prevSeparator + data);
|
|
22155
22206
|
prevIsCompleted = inputData.isCompleted;
|
|
22156
22207
|
}
|
|
@@ -22187,32 +22238,6 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
|
22187
22238
|
var result = this.getFormatedString(matchWholeMask);
|
|
22188
22239
|
return result;
|
|
22189
22240
|
};
|
|
22190
|
-
InputMaskDateTime.prototype.getPartsOld = function (input) {
|
|
22191
|
-
var inputParts = [];
|
|
22192
|
-
var separatorLexems = this.lexems.filter(function (l) { return l.type === "separator"; });
|
|
22193
|
-
var separatorLexemsIndex = 0;
|
|
22194
|
-
do {
|
|
22195
|
-
if (!separatorLexems[separatorLexemsIndex]) {
|
|
22196
|
-
if (!!input) {
|
|
22197
|
-
inputParts.push(input);
|
|
22198
|
-
input = "";
|
|
22199
|
-
}
|
|
22200
|
-
break;
|
|
22201
|
-
}
|
|
22202
|
-
var separatorCharIndex = input.indexOf(separatorLexems[separatorLexemsIndex].value);
|
|
22203
|
-
if (separatorCharIndex !== -1) {
|
|
22204
|
-
var part = input.slice(0, separatorCharIndex);
|
|
22205
|
-
if (!!part) {
|
|
22206
|
-
inputParts.push(part);
|
|
22207
|
-
}
|
|
22208
|
-
input = input.slice(separatorCharIndex + 1);
|
|
22209
|
-
}
|
|
22210
|
-
else {
|
|
22211
|
-
}
|
|
22212
|
-
separatorLexemsIndex++;
|
|
22213
|
-
} while (!!input);
|
|
22214
|
-
return inputParts;
|
|
22215
|
-
};
|
|
22216
22241
|
InputMaskDateTime.prototype.getParts = function (input) {
|
|
22217
22242
|
var inputParts = [];
|
|
22218
22243
|
var lexemsWithValue = this.lexems.filter(function (l) { return l.type !== "separator"; });
|
|
@@ -22457,7 +22482,7 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
|
22457
22482
|
}
|
|
22458
22483
|
return value;
|
|
22459
22484
|
};
|
|
22460
|
-
InputMaskNumeric.prototype.validateNumber = function (number) {
|
|
22485
|
+
InputMaskNumeric.prototype.validateNumber = function (number, matchWholeMask) {
|
|
22461
22486
|
var min = this.min || Number.MIN_SAFE_INTEGER;
|
|
22462
22487
|
var max = this.max || Number.MAX_SAFE_INTEGER;
|
|
22463
22488
|
if (this.min !== undefined || this.max !== undefined) {
|
|
@@ -22465,7 +22490,12 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
|
22465
22490
|
if (Number.isNaN(value)) {
|
|
22466
22491
|
return true;
|
|
22467
22492
|
}
|
|
22468
|
-
|
|
22493
|
+
if (!matchWholeMask) {
|
|
22494
|
+
return value >= 0 && value <= max || value < 0 && value >= min;
|
|
22495
|
+
}
|
|
22496
|
+
else {
|
|
22497
|
+
return value >= min && value <= max;
|
|
22498
|
+
}
|
|
22469
22499
|
}
|
|
22470
22500
|
return true;
|
|
22471
22501
|
};
|
|
@@ -22480,7 +22510,7 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
|
22480
22510
|
var currentChar = input[inputIndex];
|
|
22481
22511
|
switch (currentChar) {
|
|
22482
22512
|
case "-": {
|
|
22483
|
-
if (this.allowNegativeValues) {
|
|
22513
|
+
if (this.allowNegativeValues && (this.min === undefined || this.min < 0)) {
|
|
22484
22514
|
minusCharCount++;
|
|
22485
22515
|
}
|
|
22486
22516
|
break;
|
|
@@ -22516,6 +22546,9 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
|
22516
22546
|
if (matchWholeMask === void 0) { matchWholeMask = false; }
|
|
22517
22547
|
var input = (src === undefined || src === null) ? "" : src;
|
|
22518
22548
|
var parsedNumber = this.parseNumber(input);
|
|
22549
|
+
if (!this.validateNumber(parsedNumber, matchWholeMask)) {
|
|
22550
|
+
return null;
|
|
22551
|
+
}
|
|
22519
22552
|
var displayText = this.displayNumber(parsedNumber, true, matchWholeMask);
|
|
22520
22553
|
return displayText;
|
|
22521
22554
|
};
|
|
@@ -22535,7 +22568,7 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
|
22535
22568
|
var rightPart = args.prevValue.slice(args.selectionEnd);
|
|
22536
22569
|
var src = leftPart + rightPart;
|
|
22537
22570
|
var parsedNumber = this.parseNumber(src);
|
|
22538
|
-
if (!this.validateNumber(parsedNumber)) {
|
|
22571
|
+
if (!this.validateNumber(parsedNumber, false)) {
|
|
22539
22572
|
return result;
|
|
22540
22573
|
}
|
|
22541
22574
|
var maskedValue = this.getNumberMaskedValue(src);
|
|
@@ -23480,6 +23513,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23480
23513
|
/* harmony import */ var _drag_drop_panel_helper_v1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./drag-drop-panel-helper-v1 */ "./src/drag-drop-panel-helper-v1.ts");
|
|
23481
23514
|
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
|
|
23482
23515
|
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
|
|
23516
|
+
/* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./page */ "./src/page.ts");
|
|
23483
23517
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
23484
23518
|
var extendStatics = function (d, b) {
|
|
23485
23519
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -23519,6 +23553,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
|
23519
23553
|
|
|
23520
23554
|
|
|
23521
23555
|
|
|
23556
|
+
|
|
23522
23557
|
var QuestionRowModel = /** @class */ (function (_super) {
|
|
23523
23558
|
__extends(QuestionRowModel, _super);
|
|
23524
23559
|
function QuestionRowModel(panel) {
|
|
@@ -25753,7 +25788,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
25753
25788
|
Object.defineProperty(PanelModel.prototype, "hasEditButton", {
|
|
25754
25789
|
get: function () {
|
|
25755
25790
|
if (this.survey && this.survey.state === "preview")
|
|
25756
|
-
return this.
|
|
25791
|
+
return (this.parent && this.parent instanceof _page__WEBPACK_IMPORTED_MODULE_13__["PageModel"]);
|
|
25757
25792
|
return false;
|
|
25758
25793
|
},
|
|
25759
25794
|
enumerable: false,
|
|
@@ -35396,6 +35431,11 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
|
35396
35431
|
return;
|
|
35397
35432
|
this.json.onUpdateQuestionCssClasses(question, element, css);
|
|
35398
35433
|
};
|
|
35434
|
+
ComponentQuestionJSON.prototype.onSetQuestionValue = function (question, newValue) {
|
|
35435
|
+
if (!this.json.onSetQuestionValue)
|
|
35436
|
+
return;
|
|
35437
|
+
this.json.onSetQuestionValue(question, newValue);
|
|
35438
|
+
};
|
|
35399
35439
|
ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
|
|
35400
35440
|
if (!this.json.onPropertyChanged)
|
|
35401
35441
|
return;
|
|
@@ -35691,6 +35731,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
|
35691
35731
|
if (updateIsAnswered === void 0) { updateIsAnswered = true; }
|
|
35692
35732
|
_super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
|
|
35693
35733
|
this.updateElementCss();
|
|
35734
|
+
if (!!this.customQuestion) {
|
|
35735
|
+
this.customQuestion.onSetQuestionValue(this, newValue);
|
|
35736
|
+
}
|
|
35694
35737
|
};
|
|
35695
35738
|
QuestionCustomModelBase.prototype.setNewValue = function (newValue) {
|
|
35696
35739
|
_super.prototype.setNewValue.call(this, newValue);
|
|
@@ -35719,6 +35762,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
|
35719
35762
|
QuestionCustomModelBase.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
|
|
35720
35763
|
if (!this.data)
|
|
35721
35764
|
return;
|
|
35765
|
+
if (!!this.customQuestion) {
|
|
35766
|
+
this.customQuestion.onValueChanged(this, name, newValue);
|
|
35767
|
+
}
|
|
35722
35768
|
var newName = this.convertDataName(name);
|
|
35723
35769
|
var valueForSurvey = this.convertDataValue(name, newValue);
|
|
35724
35770
|
if (this.valueToDataCallback) {
|
|
@@ -35727,9 +35773,6 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
|
35727
35773
|
this.data.setValue(newName, valueForSurvey, locNotification, allowNotifyValueChanged);
|
|
35728
35774
|
this.updateIsAnswered();
|
|
35729
35775
|
this.updateElementCss();
|
|
35730
|
-
if (!!this.customQuestion) {
|
|
35731
|
-
this.customQuestion.onValueChanged(this, name, newValue);
|
|
35732
|
-
}
|
|
35733
35776
|
};
|
|
35734
35777
|
QuestionCustomModelBase.prototype.getQuestionByName = function (name) {
|
|
35735
35778
|
return undefined;
|
|
@@ -36336,7 +36379,8 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
|
36336
36379
|
this.contentPanel.questions.forEach(function (q) { return q.collectNestedQuestions(questions, visibleOnly); });
|
|
36337
36380
|
};
|
|
36338
36381
|
QuestionCompositeModel.prototype.convertDataValue = function (name, newValue) {
|
|
36339
|
-
var val = this.
|
|
36382
|
+
var val = !!this.contentPanel && !this.isEditingSurveyElement ?
|
|
36383
|
+
this.contentPanel.getValue() : this.getValueForContentPanel(this.value);
|
|
36340
36384
|
if (!val)
|
|
36341
36385
|
val = {};
|
|
36342
36386
|
if (this.isValueEmpty(newValue) && !this.isEditingSurveyElement) {
|
|
@@ -39575,11 +39619,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
|
39575
39619
|
/**
|
|
39576
39620
|
* Specifies the height of containers for images or videos. Accepts positive numbers and CSS values.
|
|
39577
39621
|
*
|
|
39578
|
-
* Default value:
|
|
39622
|
+
* Default value: `auto`
|
|
39623
|
+
*
|
|
39624
|
+
* This property allows you to specify the exact image height. If you do not set it, the height will be calculated automatically based on the [`minImageHeight`](#minImageHeight) and [`maxImageHeight`](#maxImageHeight) values and available screen height.
|
|
39579
39625
|
*
|
|
39580
|
-
* Use the `imageFit` property to specify how to fit the images or videos into their containers.
|
|
39626
|
+
* Use the [`imageFit`](#imageFit) property to specify how to fit the images or videos into their containers.
|
|
39581
39627
|
* @see imageWidth
|
|
39582
|
-
* @see imageFit
|
|
39583
39628
|
*/
|
|
39584
39629
|
get: function () {
|
|
39585
39630
|
return this.getPropertyValue("imageHeight");
|
|
@@ -39602,11 +39647,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
|
39602
39647
|
/**
|
|
39603
39648
|
* Specifies the width of containers for images or videos. Accepts positive numbers and CSS values.
|
|
39604
39649
|
*
|
|
39605
|
-
* Default value:
|
|
39650
|
+
* Default value: `auto`
|
|
39606
39651
|
*
|
|
39607
|
-
*
|
|
39652
|
+
* This property allows you to specify the exact image width. If you do not set it, the width will be calculated automatically based on the [`minImageWidth`](#minImageWidth) and [`maxImageWidth`](#maxImageWidth) values and available screen width.
|
|
39653
|
+
*
|
|
39654
|
+
* Use the [`imageFit`](#imageFit) property to specify how to fit the images or videos into their containers.
|
|
39608
39655
|
* @see imageHeight
|
|
39609
|
-
* @see imageFit
|
|
39610
39656
|
*/
|
|
39611
39657
|
get: function () {
|
|
39612
39658
|
return this.getPropertyValue("imageWidth");
|
|
@@ -45486,7 +45532,8 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
45486
45532
|
};
|
|
45487
45533
|
QuestionMatrixDropdownRenderedTable.prototype.getRowDragCell = function (rowIndex) {
|
|
45488
45534
|
var cell = new QuestionMatrixDropdownRenderedCell();
|
|
45489
|
-
|
|
45535
|
+
var lockedRows = this.matrix.lockedRowCount;
|
|
45536
|
+
cell.isDragHandlerCell = lockedRows < 1 || rowIndex >= lockedRows;
|
|
45490
45537
|
cell.className = this.getActionsCellClassName(cell);
|
|
45491
45538
|
cell.row = this.matrix.visibleRows[rowIndex];
|
|
45492
45539
|
return cell;
|
|
@@ -46076,7 +46123,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
46076
46123
|
_this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
|
|
46077
46124
|
_this.updateShowTableAndAddRow();
|
|
46078
46125
|
});
|
|
46079
|
-
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly"], function () { _this.clearRowsAndResetRenderedTable(); });
|
|
46126
|
+
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.clearRowsAndResetRenderedTable(); });
|
|
46080
46127
|
_this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_9__["DragOrClickHelper"](_this.startDragMatrixRow);
|
|
46081
46128
|
return _this;
|
|
46082
46129
|
}
|
|
@@ -46307,6 +46354,16 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
46307
46354
|
enumerable: false,
|
|
46308
46355
|
configurable: true
|
|
46309
46356
|
});
|
|
46357
|
+
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "lockedRowCount", {
|
|
46358
|
+
get: function () {
|
|
46359
|
+
return this.getPropertyValue("lockedRowCount", 0);
|
|
46360
|
+
},
|
|
46361
|
+
set: function (val) {
|
|
46362
|
+
this.setPropertyValue("lockedRowCount", val);
|
|
46363
|
+
},
|
|
46364
|
+
enumerable: false,
|
|
46365
|
+
configurable: true
|
|
46366
|
+
});
|
|
46310
46367
|
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "iconDragElement", {
|
|
46311
46368
|
get: function () {
|
|
46312
46369
|
return this.cssClasses.iconDragElement;
|
|
@@ -46464,7 +46521,10 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
|
46464
46521
|
QuestionMatrixDynamicModel.prototype.canRemoveRow = function (row) {
|
|
46465
46522
|
if (!this.survey)
|
|
46466
46523
|
return true;
|
|
46467
|
-
|
|
46524
|
+
var index = row.rowIndex - 1;
|
|
46525
|
+
if (this.lockedRowCount > 0 && index < this.lockedRowCount)
|
|
46526
|
+
return false;
|
|
46527
|
+
return this.survey.matrixAllowRemoveRow(this, index, row);
|
|
46468
46528
|
};
|
|
46469
46529
|
QuestionMatrixDynamicModel.prototype.addRowUI = function () {
|
|
46470
46530
|
this.addRow(true);
|
|
@@ -51769,14 +51829,18 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51769
51829
|
var toIndex;
|
|
51770
51830
|
if (key === " " && !isMovedElementRanked) {
|
|
51771
51831
|
toIndex = 0;
|
|
51832
|
+
this.animationAllowed = false;
|
|
51772
51833
|
dnd.selectToRank(this, fromIndex, toIndex);
|
|
51834
|
+
this.animationAllowed = true;
|
|
51773
51835
|
this.setValueAfterKeydown(toIndex, "to-container");
|
|
51774
51836
|
return;
|
|
51775
51837
|
}
|
|
51776
51838
|
if (!isMovedElementRanked)
|
|
51777
51839
|
return;
|
|
51778
51840
|
if (key === " ") {
|
|
51841
|
+
this.animationAllowed = false;
|
|
51779
51842
|
dnd.unselectFromRank(this, fromIndex);
|
|
51843
|
+
this.animationAllowed = true;
|
|
51780
51844
|
toIndex = this.unRankingChoices.indexOf(movedElement); //'this.' leads to actual array after the 'unselectFromRank' method
|
|
51781
51845
|
this.setValueAfterKeydown(toIndex, "from-container");
|
|
51782
51846
|
return;
|
|
@@ -68415,7 +68479,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68415
68479
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return AnimationGroupUtils; });
|
|
68416
68480
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return AnimationBoolean; });
|
|
68417
68481
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return AnimationGroup; });
|
|
68418
|
-
/* harmony import */ var
|
|
68482
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
|
|
68483
|
+
/* harmony import */ var _taskmanager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./taskmanager */ "./src/utils/taskmanager.ts");
|
|
68419
68484
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
68420
68485
|
var extendStatics = function (d, b) {
|
|
68421
68486
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -68432,6 +68497,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
68432
68497
|
};
|
|
68433
68498
|
})();
|
|
68434
68499
|
|
|
68500
|
+
|
|
68435
68501
|
var AnimationUtils = /** @class */ (function () {
|
|
68436
68502
|
function AnimationUtils() {
|
|
68437
68503
|
this.cancelQueue = [];
|
|
@@ -68500,8 +68566,8 @@ var AnimationUtils = /** @class */ (function () {
|
|
|
68500
68566
|
element.classList.remove(options.cssClass);
|
|
68501
68567
|
}
|
|
68502
68568
|
else {
|
|
68503
|
-
requestAnimationFrame(function () {
|
|
68504
|
-
requestAnimationFrame(function () {
|
|
68569
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
|
68570
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
|
68505
68571
|
element.classList.remove(options.cssClass);
|
|
68506
68572
|
});
|
|
68507
68573
|
});
|
|
@@ -68522,7 +68588,8 @@ var AnimationUtils = /** @class */ (function () {
|
|
|
68522
68588
|
}
|
|
68523
68589
|
};
|
|
68524
68590
|
AnimationUtils.prototype.cancel = function () {
|
|
68525
|
-
|
|
68591
|
+
var cancelQueue = [].concat(this.cancelQueue);
|
|
68592
|
+
cancelQueue.forEach(function (callback) { return callback(); });
|
|
68526
68593
|
this.cancelQueue = [];
|
|
68527
68594
|
};
|
|
68528
68595
|
return AnimationUtils;
|
|
@@ -68540,12 +68607,12 @@ var AnimationPropertyUtils = /** @class */ (function (_super) {
|
|
|
68540
68607
|
_this.beforeAnimationRun(element, options);
|
|
68541
68608
|
_this.runEnterAnimation(element, options);
|
|
68542
68609
|
};
|
|
68543
|
-
requestAnimationFrame(function () {
|
|
68610
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
|
68544
68611
|
if (getElement()) {
|
|
68545
68612
|
callback();
|
|
68546
68613
|
}
|
|
68547
68614
|
else {
|
|
68548
|
-
requestAnimationFrame(callback);
|
|
68615
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(callback);
|
|
68549
68616
|
}
|
|
68550
68617
|
});
|
|
68551
68618
|
};
|
|
@@ -68566,7 +68633,7 @@ var AnimationGroupUtils = /** @class */ (function (_super) {
|
|
|
68566
68633
|
var _this = this;
|
|
68567
68634
|
if (elements.length == 0)
|
|
68568
68635
|
return;
|
|
68569
|
-
requestAnimationFrame(function () {
|
|
68636
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
|
68570
68637
|
var callback = function () {
|
|
68571
68638
|
elements.forEach(function (el) {
|
|
68572
68639
|
_this.beforeAnimationRun(getElement(el), getOptions(el));
|
|
@@ -68576,7 +68643,7 @@ var AnimationGroupUtils = /** @class */ (function (_super) {
|
|
|
68576
68643
|
});
|
|
68577
68644
|
};
|
|
68578
68645
|
if (!getElement(elements[0])) {
|
|
68579
|
-
requestAnimationFrame(callback);
|
|
68646
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(callback);
|
|
68580
68647
|
}
|
|
68581
68648
|
else {
|
|
68582
68649
|
callback();
|
|
@@ -68607,7 +68674,7 @@ var AnimationProperty = /** @class */ (function () {
|
|
|
68607
68674
|
this.animationOptions = animationOptions;
|
|
68608
68675
|
this.update = update;
|
|
68609
68676
|
this.getCurrentValue = getCurrentValue;
|
|
68610
|
-
this._debouncedSync = Object(
|
|
68677
|
+
this._debouncedSync = Object(_taskmanager__WEBPACK_IMPORTED_MODULE_1__["debounce"])(function (newValue) {
|
|
68611
68678
|
_this.animation.cancel();
|
|
68612
68679
|
_this._sync(newValue);
|
|
68613
68680
|
});
|