survey-react 1.9.130 → 1.9.132
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 +22 -2
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +15 -1
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +208 -134
- package/survey.react.js +176 -57
- 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.132
|
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
|
*/
|
@@ -5570,7 +5570,7 @@ var defaultV2Css = {
|
|
5570
5570
|
expanded: "sd-element--expanded",
|
5571
5571
|
nested: "sd-element--nested",
|
5572
5572
|
invisible: "sd-element--invisible",
|
5573
|
-
composite: "sd-element--complex",
|
5573
|
+
composite: "sd-element--complex sd-composite",
|
5574
5574
|
disabled: "sd-question--disabled",
|
5575
5575
|
errorsContainer: "sd-element__erbox sd-question__erbox",
|
5576
5576
|
errorsContainerTop: "sd-element__erbox--above-element sd-question__erbox--above-question",
|
@@ -7682,14 +7682,14 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
7682
7682
|
if (dragOverNode.dataset.ranking === "from-container" || dragOverNode.dataset.ranking === "to-container") {
|
7683
7683
|
return dragOverNode;
|
7684
7684
|
}
|
7685
|
-
if (this.parentElement.
|
7685
|
+
if (this.parentElement.rankingChoices.length === 0 ||
|
7686
|
+
this.parentElement.unRankingChoices.length === 0) {
|
7686
7687
|
var toContainer = dragOverNode.closest("[data-ranking='to-container']");
|
7687
7688
|
var fromContainer = dragOverNode.closest("[data-ranking='from-container']");
|
7688
7689
|
if (!!toContainer)
|
7689
7690
|
return toContainer;
|
7690
7691
|
if (!!fromContainer)
|
7691
7692
|
return fromContainer;
|
7692
|
-
return null;
|
7693
7693
|
}
|
7694
7694
|
return _super.prototype.findDropTargetNodeByDragOverNode.call(this, dragOverNode);
|
7695
7695
|
};
|
@@ -7739,8 +7739,10 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
7739
7739
|
DragDropRankingSelectToRank.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
|
7740
7740
|
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
7741
7741
|
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
7742
|
-
if (toIndex === -1)
|
7743
|
-
|
7742
|
+
if (toIndex === -1) {
|
7743
|
+
var length_1 = model.value.length;
|
7744
|
+
toIndex = fromChoicesArray === toChoicesArray ? length_1 - 1 : length_1;
|
7745
|
+
}
|
7744
7746
|
return { fromIndex: fromIndex, toIndex: toIndex };
|
7745
7747
|
};
|
7746
7748
|
DragDropRankingSelectToRank.prototype.doUIEffects = function (dropTargetNode, fromIndex, toIndex) {
|
@@ -8023,6 +8025,17 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8023
8025
|
DropdownListModel.prototype.getAvailableItems = function () {
|
8024
8026
|
return this.question.visibleChoices;
|
8025
8027
|
};
|
8028
|
+
DropdownListModel.prototype.setOnTextSearchCallbackForListModel = function (listModel) {
|
8029
|
+
var _this = this;
|
8030
|
+
listModel.setOnTextSearchCallback(function (item, textToSearch) {
|
8031
|
+
if (_this.filteredItems)
|
8032
|
+
return _this.filteredItems.indexOf(item) >= 0;
|
8033
|
+
var textInLow = item.text.toLocaleLowerCase();
|
8034
|
+
textInLow = _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].comparator.normalizeTextCallback(textInLow, "filter");
|
8035
|
+
var index = textInLow.indexOf(textToSearch.toLocaleLowerCase());
|
8036
|
+
return _this.question.searchMode == "startsWith" ? index == 0 : index > -1;
|
8037
|
+
});
|
8038
|
+
};
|
8026
8039
|
DropdownListModel.prototype.createListModel = function () {
|
8027
8040
|
var _this = this;
|
8028
8041
|
var visibleItems = this.getAvailableItems();
|
@@ -8036,14 +8049,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8036
8049
|
};
|
8037
8050
|
}
|
8038
8051
|
var res = new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](visibleItems, _onSelectionChanged, false, undefined, this.question.choicesLazyLoadEnabled ? this.listModelFilterStringChanged : undefined, this.listElementId);
|
8039
|
-
|
8040
|
-
if (_this.filteredItems)
|
8041
|
-
return _this.filteredItems.indexOf(item) >= 0;
|
8042
|
-
var textInLow = item.text.toLocaleLowerCase();
|
8043
|
-
textInLow = _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].comparator.normalizeTextCallback(textInLow, "filter");
|
8044
|
-
var index = textInLow.indexOf(textToSearch.toLocaleLowerCase());
|
8045
|
-
return _this.question.searchMode == "startsWith" ? index == 0 : index > -1;
|
8046
|
-
});
|
8052
|
+
this.setOnTextSearchCallbackForListModel(res);
|
8047
8053
|
res.renderElements = false;
|
8048
8054
|
res.forceShowFilter = true;
|
8049
8055
|
res.areSameItemsCallback = function (item1, item2) {
|
@@ -8622,6 +8628,7 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
|
|
8622
8628
|
};
|
8623
8629
|
}
|
8624
8630
|
var res = new _multiSelectListModel__WEBPACK_IMPORTED_MODULE_3__["MultiSelectListModel"](visibleItems, _onSelectionChanged, false, undefined, this.question.choicesLazyLoadEnabled ? this.listModelFilterStringChanged : undefined, this.listElementId);
|
8631
|
+
this.setOnTextSearchCallbackForListModel(res);
|
8625
8632
|
res.forceShowFilter = true;
|
8626
8633
|
return res;
|
8627
8634
|
};
|
@@ -9542,8 +9549,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9542
9549
|
//import "../../modern.scss";
|
9543
9550
|
var Version;
|
9544
9551
|
var ReleaseDate;
|
9545
|
-
Version = "" + "1.9.
|
9546
|
-
ReleaseDate = "" + "2024-02-
|
9552
|
+
Version = "" + "1.9.132";
|
9553
|
+
ReleaseDate = "" + "2024-02-27";
|
9547
9554
|
function checkLibraryVersion(ver, libraryName) {
|
9548
9555
|
if (Version != ver) {
|
9549
9556
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -21257,6 +21264,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
21257
21264
|
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
|
21258
21265
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
21259
21266
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./src/base.ts");
|
21267
|
+
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
|
21268
|
+
/* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
|
21269
|
+
|
21270
|
+
|
21260
21271
|
|
21261
21272
|
|
21262
21273
|
|
@@ -21268,12 +21279,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
21268
21279
|
var LocalizableString = /** @class */ (function () {
|
21269
21280
|
function LocalizableString(owner, useMarkdown, name) {
|
21270
21281
|
if (useMarkdown === void 0) { useMarkdown = false; }
|
21282
|
+
var _a;
|
21271
21283
|
this.owner = owner;
|
21272
21284
|
this.useMarkdown = useMarkdown;
|
21273
21285
|
this.name = name;
|
21274
21286
|
this.values = {};
|
21275
21287
|
this.htmlValues = {};
|
21288
|
+
this._allowLineBreaks = false;
|
21276
21289
|
this.onStringChanged = new _base__WEBPACK_IMPORTED_MODULE_3__["EventBase"]();
|
21290
|
+
if (owner instanceof _survey_element__WEBPACK_IMPORTED_MODULE_5__["SurveyElementCore"]) {
|
21291
|
+
this._allowLineBreaks = ((_a = _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].findProperty(owner.getType(), name)) === null || _a === void 0 ? void 0 : _a.type) == "text";
|
21292
|
+
}
|
21277
21293
|
this.onCreating();
|
21278
21294
|
}
|
21279
21295
|
Object.defineProperty(LocalizableString, "defaultLocale", {
|
@@ -21299,6 +21315,13 @@ var LocalizableString = /** @class */ (function () {
|
|
21299
21315
|
enumerable: false,
|
21300
21316
|
configurable: true
|
21301
21317
|
});
|
21318
|
+
Object.defineProperty(LocalizableString.prototype, "allowLineBreaks", {
|
21319
|
+
get: function () {
|
21320
|
+
return this._allowLineBreaks;
|
21321
|
+
},
|
21322
|
+
enumerable: false,
|
21323
|
+
configurable: true
|
21324
|
+
});
|
21302
21325
|
LocalizableString.prototype.getIsMultiple = function () { return false; };
|
21303
21326
|
Object.defineProperty(LocalizableString.prototype, "locale", {
|
21304
21327
|
get: function () {
|
@@ -37215,6 +37238,13 @@ var Question = /** @class */ (function (_super) {
|
|
37215
37238
|
enumerable: false,
|
37216
37239
|
configurable: true
|
37217
37240
|
});
|
37241
|
+
Object.defineProperty(Question.prototype, "ariaDescriptionId", {
|
37242
|
+
get: function () {
|
37243
|
+
return this.id + "_ariaDescription";
|
37244
|
+
},
|
37245
|
+
enumerable: false,
|
37246
|
+
configurable: true
|
37247
|
+
});
|
37218
37248
|
Object.defineProperty(Question.prototype, "commentId", {
|
37219
37249
|
get: function () {
|
37220
37250
|
return this.id + "_comment";
|
@@ -38136,7 +38166,6 @@ var Question = /** @class */ (function (_super) {
|
|
38136
38166
|
Question.prototype.hasErrors = function (fireCallback, rec) {
|
38137
38167
|
if (fireCallback === void 0) { fireCallback = true; }
|
38138
38168
|
if (rec === void 0) { rec = null; }
|
38139
|
-
var oldHasErrors = this.errors.length > 0;
|
38140
38169
|
var errors = this.checkForErrors(!!rec && rec.isOnValueChanged === true);
|
38141
38170
|
if (fireCallback) {
|
38142
38171
|
if (!!this.survey) {
|
@@ -38194,13 +38223,16 @@ var Question = /** @class */ (function (_super) {
|
|
38194
38223
|
return;
|
38195
38224
|
var newError = null;
|
38196
38225
|
if (typeof error === "string" || error instanceof String) {
|
38197
|
-
newError =
|
38226
|
+
newError = this.addCustomError(error);
|
38198
38227
|
}
|
38199
38228
|
else {
|
38200
38229
|
newError = error;
|
38201
38230
|
}
|
38202
38231
|
this.errors.push(newError);
|
38203
38232
|
};
|
38233
|
+
Question.prototype.addCustomError = function (error) {
|
38234
|
+
return new _error__WEBPACK_IMPORTED_MODULE_3__["CustomError"](error, this.survey);
|
38235
|
+
};
|
38204
38236
|
Question.prototype.removeError = function (error) {
|
38205
38237
|
var errors = this.errors;
|
38206
38238
|
var index = errors.indexOf(error);
|
@@ -38251,6 +38283,12 @@ var Question = /** @class */ (function (_super) {
|
|
38251
38283
|
err.onUpdateErrorTextCallback = function (err) { err.text = _this.requiredErrorText; };
|
38252
38284
|
errors.push(err);
|
38253
38285
|
}
|
38286
|
+
if (!this.isEmpty() && this.customWidget) {
|
38287
|
+
var text = this.customWidget.validate(this);
|
38288
|
+
if (!!text) {
|
38289
|
+
errors.push(this.addCustomError(text));
|
38290
|
+
}
|
38291
|
+
}
|
38254
38292
|
};
|
38255
38293
|
Question.prototype.hasRequiredError = function () {
|
38256
38294
|
return this.isRequired && this.isEmpty();
|
@@ -38732,6 +38770,20 @@ var Question = /** @class */ (function (_super) {
|
|
38732
38770
|
enumerable: false,
|
38733
38771
|
configurable: true
|
38734
38772
|
});
|
38773
|
+
Object.defineProperty(Question.prototype, "ariaDescribedBy", {
|
38774
|
+
get: function () {
|
38775
|
+
if (this.isNewA11yStructure)
|
38776
|
+
return null;
|
38777
|
+
if (this.hasTitle) {
|
38778
|
+
return this.ariaDescriptionId;
|
38779
|
+
}
|
38780
|
+
else {
|
38781
|
+
return null;
|
38782
|
+
}
|
38783
|
+
},
|
38784
|
+
enumerable: false,
|
38785
|
+
configurable: true
|
38786
|
+
});
|
38735
38787
|
Object.defineProperty(Question.prototype, "ariaExpanded", {
|
38736
38788
|
get: function () {
|
38737
38789
|
return null;
|
@@ -38739,7 +38791,7 @@ var Question = /** @class */ (function (_super) {
|
|
38739
38791
|
enumerable: false,
|
38740
38792
|
configurable: true
|
38741
38793
|
});
|
38742
|
-
Object.defineProperty(Question.prototype, "
|
38794
|
+
Object.defineProperty(Question.prototype, "ariaErrormessage", {
|
38743
38795
|
get: function () {
|
38744
38796
|
if (this.isNewA11yStructure)
|
38745
38797
|
return null;
|
@@ -38796,6 +38848,18 @@ var Question = /** @class */ (function (_super) {
|
|
38796
38848
|
configurable: true
|
38797
38849
|
});
|
38798
38850
|
Object.defineProperty(Question.prototype, "a11y_input_ariaDescribedBy", {
|
38851
|
+
get: function () {
|
38852
|
+
if (this.hasTitle && !this.parentQuestion) {
|
38853
|
+
return this.ariaDescriptionId;
|
38854
|
+
}
|
38855
|
+
else {
|
38856
|
+
return null;
|
38857
|
+
}
|
38858
|
+
},
|
38859
|
+
enumerable: false,
|
38860
|
+
configurable: true
|
38861
|
+
});
|
38862
|
+
Object.defineProperty(Question.prototype, "a11y_input_ariaErrormessage", {
|
38799
38863
|
get: function () {
|
38800
38864
|
return this.hasCssError() ? this.id + "_errors" : null;
|
38801
38865
|
},
|
@@ -39013,6 +39077,11 @@ var QuestionCustomWidget = /** @class */ (function () {
|
|
39013
39077
|
return this.widgetJson.getDisplayValue(question, value);
|
39014
39078
|
return null;
|
39015
39079
|
};
|
39080
|
+
QuestionCustomWidget.prototype.validate = function (question) {
|
39081
|
+
if (this.widgetJson.validate)
|
39082
|
+
return this.widgetJson.validate(question);
|
39083
|
+
return undefined;
|
39084
|
+
};
|
39016
39085
|
QuestionCustomWidget.prototype.isFit = function (question) {
|
39017
39086
|
if (this.isLibraryLoaded() && this.widgetJson.isFit)
|
39018
39087
|
return this.widgetJson.isFit(question);
|
@@ -44164,6 +44233,15 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
44164
44233
|
}
|
44165
44234
|
}
|
44166
44235
|
};
|
44236
|
+
QuestionCompositeModel.prototype.onSurveyValueChanged = function (newValue) {
|
44237
|
+
_super.prototype.onSurveyValueChanged.call(this, newValue);
|
44238
|
+
var val = !!newValue ? newValue : {};
|
44239
|
+
if (!!this.contentPanel) {
|
44240
|
+
this.contentPanel.questions.forEach(function (q) {
|
44241
|
+
q.onSurveyValueChanged(val[q.getValueName()]);
|
44242
|
+
});
|
44243
|
+
}
|
44244
|
+
};
|
44167
44245
|
QuestionCompositeModel.prototype.getValue = function (name) {
|
44168
44246
|
var val = this.value;
|
44169
44247
|
return !!val ? val[name] : null;
|
@@ -44188,6 +44266,14 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
44188
44266
|
this.setNewValueIntoQuestion(name, newValue);
|
44189
44267
|
_super.prototype.setValue.call(this, name, newValue, locNotification, allowNotifyValueChanged);
|
44190
44268
|
this.settingNewValue = false;
|
44269
|
+
this.runPanelTriggers(QuestionCompositeModel.ItemVariableName + "." + name, newValue);
|
44270
|
+
};
|
44271
|
+
QuestionCompositeModel.prototype.runPanelTriggers = function (name, value) {
|
44272
|
+
if (!!this.contentPanel) {
|
44273
|
+
this.contentPanel.questions.forEach(function (q) {
|
44274
|
+
q.runTriggers(name, value);
|
44275
|
+
});
|
44276
|
+
}
|
44191
44277
|
};
|
44192
44278
|
QuestionCompositeModel.prototype.getFilteredValues = function () {
|
44193
44279
|
var values = !!this.data ? this.data.getFilteredValues() : {};
|
@@ -48325,7 +48411,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
48325
48411
|
return loc ? loc : this.emptyLocalizableString;
|
48326
48412
|
};
|
48327
48413
|
QuestionMatrixModel.prototype.supportGoNextPageAutomatic = function () {
|
48328
|
-
return this.isMouseDown === true && this.hasValuesInAllRows();
|
48414
|
+
return this.isMouseDown === true && this.hasValuesInAllRows(false);
|
48329
48415
|
};
|
48330
48416
|
QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
48331
48417
|
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
@@ -48340,12 +48426,12 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
48340
48426
|
}
|
48341
48427
|
};
|
48342
48428
|
QuestionMatrixModel.prototype.hasErrorAllRowsRequired = function () {
|
48343
|
-
return this.isAllRowRequired && !this.hasValuesInAllRows();
|
48429
|
+
return this.isAllRowRequired && !this.hasValuesInAllRows(true);
|
48344
48430
|
};
|
48345
48431
|
QuestionMatrixModel.prototype.hasErrorEachRowUnique = function () {
|
48346
48432
|
return this.eachRowUnique && this.hasNonUniqueValueInRow();
|
48347
48433
|
};
|
48348
|
-
QuestionMatrixModel.prototype.hasValuesInAllRows = function () {
|
48434
|
+
QuestionMatrixModel.prototype.hasValuesInAllRows = function (addError) {
|
48349
48435
|
var rows = this.generatedVisibleRows;
|
48350
48436
|
if (!rows)
|
48351
48437
|
rows = this.visibleRows;
|
@@ -48355,7 +48441,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
48355
48441
|
for (var i = 0; i < rows.length; i++) {
|
48356
48442
|
var row = rows[i];
|
48357
48443
|
var hasValue = !this.isValueEmpty(row.value);
|
48358
|
-
if (!hasValue) {
|
48444
|
+
if (addError && !hasValue) {
|
48359
48445
|
this.addErrorIntoRow(row);
|
48360
48446
|
}
|
48361
48447
|
res = res && hasValue;
|
@@ -48390,7 +48476,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
48390
48476
|
this.errorsInRow[row.name] = true;
|
48391
48477
|
};
|
48392
48478
|
QuestionMatrixModel.prototype.getIsAnswered = function () {
|
48393
|
-
return _super.prototype.getIsAnswered.call(this) && this.hasValuesInAllRows();
|
48479
|
+
return _super.prototype.getIsAnswered.call(this) && this.hasValuesInAllRows(false);
|
48394
48480
|
};
|
48395
48481
|
QuestionMatrixModel.prototype.createMatrixRow = function (item, fullName, value) {
|
48396
48482
|
var row = new MatrixRowModel(item, fullName, this, value);
|
@@ -53717,6 +53803,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
53717
53803
|
};
|
53718
53804
|
QuestionMatrixDropdownRenderedTable.prototype.setItemCellCssClasses = function (cell) {
|
53719
53805
|
cell.className = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
|
53806
|
+
.append(this.cssClasses.cell)
|
53720
53807
|
.append(this.cssClasses.itemCell)
|
53721
53808
|
.append(this.cssClasses.radioCell, cell.isRadio)
|
53722
53809
|
.append(this.cssClasses.checkboxCell, cell.isCheckbox)
|
@@ -55039,6 +55126,13 @@ var MultipleTextEditorModel = /** @class */ (function (_super) {
|
|
55039
55126
|
enumerable: false,
|
55040
55127
|
configurable: true
|
55041
55128
|
});
|
55129
|
+
Object.defineProperty(MultipleTextEditorModel.prototype, "a11y_input_ariaDescribedBy", {
|
55130
|
+
get: function () {
|
55131
|
+
return null;
|
55132
|
+
},
|
55133
|
+
enumerable: false,
|
55134
|
+
configurable: true
|
55135
|
+
});
|
55042
55136
|
return MultipleTextEditorModel;
|
55043
55137
|
}(_question_text__WEBPACK_IMPORTED_MODULE_3__["QuestionTextModel"]));
|
55044
55138
|
|
@@ -61656,6 +61750,9 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
61656
61750
|
enumerable: false,
|
61657
61751
|
configurable: true
|
61658
61752
|
});
|
61753
|
+
__decorate([
|
61754
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
61755
|
+
], QuestionTagboxModel.prototype, "searchMode", void 0);
|
61659
61756
|
__decorate([
|
61660
61757
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
61661
61758
|
], QuestionTagboxModel.prototype, "allowClear", void 0);
|
@@ -61697,7 +61794,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("tagbox", [
|
|
61697
61794
|
{ name: "choicesLazyLoadPageSize:number", default: 25, visible: false },
|
61698
61795
|
{ name: "hideSelectedItems:boolean", default: false },
|
61699
61796
|
{ name: "closeOnSelect:boolean" },
|
61700
|
-
{ name: "itemComponent", visible: false, default: "" }
|
61797
|
+
{ name: "itemComponent", visible: false, default: "" },
|
61798
|
+
{ name: "searchMode", default: "contains", choices: ["contains", "startsWith"] }
|
61701
61799
|
], function () {
|
61702
61800
|
return new QuestionTagboxModel("");
|
61703
61801
|
}, "checkbox");
|
@@ -63009,7 +63107,7 @@ var SurveyQuestionBooleanCheckbox = /** @class */ (function (_super) {
|
|
63009
63107
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: cssClasses.checkboxLabel },
|
63010
63108
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
63011
63109
|
? ""
|
63012
|
-
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-
|
63110
|
+
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
63013
63111
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.checkboxMaterialDecorator },
|
63014
63112
|
this.question.svgIcon ?
|
63015
63113
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: cssClasses.checkboxItemDecorator },
|
@@ -63077,7 +63175,7 @@ var SurveyQuestionBooleanRadio = /** @class */ (function (_super) {
|
|
63077
63175
|
var cssClasses = this.question.cssClasses;
|
63078
63176
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { role: "presentation", className: this.question.getRadioItemClass(cssClasses, value) },
|
63079
63177
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: cssClasses.radioLabel },
|
63080
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "radio", name: this.question.name, value: value, "aria-
|
63178
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "radio", name: this.question.name, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.booleanValueRendered, disabled: this.question.isInputReadOnly, className: cssClasses.itemRadioControl, onChange: this.handleOnChange }),
|
63081
63179
|
this.question.cssClasses.materialRadioDecorator ?
|
63082
63180
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
|
63083
63181
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: cssClasses.itemRadioDecorator },
|
@@ -63197,7 +63295,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
|
|
63197
63295
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: itemClass, onClick: this.handleOnClick },
|
63198
63296
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
|
63199
63297
|
? ""
|
63200
|
-
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-
|
63298
|
+
: this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
|
63201
63299
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, _this.question.swapOrder); } },
|
63202
63300
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(this.question.swapOrder) }, this.renderLocString(this.question.locLabelLeft))),
|
63203
63301
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
|
@@ -65312,7 +65410,7 @@ var RatingItemSmiley = /** @class */ (function (_super) {
|
|
65312
65410
|
RatingItemSmiley.prototype.render = function () {
|
65313
65411
|
var _this = this;
|
65314
65412
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, style: this.question.getItemStyle(this.item.itemValue, this.item.highlight), className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
|
65315
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-
|
65413
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
65316
65414
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue), title: this.item.text })));
|
65317
65415
|
};
|
65318
65416
|
return RatingItemSmiley;
|
@@ -65367,7 +65465,7 @@ var RatingItemStar = /** @class */ (function (_super) {
|
|
65367
65465
|
RatingItemStar.prototype.render = function () {
|
65368
65466
|
var _this = this;
|
65369
65467
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
|
65370
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-
|
65468
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
65371
65469
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon, title: this.item.text }),
|
65372
65470
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt, title: this.item.text })));
|
65373
65471
|
};
|
@@ -65459,7 +65557,7 @@ var RatingItem = /** @class */ (function (_super) {
|
|
65459
65557
|
RatingItem.prototype.render = function () {
|
65460
65558
|
var itemText = this.renderLocString(this.item.locText);
|
65461
65559
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
|
65462
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-
|
65560
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
65463
65561
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText }, itemText)));
|
65464
65562
|
};
|
65465
65563
|
RatingItem.prototype.componentDidMount = function () {
|
@@ -66268,7 +66366,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
66268
66366
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
|
66269
66367
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
66270
66368
|
// @ts-ignore
|
66271
|
-
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-
|
66369
|
+
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
|
66272
66370
|
dropdownListModel.showHintPrefix ?
|
66273
66371
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
|
66274
66372
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringPrefix))) : null,
|
@@ -66278,7 +66376,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
66278
66376
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
|
66279
66377
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
|
66280
66378
|
valueElement,
|
66281
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
|
66379
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
|
66282
66380
|
this.createClearButton()));
|
66283
66381
|
};
|
66284
66382
|
SurveyQuestionDropdownBase.prototype.createClearButton = function () {
|
@@ -66454,7 +66552,7 @@ var SurveyQuestionDropdownSelect = /** @class */ (function (_super) {
|
|
66454
66552
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
66455
66553
|
// @ts-ignore
|
66456
66554
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), disabled: true }, this.question.readOnlyText)) :
|
66457
|
-
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("select", { id: this.question.inputId, className: this.question.getControlClass(), ref: function (select) { return (_this.setControl(select)); }, autoComplete: this.question.autocomplete, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onClick: click, onKeyUp: keyup, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-
|
66555
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("select", { id: this.question.inputId, className: this.question.getControlClass(), ref: function (select) { return (_this.setControl(select)); }, autoComplete: this.question.autocomplete, onChange: this.updateValueOnEvent, onInput: this.updateValueOnEvent, onClick: click, onKeyUp: keyup, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, required: this.question.isRequired },
|
66458
66556
|
this.question.allowClear ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("option", { value: "" }, this.question.placeholder)) : null,
|
66459
66557
|
this.question.visibleChoices.map(function (item, i) { return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_dropdown_item__WEBPACK_IMPORTED_MODULE_4__["SurveyQuestionOptionItem"], { key: "item" + i, item: item }); })));
|
66460
66558
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.selectWrapper },
|
@@ -67151,7 +67249,7 @@ var SurveyQuestionImagePickerItem = /** @class */ (function (_super) {
|
|
67151
67249
|
}
|
67152
67250
|
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass },
|
67153
67251
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: cssClasses.label },
|
67154
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-
|
67252
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
|
67155
67253
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.itemDecorator },
|
67156
67254
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.imageContainer },
|
67157
67255
|
!!this.question.cssClasses.checkedItemDecorator ?
|
@@ -68586,7 +68684,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
|
|
68586
68684
|
var rootStyle = question.getRootStyle();
|
68587
68685
|
var questionContent = this.wrapQuestionContent(this.renderQuestionContent());
|
68588
68686
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
68589
|
-
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-expanded": question.ariaExpanded === null ? undefined : question.ariaExpanded === "true" },
|
68687
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { ref: this.rootRef, id: question.id, className: question.getRootCss(), style: rootStyle, role: question.ariaRole, "aria-required": this.question.ariaRequired, "aria-invalid": this.question.ariaInvalid, "aria-labelledby": question.ariaLabelledBy, "aria-describedby": question.ariaDescribedBy, "aria-expanded": question.ariaExpanded === null ? undefined : question.ariaExpanded === "true" },
|
68590
68688
|
errorsAboveQuestion,
|
68591
68689
|
headerTop,
|
68592
68690
|
questionContent,
|
@@ -68955,7 +69053,7 @@ var SurveyButtonGroupItem = /** @class */ (function (_super) {
|
|
68955
69053
|
var _this = this;
|
68956
69054
|
return (react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("input", { className: this.model.css.control, id: this.model.id, type: "radio", name: this.model.name, checked: this.model.selected, value: this.model.value, disabled: this.model.readOnly, onChange: function () {
|
68957
69055
|
_this.model.onChange();
|
68958
|
-
}, "aria-required": this.model.isRequired, "aria-label": this.model.caption.renderedHtml, "aria-invalid": this.model.hasErrors, "aria-
|
69056
|
+
}, "aria-required": this.model.isRequired, "aria-label": this.model.caption.renderedHtml, "aria-invalid": this.model.hasErrors, "aria-errormessage": this.model.describedBy, role: "radio" }));
|
68959
69057
|
};
|
68960
69058
|
SurveyButtonGroupItem.prototype.renderCaption = function () {
|
68961
69059
|
if (!this.model.showCaption)
|
@@ -69027,7 +69125,7 @@ var SurveyQuestionCheckbox = /** @class */ (function (_super) {
|
|
69027
69125
|
SurveyQuestionCheckbox.prototype.renderElement = function () {
|
69028
69126
|
var _this = this;
|
69029
69127
|
var cssClasses = this.question.cssClasses;
|
69030
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-
|
69128
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
|
69031
69129
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("legend", { className: "sv-hidden" }, this.question.locTitle.renderedHtml),
|
69032
69130
|
this.getHeader(),
|
69033
69131
|
this.question.hasColumns
|
@@ -69286,7 +69384,7 @@ var SurveyQuestionComment = /** @class */ (function (_super) {
|
|
69286
69384
|
}
|
69287
69385
|
var counter = !!this.question.getMaxLength() ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_character_counter__WEBPACK_IMPORTED_MODULE_4__["CharacterCounterComponent"], { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter })) : null;
|
69288
69386
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
69289
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.question.inputId, className: this.question.className, disabled: this.question.isInputReadOnly, readOnly: this.question.isInputReadOnly, ref: function (textarea) { return (_this.setControl(textarea)); }, maxLength: this.question.getMaxLength(), placeholder: placeholder, onBlur: onBlur, onInput: onInput, onKeyDown: function (event) { _this.question.onKeyDown(event); }, cols: this.question.cols, rows: this.question.rows, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-
|
69387
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.question.inputId, className: this.question.className, disabled: this.question.isInputReadOnly, readOnly: this.question.isInputReadOnly, ref: function (textarea) { return (_this.setControl(textarea)); }, maxLength: this.question.getMaxLength(), placeholder: placeholder, onBlur: onBlur, onInput: onInput, onKeyDown: function (event) { _this.question.onKeyDown(event); }, cols: this.question.cols, rows: this.question.rows, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, style: { resize: this.question.resizeStyle } }),
|
69290
69388
|
counter));
|
69291
69389
|
};
|
69292
69390
|
return SurveyQuestionComment;
|
@@ -69576,7 +69674,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
|
|
69576
69674
|
};
|
69577
69675
|
SurveyElementBase.renderQuestionDescription = function (question) {
|
69578
69676
|
var descriptionText = SurveyElementBase.renderLocString(question.locDescription);
|
69579
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: question.hasDescription ? undefined : { display: "none" }, className: question.cssDescription }, descriptionText);
|
69677
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: question.hasDescription ? undefined : { display: "none" }, id: question.ariaDescriptionId, className: question.cssDescription }, descriptionText);
|
69580
69678
|
};
|
69581
69679
|
SurveyElementBase.prototype.componentDidMount = function () {
|
69582
69680
|
this.makeBaseElementsReact();
|
@@ -70116,7 +70214,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
|
|
70116
70214
|
var fileNavigator = this.question.fileNavigatorVisible ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: this.question.fileNavigator })) : null;
|
70117
70215
|
var fileInput = (this.isDisplayMode ?
|
70118
70216
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, multiple: this.question.allowMultiple, placeholder: this.question.title, accept: this.question.acceptedTypes }) : this.question.hasFileUI ?
|
70119
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, tabIndex: -1, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-
|
70217
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, tabIndex: -1, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, multiple: this.question.allowMultiple, title: this.question.inputTitle, accept: this.question.acceptedTypes, capture: this.question.renderCapture }) : null);
|
70120
70218
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss },
|
70121
70219
|
fileInput,
|
70122
70220
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.dragArea, onDrop: this.question.onDrop, onDragOver: this.question.onDragOver, onDragLeave: this.question.onDragLeave, onDragEnter: this.question.onDragEnter },
|
@@ -70508,7 +70606,7 @@ var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
|
|
70508
70606
|
mobileSpan));
|
70509
70607
|
};
|
70510
70608
|
SurveyQuestionMatrixCell.prototype.renderInput = function (inputId, isChecked) {
|
70511
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isReadOnly, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-
|
70609
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isReadOnly, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }));
|
70512
70610
|
};
|
70513
70611
|
return SurveyQuestionMatrixCell;
|
70514
70612
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
@@ -71519,7 +71617,7 @@ var SurveyQuestionRadiogroup = /** @class */ (function (_super) {
|
|
71519
71617
|
clearButton = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
|
71520
71618
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "button", className: this.question.cssClasses.clearButton, onClick: function () { return _this.question.clearValue(); }, value: this.question.clearButtonCaption })));
|
71521
71619
|
}
|
71522
|
-
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-
|
71620
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("fieldset", { className: this.question.getSelectBaseRootCss(), ref: function (fieldset) { return (_this.setControl(fieldset)); }, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage },
|
71523
71621
|
this.question.hasColumns
|
71524
71622
|
? this.getColumnedBody(cssClasses)
|
71525
71623
|
: this.getBody(cssClasses),
|
@@ -71679,7 +71777,7 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
|
|
71679
71777
|
var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
71680
71778
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
|
71681
71779
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
|
71682
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { "aria-
|
71780
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), onChange: this.handleOnChange }),
|
71683
71781
|
this.cssClasses.materialDecorator ?
|
71684
71782
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
71685
71783
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
|
@@ -72058,7 +72156,7 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
|
|
72058
72156
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
|
72059
72157
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
72060
72158
|
// @ts-ignore
|
72061
|
-
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-
|
72159
|
+
disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
|
72062
72160
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.controlValue },
|
72063
72161
|
items,
|
72064
72162
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_tagbox_filter__WEBPACK_IMPORTED_MODULE_4__["TagboxFilterString"], { model: dropdownMultiSelectListModel, question: this.question })),
|
@@ -72142,7 +72240,7 @@ var SurveyQuestionText = /** @class */ (function (_super) {
|
|
72142
72240
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
72143
72241
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: inputClass, type: this.question.inputType,
|
72144
72242
|
//ref={this.controlRef}
|
72145
|
-
ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: this.question.onBlur, onFocus: this.question.onFocus, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-
|
72243
|
+
ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: this.question.onBlur, onFocus: this.question.onFocus, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
|
72146
72244
|
counter));
|
72147
72245
|
};
|
72148
72246
|
SurveyQuestionText.prototype.renderElement = function () {
|
@@ -72747,11 +72845,12 @@ var SurveyLocStringViewer = /** @class */ (function (_super) {
|
|
72747
72845
|
return strEl;
|
72748
72846
|
};
|
72749
72847
|
SurveyLocStringViewer.prototype.renderString = function () {
|
72848
|
+
var className = this.locStr.allowLineBreaks ? "sv-string-viewer sv-string-viewer--multiline" : "sv-string-viewer";
|
72750
72849
|
if (this.locStr.hasHtml) {
|
72751
72850
|
var htmlValue = { __html: this.locStr.renderedHtml };
|
72752
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { ref: this.rootRef, className:
|
72851
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { ref: this.rootRef, className: className, style: this.style, dangerouslySetInnerHTML: htmlValue });
|
72753
72852
|
}
|
72754
|
-
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { ref: this.rootRef, className:
|
72853
|
+
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { ref: this.rootRef, className: className, style: this.style }, this.locStr.renderedHtml);
|
72755
72854
|
};
|
72756
72855
|
return SurveyLocStringViewer;
|
72757
72856
|
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component));
|
@@ -72917,7 +73016,7 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
72917
73016
|
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
|
72918
73017
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, this.model.inputStringRendered),
|
72919
73018
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.model.hintStringSuffix))) : null,
|
72920
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: this.model.filterReadOnly ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-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); } }))));
|
73019
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), inputMode: this.model.inputMode, ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, disabled: this.question.isInputReadOnly, readOnly: this.model.filterReadOnly ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-controls": this.model.listElementId, "aria-activedescendant": this.model.ariaActivedescendant, placeholder: this.model.filterStringPlaceholder, onKeyDown: function (e) { _this.keyhandler(e); }, onChange: function (e) { _this.onChange(e); }, onBlur: function (e) { _this.onBlur(e); }, onFocus: function (e) { _this.onFocus(e); } }))));
|
72921
73020
|
};
|
72922
73021
|
return TagboxFilterString;
|
72923
73022
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|
@@ -73648,7 +73747,7 @@ var settings = {
|
|
73648
73747
|
*/
|
73649
73748
|
showMaxLengthIndicator: true,
|
73650
73749
|
/**
|
73651
|
-
*
|
73750
|
+
* Specifies whether to animate survey elements.
|
73652
73751
|
*
|
73653
73752
|
* Default value: `true`
|
73654
73753
|
*/
|
@@ -74295,6 +74394,11 @@ var SurveyElementCore = /** @class */ (function (_super) {
|
|
74295
74394
|
enumerable: false,
|
74296
74395
|
configurable: true
|
74297
74396
|
});
|
74397
|
+
Object.defineProperty(SurveyElementCore.prototype, "ariaDescriptionId", {
|
74398
|
+
get: function () { return undefined; },
|
74399
|
+
enumerable: false,
|
74400
|
+
configurable: true
|
74401
|
+
});
|
74298
74402
|
Object.defineProperty(SurveyElementCore.prototype, "titleTabIndex", {
|
74299
74403
|
get: function () { return undefined; },
|
74300
74404
|
enumerable: false,
|
@@ -86519,7 +86623,7 @@ var VerticalResponsivityManager = /** @class */ (function (_super) {
|
|
86519
86623
|
/*!****************************!*\
|
86520
86624
|
!*** ./src/utils/utils.ts ***!
|
86521
86625
|
\****************************/
|
86522
|
-
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, 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 */
|
86626
|
+
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, 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 */
|
86523
86627
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
86524
86628
|
|
86525
86629
|
"use strict";
|
@@ -86533,6 +86637,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
86533
86637
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return sanitizeEditableContent; });
|
86534
86638
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
|
86535
86639
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
|
86640
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
|
86536
86641
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
|
86537
86642
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
|
86538
86643
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
|
@@ -86886,7 +86991,8 @@ function findParentByClassNames(element, classNames) {
|
|
86886
86991
|
}
|
86887
86992
|
}
|
86888
86993
|
}
|
86889
|
-
function sanitizeEditableContent(element) {
|
86994
|
+
function sanitizeEditableContent(element, cleanLineBreaks) {
|
86995
|
+
if (cleanLineBreaks === void 0) { cleanLineBreaks = true; }
|
86890
86996
|
if (window.getSelection && document.createRange && element.childNodes.length > 0) {
|
86891
86997
|
var selection = document.getSelection();
|
86892
86998
|
if (selection.rangeCount == 0) {
|
@@ -86897,13 +87003,23 @@ function sanitizeEditableContent(element) {
|
|
86897
87003
|
range.setEndAfter(element.lastChild);
|
86898
87004
|
selection.removeAllRanges();
|
86899
87005
|
selection.addRange(range);
|
86900
|
-
var
|
86901
|
-
|
87006
|
+
var tail = selection.toString();
|
87007
|
+
var innerText = element.innerText;
|
87008
|
+
tail = tail.replace(/\r/g, "");
|
87009
|
+
if (cleanLineBreaks) {
|
87010
|
+
tail = tail.replace(/\n/g, "");
|
87011
|
+
innerText = innerText.replace(/\n/g, "");
|
87012
|
+
}
|
87013
|
+
var tail_len = tail.length;
|
87014
|
+
element.innerText = innerText;
|
86902
87015
|
range = document.createRange();
|
86903
|
-
range.setStart(element.
|
86904
|
-
range.
|
87016
|
+
range.setStart(element.firstChild, 0);
|
87017
|
+
range.setEnd(element.firstChild, 0);
|
86905
87018
|
selection.removeAllRanges();
|
86906
87019
|
selection.addRange(range);
|
87020
|
+
for (var i = 0; i < innerText.length - tail_len; i++) {
|
87021
|
+
selection.modify("move", "forward", "character");
|
87022
|
+
}
|
86907
87023
|
}
|
86908
87024
|
}
|
86909
87025
|
function mergeValues(src, dest) {
|
@@ -86965,9 +87081,12 @@ function showConfirmDialog(message, callback, applyTitle, locale, rootElement) {
|
|
86965
87081
|
cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
|
86966
87082
|
applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok", locale);
|
86967
87083
|
applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
|
86968
|
-
popupViewModel
|
87084
|
+
configConfirmDialog(popupViewModel);
|
86969
87085
|
return true;
|
86970
87086
|
}
|
87087
|
+
function configConfirmDialog(popupViewModel) {
|
87088
|
+
popupViewModel.width = "min-content";
|
87089
|
+
}
|
86971
87090
|
function chooseFiles(input, callback) {
|
86972
87091
|
if (!window || !window["FileReader"])
|
86973
87092
|
return;
|