survey-react 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.min.css +2 -2
- package/modern.css +1 -1
- package/modern.css.map +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.css.map +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +55 -10
- package/survey.react.js +142 -70
- 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.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;
|
@@ -9670,8 +9674,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9670
9674
|
|
9671
9675
|
var Version;
|
9672
9676
|
var ReleaseDate;
|
9673
|
-
Version = "" + "1.9.
|
9674
|
-
ReleaseDate = "" + "2024-04-
|
9677
|
+
Version = "" + "1.9.138";
|
9678
|
+
ReleaseDate = "" + "2024-04-09";
|
9675
9679
|
function checkLibraryVersion(ver, libraryName) {
|
9676
9680
|
if (Version != ver) {
|
9677
9681
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -30036,6 +30040,12 @@ var InputElementAdapter = /** @class */ (function () {
|
|
30036
30040
|
_this.inputElement.value = maskedValue;
|
30037
30041
|
}
|
30038
30042
|
};
|
30043
|
+
this.clickHandler = function (event) {
|
30044
|
+
if (_this.inputElement.value == _this.inputMaskInstance.getMaskedValue("")) {
|
30045
|
+
_this.inputElement.setSelectionRange(0, 0);
|
30046
|
+
event.preventDefault();
|
30047
|
+
}
|
30048
|
+
};
|
30039
30049
|
this.beforeInputHandler = function (event) {
|
30040
30050
|
var args = _this.createArgs(event);
|
30041
30051
|
var result = _this.inputMaskInstance.processInput(args);
|
@@ -30079,11 +30089,15 @@ var InputElementAdapter = /** @class */ (function () {
|
|
30079
30089
|
InputElementAdapter.prototype.addInputEventListener = function () {
|
30080
30090
|
if (!!this.inputElement) {
|
30081
30091
|
this.inputElement.addEventListener("beforeinput", this.beforeInputHandler);
|
30092
|
+
this.inputElement.addEventListener("click", this.clickHandler);
|
30093
|
+
this.inputElement.addEventListener("focus", this.clickHandler);
|
30082
30094
|
}
|
30083
30095
|
};
|
30084
30096
|
InputElementAdapter.prototype.removeInputEventListener = function () {
|
30085
30097
|
if (!!this.inputElement) {
|
30086
30098
|
this.inputElement.removeEventListener("beforeinput", this.beforeInputHandler);
|
30099
|
+
this.inputElement.removeEventListener("click", this.clickHandler);
|
30100
|
+
this.inputElement.removeEventListener("focus", this.clickHandler);
|
30087
30101
|
}
|
30088
30102
|
};
|
30089
30103
|
InputElementAdapter.prototype.dispose = function () {
|
@@ -30518,12 +30532,20 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
30518
30532
|
});
|
30519
30533
|
};
|
30520
30534
|
InputMaskDateTime.prototype.getISO_8601Format = function (dateTime) {
|
30521
|
-
|
30522
|
-
|
30523
|
-
|
30524
|
-
|
30525
|
-
|
30526
|
-
|
30535
|
+
var date = [];
|
30536
|
+
if (dateTime.year !== undefined) {
|
30537
|
+
var year = this.getPlaceholder(4, dateTime.year.toString(), "0") + dateTime.year;
|
30538
|
+
date.push(year);
|
30539
|
+
}
|
30540
|
+
if (dateTime.month !== undefined && dateTime.year !== undefined) {
|
30541
|
+
var month = this.getPlaceholder(2, dateTime.month.toString(), "0") + dateTime.month;
|
30542
|
+
date.push(month);
|
30543
|
+
}
|
30544
|
+
if (dateTime.day !== undefined && dateTime.month !== undefined && dateTime.year !== undefined) {
|
30545
|
+
var day = this.getPlaceholder(2, dateTime.day.toString(), "0") + dateTime.day;
|
30546
|
+
date.push(day);
|
30547
|
+
}
|
30548
|
+
return date.join("-");
|
30527
30549
|
};
|
30528
30550
|
InputMaskDateTime.prototype.isYearValid = function (dateTime) {
|
30529
30551
|
if (dateTime.min === undefined && dateTime.max === undefined)
|
@@ -30566,13 +30588,36 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
30566
30588
|
data = data.slice(0, data.length - 1);
|
30567
30589
|
}
|
30568
30590
|
}
|
30569
|
-
|
30591
|
+
dateTime[propertyName] = parseInt(data);
|
30592
|
+
if (propertyName === "year" && !this.isYearValid(dateTime)) {
|
30570
30593
|
data = data.slice(0, data.length - 1);
|
30571
30594
|
}
|
30572
30595
|
else if ((propertyName === "day" && parseInt(data[0]) > 3) || (propertyName === "month" && parseInt(data[0]) > 1)) {
|
30596
|
+
if (this.isDateValid(dateTime)) {
|
30597
|
+
newItem.isCompleted = true;
|
30598
|
+
}
|
30599
|
+
else {
|
30600
|
+
data = data.slice(0, data.length - 1);
|
30601
|
+
}
|
30602
|
+
}
|
30603
|
+
else if ((propertyName === "day" && parseInt(data[0]) <= 3 && parseInt(data[0]) !== 0) || (propertyName === "month" && parseInt(data[0]) <= 1 && parseInt(data[0]) !== 0)) {
|
30604
|
+
var prevValue = dateTime[propertyName];
|
30605
|
+
var tempValue = prevValue * 10;
|
30606
|
+
var maxValue = propertyName === "month" ? 3 : 10;
|
30573
30607
|
newItem.isCompleted = true;
|
30608
|
+
for (var index = 0; index < maxValue; index++) {
|
30609
|
+
dateTime[propertyName] = tempValue + index;
|
30610
|
+
if (this.isDateValid(dateTime)) {
|
30611
|
+
newItem.isCompleted = false;
|
30612
|
+
break;
|
30613
|
+
}
|
30614
|
+
}
|
30615
|
+
dateTime[propertyName] = prevValue;
|
30616
|
+
if (newItem.isCompleted && !this.isDateValid(dateTime)) {
|
30617
|
+
data = data.slice(0, data.length - 1);
|
30618
|
+
}
|
30574
30619
|
}
|
30575
|
-
newItem.value = data;
|
30620
|
+
newItem.value = data || undefined;
|
30576
30621
|
dateTime[propertyName] = parseInt(data) > 0 ? parseInt(data) : undefined;
|
30577
30622
|
};
|
30578
30623
|
InputMaskDateTime.prototype.getCorrectDatePartFormat = function (inputData, matchWholeMask) {
|
@@ -30619,6 +30664,11 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
30619
30664
|
var result = "";
|
30620
30665
|
var prevSeparator = "";
|
30621
30666
|
var prevIsCompleted = false;
|
30667
|
+
var lastItemWithDataIndex = this.inputDateTimeData.length - 1;
|
30668
|
+
if (!matchWholeMask) {
|
30669
|
+
var arr = this.inputDateTimeData.filter(function (item) { return !!item.value; });
|
30670
|
+
lastItemWithDataIndex = this.inputDateTimeData.indexOf(arr[arr.length - 1]);
|
30671
|
+
}
|
30622
30672
|
for (var index = 0; index < this.inputDateTimeData.length; index++) {
|
30623
30673
|
var inputData = this.inputDateTimeData[index];
|
30624
30674
|
switch (inputData.lexem.type) {
|
@@ -30630,7 +30680,8 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
30630
30680
|
return result;
|
30631
30681
|
}
|
30632
30682
|
else {
|
30633
|
-
var
|
30683
|
+
var _matchWholeMask = matchWholeMask || lastItemWithDataIndex !== index;
|
30684
|
+
var data = this.getCorrectDatePartFormat(inputData, _matchWholeMask);
|
30634
30685
|
result += (prevSeparator + data);
|
30635
30686
|
prevIsCompleted = inputData.isCompleted;
|
30636
30687
|
}
|
@@ -30667,32 +30718,6 @@ var InputMaskDateTime = /** @class */ (function (_super) {
|
|
30667
30718
|
var result = this.getFormatedString(matchWholeMask);
|
30668
30719
|
return result;
|
30669
30720
|
};
|
30670
|
-
InputMaskDateTime.prototype.getPartsOld = function (input) {
|
30671
|
-
var inputParts = [];
|
30672
|
-
var separatorLexems = this.lexems.filter(function (l) { return l.type === "separator"; });
|
30673
|
-
var separatorLexemsIndex = 0;
|
30674
|
-
do {
|
30675
|
-
if (!separatorLexems[separatorLexemsIndex]) {
|
30676
|
-
if (!!input) {
|
30677
|
-
inputParts.push(input);
|
30678
|
-
input = "";
|
30679
|
-
}
|
30680
|
-
break;
|
30681
|
-
}
|
30682
|
-
var separatorCharIndex = input.indexOf(separatorLexems[separatorLexemsIndex].value);
|
30683
|
-
if (separatorCharIndex !== -1) {
|
30684
|
-
var part = input.slice(0, separatorCharIndex);
|
30685
|
-
if (!!part) {
|
30686
|
-
inputParts.push(part);
|
30687
|
-
}
|
30688
|
-
input = input.slice(separatorCharIndex + 1);
|
30689
|
-
}
|
30690
|
-
else {
|
30691
|
-
}
|
30692
|
-
separatorLexemsIndex++;
|
30693
|
-
} while (!!input);
|
30694
|
-
return inputParts;
|
30695
|
-
};
|
30696
30721
|
InputMaskDateTime.prototype.getParts = function (input) {
|
30697
30722
|
var inputParts = [];
|
30698
30723
|
var lexemsWithValue = this.lexems.filter(function (l) { return l.type !== "separator"; });
|
@@ -30937,7 +30962,7 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
30937
30962
|
}
|
30938
30963
|
return value;
|
30939
30964
|
};
|
30940
|
-
InputMaskNumeric.prototype.validateNumber = function (number) {
|
30965
|
+
InputMaskNumeric.prototype.validateNumber = function (number, matchWholeMask) {
|
30941
30966
|
var min = this.min || Number.MIN_SAFE_INTEGER;
|
30942
30967
|
var max = this.max || Number.MAX_SAFE_INTEGER;
|
30943
30968
|
if (this.min !== undefined || this.max !== undefined) {
|
@@ -30945,7 +30970,12 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
30945
30970
|
if (Number.isNaN(value)) {
|
30946
30971
|
return true;
|
30947
30972
|
}
|
30948
|
-
|
30973
|
+
if (!matchWholeMask) {
|
30974
|
+
return value >= 0 && value <= max || value < 0 && value >= min;
|
30975
|
+
}
|
30976
|
+
else {
|
30977
|
+
return value >= min && value <= max;
|
30978
|
+
}
|
30949
30979
|
}
|
30950
30980
|
return true;
|
30951
30981
|
};
|
@@ -30960,7 +30990,7 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
30960
30990
|
var currentChar = input[inputIndex];
|
30961
30991
|
switch (currentChar) {
|
30962
30992
|
case "-": {
|
30963
|
-
if (this.allowNegativeValues) {
|
30993
|
+
if (this.allowNegativeValues && (this.min === undefined || this.min < 0)) {
|
30964
30994
|
minusCharCount++;
|
30965
30995
|
}
|
30966
30996
|
break;
|
@@ -30996,6 +31026,9 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
30996
31026
|
if (matchWholeMask === void 0) { matchWholeMask = false; }
|
30997
31027
|
var input = (src === undefined || src === null) ? "" : src;
|
30998
31028
|
var parsedNumber = this.parseNumber(input);
|
31029
|
+
if (!this.validateNumber(parsedNumber, matchWholeMask)) {
|
31030
|
+
return null;
|
31031
|
+
}
|
30999
31032
|
var displayText = this.displayNumber(parsedNumber, true, matchWholeMask);
|
31000
31033
|
return displayText;
|
31001
31034
|
};
|
@@ -31015,7 +31048,7 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
31015
31048
|
var rightPart = args.prevValue.slice(args.selectionEnd);
|
31016
31049
|
var src = leftPart + rightPart;
|
31017
31050
|
var parsedNumber = this.parseNumber(src);
|
31018
|
-
if (!this.validateNumber(parsedNumber)) {
|
31051
|
+
if (!this.validateNumber(parsedNumber, false)) {
|
31019
31052
|
return result;
|
31020
31053
|
}
|
31021
31054
|
var maskedValue = this.getNumberMaskedValue(src);
|
@@ -31960,6 +31993,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
31960
31993
|
/* 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");
|
31961
31994
|
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
|
31962
31995
|
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
|
31996
|
+
/* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./page */ "./src/page.ts");
|
31963
31997
|
var __extends = (undefined && undefined.__extends) || (function () {
|
31964
31998
|
var extendStatics = function (d, b) {
|
31965
31999
|
extendStatics = Object.setPrototypeOf ||
|
@@ -31999,6 +32033,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
31999
32033
|
|
32000
32034
|
|
32001
32035
|
|
32036
|
+
|
32002
32037
|
var QuestionRowModel = /** @class */ (function (_super) {
|
32003
32038
|
__extends(QuestionRowModel, _super);
|
32004
32039
|
function QuestionRowModel(panel) {
|
@@ -34233,7 +34268,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
34233
34268
|
Object.defineProperty(PanelModel.prototype, "hasEditButton", {
|
34234
34269
|
get: function () {
|
34235
34270
|
if (this.survey && this.survey.state === "preview")
|
34236
|
-
return this.
|
34271
|
+
return (this.parent && this.parent instanceof _page__WEBPACK_IMPORTED_MODULE_13__["PageModel"]);
|
34237
34272
|
return false;
|
34238
34273
|
},
|
34239
34274
|
enumerable: false,
|
@@ -45234,6 +45269,11 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
45234
45269
|
return;
|
45235
45270
|
this.json.onUpdateQuestionCssClasses(question, element, css);
|
45236
45271
|
};
|
45272
|
+
ComponentQuestionJSON.prototype.onSetQuestionValue = function (question, newValue) {
|
45273
|
+
if (!this.json.onSetQuestionValue)
|
45274
|
+
return;
|
45275
|
+
this.json.onSetQuestionValue(question, newValue);
|
45276
|
+
};
|
45237
45277
|
ComponentQuestionJSON.prototype.onPropertyChanged = function (question, propertyName, newValue) {
|
45238
45278
|
if (!this.json.onPropertyChanged)
|
45239
45279
|
return;
|
@@ -45529,6 +45569,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
45529
45569
|
if (updateIsAnswered === void 0) { updateIsAnswered = true; }
|
45530
45570
|
_super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
|
45531
45571
|
this.updateElementCss();
|
45572
|
+
if (!!this.customQuestion) {
|
45573
|
+
this.customQuestion.onSetQuestionValue(this, newValue);
|
45574
|
+
}
|
45532
45575
|
};
|
45533
45576
|
QuestionCustomModelBase.prototype.setNewValue = function (newValue) {
|
45534
45577
|
_super.prototype.setNewValue.call(this, newValue);
|
@@ -45557,6 +45600,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
45557
45600
|
QuestionCustomModelBase.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
|
45558
45601
|
if (!this.data)
|
45559
45602
|
return;
|
45603
|
+
if (!!this.customQuestion) {
|
45604
|
+
this.customQuestion.onValueChanged(this, name, newValue);
|
45605
|
+
}
|
45560
45606
|
var newName = this.convertDataName(name);
|
45561
45607
|
var valueForSurvey = this.convertDataValue(name, newValue);
|
45562
45608
|
if (this.valueToDataCallback) {
|
@@ -45565,9 +45611,6 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
45565
45611
|
this.data.setValue(newName, valueForSurvey, locNotification, allowNotifyValueChanged);
|
45566
45612
|
this.updateIsAnswered();
|
45567
45613
|
this.updateElementCss();
|
45568
|
-
if (!!this.customQuestion) {
|
45569
|
-
this.customQuestion.onValueChanged(this, name, newValue);
|
45570
|
-
}
|
45571
45614
|
};
|
45572
45615
|
QuestionCustomModelBase.prototype.getQuestionByName = function (name) {
|
45573
45616
|
return undefined;
|
@@ -46174,7 +46217,8 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
46174
46217
|
this.contentPanel.questions.forEach(function (q) { return q.collectNestedQuestions(questions, visibleOnly); });
|
46175
46218
|
};
|
46176
46219
|
QuestionCompositeModel.prototype.convertDataValue = function (name, newValue) {
|
46177
|
-
var val = this.
|
46220
|
+
var val = !!this.contentPanel && !this.isEditingSurveyElement ?
|
46221
|
+
this.contentPanel.getValue() : this.getValueForContentPanel(this.value);
|
46178
46222
|
if (!val)
|
46179
46223
|
val = {};
|
46180
46224
|
if (this.isValueEmpty(newValue) && !this.isEditingSurveyElement) {
|
@@ -49413,11 +49457,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
49413
49457
|
/**
|
49414
49458
|
* Specifies the height of containers for images or videos. Accepts positive numbers and CSS values.
|
49415
49459
|
*
|
49416
|
-
* Default value:
|
49460
|
+
* Default value: `auto`
|
49461
|
+
*
|
49462
|
+
* 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.
|
49417
49463
|
*
|
49418
|
-
* Use the `imageFit` property to specify how to fit the images or videos into their containers.
|
49464
|
+
* Use the [`imageFit`](#imageFit) property to specify how to fit the images or videos into their containers.
|
49419
49465
|
* @see imageWidth
|
49420
|
-
* @see imageFit
|
49421
49466
|
*/
|
49422
49467
|
get: function () {
|
49423
49468
|
return this.getPropertyValue("imageHeight");
|
@@ -49440,11 +49485,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
49440
49485
|
/**
|
49441
49486
|
* Specifies the width of containers for images or videos. Accepts positive numbers and CSS values.
|
49442
49487
|
*
|
49443
|
-
* Default value:
|
49488
|
+
* Default value: `auto`
|
49444
49489
|
*
|
49445
|
-
*
|
49490
|
+
* 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.
|
49491
|
+
*
|
49492
|
+
* Use the [`imageFit`](#imageFit) property to specify how to fit the images or videos into their containers.
|
49446
49493
|
* @see imageHeight
|
49447
|
-
* @see imageFit
|
49448
49494
|
*/
|
49449
49495
|
get: function () {
|
49450
49496
|
return this.getPropertyValue("imageWidth");
|
@@ -55324,7 +55370,8 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
55324
55370
|
};
|
55325
55371
|
QuestionMatrixDropdownRenderedTable.prototype.getRowDragCell = function (rowIndex) {
|
55326
55372
|
var cell = new QuestionMatrixDropdownRenderedCell();
|
55327
|
-
|
55373
|
+
var lockedRows = this.matrix.lockedRowCount;
|
55374
|
+
cell.isDragHandlerCell = lockedRows < 1 || rowIndex >= lockedRows;
|
55328
55375
|
cell.className = this.getActionsCellClassName(cell);
|
55329
55376
|
cell.row = this.matrix.visibleRows[rowIndex];
|
55330
55377
|
return cell;
|
@@ -55914,7 +55961,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
55914
55961
|
_this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
|
55915
55962
|
_this.updateShowTableAndAddRow();
|
55916
55963
|
});
|
55917
|
-
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly"], function () { _this.clearRowsAndResetRenderedTable(); });
|
55964
|
+
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.clearRowsAndResetRenderedTable(); });
|
55918
55965
|
_this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_9__["DragOrClickHelper"](_this.startDragMatrixRow);
|
55919
55966
|
return _this;
|
55920
55967
|
}
|
@@ -56145,6 +56192,16 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
56145
56192
|
enumerable: false,
|
56146
56193
|
configurable: true
|
56147
56194
|
});
|
56195
|
+
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "lockedRowCount", {
|
56196
|
+
get: function () {
|
56197
|
+
return this.getPropertyValue("lockedRowCount", 0);
|
56198
|
+
},
|
56199
|
+
set: function (val) {
|
56200
|
+
this.setPropertyValue("lockedRowCount", val);
|
56201
|
+
},
|
56202
|
+
enumerable: false,
|
56203
|
+
configurable: true
|
56204
|
+
});
|
56148
56205
|
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "iconDragElement", {
|
56149
56206
|
get: function () {
|
56150
56207
|
return this.cssClasses.iconDragElement;
|
@@ -56302,7 +56359,10 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
56302
56359
|
QuestionMatrixDynamicModel.prototype.canRemoveRow = function (row) {
|
56303
56360
|
if (!this.survey)
|
56304
56361
|
return true;
|
56305
|
-
|
56362
|
+
var index = row.rowIndex - 1;
|
56363
|
+
if (this.lockedRowCount > 0 && index < this.lockedRowCount)
|
56364
|
+
return false;
|
56365
|
+
return this.survey.matrixAllowRemoveRow(this, index, row);
|
56306
56366
|
};
|
56307
56367
|
QuestionMatrixDynamicModel.prototype.addRowUI = function () {
|
56308
56368
|
this.addRow(true);
|
@@ -61607,14 +61667,18 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
61607
61667
|
var toIndex;
|
61608
61668
|
if (key === " " && !isMovedElementRanked) {
|
61609
61669
|
toIndex = 0;
|
61670
|
+
this.animationAllowed = false;
|
61610
61671
|
dnd.selectToRank(this, fromIndex, toIndex);
|
61672
|
+
this.animationAllowed = true;
|
61611
61673
|
this.setValueAfterKeydown(toIndex, "to-container");
|
61612
61674
|
return;
|
61613
61675
|
}
|
61614
61676
|
if (!isMovedElementRanked)
|
61615
61677
|
return;
|
61616
61678
|
if (key === " ") {
|
61679
|
+
this.animationAllowed = false;
|
61617
61680
|
dnd.unselectFromRank(this, fromIndex);
|
61681
|
+
this.animationAllowed = true;
|
61618
61682
|
toIndex = this.unRankingChoices.indexOf(movedElement); //'this.' leads to actual array after the 'unselectFromRank' method
|
61619
61683
|
this.setValueAfterKeydown(toIndex, "from-container");
|
61620
61684
|
return;
|
@@ -65413,9 +65477,14 @@ var SurveyQuestionBooleanRadio = /** @class */ (function (_super) {
|
|
65413
65477
|
SurveyQuestionBooleanRadio.prototype.renderElement = function () {
|
65414
65478
|
var cssClasses = this.question.cssClasses;
|
65415
65479
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.rootRadio },
|
65416
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { role: "presentation", className: cssClasses.radioFieldset },
|
65417
|
-
|
65418
|
-
|
65480
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { role: "presentation", className: cssClasses.radioFieldset }, !this.question.swapOrder ?
|
65481
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
65482
|
+
this.renderRadioItem(false, this.question.locLabelFalse),
|
65483
|
+
this.renderRadioItem(true, this.question.locLabelTrue)))
|
65484
|
+
:
|
65485
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
65486
|
+
this.renderRadioItem(true, this.question.locLabelTrue),
|
65487
|
+
this.renderRadioItem(false, this.question.locLabelFalse))))));
|
65419
65488
|
};
|
65420
65489
|
return SurveyQuestionBooleanRadio;
|
65421
65490
|
}(_boolean__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionBoolean"]));
|
@@ -88358,7 +88427,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
88358
88427
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return AnimationGroupUtils; });
|
88359
88428
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return AnimationBoolean; });
|
88360
88429
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return AnimationGroup; });
|
88361
|
-
/* harmony import */ var
|
88430
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
|
88431
|
+
/* harmony import */ var _taskmanager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./taskmanager */ "./src/utils/taskmanager.ts");
|
88362
88432
|
var __extends = (undefined && undefined.__extends) || (function () {
|
88363
88433
|
var extendStatics = function (d, b) {
|
88364
88434
|
extendStatics = Object.setPrototypeOf ||
|
@@ -88375,6 +88445,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
88375
88445
|
};
|
88376
88446
|
})();
|
88377
88447
|
|
88448
|
+
|
88378
88449
|
var AnimationUtils = /** @class */ (function () {
|
88379
88450
|
function AnimationUtils() {
|
88380
88451
|
this.cancelQueue = [];
|
@@ -88443,8 +88514,8 @@ var AnimationUtils = /** @class */ (function () {
|
|
88443
88514
|
element.classList.remove(options.cssClass);
|
88444
88515
|
}
|
88445
88516
|
else {
|
88446
|
-
requestAnimationFrame(function () {
|
88447
|
-
requestAnimationFrame(function () {
|
88517
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
88518
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
88448
88519
|
element.classList.remove(options.cssClass);
|
88449
88520
|
});
|
88450
88521
|
});
|
@@ -88465,7 +88536,8 @@ var AnimationUtils = /** @class */ (function () {
|
|
88465
88536
|
}
|
88466
88537
|
};
|
88467
88538
|
AnimationUtils.prototype.cancel = function () {
|
88468
|
-
|
88539
|
+
var cancelQueue = [].concat(this.cancelQueue);
|
88540
|
+
cancelQueue.forEach(function (callback) { return callback(); });
|
88469
88541
|
this.cancelQueue = [];
|
88470
88542
|
};
|
88471
88543
|
return AnimationUtils;
|
@@ -88483,12 +88555,12 @@ var AnimationPropertyUtils = /** @class */ (function (_super) {
|
|
88483
88555
|
_this.beforeAnimationRun(element, options);
|
88484
88556
|
_this.runEnterAnimation(element, options);
|
88485
88557
|
};
|
88486
|
-
requestAnimationFrame(function () {
|
88558
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
88487
88559
|
if (getElement()) {
|
88488
88560
|
callback();
|
88489
88561
|
}
|
88490
88562
|
else {
|
88491
|
-
requestAnimationFrame(callback);
|
88563
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(callback);
|
88492
88564
|
}
|
88493
88565
|
});
|
88494
88566
|
};
|
@@ -88509,7 +88581,7 @@ var AnimationGroupUtils = /** @class */ (function (_super) {
|
|
88509
88581
|
var _this = this;
|
88510
88582
|
if (elements.length == 0)
|
88511
88583
|
return;
|
88512
|
-
requestAnimationFrame(function () {
|
88584
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
88513
88585
|
var callback = function () {
|
88514
88586
|
elements.forEach(function (el) {
|
88515
88587
|
_this.beforeAnimationRun(getElement(el), getOptions(el));
|
@@ -88519,7 +88591,7 @@ var AnimationGroupUtils = /** @class */ (function (_super) {
|
|
88519
88591
|
});
|
88520
88592
|
};
|
88521
88593
|
if (!getElement(elements[0])) {
|
88522
|
-
requestAnimationFrame(callback);
|
88594
|
+
_global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(callback);
|
88523
88595
|
}
|
88524
88596
|
else {
|
88525
88597
|
callback();
|
@@ -88550,7 +88622,7 @@ var AnimationProperty = /** @class */ (function () {
|
|
88550
88622
|
this.animationOptions = animationOptions;
|
88551
88623
|
this.update = update;
|
88552
88624
|
this.getCurrentValue = getCurrentValue;
|
88553
|
-
this._debouncedSync = Object(
|
88625
|
+
this._debouncedSync = Object(_taskmanager__WEBPACK_IMPORTED_MODULE_1__["debounce"])(function (newValue) {
|
88554
88626
|
_this.animation.cancel();
|
88555
88627
|
_this._sync(newValue);
|
88556
88628
|
});
|