survey-react 1.9.77 → 1.9.79
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 +89 -27
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +63 -14
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +44 -6
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +6841 -6382
- package/survey.react.js +560 -713
- 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.79
|
3
3
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -4965,6 +4965,8 @@ var modernCss = {
|
|
4965
4965
|
filterStringInput: "sv-dropdown__filter-string-input",
|
4966
4966
|
controlValue: "sv-dropdown__value",
|
4967
4967
|
controlInputFieldComponent: "sv_dropdown_control__input-field-component",
|
4968
|
+
hintPrefix: "sv-dropdown__hint-prefix",
|
4969
|
+
hintSuffix: "sv-dropdown__hint-suffix"
|
4968
4970
|
},
|
4969
4971
|
tagbox: {
|
4970
4972
|
root: "",
|
@@ -5115,6 +5117,7 @@ var modernCss = {
|
|
5115
5117
|
error: "sv-save-data_error",
|
5116
5118
|
success: "sv-save-data_success",
|
5117
5119
|
button: "sv-save-data_button",
|
5120
|
+
shown: "sv-save-data_root--shown"
|
5118
5121
|
},
|
5119
5122
|
window: {
|
5120
5123
|
root: "sv_window",
|
@@ -5315,10 +5318,17 @@ var defaultStandardCss = {
|
|
5315
5318
|
cleanButtonSvg: "sv_q_dropdown_clean-button-svg",
|
5316
5319
|
cleanButtonIconId: "icon-clear_16x16",
|
5317
5320
|
controlValue: "sv_q_dropdown__value",
|
5318
|
-
filterStringInput: "sv_q_dropdown__filter-string-input"
|
5321
|
+
filterStringInput: "sv_q_dropdown__filter-string-input",
|
5322
|
+
hintPrefix: "sv_q_dropdown__hint-prefix",
|
5323
|
+
hintSuffix: "sv_q_dropdown__hint-suffix"
|
5319
5324
|
},
|
5320
5325
|
html: { root: "" },
|
5321
|
-
image: {
|
5326
|
+
image: {
|
5327
|
+
root: "sv_q_image",
|
5328
|
+
image: "sv_image_image",
|
5329
|
+
noImage: "sv-image__no-image",
|
5330
|
+
noImageSvgIconId: "icon-no-image",
|
5331
|
+
},
|
5322
5332
|
matrix: {
|
5323
5333
|
root: "sv_q_matrix",
|
5324
5334
|
label: "sv_q_m_label",
|
@@ -5435,7 +5445,10 @@ var defaultStandardCss = {
|
|
5435
5445
|
itemInline: "sv_q_imagepicker_inline",
|
5436
5446
|
itemText: "sv_q_imgsel_text",
|
5437
5447
|
clearButton: "sv_q_radiogroup_clear",
|
5438
|
-
column: "sv_q_select_column"
|
5448
|
+
column: "sv_q_select_column",
|
5449
|
+
itemNoImage: "sv_q_imgsel__no-image",
|
5450
|
+
itemNoImageSvgIcon: "sv_q_imgsel__no-image-svg",
|
5451
|
+
itemNoImageSvgIconId: "icon-no-image",
|
5439
5452
|
},
|
5440
5453
|
rating: {
|
5441
5454
|
root: "sv_q_rating",
|
@@ -5476,6 +5489,7 @@ var defaultStandardCss = {
|
|
5476
5489
|
error: "sv-save-data_error",
|
5477
5490
|
success: "sv-save-data_success",
|
5478
5491
|
button: "sv-save-data_button",
|
5492
|
+
shown: "sv-save-data_root--shown"
|
5479
5493
|
},
|
5480
5494
|
window: {
|
5481
5495
|
root: "sv_window",
|
@@ -5586,6 +5600,7 @@ var defaultV2Css = {
|
|
5586
5600
|
number: "sd-element__num",
|
5587
5601
|
title: "sd-title sd-element__title sd-panel__title",
|
5588
5602
|
titleExpandable: "sd-element__title--expandable",
|
5603
|
+
titleNumInline: "sd-element__title--num-inline",
|
5589
5604
|
titleExpanded: "sd-element__title--expanded",
|
5590
5605
|
titleCollapsed: "sd-element__title--collapsed",
|
5591
5606
|
titleDisabled: "sd-element__title--disabled",
|
@@ -5674,6 +5689,7 @@ var defaultV2Css = {
|
|
5674
5689
|
headerBottom: "sd-question__header--location--bottom",
|
5675
5690
|
content: "sd-question__content",
|
5676
5691
|
contentLeft: "sd-question__content--left",
|
5692
|
+
titleNumInline: "sd-element__title--num-inline",
|
5677
5693
|
titleLeftRoot: "sd-question--left",
|
5678
5694
|
titleOnAnswer: "sd-question__title--answer",
|
5679
5695
|
titleOnError: "sd-question__title--error",
|
@@ -5708,6 +5724,8 @@ var defaultV2Css = {
|
|
5708
5724
|
root: "sd-image",
|
5709
5725
|
image: "sd-image__image",
|
5710
5726
|
adaptive: "sd-image__image--adaptive",
|
5727
|
+
noImage: "sd-image__no-image",
|
5728
|
+
noImageSvgIconId: "icon-no-image",
|
5711
5729
|
withFrame: ""
|
5712
5730
|
},
|
5713
5731
|
html: {
|
@@ -5848,7 +5866,9 @@ var defaultV2Css = {
|
|
5848
5866
|
controlEmpty: "sd-dropdown--empty",
|
5849
5867
|
controlLabel: "sd-item__control-label",
|
5850
5868
|
filterStringInput: "sd-dropdown__filter-string-input",
|
5851
|
-
materialDecorator: "sd-item__decorator sd-radio__decorator"
|
5869
|
+
materialDecorator: "sd-item__decorator sd-radio__decorator",
|
5870
|
+
hintPrefix: "sd-dropdown__hint-prefix",
|
5871
|
+
hintSuffix: "sd-dropdown__hint-suffix"
|
5852
5872
|
},
|
5853
5873
|
imagepicker: {
|
5854
5874
|
mainRoot: "sd-element sd-question sd-row__question",
|
@@ -5869,7 +5889,7 @@ var defaultV2Css = {
|
|
5869
5889
|
other: "sd-input sd-comment",
|
5870
5890
|
itemNoImage: "sd-imagepicker__no-image",
|
5871
5891
|
itemNoImageSvgIcon: "sd-imagepicker__no-image-svg",
|
5872
|
-
itemNoImageSvgIconId: "
|
5892
|
+
itemNoImageSvgIconId: "icon-no-image",
|
5873
5893
|
column: "sd-selectbase__column sd-imagepicker__column",
|
5874
5894
|
checkedItemDecorator: "sd-imagepicker__check-decorator",
|
5875
5895
|
checkedItemSvgIcon: "sd-imagepicker__check-icon",
|
@@ -6051,6 +6071,7 @@ var defaultV2Css = {
|
|
6051
6071
|
error: "sv-save-data_error",
|
6052
6072
|
success: "sv-save-data_success",
|
6053
6073
|
button: "sv-save-data_button",
|
6074
|
+
shown: "sv-save-data_root--shown"
|
6054
6075
|
},
|
6055
6076
|
window: {
|
6056
6077
|
root: "sv_window",
|
@@ -6276,10 +6297,6 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
6276
6297
|
draggedElementShortcut.appendChild(imageNode);
|
6277
6298
|
return draggedElementShortcut;
|
6278
6299
|
};
|
6279
|
-
DragDropChoices.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
6280
|
-
var result = dragOverNode.closest(this.dropTargetDataAttributeName);
|
6281
|
-
return result;
|
6282
|
-
};
|
6283
6300
|
DragDropChoices.prototype.getDropTargetByDataAttributeValue = function (dataAttributeValue) {
|
6284
6301
|
var dragOverChoice;
|
6285
6302
|
dragOverChoice = this.parentElement.choices.filter(function (choice) { return "" + choice.value == dataAttributeValue; })[0];
|
@@ -6426,8 +6443,10 @@ var DragDropCore = /** @class */ (function (_super) {
|
|
6426
6443
|
_this.creator = creator;
|
6427
6444
|
_this.longTap = longTap;
|
6428
6445
|
_this.onGhostPositionChanged = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
|
6429
|
-
_this.
|
6430
|
-
_this.
|
6446
|
+
_this.onDragStart = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
|
6447
|
+
_this.onDragEnd = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
|
6448
|
+
_this.onBeforeDrop = _this.onDragStart;
|
6449
|
+
_this.onAfterDrop = _this.onDragEnd;
|
6431
6450
|
_this.draggedElement = null;
|
6432
6451
|
_this.dropTarget = null;
|
6433
6452
|
_this.prevDropTarget = null;
|
@@ -6482,9 +6501,9 @@ var DragDropCore = /** @class */ (function (_super) {
|
|
6482
6501
|
_this.drop = function () {
|
6483
6502
|
if (_this.allowDropHere) {
|
6484
6503
|
var fromElement = _this.draggedElement.parent;
|
6485
|
-
_this.
|
6504
|
+
_this.onDragStart.fire(_this, { fromElement: fromElement, draggedElement: _this.draggedElement });
|
6486
6505
|
var newElement = _this.doDrop();
|
6487
|
-
_this.
|
6506
|
+
_this.onDragEnd.fire(_this, { fromElement: fromElement, draggedElement: newElement, toElement: _this.dropTarget });
|
6488
6507
|
}
|
6489
6508
|
_this.clear();
|
6490
6509
|
};
|
@@ -6775,9 +6794,8 @@ var DragDropCore = /** @class */ (function (_super) {
|
|
6775
6794
|
return this.findDropTargetNodeByDragOverNode(dragOverNode);
|
6776
6795
|
};
|
6777
6796
|
DragDropCore.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
6778
|
-
var
|
6779
|
-
|
6780
|
-
return result;
|
6797
|
+
var dropTargetNode = dragOverNode.closest(this.dropTargetDataAttributeName);
|
6798
|
+
return dropTargetNode;
|
6781
6799
|
};
|
6782
6800
|
DragDropCore.prototype.doClear = function () { };
|
6783
6801
|
DragDropCore.PreventScrolling = false;
|
@@ -6891,10 +6909,6 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
|
|
6891
6909
|
DragDropMatrixRows.prototype.isDropTargetValid = function (dropTarget) {
|
6892
6910
|
return true;
|
6893
6911
|
};
|
6894
|
-
DragDropMatrixRows.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
6895
|
-
var result = dragOverNode.closest(this.dropTargetDataAttributeName);
|
6896
|
-
return result;
|
6897
|
-
};
|
6898
6912
|
DragDropMatrixRows.prototype.calculateIsBottom = function (clientY) {
|
6899
6913
|
var rendreredRows = this.parentElement.renderedTable.rows;
|
6900
6914
|
var rows = rendreredRows.map(function (rendredRow) { return rendredRow.row; });
|
@@ -7029,6 +7043,10 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7029
7043
|
var rect = draggedElementNode.getBoundingClientRect();
|
7030
7044
|
draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
|
7031
7045
|
draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
|
7046
|
+
if (this.parentElement && this.parentElement.useFullItemSizeForShortcut) {
|
7047
|
+
draggedElementShortcut.style.width = draggedElementNode.offsetWidth + "px";
|
7048
|
+
draggedElementShortcut.style.height = draggedElementNode.offsetHeight + "px";
|
7049
|
+
}
|
7032
7050
|
return draggedElementShortcut;
|
7033
7051
|
};
|
7034
7052
|
Object.defineProperty(DragDropRankingChoices.prototype, "shortcutClass", {
|
@@ -7046,7 +7064,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7046
7064
|
};
|
7047
7065
|
DragDropRankingChoices.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
7048
7066
|
this.isDragOverRootNode = this.getIsDragOverRootNode(dragOverNode);
|
7049
|
-
return
|
7067
|
+
return _super.prototype.findDropTargetNodeByDragOverNode.call(this, dragOverNode);
|
7050
7068
|
};
|
7051
7069
|
DragDropRankingChoices.prototype.getIsDragOverRootNode = function (dragOverNode) {
|
7052
7070
|
// dragOverNode might be <path></path> for example and the className prop is obj
|
@@ -7537,9 +7555,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
7537
7555
|
/* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
|
7538
7556
|
/* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./list */ "./src/list.ts");
|
7539
7557
|
/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./popup */ "./src/popup.ts");
|
7540
|
-
/* harmony import */ var
|
7541
|
-
/* harmony import */ var
|
7542
|
-
/* harmony import */ var
|
7558
|
+
/* harmony import */ var _question_dropdown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./question_dropdown */ "./src/question_dropdown.ts");
|
7559
|
+
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
7560
|
+
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
|
7561
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
7543
7562
|
var __extends = (undefined && undefined.__extends) || (function () {
|
7544
7563
|
var extendStatics = function (d, b) {
|
7545
7564
|
extendStatics = Object.setPrototypeOf ||
|
@@ -7568,6 +7587,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
7568
7587
|
|
7569
7588
|
|
7570
7589
|
|
7590
|
+
|
7571
7591
|
var DropdownListModel = /** @class */ (function (_super) {
|
7572
7592
|
__extends(DropdownListModel, _super);
|
7573
7593
|
function DropdownListModel(question, onSelectionChanged) {
|
@@ -7576,11 +7596,20 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7576
7596
|
_this.onSelectionChanged = onSelectionChanged;
|
7577
7597
|
_this.minPageSize = 25;
|
7578
7598
|
_this.loadingItemHeight = 40;
|
7599
|
+
_this._markdownMode = false;
|
7579
7600
|
_this.selectedItemSelector = ".sv-list__item--selected";
|
7580
7601
|
_this.itemSelector = ".sv-list__item";
|
7581
7602
|
_this.itemsSettings = { skip: 0, take: 0, totalCount: 0, items: [] };
|
7582
7603
|
_this.isRunningLoadQuestionChoices = false;
|
7583
7604
|
_this.popupCssClasses = "sv-single-select-list";
|
7605
|
+
question.onPropertyChanged.add(function (sender, options) {
|
7606
|
+
if (options.name == "value") {
|
7607
|
+
_this.showInputFieldComponent = _this.question.showInputFieldComponent;
|
7608
|
+
_this.showSelectedItemLocText = _this.question.showSelectedItemLocText;
|
7609
|
+
}
|
7610
|
+
});
|
7611
|
+
_this.showInputFieldComponent = _this.question.showInputFieldComponent;
|
7612
|
+
_this.showSelectedItemLocText = _this.question.showSelectedItemLocText;
|
7584
7613
|
_this.listModel = _this.createListModel();
|
7585
7614
|
_this.updateAfterListModelCreated(_this.listModel);
|
7586
7615
|
_this.setSearchEnabled(_this.question.searchEnabled);
|
@@ -7596,7 +7625,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7596
7625
|
configurable: true
|
7597
7626
|
});
|
7598
7627
|
DropdownListModel.prototype.getFocusFirstInputSelector = function () {
|
7599
|
-
if (
|
7628
|
+
if (_utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"]) {
|
7600
7629
|
return this.isValueEmpty(this.question.value) ? this.itemSelector : this.selectedItemSelector;
|
7601
7630
|
}
|
7602
7631
|
else {
|
@@ -7645,16 +7674,19 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7645
7674
|
DropdownListModel.prototype.createPopup = function () {
|
7646
7675
|
var _this = this;
|
7647
7676
|
this._popupModel = new _popup__WEBPACK_IMPORTED_MODULE_3__["PopupModel"]("sv-list", { model: this.listModel }, "bottom", "center", false);
|
7648
|
-
this._popupModel.displayMode =
|
7677
|
+
this._popupModel.displayMode = _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"] ? "overlay" : "popup";
|
7649
7678
|
this._popupModel.positionMode = "fixed";
|
7650
|
-
this._popupModel.isFocusedContent =
|
7651
|
-
this._popupModel.setWidthByTarget = !
|
7679
|
+
this._popupModel.isFocusedContent = _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"];
|
7680
|
+
this._popupModel.setWidthByTarget = !_utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"];
|
7652
7681
|
this.updatePopupFocusFirstInputSelector();
|
7653
7682
|
this.listModel.registerPropertyChangedHandlers(["showFilter"], function () {
|
7654
7683
|
_this.updatePopupFocusFirstInputSelector();
|
7655
7684
|
});
|
7656
7685
|
this._popupModel.cssClass = this.popupCssClasses;
|
7657
7686
|
this._popupModel.onVisibilityChanged.add(function (_, option) {
|
7687
|
+
if (option.isVisible) {
|
7688
|
+
_this.listModel.renderElements = true;
|
7689
|
+
}
|
7658
7690
|
if (option.isVisible && _this.question.choicesLazyLoadEnabled) {
|
7659
7691
|
_this.listModel.actions = [];
|
7660
7692
|
_this.updateQuestionChoices();
|
@@ -7672,7 +7704,13 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7672
7704
|
});
|
7673
7705
|
};
|
7674
7706
|
DropdownListModel.prototype.setFilterStringToListModel = function (newValue) {
|
7707
|
+
var _this = this;
|
7675
7708
|
this.listModel.filterString = newValue;
|
7709
|
+
this.listModel.resetFocusedItem();
|
7710
|
+
if (this.question.selectedItem && this.question.selectedItem.text.indexOf(newValue) >= 0) {
|
7711
|
+
this.listModel.focusedItem = this.getAvailableItems().filter(function (item) { return item.id == _this.question.selectedItem.value; })[0];
|
7712
|
+
return;
|
7713
|
+
}
|
7676
7714
|
if (!this.listModel.focusedItem || !this.listModel.isItemVisible(this.listModel.focusedItem)) {
|
7677
7715
|
this.listModel.focusFirstVisibleItem();
|
7678
7716
|
}
|
@@ -7696,11 +7734,14 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7696
7734
|
var _onSelectionChanged = this.onSelectionChanged;
|
7697
7735
|
if (!_onSelectionChanged) {
|
7698
7736
|
_onSelectionChanged = function (item) {
|
7699
|
-
_this.question.value = item.
|
7737
|
+
_this.question.value = item.id;
|
7738
|
+
if (_this.question.searchEnabled)
|
7739
|
+
_this.applyInputString(item);
|
7700
7740
|
_this._popupModel.toggleVisibility();
|
7701
7741
|
};
|
7702
7742
|
}
|
7703
7743
|
var res = new _list__WEBPACK_IMPORTED_MODULE_2__["ListModel"](visibleItems, _onSelectionChanged, false);
|
7744
|
+
res.renderElements = false;
|
7704
7745
|
res.areSameItemsCallback = function (item1, item2) {
|
7705
7746
|
return item1 === item2;
|
7706
7747
|
};
|
@@ -7718,7 +7759,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7718
7759
|
model.isAllDataLoaded = !this.question.choicesLazyLoadEnabled;
|
7719
7760
|
};
|
7720
7761
|
DropdownListModel.prototype.updateCssClasses = function (popupCssClass, listCssClasses) {
|
7721
|
-
this.popupModel.cssClass = new
|
7762
|
+
this.popupModel.cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(popupCssClass).append(this.popupCssClasses).toString();
|
7722
7763
|
this.listModel.cssClasses = listCssClasses;
|
7723
7764
|
};
|
7724
7765
|
DropdownListModel.prototype.resetFilterString = function () {
|
@@ -7731,7 +7772,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7731
7772
|
if (!!this.filterString && !this.popupModel.isVisible) {
|
7732
7773
|
this.popupModel.isVisible = true;
|
7733
7774
|
}
|
7734
|
-
this.setInputHasValue(!!this.filterString);
|
7735
7775
|
var updateAfterFilterStringChanged = function () {
|
7736
7776
|
_this.setFilterStringToListModel(_this.filterString);
|
7737
7777
|
_this.popupRecalculatePosition(true);
|
@@ -7744,9 +7784,91 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7744
7784
|
updateAfterFilterStringChanged();
|
7745
7785
|
}
|
7746
7786
|
};
|
7747
|
-
DropdownListModel.prototype.
|
7748
|
-
|
7787
|
+
DropdownListModel.prototype.applyInputString = function (item) {
|
7788
|
+
var hasHtml = item === null || item === void 0 ? void 0 : item.locText.hasHtml;
|
7789
|
+
if (hasHtml || this.question.inputFieldComponentName) {
|
7790
|
+
this._markdownMode = true;
|
7791
|
+
this.inputString = "";
|
7792
|
+
}
|
7793
|
+
else {
|
7794
|
+
this.inputString = item === null || item === void 0 ? void 0 : item.title;
|
7795
|
+
}
|
7796
|
+
};
|
7797
|
+
DropdownListModel.prototype.applyHintString = function (item) {
|
7798
|
+
var hasHtml = item === null || item === void 0 ? void 0 : item.locText.hasHtml;
|
7799
|
+
if (hasHtml || this.question.inputFieldComponentName) {
|
7800
|
+
this._markdownMode = true;
|
7801
|
+
this.hintString = "";
|
7802
|
+
}
|
7803
|
+
else {
|
7804
|
+
this.hintString = item === null || item === void 0 ? void 0 : item.title;
|
7805
|
+
}
|
7749
7806
|
};
|
7807
|
+
Object.defineProperty(DropdownListModel.prototype, "inputStringRendered", {
|
7808
|
+
get: function () {
|
7809
|
+
return this.getPropertyValue("inputString") || "";
|
7810
|
+
},
|
7811
|
+
set: function (val) {
|
7812
|
+
this.setPropertyValue("inputString", val);
|
7813
|
+
this.filterString = val;
|
7814
|
+
this.applyHintString(this.listModel.focusedItem);
|
7815
|
+
},
|
7816
|
+
enumerable: false,
|
7817
|
+
configurable: true
|
7818
|
+
});
|
7819
|
+
Object.defineProperty(DropdownListModel.prototype, "placeholderRendered", {
|
7820
|
+
get: function () {
|
7821
|
+
return this.hintString ? "" : this.question.readOnlyText;
|
7822
|
+
},
|
7823
|
+
enumerable: false,
|
7824
|
+
configurable: true
|
7825
|
+
});
|
7826
|
+
Object.defineProperty(DropdownListModel.prototype, "hintStringLC", {
|
7827
|
+
get: function () {
|
7828
|
+
var _a;
|
7829
|
+
return ((_a = this.hintString) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || "";
|
7830
|
+
},
|
7831
|
+
enumerable: false,
|
7832
|
+
configurable: true
|
7833
|
+
});
|
7834
|
+
Object.defineProperty(DropdownListModel.prototype, "inputStringLC", {
|
7835
|
+
get: function () {
|
7836
|
+
var _a;
|
7837
|
+
return ((_a = this.inputString) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || "";
|
7838
|
+
},
|
7839
|
+
enumerable: false,
|
7840
|
+
configurable: true
|
7841
|
+
});
|
7842
|
+
Object.defineProperty(DropdownListModel.prototype, "showHintPrefix", {
|
7843
|
+
get: function () {
|
7844
|
+
return !!this.inputString && this.hintStringLC.indexOf(this.inputStringLC) > 0;
|
7845
|
+
},
|
7846
|
+
enumerable: false,
|
7847
|
+
configurable: true
|
7848
|
+
});
|
7849
|
+
Object.defineProperty(DropdownListModel.prototype, "hintStringPrefix", {
|
7850
|
+
get: function () {
|
7851
|
+
if (!this.inputString)
|
7852
|
+
return null;
|
7853
|
+
return this.hintString.substring(0, this.hintStringLC.indexOf(this.inputStringLC));
|
7854
|
+
},
|
7855
|
+
enumerable: false,
|
7856
|
+
configurable: true
|
7857
|
+
});
|
7858
|
+
Object.defineProperty(DropdownListModel.prototype, "showHintString", {
|
7859
|
+
get: function () {
|
7860
|
+
return this.hintStringLC != this.inputStringLC && this.hintStringLC.indexOf(this.inputStringLC) >= 0;
|
7861
|
+
},
|
7862
|
+
enumerable: false,
|
7863
|
+
configurable: true
|
7864
|
+
});
|
7865
|
+
Object.defineProperty(DropdownListModel.prototype, "hintStringSuffix", {
|
7866
|
+
get: function () {
|
7867
|
+
return this.hintString.substring(this.hintStringLC.indexOf(this.inputStringLC) + this.inputStringLC.length);
|
7868
|
+
},
|
7869
|
+
enumerable: false,
|
7870
|
+
configurable: true
|
7871
|
+
});
|
7750
7872
|
Object.defineProperty(DropdownListModel.prototype, "popupModel", {
|
7751
7873
|
get: function () {
|
7752
7874
|
return this._popupModel;
|
@@ -7770,14 +7892,14 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7770
7892
|
});
|
7771
7893
|
Object.defineProperty(DropdownListModel.prototype, "inputMode", {
|
7772
7894
|
get: function () {
|
7773
|
-
return
|
7895
|
+
return _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"] ? "none" : "text";
|
7774
7896
|
},
|
7775
7897
|
enumerable: false,
|
7776
7898
|
configurable: true
|
7777
7899
|
});
|
7778
7900
|
DropdownListModel.prototype.setSearchEnabled = function (newValue) {
|
7779
|
-
this.listModel.searchEnabled =
|
7780
|
-
this.listModel.showSearchClearButton =
|
7901
|
+
this.listModel.searchEnabled = _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"];
|
7902
|
+
this.listModel.showSearchClearButton = _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"];
|
7781
7903
|
this.searchEnabled = newValue;
|
7782
7904
|
};
|
7783
7905
|
DropdownListModel.prototype.updateItems = function () {
|
@@ -7785,7 +7907,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7785
7907
|
};
|
7786
7908
|
DropdownListModel.prototype.onClick = function (event) {
|
7787
7909
|
this._popupModel.toggleVisibility();
|
7788
|
-
this.listModel.focusNextVisibleItem();
|
7789
7910
|
if (this.searchEnabled && !!event && !!event.target) {
|
7790
7911
|
var input = event.target.querySelector("input");
|
7791
7912
|
if (!!input) {
|
@@ -7795,18 +7916,37 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7795
7916
|
};
|
7796
7917
|
DropdownListModel.prototype.onClear = function (event) {
|
7797
7918
|
this.question.clearValue();
|
7919
|
+
this.inputString = null;
|
7920
|
+
this.hintString = "";
|
7798
7921
|
this.resetFilterString();
|
7799
|
-
event
|
7800
|
-
|
7922
|
+
if (event) {
|
7923
|
+
event.preventDefault();
|
7924
|
+
event.stopPropagation();
|
7925
|
+
}
|
7801
7926
|
};
|
7802
7927
|
DropdownListModel.prototype.getSelectedAction = function () {
|
7803
7928
|
return this.question.selectedItem || null;
|
7804
7929
|
};
|
7930
|
+
DropdownListModel.prototype.changeSelectionWithKeyboard = function (reverse) {
|
7931
|
+
if (reverse) {
|
7932
|
+
this.listModel.focusPrevVisibleItem();
|
7933
|
+
}
|
7934
|
+
else {
|
7935
|
+
this.listModel.focusNextVisibleItem();
|
7936
|
+
}
|
7937
|
+
this.scrollToFocusedItem();
|
7938
|
+
if (this.question.value && this.question.searchEnabled && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"]) {
|
7939
|
+
this.applyInputString(this.listModel.focusedItem);
|
7940
|
+
this.hintString = "";
|
7941
|
+
}
|
7942
|
+
else {
|
7943
|
+
this.applyHintString(this.listModel.focusedItem);
|
7944
|
+
}
|
7945
|
+
};
|
7805
7946
|
DropdownListModel.prototype.keyHandler = function (event) {
|
7806
7947
|
var char = event.which || event.keyCode;
|
7807
7948
|
if (this.popupModel.isVisible && event.keyCode === 38) {
|
7808
|
-
this.
|
7809
|
-
this.scrollToFocusedItem();
|
7949
|
+
this.changeSelectionWithKeyboard(true);
|
7810
7950
|
event.preventDefault();
|
7811
7951
|
event.stopPropagation();
|
7812
7952
|
}
|
@@ -7814,28 +7954,48 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7814
7954
|
if (!this.popupModel.isVisible) {
|
7815
7955
|
this.popupModel.toggleVisibility();
|
7816
7956
|
}
|
7817
|
-
this.
|
7818
|
-
this.scrollToFocusedItem();
|
7957
|
+
this.changeSelectionWithKeyboard(false);
|
7819
7958
|
event.preventDefault();
|
7820
7959
|
event.stopPropagation();
|
7821
7960
|
}
|
7822
|
-
else if (this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32)) {
|
7823
|
-
this.
|
7961
|
+
else if (!this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32)) {
|
7962
|
+
this.popupModel.toggleVisibility();
|
7963
|
+
this.changeSelectionWithKeyboard(false);
|
7964
|
+
event.preventDefault();
|
7965
|
+
event.stopPropagation();
|
7966
|
+
}
|
7967
|
+
else if (this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32 && !this.question.searchEnabled)) {
|
7968
|
+
if (event.keyCode === 13 && this.question.searchEnabled && !this.inputString && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"] && !this._markdownMode && this.question.value) {
|
7969
|
+
this._popupModel.isVisible = false;
|
7970
|
+
this.onClear(event);
|
7971
|
+
}
|
7972
|
+
else {
|
7973
|
+
this.listModel.selectFocusedItem();
|
7974
|
+
this.onFocus(event);
|
7975
|
+
}
|
7824
7976
|
event.preventDefault();
|
7825
7977
|
event.stopPropagation();
|
7826
7978
|
}
|
7827
|
-
else if (char === 46) {
|
7828
|
-
this.
|
7979
|
+
else if (char === 46 || char === 8) {
|
7980
|
+
if (!this.searchEnabled) {
|
7981
|
+
this.onClear(event);
|
7982
|
+
}
|
7829
7983
|
}
|
7830
7984
|
else if (event.keyCode === 27) {
|
7831
|
-
this.
|
7985
|
+
this._popupModel.isVisible = false;
|
7986
|
+
this.hintString = "";
|
7987
|
+
if (this.question.searchEnabled && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"])
|
7988
|
+
this.applyInputString(this.question.selectedItem);
|
7832
7989
|
}
|
7833
7990
|
else {
|
7834
|
-
if (event.keyCode === 38 || event.keyCode === 40 || event.keyCode === 32) {
|
7991
|
+
if (event.keyCode === 38 || event.keyCode === 40 || event.keyCode === 32 && !this.question.searchEnabled) {
|
7835
7992
|
event.preventDefault();
|
7836
7993
|
event.stopPropagation();
|
7837
7994
|
}
|
7838
|
-
|
7995
|
+
if (event.keyCode === 32 && this.question.searchEnabled) {
|
7996
|
+
return;
|
7997
|
+
}
|
7998
|
+
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_7__["doKey2ClickUp"])(event, { processEsc: false, disableTabStop: this.question.isInputReadOnly });
|
7839
7999
|
}
|
7840
8000
|
};
|
7841
8001
|
DropdownListModel.prototype.onScroll = function (event) {
|
@@ -7845,7 +8005,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7845
8005
|
}
|
7846
8006
|
};
|
7847
8007
|
DropdownListModel.prototype.onBlur = function (event) {
|
7848
|
-
if (this.popupModel.isVisible &&
|
8008
|
+
if (this.popupModel.isVisible && _utils_devices__WEBPACK_IMPORTED_MODULE_6__["IsTouch"]) {
|
7849
8009
|
this._popupModel.isVisible = true;
|
7850
8010
|
return;
|
7851
8011
|
}
|
@@ -7853,9 +8013,20 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7853
8013
|
this.listModel.selectFocusedItem();
|
7854
8014
|
}
|
7855
8015
|
this.resetFilterString();
|
8016
|
+
this.inputString = null;
|
8017
|
+
this.hintString = "";
|
8018
|
+
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_7__["doKey2ClickBlur"])(event);
|
7856
8019
|
this._popupModel.isVisible = false;
|
7857
|
-
|
7858
|
-
|
8020
|
+
};
|
8021
|
+
DropdownListModel.prototype.onFocus = function (event) {
|
8022
|
+
if (this.question.searchEnabled) {
|
8023
|
+
if (this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_4__["QuestionDropdownModel"]) {
|
8024
|
+
this.applyInputString(this.question.selectedItem);
|
8025
|
+
}
|
8026
|
+
else {
|
8027
|
+
this.inputString = null;
|
8028
|
+
}
|
8029
|
+
}
|
7859
8030
|
};
|
7860
8031
|
DropdownListModel.prototype.scrollToFocusedItem = function () {
|
7861
8032
|
this.listModel.scrollToFocusedItem();
|
@@ -7871,6 +8042,20 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7871
8042
|
}
|
7872
8043
|
})
|
7873
8044
|
], DropdownListModel.prototype, "filterString", void 0);
|
8045
|
+
__decorate([
|
8046
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
|
8047
|
+
defaultValue: "",
|
8048
|
+
onSet: function (newValue, target) {
|
8049
|
+
target.question.inputHasValue = !!newValue;
|
8050
|
+
}
|
8051
|
+
})
|
8052
|
+
], DropdownListModel.prototype, "inputString", void 0);
|
8053
|
+
__decorate([
|
8054
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({})
|
8055
|
+
], DropdownListModel.prototype, "showSelectedItemLocText", void 0);
|
8056
|
+
__decorate([
|
8057
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({})
|
8058
|
+
], DropdownListModel.prototype, "showInputFieldComponent", void 0);
|
7874
8059
|
__decorate([
|
7875
8060
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
|
7876
8061
|
defaultValue: false,
|
@@ -7884,6 +8069,9 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
7884
8069
|
}
|
7885
8070
|
})
|
7886
8071
|
], DropdownListModel.prototype, "hasScroll", void 0);
|
8072
|
+
__decorate([
|
8073
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "" })
|
8074
|
+
], DropdownListModel.prototype, "hintString", void 0);
|
7887
8075
|
return DropdownListModel;
|
7888
8076
|
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));
|
7889
8077
|
|
@@ -8007,14 +8195,14 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
|
|
8007
8195
|
_super.prototype.createPopup.call(this);
|
8008
8196
|
this.popupModel.onFooterActionsCreated.add(function (_, opt) {
|
8009
8197
|
if (_this.shouldResetAfterCancel) {
|
8010
|
-
opt.actions
|
8011
|
-
|
8012
|
-
|
8013
|
-
|
8014
|
-
|
8015
|
-
|
8016
|
-
|
8017
|
-
|
8198
|
+
opt.actions.push({
|
8199
|
+
id: "sv-dropdown-done-button",
|
8200
|
+
title: _this.doneButtonCaption,
|
8201
|
+
innerCss: "sv-popup__button--done",
|
8202
|
+
needSpace: true,
|
8203
|
+
action: function () { _this.popupModel.isVisible = false; },
|
8204
|
+
enabled: new _base__WEBPACK_IMPORTED_MODULE_0__["ComputedUpdater"](function () { return !_this.isTwoValueEquals(_this.question.renderedValue, _this.previousValue); })
|
8205
|
+
});
|
8018
8206
|
}
|
8019
8207
|
});
|
8020
8208
|
this.popupModel.onVisibilityChanged.add(function (_, opt) {
|
@@ -8833,7 +9021,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
8833
9021
|
// import "../../main.scss";
|
8834
9022
|
//import "../../modern.scss";
|
8835
9023
|
var Version;
|
8836
|
-
Version = "" + "1.9.
|
9024
|
+
Version = "" + "1.9.79";
|
8837
9025
|
function checkLibraryVersion(ver, libraryName) {
|
8838
9026
|
if (Version != ver) {
|
8839
9027
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -18179,7 +18367,7 @@ var JsonMetadata = /** @class */ (function () {
|
|
18179
18367
|
var props = {};
|
18180
18368
|
this.generateSchemaProperties(classInfo, props, schemaDef);
|
18181
18369
|
if (hasParent) {
|
18182
|
-
res.
|
18370
|
+
res.allOf = [
|
18183
18371
|
{ $ref: "#" + classInfo.parentName },
|
18184
18372
|
{ properties: props },
|
18185
18373
|
];
|
@@ -18769,7 +18957,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
18769
18957
|
});
|
18770
18958
|
Object.defineProperty(ListModel.prototype, "emptyMessage", {
|
18771
18959
|
get: function () {
|
18772
|
-
return this.getLocalizationString("emptyMessage");
|
18960
|
+
return this.isAllDataLoaded ? this.getLocalizationString("emptyMessage") : this.loadingText;
|
18773
18961
|
},
|
18774
18962
|
enumerable: false,
|
18775
18963
|
configurable: true
|
@@ -18959,6 +19147,9 @@ var ListModel = /** @class */ (function (_super) {
|
|
18959
19147
|
__decorate([
|
18960
19148
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
18961
19149
|
], ListModel.prototype, "showSearchClearButton", void 0);
|
19150
|
+
__decorate([
|
19151
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
|
19152
|
+
], ListModel.prototype, "renderElements", void 0);
|
18962
19153
|
return ListModel;
|
18963
19154
|
}(_actions_container__WEBPACK_IMPORTED_MODULE_1__["ActionContainer"]));
|
18964
19155
|
|
@@ -20478,7 +20669,7 @@ var englishStrings = {
|
|
20478
20669
|
noEntriesText: "There are no entries yet.\nClick the button below to add a new entry.",
|
20479
20670
|
noEntriesReadonlyText: "There are no entries.",
|
20480
20671
|
more: "More",
|
20481
|
-
tagboxDoneButtonCaption: "
|
20672
|
+
tagboxDoneButtonCaption: "OK"
|
20482
20673
|
};
|
20483
20674
|
// Uncomment the lines below if you create a custom dictionary.
|
20484
20675
|
// Replace "en" with a custom locale code (for example, "fr" or "de"),
|
@@ -25238,6 +25429,8 @@ var MultiSelectListModel = /** @class */ (function (_super) {
|
|
25238
25429
|
function MultiSelectListModel(items, onSelectionChanged, allowSelection, selectedItems, onFilterStringChangedCallback) {
|
25239
25430
|
var _this = _super.call(this, items, onSelectionChanged, allowSelection, undefined, onFilterStringChangedCallback) || this;
|
25240
25431
|
_this.onItemClick = function (item) {
|
25432
|
+
if (_this.isItemDisabled(item))
|
25433
|
+
return;
|
25241
25434
|
_this.isExpanded = false;
|
25242
25435
|
if (_this.isItemSelected(item)) {
|
25243
25436
|
_this.selectedItems.splice(_this.selectedItems.indexOf(item), 1)[0];
|
@@ -25342,6 +25535,7 @@ var Notifier = /** @class */ (function (_super) {
|
|
25342
25535
|
_this.actionBar.updateCallback = function (isResetInitialized) {
|
25343
25536
|
_this.actionBar.actions.forEach(function (action) { return action.cssClasses = {}; });
|
25344
25537
|
};
|
25538
|
+
_this.css = _this.cssClasses.root;
|
25345
25539
|
return _this;
|
25346
25540
|
}
|
25347
25541
|
Notifier.prototype.getCssClass = function (type) {
|
@@ -25350,27 +25544,35 @@ var Notifier = /** @class */ (function (_super) {
|
|
25350
25544
|
.append(this.cssClasses.info, type !== "error" && type !== "success")
|
25351
25545
|
.append(this.cssClasses.error, type === "error")
|
25352
25546
|
.append(this.cssClasses.success, type === "success")
|
25547
|
+
.append(this.cssClasses.shown, this.active)
|
25353
25548
|
.toString();
|
25354
25549
|
};
|
25355
25550
|
Notifier.prototype.updateActionsVisibility = function (type) {
|
25356
25551
|
var _this = this;
|
25357
25552
|
this.actionBar.actions.forEach(function (action) { return action.visible = (_this.actionsVisibility[action.id] === type); });
|
25358
25553
|
};
|
25359
|
-
Notifier.prototype.notify = function (message, type) {
|
25554
|
+
Notifier.prototype.notify = function (message, type, waitUserAction) {
|
25360
25555
|
var _this = this;
|
25361
25556
|
if (type === void 0) { type = "info"; }
|
25362
|
-
|
25363
|
-
this.
|
25364
|
-
|
25365
|
-
|
25366
|
-
|
25367
|
-
|
25368
|
-
|
25369
|
-
|
25370
|
-
|
25371
|
-
|
25372
|
-
|
25373
|
-
|
25557
|
+
if (waitUserAction === void 0) { waitUserAction = false; }
|
25558
|
+
this.isDisplayed = true;
|
25559
|
+
setTimeout(function () {
|
25560
|
+
_this.updateActionsVisibility(type);
|
25561
|
+
_this.message = message;
|
25562
|
+
_this.active = true;
|
25563
|
+
_this.css = _this.getCssClass(type);
|
25564
|
+
if (!!_this.timer) {
|
25565
|
+
clearTimeout(_this.timer);
|
25566
|
+
_this.timer = undefined;
|
25567
|
+
}
|
25568
|
+
if (!waitUserAction) {
|
25569
|
+
_this.timer = setTimeout(function () {
|
25570
|
+
_this.timer = undefined;
|
25571
|
+
_this.active = false;
|
25572
|
+
_this.css = _this.getCssClass(type);
|
25573
|
+
}, _this.timeout);
|
25574
|
+
}
|
25575
|
+
}, 1);
|
25374
25576
|
};
|
25375
25577
|
Notifier.prototype.addAction = function (action, notificationType) {
|
25376
25578
|
action.visible = false;
|
@@ -25381,6 +25583,9 @@ var Notifier = /** @class */ (function (_super) {
|
|
25381
25583
|
__decorate([
|
25382
25584
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
|
25383
25585
|
], Notifier.prototype, "active", void 0);
|
25586
|
+
__decorate([
|
25587
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
|
25588
|
+
], Notifier.prototype, "isDisplayed", void 0);
|
25384
25589
|
__decorate([
|
25385
25590
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
25386
25591
|
], Notifier.prototype, "message", void 0);
|
@@ -25802,6 +26007,7 @@ var PageModel = /** @class */ (function (_super) {
|
|
25802
26007
|
}
|
25803
26008
|
}
|
25804
26009
|
var options = {
|
26010
|
+
allow: true,
|
25805
26011
|
target: this.dragDropInfo.target,
|
25806
26012
|
source: this.dragDropInfo.source,
|
25807
26013
|
parent: parent,
|
@@ -28103,14 +28309,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
28103
28309
|
};
|
28104
28310
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
28105
28311
|
get: function () {
|
28106
|
-
return
|
28107
|
-
.append(this.cssClasses.panel.title)
|
28108
|
-
.append(this.cssClasses.panel.titleExpandable, this.state !== "default")
|
28109
|
-
.append(this.cssClasses.panel.titleExpanded, this.isExpanded)
|
28110
|
-
.append(this.cssClasses.panel.titleCollapsed, this.isCollapsed)
|
28111
|
-
.append(this.cssClasses.panel.titleDisabled, this.isReadOnly)
|
28112
|
-
.append(this.cssClasses.panel.titleOnError, this.containsErrors)
|
28113
|
-
.toString();
|
28312
|
+
return this.getCssTitle(this.cssClasses.panel);
|
28114
28313
|
},
|
28115
28314
|
enumerable: false,
|
28116
28315
|
configurable: true
|
@@ -28403,6 +28602,8 @@ var defaultCss = {
|
|
28403
28602
|
cleanButtonSvg: "sv_q_dd_clean-button-svg",
|
28404
28603
|
cleanButtonIconId: "icon-clear_16x16",
|
28405
28604
|
filterStringInput: "sv_q_dd_filter-string-input",
|
28605
|
+
hintPrefix: "sv_q_dd_hint-prefix",
|
28606
|
+
hintSuffix: "sv_q_dd_hint-suffix"
|
28406
28607
|
},
|
28407
28608
|
tagbox: {
|
28408
28609
|
root: "sv_q_dd_root",
|
@@ -30809,6 +31010,9 @@ var Question = /** @class */ (function (_super) {
|
|
30809
31010
|
_this.registerPropertyChangedHandlers(["showCommentArea", "showOtherItem"], function () {
|
30810
31011
|
_this.initCommentFromSurvey();
|
30811
31012
|
});
|
31013
|
+
_this.registerFunctionOnPropertiesValueChanged(["no"], function () {
|
31014
|
+
_this.updateQuestionCss();
|
31015
|
+
});
|
30812
31016
|
_this.registerPropertyChangedHandlers(["isMobile"], function () { _this.onMobileChanged(); });
|
30813
31017
|
return _this;
|
30814
31018
|
}
|
@@ -31670,12 +31874,7 @@ var Question = /** @class */ (function (_super) {
|
|
31670
31874
|
};
|
31671
31875
|
Question.prototype.getCssTitle = function (cssClasses) {
|
31672
31876
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
|
31673
|
-
.append(cssClasses
|
31674
|
-
.append(cssClasses.titleExpandable, this.state !== "default")
|
31675
|
-
.append(cssClasses.titleExpanded, this.isExpanded)
|
31676
|
-
.append(cssClasses.titleCollapsed, this.isCollapsed)
|
31677
|
-
.append(cssClasses.titleDisabled, this.isReadOnly)
|
31678
|
-
.append(cssClasses.titleOnError, this.containsErrors)
|
31877
|
+
.append(_super.prototype.getCssTitle.call(this, cssClasses))
|
31679
31878
|
.append(cssClasses.titleOnAnswer, !this.containsErrors && this.isAnswered)
|
31680
31879
|
.toString();
|
31681
31880
|
};
|
@@ -34603,12 +34802,12 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
34603
34802
|
if (this.isBuiltInChoice(choices[i], question))
|
34604
34803
|
continue;
|
34605
34804
|
if (isSelected === undefined) {
|
34606
|
-
res.push(choices[i]);
|
34805
|
+
res.push(this.copyChoiceItem(choices[i]));
|
34607
34806
|
continue;
|
34608
34807
|
}
|
34609
34808
|
var itemsSelected = question.isItemSelected(choices[i]);
|
34610
34809
|
if ((itemsSelected && isSelected) || (!itemsSelected && !isSelected)) {
|
34611
|
-
res.push(choices[i]);
|
34810
|
+
res.push(this.copyChoiceItem(choices[i]));
|
34612
34811
|
}
|
34613
34812
|
}
|
34614
34813
|
if (this.choicesFromQuestionMode === "selected" && question.isOtherSelected && !!question.comment) {
|
@@ -34616,6 +34815,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
34616
34815
|
}
|
34617
34816
|
return res;
|
34618
34817
|
};
|
34818
|
+
QuestionSelectBase.prototype.copyChoiceItem = function (item) {
|
34819
|
+
return new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](item.value, item.text);
|
34820
|
+
};
|
34619
34821
|
Object.defineProperty(QuestionSelectBase.prototype, "hasActiveChoices", {
|
34620
34822
|
get: function () {
|
34621
34823
|
var choices = this.visibleChoices;
|
@@ -37012,6 +37214,11 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
37012
37214
|
return;
|
37013
37215
|
this.json.onValueChanged(question, name, newValue);
|
37014
37216
|
};
|
37217
|
+
ComponentQuestionJSON.prototype.onValueChanging = function (question, name, newValue) {
|
37218
|
+
if (!this.json.onValueChanging)
|
37219
|
+
return newValue;
|
37220
|
+
return this.json.onValueChanging(question, name, newValue);
|
37221
|
+
};
|
37015
37222
|
ComponentQuestionJSON.prototype.onItemValuePropertyChanged = function (question, item, propertyName, name, newValue) {
|
37016
37223
|
if (!this.json.onItemValuePropertyChanged)
|
37017
37224
|
return;
|
@@ -37222,6 +37429,23 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
37222
37429
|
this.customQuestion.onValueChanged(this, name, newValue);
|
37223
37430
|
}
|
37224
37431
|
};
|
37432
|
+
QuestionCustomModelBase.prototype.getQuestionByName = function (name) {
|
37433
|
+
return undefined;
|
37434
|
+
};
|
37435
|
+
QuestionCustomModelBase.prototype.isValueChanging = function (name, newValue) {
|
37436
|
+
if (!!this.customQuestion) {
|
37437
|
+
var qValue = newValue;
|
37438
|
+
newValue = this.customQuestion.onValueChanging(this, name, newValue);
|
37439
|
+
if (!_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isTwoValueEquals(newValue, qValue)) {
|
37440
|
+
var q = this.getQuestionByName(name);
|
37441
|
+
if (!!q) {
|
37442
|
+
q.value = newValue;
|
37443
|
+
return true;
|
37444
|
+
}
|
37445
|
+
}
|
37446
|
+
}
|
37447
|
+
return false;
|
37448
|
+
};
|
37225
37449
|
QuestionCustomModelBase.prototype.convertDataName = function (name) {
|
37226
37450
|
return this.getValueName();
|
37227
37451
|
};
|
@@ -37312,6 +37536,14 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
37312
37536
|
this.contentQuestion.onAnyValueChanged(name);
|
37313
37537
|
}
|
37314
37538
|
};
|
37539
|
+
QuestionCustomModel.prototype.getQuestionByName = function (name) {
|
37540
|
+
return this.contentQuestion;
|
37541
|
+
};
|
37542
|
+
QuestionCustomModel.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
|
37543
|
+
if (this.isValueChanging(name, newValue))
|
37544
|
+
return;
|
37545
|
+
_super.prototype.setValue.call(this, name, newValue, locNotification, allowNotifyValueChanged);
|
37546
|
+
};
|
37315
37547
|
QuestionCustomModel.prototype.hasErrors = function (fireCallback, rec) {
|
37316
37548
|
if (fireCallback === void 0) { fireCallback = true; }
|
37317
37549
|
if (rec === void 0) { rec = null; }
|
@@ -37618,9 +37850,14 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
37618
37850
|
var val = this.value;
|
37619
37851
|
return !!val ? val[name] : null;
|
37620
37852
|
};
|
37853
|
+
QuestionCompositeModel.prototype.getQuestionByName = function (name) {
|
37854
|
+
return !!this.contentPanel ? this.contentPanel.getQuestionByName(name) : undefined;
|
37855
|
+
};
|
37621
37856
|
QuestionCompositeModel.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
|
37622
37857
|
if (this.settingNewValue)
|
37623
37858
|
return;
|
37859
|
+
if (this.isValueChanging(name, newValue))
|
37860
|
+
return;
|
37624
37861
|
this.settingNewValue = true;
|
37625
37862
|
if (!this.isEditingSurveyElement && !!this.contentPanel) {
|
37626
37863
|
var panelValue = this.contentPanel.getValue();
|
@@ -37862,7 +38099,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
37862
38099
|
else if (!selectedItemValues) {
|
37863
38100
|
this.updateSelectedItemValues();
|
37864
38101
|
}
|
37865
|
-
return this.lastSelectedItemValue || selectedItemValues || new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value);
|
38102
|
+
return this.lastSelectedItemValue || selectedItemValues || (this.isOtherSelected ? this.otherItem : new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value));
|
37866
38103
|
},
|
37867
38104
|
enumerable: false,
|
37868
38105
|
configurable: true
|
@@ -39565,6 +39802,12 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
39565
39802
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
39566
39803
|
};
|
39567
39804
|
})();
|
39805
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
39806
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
39807
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
39808
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
39809
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
39810
|
+
};
|
39568
39811
|
|
39569
39812
|
|
39570
39813
|
|
@@ -39674,9 +39917,12 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
39674
39917
|
enumerable: false,
|
39675
39918
|
configurable: true
|
39676
39919
|
});
|
39920
|
+
QuestionImageModel.prototype.getRenderedSize = function (val) {
|
39921
|
+
return isNaN(Number(val)) ? val : val + "px";
|
39922
|
+
};
|
39677
39923
|
Object.defineProperty(QuestionImageModel.prototype, "renderedHeight", {
|
39678
39924
|
get: function () {
|
39679
|
-
return this.imageHeight ? this.imageHeight
|
39925
|
+
return this.imageHeight ? this.getRenderedSize(this.imageHeight) : undefined;
|
39680
39926
|
},
|
39681
39927
|
enumerable: false,
|
39682
39928
|
configurable: true
|
@@ -39702,7 +39948,7 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
39702
39948
|
});
|
39703
39949
|
Object.defineProperty(QuestionImageModel.prototype, "renderedWidth", {
|
39704
39950
|
get: function () {
|
39705
|
-
return this.imageWidth ? this.imageWidth
|
39951
|
+
return this.imageWidth ? this.getRenderedSize(this.imageWidth) : undefined;
|
39706
39952
|
},
|
39707
39953
|
enumerable: false,
|
39708
39954
|
configurable: true
|
@@ -39767,6 +40013,12 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
39767
40013
|
.append(this.cssClasses.adaptive, isDefaultSize)
|
39768
40014
|
.toString();
|
39769
40015
|
};
|
40016
|
+
QuestionImageModel.prototype.onLoadHandler = function () {
|
40017
|
+
this.contentNotLoaded = false;
|
40018
|
+
};
|
40019
|
+
QuestionImageModel.prototype.onErrorHandler = function () {
|
40020
|
+
this.contentNotLoaded = true;
|
40021
|
+
};
|
39770
40022
|
QuestionImageModel.prototype.setRenderedMode = function (val) {
|
39771
40023
|
this.setPropertyValue("renderedMode", val);
|
39772
40024
|
};
|
@@ -39800,6 +40052,9 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
39800
40052
|
}
|
39801
40053
|
return false;
|
39802
40054
|
};
|
40055
|
+
__decorate([
|
40056
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
|
40057
|
+
], QuestionImageModel.prototype, "contentNotLoaded", void 0);
|
39803
40058
|
return QuestionImageModel;
|
39804
40059
|
}(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
|
39805
40060
|
|
@@ -39830,8 +40085,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("image", [
|
|
39830
40085
|
default: "contain",
|
39831
40086
|
choices: ["none", "contain", "cover", "fill"],
|
39832
40087
|
},
|
39833
|
-
{ name: "imageHeight
|
39834
|
-
{ name: "imageWidth
|
40088
|
+
{ name: "imageHeight", default: "150" },
|
40089
|
+
{ name: "imageWidth", default: "200" },
|
39835
40090
|
], function () {
|
39836
40091
|
return new QuestionImageModel("");
|
39837
40092
|
}, "nonvalue");
|
@@ -39938,6 +40193,12 @@ var ImageItemValue = /** @class */ (function (_super) {
|
|
39938
40193
|
ImageItemValue.prototype.getProcessedText = function (text) {
|
39939
40194
|
return !!this.locOwner ? this.locOwner.getProcessedText(text) : text;
|
39940
40195
|
};
|
40196
|
+
ImageItemValue.prototype.onErrorHandler = function () {
|
40197
|
+
this.contentNotLoaded = true;
|
40198
|
+
};
|
40199
|
+
__decorate([
|
40200
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
40201
|
+
], ImageItemValue.prototype, "contentNotLoaded", void 0);
|
39941
40202
|
return ImageItemValue;
|
39942
40203
|
}(_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"]));
|
39943
40204
|
|
@@ -39953,6 +40214,7 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
39953
40214
|
//responsive mode
|
39954
40215
|
_this.isResponsiveValue = false;
|
39955
40216
|
_this.onContentLoaded = function (item, event) {
|
40217
|
+
item.contentNotLoaded = false;
|
39956
40218
|
var content = event.target;
|
39957
40219
|
if (_this.contentMode == "video") {
|
39958
40220
|
item["aspectRatio"] = content.videoWidth / content.videoHeight;
|
@@ -40025,8 +40287,11 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
40025
40287
|
});
|
40026
40288
|
QuestionImagePickerModel.prototype.isItemSelected = function (item) {
|
40027
40289
|
var val = this.value;
|
40290
|
+
var imageItemValue = item;
|
40028
40291
|
if (this.isValueEmpty(val))
|
40029
40292
|
return false;
|
40293
|
+
if (!imageItemValue.imageLink || imageItemValue.contentNotLoaded)
|
40294
|
+
return false;
|
40030
40295
|
if (!this.multiSelect)
|
40031
40296
|
return this.isTwoValueEquals(val, item.value);
|
40032
40297
|
if (!Array.isArray(val))
|
@@ -40037,6 +40302,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
40037
40302
|
}
|
40038
40303
|
return false;
|
40039
40304
|
};
|
40305
|
+
QuestionImagePickerModel.prototype.getItemEnabled = function (item) {
|
40306
|
+
var imageItemValue = item;
|
40307
|
+
if (!imageItemValue.imageLink || imageItemValue.contentNotLoaded)
|
40308
|
+
return false;
|
40309
|
+
return _super.prototype.getItemEnabled.call(this, item);
|
40310
|
+
};
|
40040
40311
|
QuestionImagePickerModel.prototype.clearIncorrectValues = function () {
|
40041
40312
|
if (this.multiSelect) {
|
40042
40313
|
var val = this.value;
|
@@ -47773,6 +48044,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
47773
48044
|
_this.registerPropertyChangedHandlers(["isMobile"], function () {
|
47774
48045
|
_this.updateFooterActions();
|
47775
48046
|
});
|
48047
|
+
_this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
|
47776
48048
|
return _this;
|
47777
48049
|
}
|
47778
48050
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "hasSingleInput", {
|
@@ -48997,7 +49269,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
48997
49269
|
var loc = this.getLocalizableString("noEntriesText");
|
48998
49270
|
if (!loc)
|
48999
49271
|
return;
|
49000
|
-
loc.localizationName = this.isReadOnly ? "noEntriesReadonlyText" : "noEntriesText";
|
49272
|
+
loc.localizationName = (this.isReadOnly || !this.allowAddPanel) ? "noEntriesReadonlyText" : "noEntriesText";
|
49001
49273
|
loc.strChanged();
|
49002
49274
|
};
|
49003
49275
|
QuestionPanelDynamicModel.prototype.onSurveyLoad = function () {
|
@@ -49018,7 +49290,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
49018
49290
|
}
|
49019
49291
|
}
|
49020
49292
|
this.recalculateIsReadyValue();
|
49021
|
-
if (this.isReadOnly) {
|
49293
|
+
if (this.isReadOnly || !this.allowAddPanel) {
|
49022
49294
|
this.updateNoEntriesTextDefaultLoc();
|
49023
49295
|
}
|
49024
49296
|
_super.prototype.onSurveyLoad.call(this);
|
@@ -49829,7 +50101,7 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
|
|
49829
50101
|
if (!itemValue && !selectedItemValues) {
|
49830
50102
|
this.updateSelectedItemValues();
|
49831
50103
|
}
|
49832
|
-
return itemValue || selectedItemValues || new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value);
|
50104
|
+
return itemValue || selectedItemValues || (this.isOtherSelected ? this.otherItem : new _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"](this.value));
|
49833
50105
|
},
|
49834
50106
|
enumerable: false,
|
49835
50107
|
configurable: true
|
@@ -50227,6 +50499,16 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
50227
50499
|
enumerable: false,
|
50228
50500
|
configurable: true
|
50229
50501
|
});
|
50502
|
+
Object.defineProperty(QuestionRankingModel.prototype, "useFullItemSizeForShortcut", {
|
50503
|
+
get: function () {
|
50504
|
+
return this.getPropertyValue("useFullItemSizeForShortcut");
|
50505
|
+
},
|
50506
|
+
set: function (val) {
|
50507
|
+
this.setPropertyValue("useFullItemSizeForShortcut", val);
|
50508
|
+
},
|
50509
|
+
enumerable: false,
|
50510
|
+
configurable: true
|
50511
|
+
});
|
50230
50512
|
__decorate([
|
50231
50513
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: null })
|
50232
50514
|
], QuestionRankingModel.prototype, "currentDropTarget", void 0);
|
@@ -50657,8 +50939,17 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
50657
50939
|
configurable: true
|
50658
50940
|
});
|
50659
50941
|
QuestionRatingModel.prototype.getItemClass = function (item, highlight) {
|
50942
|
+
var _this = this;
|
50660
50943
|
if (highlight === void 0) { highlight = "none"; }
|
50661
|
-
var isSelected = this.
|
50944
|
+
var isSelected = this.value == item.value;
|
50945
|
+
if (this.isStar) {
|
50946
|
+
if (this.rateValues.length == 0) {
|
50947
|
+
isSelected = this.value >= item.value;
|
50948
|
+
}
|
50949
|
+
else {
|
50950
|
+
isSelected = this.rateValues.indexOf(this.rateValues.filter(function (i) { return i.value == _this.value; })[0]) >= this.rateValues.indexOf(item);
|
50951
|
+
}
|
50952
|
+
}
|
50662
50953
|
var isDisabled = this.isReadOnly || !item.isEnabled;
|
50663
50954
|
var allowHover = !isDisabled && (this.value != item.value) && !(!!this.survey && this.survey.isDesignMode);
|
50664
50955
|
var renderedItem = this.renderedRateItems.filter(function (i) { return i.itemValue == item; })[0];
|
@@ -51573,6 +51864,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
51573
51864
|
_this.updateValueOnEvent(event);
|
51574
51865
|
_this.updateRemainingCharacterCounter(event.target.value);
|
51575
51866
|
};
|
51867
|
+
_this.onFocus = function (event) {
|
51868
|
+
_this.updateRemainingCharacterCounter(event.target.value);
|
51869
|
+
};
|
51576
51870
|
_this.createLocalizableString("minErrorText", _this, true, "minError");
|
51577
51871
|
_this.createLocalizableString("maxErrorText", _this, true, "maxError");
|
51578
51872
|
_this.locDataListValue = new _localizablestring__WEBPACK_IMPORTED_MODULE_2__["LocalizableStrings"](_this);
|
@@ -51882,7 +52176,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
51882
52176
|
};
|
51883
52177
|
Object.defineProperty(QuestionTextModel.prototype, "isValueLessMin", {
|
51884
52178
|
get: function () {
|
51885
|
-
return (!this.isValueEmpty(this.renderedMin) &&
|
52179
|
+
return (!this.isValueEmpty(this.renderedMin) && !this.isEmpty() &&
|
51886
52180
|
this.getCalculatedMinMax(this.value) <
|
51887
52181
|
this.getCalculatedMinMax(this.renderedMin));
|
51888
52182
|
},
|
@@ -51891,7 +52185,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
51891
52185
|
});
|
51892
52186
|
Object.defineProperty(QuestionTextModel.prototype, "isValueGreaterMax", {
|
51893
52187
|
get: function () {
|
51894
|
-
return (!this.isValueEmpty(this.renderedMax) &&
|
52188
|
+
return (!this.isValueEmpty(this.renderedMax) && !this.isEmpty() &&
|
51895
52189
|
this.getCalculatedMinMax(this.value) >
|
51896
52190
|
this.getCalculatedMinMax(this.renderedMax));
|
51897
52191
|
},
|
@@ -53607,14 +53901,19 @@ var List = /** @class */ (function (_super) {
|
|
53607
53901
|
}
|
53608
53902
|
};
|
53609
53903
|
List.prototype.renderElement = function () {
|
53610
|
-
var items = this.renderItems();
|
53611
|
-
var ulStyle = { display: this.model.isEmpty ? "none" : null };
|
53612
53904
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.root, ref: this.listContainerRef },
|
53613
53905
|
this.searchElementContent(),
|
53614
53906
|
this.emptyContent(),
|
53615
|
-
|
53616
|
-
|
53617
|
-
|
53907
|
+
this.renderList()));
|
53908
|
+
};
|
53909
|
+
List.prototype.renderList = function () {
|
53910
|
+
if (!this.model.renderElements)
|
53911
|
+
return null;
|
53912
|
+
var items = this.renderItems();
|
53913
|
+
var ulStyle = { display: this.model.isEmpty ? "none" : null };
|
53914
|
+
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul", { className: this.model.cssClasses.itemsContainer, style: ulStyle, role: "listbox", onMouseDown: function (e) {
|
53915
|
+
e.preventDefault();
|
53916
|
+
}, onKeyDown: this.handleKeydown, onMouseMove: this.handleMouseMove }, items));
|
53618
53917
|
};
|
53619
53918
|
List.prototype.renderItems = function () {
|
53620
53919
|
var _this = this;
|
@@ -54010,7 +54309,9 @@ var NotifierComponent = /** @class */ (function (_super) {
|
|
54010
54309
|
return this.notifier;
|
54011
54310
|
};
|
54012
54311
|
NotifierComponent.prototype.renderElement = function () {
|
54013
|
-
|
54312
|
+
if (!this.notifier.isDisplayed)
|
54313
|
+
return null;
|
54314
|
+
var style = { visibility: this.notifier.active ? "visible" : "hidden" };
|
54014
54315
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.notifier.css, style: style },
|
54015
54316
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", null, this.notifier.message),
|
54016
54317
|
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_3__["SurveyActionBar"], { model: this.notifier.actionBar })));
|
@@ -54629,8 +54930,8 @@ var RatingItemStar = /** @class */ (function (_super) {
|
|
54629
54930
|
var _this = this;
|
54630
54931
|
return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { 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); } },
|
54631
54932
|
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-describedby": this.question.ariaDescribedBy }),
|
54632
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star", size:
|
54633
|
-
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star-2", size:
|
54933
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star", size: "auto", iconName: "icon-rating-star", title: this.item.text }),
|
54934
|
+
react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: "icon-rating-star-2", title: this.item.text })));
|
54634
54935
|
};
|
54635
54936
|
return RatingItemStar;
|
54636
54937
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
|
@@ -55446,8 +55747,15 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
55446
55747
|
(_a = _this.question.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
|
55447
55748
|
_this.updateInputDomElement();
|
55448
55749
|
};
|
55750
|
+
_this.focus = function (event) {
|
55751
|
+
var _a;
|
55752
|
+
(_a = _this.question.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
|
55753
|
+
};
|
55449
55754
|
return _this;
|
55450
55755
|
}
|
55756
|
+
SurveyQuestionDropdownBase.prototype.getStateElement = function () {
|
55757
|
+
return this.question["dropdownListModel"];
|
55758
|
+
};
|
55451
55759
|
SurveyQuestionDropdownBase.prototype.setValueCore = function (newValue) {
|
55452
55760
|
this.questionBase.renderedValue = newValue;
|
55453
55761
|
};
|
@@ -55489,16 +55797,23 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
55489
55797
|
var valueElement = this.renderValueElement(dropdownListModel);
|
55490
55798
|
var onInputChange = function (e) {
|
55491
55799
|
if (e.target === document.activeElement) {
|
55492
|
-
dropdownListModel.
|
55800
|
+
dropdownListModel.inputStringRendered = e.target.value;
|
55493
55801
|
}
|
55494
55802
|
};
|
55495
55803
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.inputReadOnly ? undefined : 0, onClick: this.click,
|
55496
55804
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
55497
55805
|
// @ts-ignore
|
55498
55806
|
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-describedby": this.question.ariaDescribedBy },
|
55807
|
+
dropdownListModel.showHintPrefix ?
|
55808
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
|
55809
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringPrefix))) : null,
|
55499
55810
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.controlValue },
|
55811
|
+
dropdownListModel.showHintString ?
|
55812
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintSuffix },
|
55813
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
|
55814
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
|
55500
55815
|
valueElement,
|
55501
|
-
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-label": this.question.placeholder, placeholder:
|
55816
|
+
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-label": this.question.placeholder, placeholder: dropdownListModel.placeholderRendered, readOnly: !dropdownListModel.searchEnabled ? true : undefined, tabIndex: dropdownListModel.inputReadOnly ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
|
55502
55817
|
this.createClearButton()));
|
55503
55818
|
};
|
55504
55819
|
SurveyQuestionDropdownBase.prototype.createClearButton = function () {
|
@@ -55523,9 +55838,9 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
55523
55838
|
SurveyQuestionDropdownBase.prototype.updateInputDomElement = function () {
|
55524
55839
|
if (!!this.inputElement) {
|
55525
55840
|
var control = this.inputElement;
|
55526
|
-
var newValue = this.question.dropdownListModel.
|
55841
|
+
var newValue = this.question.dropdownListModel.inputStringRendered;
|
55527
55842
|
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
55528
|
-
control.value = this.question.dropdownListModel.
|
55843
|
+
control.value = this.question.dropdownListModel.inputStringRendered;
|
55529
55844
|
}
|
55530
55845
|
}
|
55531
55846
|
};
|
@@ -55967,6 +56282,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
55967
56282
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
55968
56283
|
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
55969
56284
|
/* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
|
56285
|
+
/* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
|
55970
56286
|
var __extends = (undefined && undefined.__extends) || (function () {
|
55971
56287
|
var extendStatics = function (d, b) {
|
55972
56288
|
extendStatics = Object.setPrototypeOf ||
|
@@ -55985,6 +56301,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
55985
56301
|
|
55986
56302
|
|
55987
56303
|
|
56304
|
+
|
55988
56305
|
var SurveyQuestionImage = /** @class */ (function (_super) {
|
55989
56306
|
__extends(SurveyQuestionImage, _super);
|
55990
56307
|
function SurveyQuestionImage(props) {
|
@@ -56008,25 +56325,30 @@ var SurveyQuestionImage = /** @class */ (function (_super) {
|
|
56008
56325
|
enumerable: false,
|
56009
56326
|
configurable: true
|
56010
56327
|
});
|
56011
|
-
SurveyQuestionImage.prototype.canRender = function () {
|
56012
|
-
return _super.prototype.canRender.call(this) && !!this.question.imageLink;
|
56013
|
-
};
|
56014
56328
|
SurveyQuestionImage.prototype.renderElement = function () {
|
56329
|
+
var _this = this;
|
56015
56330
|
var cssClasses = this.question.getImageCss();
|
56016
56331
|
var style = { objectFit: this.question.imageFit };
|
56017
56332
|
var control = null;
|
56018
56333
|
if (this.question.renderedMode === "image") {
|
56019
56334
|
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml, alt: this.question.altText || this.question.title, width: this.question.renderedWidth, height: this.question.renderedHeight,
|
56020
56335
|
//alt={item.text || item.value}
|
56021
|
-
style: style }));
|
56336
|
+
style: style, onLoad: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
|
56022
56337
|
}
|
56023
56338
|
if (this.question.renderedMode === "video") {
|
56024
|
-
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style }));
|
56339
|
+
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoadedMetadata: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
|
56025
56340
|
}
|
56026
56341
|
if (this.question.renderedMode === "youtube") {
|
56027
56342
|
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("iframe", { className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style }));
|
56028
56343
|
}
|
56029
|
-
|
56344
|
+
var noImage = null;
|
56345
|
+
if (!this.question.imageLink || this.question.contentNotLoaded) {
|
56346
|
+
noImage = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.noImage },
|
56347
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: this.question.cssClasses.noImageSvgIconId, size: 48 })));
|
56348
|
+
}
|
56349
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.root },
|
56350
|
+
control,
|
56351
|
+
noImage);
|
56030
56352
|
};
|
56031
56353
|
return SurveyQuestionImage;
|
56032
56354
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyQuestionElementBase"]));
|
@@ -56209,20 +56531,19 @@ var SurveyQuestionImagePickerItem = /** @class */ (function (_super) {
|
|
56209
56531
|
var style = { objectFit: this.question.imageFit };
|
56210
56532
|
var control = null;
|
56211
56533
|
if (item.locImageLink.renderedHtml && this.question.contentMode === "image") {
|
56212
|
-
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, alt: item.locText.renderedHtml, style: style, onLoad: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); } }));
|
56534
|
+
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, alt: item.locText.renderedHtml, style: style, onLoad: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); }, onError: function (event) { item.onErrorHandler(item, event.nativeEvent); } }));
|
56213
56535
|
}
|
56214
56536
|
if (item.locImageLink.renderedHtml && this.question.contentMode === "video") {
|
56215
|
-
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, style: style, onLoadedMetadata: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); } }));
|
56537
|
+
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, style: style, onLoadedMetadata: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); }, onError: function (event) { item.onErrorHandler(item, event.nativeEvent); } }));
|
56216
56538
|
}
|
56217
|
-
if (!item.locImageLink.renderedHtml) {
|
56539
|
+
if (!item.locImageLink.renderedHtml || item.contentNotLoaded) {
|
56218
56540
|
var style_1 = {
|
56219
56541
|
width: this.question.renderedImageWidth,
|
56220
56542
|
height: this.question.renderedImageHeight,
|
56221
56543
|
objectFit: this.question.imageFit
|
56222
56544
|
};
|
56223
56545
|
control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.itemNoImage, style: style_1 }, cssClasses.itemNoImageSvgIcon ?
|
56224
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("
|
56225
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: cssClasses.itemNoImageSvgIconId })) :
|
56546
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { className: cssClasses.itemNoImageSvgIcon, iconName: this.question.cssClasses.itemNoImageSvgIconId, size: 48 }) :
|
56226
56547
|
null));
|
56227
56548
|
}
|
56228
56549
|
var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass },
|
@@ -58165,6 +58486,8 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
|
|
58165
58486
|
SurveyQuestionCheckboxItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
58166
58487
|
if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
|
58167
58488
|
return false;
|
58489
|
+
if (!this.question)
|
58490
|
+
return false;
|
58168
58491
|
return (!this.question.customWidget ||
|
58169
58492
|
!!this.question.customWidgetData.isNeedRender ||
|
58170
58493
|
!!this.question.customWidget.widgetJson.isDefaultRender ||
|
@@ -60541,6 +60864,8 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
|
|
60541
60864
|
SurveyQuestionRadioItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
60542
60865
|
if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
|
60543
60866
|
return false;
|
60867
|
+
if (!this.question)
|
60868
|
+
return false;
|
60544
60869
|
return (!this.question.customWidget ||
|
60545
60870
|
!!this.question.customWidgetData.isNeedRender ||
|
60546
60871
|
!!this.question.customWidget.widgetJson.isDefaultRender ||
|
@@ -60978,7 +61303,7 @@ var SurveyQuestionText = /** @class */ (function (_super) {
|
|
60978
61303
|
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
|
60979
61304
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: inputClass, type: this.question.inputType,
|
60980
61305
|
//ref={this.controlRef}
|
60981
|
-
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, 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.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
|
61306
|
+
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.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
|
60982
61307
|
counter));
|
60983
61308
|
};
|
60984
61309
|
SurveyQuestionText.prototype.renderElement = function () {
|
@@ -61653,15 +61978,15 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
61653
61978
|
TagboxFilterString.prototype.updateDomElement = function () {
|
61654
61979
|
if (!!this.inputElement) {
|
61655
61980
|
var control = this.inputElement;
|
61656
|
-
var newValue = this.model.
|
61981
|
+
var newValue = this.model.inputStringRendered;
|
61657
61982
|
if (!survey_core__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(newValue, control.value)) {
|
61658
|
-
control.value = this.model.
|
61983
|
+
control.value = this.model.inputStringRendered;
|
61659
61984
|
}
|
61660
61985
|
}
|
61661
61986
|
};
|
61662
61987
|
TagboxFilterString.prototype.onChange = function (e) {
|
61663
61988
|
if (e.target === document.activeElement) {
|
61664
|
-
this.model.
|
61989
|
+
this.model.inputStringRendered = e.target.value;
|
61665
61990
|
}
|
61666
61991
|
};
|
61667
61992
|
TagboxFilterString.prototype.keyhandler = function (e) {
|
@@ -61670,12 +61995,15 @@ var TagboxFilterString = /** @class */ (function (_super) {
|
|
61670
61995
|
TagboxFilterString.prototype.onBlur = function (e) {
|
61671
61996
|
this.model.onBlur(e);
|
61672
61997
|
};
|
61998
|
+
TagboxFilterString.prototype.onFocus = function (e) {
|
61999
|
+
this.model.onFocus(e);
|
62000
|
+
};
|
61673
62001
|
TagboxFilterString.prototype.getStateElement = function () {
|
61674
62002
|
return this.model;
|
61675
62003
|
};
|
61676
62004
|
TagboxFilterString.prototype.render = function () {
|
61677
62005
|
var _this = this;
|
61678
|
-
return (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.searchEnabled ? true : undefined, size: !this.model.
|
62006
|
+
return (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.searchEnabled ? true : undefined, size: !this.model.inputStringRendered ? 1 : undefined, role: this.model.filterStringEnabled ? this.question.ariaRole : undefined, "aria-label": this.question.placeholder, 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); } }));
|
61679
62007
|
};
|
61680
62008
|
return TagboxFilterString;
|
61681
62009
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
|
@@ -62314,6 +62642,7 @@ var modernThemeColors = {
|
|
62314
62642
|
"$clean-button-color": "#1948b3",
|
62315
62643
|
"$body-background-color": "#ffffff",
|
62316
62644
|
"$foreground-light": "#909090",
|
62645
|
+
"$font-family": "Raleway",
|
62317
62646
|
};
|
62318
62647
|
var defaultThemeColors = {
|
62319
62648
|
"$header-background-color": "#e7e7e7",
|
@@ -62663,6 +62992,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
62663
62992
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
62664
62993
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
62665
62994
|
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
|
62995
|
+
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
62666
62996
|
var __extends = (undefined && undefined.__extends) || (function () {
|
62667
62997
|
var extendStatics = function (d, b) {
|
62668
62998
|
extendStatics = Object.setPrototypeOf ||
|
@@ -62690,6 +63020,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
62690
63020
|
|
62691
63021
|
|
62692
63022
|
|
63023
|
+
|
62693
63024
|
/**
|
62694
63025
|
* A base class for the [`SurveyElement`](https://surveyjs.io/form-library/documentation/surveyelement) and [`SurveyModel`](https://surveyjs.io/form-library/documentation/surveymodel) classes.
|
62695
63026
|
*/
|
@@ -63802,6 +64133,18 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
63802
64133
|
this.toggleState();
|
63803
64134
|
}
|
63804
64135
|
};
|
64136
|
+
SurveyElement.prototype.getCssTitle = function (cssClasses) {
|
64137
|
+
var isExpandable = this.state !== "default";
|
64138
|
+
var numInlineLimit = 4;
|
64139
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
64140
|
+
.append(cssClasses.title)
|
64141
|
+
.append(cssClasses.titleNumInline, (this.no || "").length > numInlineLimit || isExpandable)
|
64142
|
+
.append(cssClasses.titleExpandable, isExpandable)
|
64143
|
+
.append(cssClasses.titleExpanded, this.isExpanded)
|
64144
|
+
.append(cssClasses.titleCollapsed, this.isCollapsed)
|
64145
|
+
.append(cssClasses.titleDisabled, this.isReadOnly)
|
64146
|
+
.append(cssClasses.titleOnError, this.containsErrors).toString();
|
64147
|
+
};
|
63805
64148
|
SurveyElement.prototype.localeChanged = function () {
|
63806
64149
|
_super.prototype.localeChanged.call(this);
|
63807
64150
|
this.updateDescriptionVisibility(this.description);
|
@@ -64002,8 +64345,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64002
64345
|
/**
|
64003
64346
|
* An event that is raised after a trigger is executed.
|
64004
64347
|
*
|
64005
|
-
*
|
64006
|
-
* - `options.trigger`: [`Trigger`](https://surveyjs.io/form-library/documentation/api-reference/trigger) - A trigger that has been executed.
|
64348
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64007
64349
|
*
|
64008
64350
|
* For more information about triggers, refer to the following help topic: [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers).
|
64009
64351
|
* @see triggers
|
@@ -64012,15 +64354,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64012
64354
|
_this.onTriggerExecuted = _this.addEvent();
|
64013
64355
|
/**
|
64014
64356
|
* An event that is raised before the survey is completed. Use this event to prevent survey completion.
|
64015
|
-
*
|
64016
|
-
* Parameters:
|
64017
|
-
*
|
64018
|
-
* - `sender`: `SurveyModel`\
|
64019
|
-
* A survey instance that raised the event.
|
64020
|
-
* - `options.allow`: `Boolean`\
|
64021
|
-
* Set this property to `false` if you want to prevent survey completion.
|
64022
|
-
* - `options.isCompleteOnTrigger`: `Boolean`\
|
64023
|
-
* Returns `true` if survey completion is caused by the ["complete" trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete).
|
64024
64357
|
* @see onComplete
|
64025
64358
|
* @see doComplete
|
64026
64359
|
* @see allowCompleteSurveyAutomatic
|
@@ -64029,20 +64362,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64029
64362
|
/**
|
64030
64363
|
* An event that is raised after the survey is completed. Use this event to send survey results to the server.
|
64031
64364
|
*
|
64032
|
-
*
|
64033
|
-
*
|
64034
|
-
* - `sender`: `SurveyModel`\
|
64035
|
-
* A survey instance that raised the event. Use `sender.data` to access survey results.
|
64036
|
-
* - `options.isCompleteOnTrigger`: `Boolean`\
|
64037
|
-
* Returns `true` if survey completion is caused by the ["complete" trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete).
|
64038
|
-
* - `options.showSaveInProgress(text?: string)`\
|
64039
|
-
* Call this method to indicate that the save operation is in progress. You can use the `text` parameter to display a custom message.
|
64040
|
-
* - `options.showSaveError(text?: string)`\
|
64041
|
-
* Call this method to indicate that an error occurred during the save operation. You can use the `text` parameter to display a custom error message.
|
64042
|
-
* - `options.showSaveSuccess(text?: string)`\
|
64043
|
-
* Call this method to indicate that survey results are successfully saved. You can use the `text` parameter to display a custom message.
|
64044
|
-
* - `options.clearSaveMessages()`\
|
64045
|
-
* Call this method to hide the save operation messages.
|
64365
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64046
64366
|
*
|
64047
64367
|
* For an example of how to use the methods described above, refer to the following help topic: [Store Survey Results in Your Own Database](https://surveyjs.io/form-library/documentation/handle-survey-results-store#store-survey-results-in-your-own-database).
|
64048
64368
|
*
|
@@ -64055,47 +64375,24 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64055
64375
|
/**
|
64056
64376
|
* An event that is raised before the survey displays a [preview](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Use this event to cancel the preview.
|
64057
64377
|
*
|
64058
|
-
* Parameters:
|
64059
|
-
*
|
64060
|
-
* - `sender`: `SurveyModel`\
|
64061
|
-
* A survey instance that raised the event.
|
64062
|
-
* - `options.allow`: `Boolean`\
|
64063
|
-
* Set this property to `false` if you want to cancel the preview.
|
64064
64378
|
* @see showPreviewBeforeComplete
|
64065
64379
|
*/
|
64066
64380
|
_this.onShowingPreview = _this.addEvent();
|
64067
64381
|
/**
|
64068
64382
|
* An event that is raised before the survey navigates to a specified URL. Use this event to change the URL or cancel the navigation.
|
64069
|
-
*
|
64070
|
-
* Parameters:
|
64071
|
-
*
|
64072
|
-
* - `sender`: `SurveyModel`\
|
64073
|
-
* A survey instance that raised the event.
|
64074
|
-
* - `options.url`: `String`\
|
64075
|
-
* A URL to which respondents should be navigated. You can modify this parameter's value.
|
64076
|
-
* - `options.allow`: `Boolean`\
|
64077
|
-
* Set this property to `false` if you want to cancel the navigation and show the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
|
64078
64383
|
* @see navigateToUrl
|
64079
64384
|
* @see navigateToUrlOnCondition
|
64080
64385
|
*/
|
64081
64386
|
_this.onNavigateToUrl = _this.addEvent();
|
64082
64387
|
/**
|
64083
64388
|
* An event that is raised when the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) changes from `"starting"` to `"running"`. This occurs only if your survey includes a [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
|
64084
|
-
*
|
64085
|
-
* Parameters:
|
64086
|
-
*
|
64087
|
-
* - `sender`: `SurveyModel`\
|
64088
|
-
* A survey instance that raised the event.
|
64089
64389
|
* @see firstPageIsStarted
|
64090
64390
|
*/
|
64091
64391
|
_this.onStarted = _this.addEvent();
|
64092
64392
|
/**
|
64093
64393
|
* Use this event to save incomplete survey results. Enable the [`sendResultOnPageNext`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#sendResultOnPageNext) property for this event to occur.
|
64094
64394
|
*
|
64095
|
-
*
|
64096
|
-
*
|
64097
|
-
* - `sender`: `SurveyModel`\
|
64098
|
-
* A survey instance that raised the event.
|
64395
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64099
64396
|
*
|
64100
64397
|
* Refer to the following help topic for more information on the use case: [Continue an Incomplete Survey](https://surveyjs.io/form-library/documentation/handle-survey-results-continue-incomplete).
|
64101
64398
|
*/
|
@@ -64103,20 +64400,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64103
64400
|
/**
|
64104
64401
|
* An event that is raised before the current page is switched.
|
64105
64402
|
*
|
64106
|
-
* Parameters:
|
64107
|
-
*
|
64108
|
-
* - `sender`: `SurveyModel`\
|
64109
|
-
* A survey instance that raised the event.
|
64110
|
-
* - `options.oldCurrentPage`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
64111
|
-
* The current page.
|
64112
|
-
* - `options.newCurrentPage`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
64113
|
-
* A page that will be current.
|
64114
|
-
* - `options.allow`: `Boolean`\
|
64115
|
-
* Set this property to `false` if you do not want to switch the current page.
|
64116
|
-
* - `options.isNextPage`: `Boolean`\
|
64117
|
-
* Returns `true` if the respondent is going forward along the survey.
|
64118
|
-
* - `options.isPrevPage`: `Boolean`\
|
64119
|
-
* Returns `true` if the respondent is going backwards, that is, `newCurrentPage` is earlier in the survey than `oldCurrentPage`.
|
64120
64403
|
* @see currentPageNo
|
64121
64404
|
* @see nextPage
|
64122
64405
|
* @see prevPage
|
@@ -64125,18 +64408,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64125
64408
|
/**
|
64126
64409
|
* An event that is raised after the current page is switched.
|
64127
64410
|
*
|
64128
|
-
* Parameters:
|
64129
|
-
*
|
64130
|
-
* - `sender`: `SurveyModel`\
|
64131
|
-
* A survey instance that raised the event.
|
64132
|
-
* - `options.oldCurrentPage`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
64133
|
-
* A page that used to be current.
|
64134
|
-
* - `options.newCurrentPage`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
64135
|
-
* The current page.
|
64136
|
-
* - `options.isNextPage`: `Boolean`\
|
64137
|
-
* Returns `true` if the respondent is going forward along the survey.
|
64138
|
-
* - `options.isPrevPage`: `Boolean`\
|
64139
|
-
* Returns `true` if the respondent is going backwards, that is, `newCurrentPage` is earlier in the survey than `oldCurrentPage`.
|
64140
64411
|
* @see currentPageNo
|
64141
64412
|
* @see nextPage
|
64142
64413
|
* @see prevPage
|
@@ -64144,35 +64415,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64144
64415
|
_this.onCurrentPageChanged = _this.addEvent();
|
64145
64416
|
/**
|
64146
64417
|
* An event that is raised before a question value is changed.
|
64147
|
-
*
|
64148
|
-
* Parameters:
|
64149
|
-
*
|
64150
|
-
* - `sender`: `SurveyModel`\
|
64151
|
-
* A survey instance that raised the event.
|
64152
|
-
* - `options.name`: `String`\
|
64153
|
-
* The `name` of the question whose value is being changed. If you use the [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#valueName) property, this parameter contains its value.
|
64154
|
-
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
64155
|
-
* The question whose value is being changed. If you use `valueName` and it is the same for several questions, this parameter contains the first question.
|
64156
|
-
* - `options.oldValue`: `any`\
|
64157
|
-
* A previous value.
|
64158
|
-
* - `options.value`: `any`\
|
64159
|
-
* A new value. You can change it if required.
|
64160
64418
|
* @see setValue
|
64161
64419
|
*/
|
64162
64420
|
_this.onValueChanging = _this.addEvent();
|
64163
64421
|
/**
|
64164
|
-
* An event that is raised after a question value is changed
|
64422
|
+
* An event that is raised after a question value is changed
|
64165
64423
|
*
|
64166
|
-
*
|
64167
|
-
*
|
64168
|
-
* - `sender`: `SurveyModel`\
|
64169
|
-
* A survey instance that raised the event.
|
64170
|
-
* - `options.name`: `String`\
|
64171
|
-
* The `name` of the question whose value has been changed. If you use the [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#valueName) property, this parameter contains its value.
|
64172
|
-
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
64173
|
-
* The question whose value has been changed. If you use `valueName`, and it is the same for several questions, this parameter contains the first question.
|
64174
|
-
* - `options.value`: `any`\
|
64175
|
-
* A new value.
|
64424
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64176
64425
|
*
|
64177
64426
|
* To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelItemValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelItemValueChanged) event.
|
64178
64427
|
* @see setValue
|
@@ -64181,14 +64430,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64181
64430
|
/**
|
64182
64431
|
* An event that is raised after a [variable](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#variables) or [calculated value](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#calculated-values) is changed.
|
64183
64432
|
*
|
64184
|
-
* Parameters:
|
64185
|
-
*
|
64186
|
-
* - `sender`: `SurveyModel`\
|
64187
|
-
* A survey instance that raised the event.
|
64188
|
-
* - `options.name`: `String`\
|
64189
|
-
* The name of the variable or calculated value that has been changed.
|
64190
|
-
* - `options.value`: `any`\
|
64191
|
-
* A new value for the variable or calculated value.
|
64192
64433
|
* @see setVariable
|
64193
64434
|
* @see calculatedValues
|
64194
64435
|
*/
|
@@ -64196,16 +64437,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64196
64437
|
/**
|
64197
64438
|
* An event that is raised after question visibility is changed.
|
64198
64439
|
*
|
64199
|
-
*
|
64200
|
-
*
|
64201
|
-
* - `sender`: `SurveyModel`\
|
64202
|
-
* A survey instance that raised the event.
|
64203
|
-
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
64204
|
-
* A question whose visibility has been changed.
|
64205
|
-
* - `options.name`: `String`\
|
64206
|
-
* The question's name.
|
64207
|
-
* - `options.visible`: `Boolean`\
|
64208
|
-
* Indicates whether the question is visible now.
|
64440
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64209
64441
|
*
|
64210
64442
|
* Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
|
64211
64443
|
*/
|
@@ -64218,14 +64450,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64218
64450
|
/**
|
64219
64451
|
* An event that is raised after page visibility is changed.
|
64220
64452
|
*
|
64221
|
-
*
|
64222
|
-
*
|
64223
|
-
* - `sender`: `SurveyModel`\
|
64224
|
-
* A survey instance that raised the event.
|
64225
|
-
* - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
64226
|
-
* A page whose visibility has been changed.
|
64227
|
-
* - `options.visible`: `Boolean`\
|
64228
|
-
* Indicates whether the page is visible now.
|
64453
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64229
64454
|
*
|
64230
64455
|
* Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
|
64231
64456
|
*/
|
@@ -64233,14 +64458,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64233
64458
|
/**
|
64234
64459
|
* An event that is raised after page visibility is changed.
|
64235
64460
|
*
|
64236
|
-
*
|
64237
|
-
*
|
64238
|
-
* - `sender`: `SurveyModel`\
|
64239
|
-
* A survey instance that raised the event.
|
64240
|
-
* - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
|
64241
|
-
* A panel whose visibility has been changed.
|
64242
|
-
* - `options.visible`: `Boolean`\
|
64243
|
-
* Indicates whether the panel is visible now.
|
64461
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64244
64462
|
*
|
64245
64463
|
* Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
|
64246
64464
|
*/
|
@@ -64250,12 +64468,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64250
64468
|
*
|
64251
64469
|
* In a survey, complex elements ([Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/), [Multiple Text](https://surveyjs.io/form-library/examples/questiontype-multipletext/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/)) are composed of questions. Use this event to customize any question regardless of which survey element it belongs to.
|
64252
64470
|
*
|
64253
|
-
*
|
64254
|
-
*
|
64255
|
-
* - `sender`: `SurveyModel`\
|
64256
|
-
* A survey instance that raised the event.
|
64257
|
-
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
64258
|
-
* A created question.
|
64471
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64259
64472
|
*
|
64260
64473
|
* To use this event for questions loaded from JSON, create an empty survey model, add an event handler, and only then populate the model from the JSON object:
|
64261
64474
|
*
|
@@ -64280,20 +64493,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64280
64493
|
/**
|
64281
64494
|
* An event that is raised when a new question is added to a panel or page.
|
64282
64495
|
*
|
64283
|
-
*
|
64284
|
-
*
|
64285
|
-
* - `sender`: `SurveyModel`\
|
64286
|
-
* A survey instance that raised the event.
|
64287
|
-
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
64288
|
-
* A new question.
|
64289
|
-
* - `options.name`: `String`\
|
64290
|
-
* The question's name.
|
64291
|
-
* - `options.index`: `Number`\
|
64292
|
-
* The question's index within the parent container (panel or page).
|
64293
|
-
* - `options.parent`: [`PanelModelBase`](https://surveyjs.io/form-library/documentation/api-reference/panelmodelbase)\
|
64294
|
-
* The parent container (panel or page).
|
64295
|
-
* - `options.page`: [`PanelModelBase`](https://surveyjs.io/form-library/documentation/api-reference/panelmodelbase)\
|
64296
|
-
* A page that nests the added question.
|
64496
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64297
64497
|
*
|
64298
64498
|
* To use this event for questions loaded from JSON, create an empty survey model, add an event handler, and only then populate the model from the JSON object:
|
64299
64499
|
*
|
@@ -64317,76 +64517,25 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64317
64517
|
_this.onQuestionAdded = _this.addEvent();
|
64318
64518
|
/**
|
64319
64519
|
* An event that is raised after a question is deleted from the survey.
|
64320
|
-
*
|
64321
|
-
* Parameters:
|
64322
|
-
*
|
64323
|
-
* - `sender`: `SurveyModel`\
|
64324
|
-
* A survey instance that raised the event.
|
64325
|
-
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
64326
|
-
* A deleted question.
|
64327
|
-
* - `options.name`: `String`\
|
64328
|
-
* The question's name.
|
64329
64520
|
*/
|
64330
64521
|
_this.onQuestionRemoved = _this.addEvent();
|
64331
64522
|
/**
|
64332
|
-
*
|
64333
|
-
*
|
64334
|
-
* * Parameters:
|
64335
|
-
*
|
64336
|
-
* - `sender`: `SurveyModel`\
|
64337
|
-
* A survey instance that raised the event.
|
64338
|
-
* - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
|
64339
|
-
* A new panel.
|
64340
|
-
* - `options.name`: `String`\
|
64341
|
-
* The panel's name.
|
64342
|
-
* - `options.index`: `Number`\
|
64343
|
-
* The panel's index within the parent container (panel or page).
|
64344
|
-
* - `options.parent`: [`PanelModelBase`](https://surveyjs.io/form-library/documentation/api-reference/panelmodelbase)\
|
64345
|
-
* The parent container (panel or page).
|
64346
|
-
* - `options.page`: [`PanelModelBase`](https://surveyjs.io/form-library/documentation/api-reference/panelmodelbase)\
|
64347
|
-
* A page that nests the added panel.
|
64523
|
+
* An event that is raised when a new panel is added to a page.
|
64348
64524
|
*/
|
64349
64525
|
_this.onPanelAdded = _this.addEvent();
|
64350
64526
|
/**
|
64351
64527
|
* An event that is raised after a panel is deleted from the survey.
|
64352
|
-
*
|
64353
|
-
* Parameters:
|
64354
|
-
*
|
64355
|
-
* - `sender`: `SurveyModel`\
|
64356
|
-
* A survey instance that raised the event.
|
64357
|
-
* - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
|
64358
|
-
* A deleted panel.
|
64359
|
-
* - `options.name`: `String`\
|
64360
|
-
* The panel's name.
|
64361
64528
|
*/
|
64362
64529
|
_this.onPanelRemoved = _this.addEvent();
|
64363
64530
|
/**
|
64364
|
-
*
|
64365
|
-
*
|
64366
|
-
* * Parameters:
|
64367
|
-
*
|
64368
|
-
* - `sender`: `SurveyModel`\
|
64369
|
-
* A survey instance that raised the event.
|
64370
|
-
* - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
|
64371
|
-
* A new page.
|
64531
|
+
* An event that is raised when a new page is added to the survey.
|
64372
64532
|
* @see PanelModel
|
64373
64533
|
*/
|
64374
64534
|
_this.onPageAdded = _this.addEvent();
|
64375
64535
|
/**
|
64376
64536
|
* An event that is raised when a question value is being validated. Use this event to specify a custom error message.
|
64377
64537
|
*
|
64378
|
-
*
|
64379
|
-
*
|
64380
|
-
* - `sender`: `SurveyModel`\
|
64381
|
-
* A survey instance that raised the event.
|
64382
|
-
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
64383
|
-
* A question being validated.
|
64384
|
-
* - `options.name`: `String`\
|
64385
|
-
* The question's name.
|
64386
|
-
* - `options.value`: `any`\
|
64387
|
-
* A question value being validated.
|
64388
|
-
* - `options.error`: `String`\
|
64389
|
-
* An error message that you should specify if validation fails.
|
64538
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64390
64539
|
*
|
64391
64540
|
* [View Demo](https://surveyjs.io/form-library/examples/add-custom-input-validation/ (linkStyle))
|
64392
64541
|
* @see onServerValidateQuestions
|
@@ -64397,25 +64546,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64397
64546
|
_this.onValidateQuestion = _this.addEvent();
|
64398
64547
|
/**
|
64399
64548
|
* An event that is raised before errors are assigned to a question. You may add/remove/modify errors for a question.
|
64400
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64401
|
-
* - `options.question` - a validated question.
|
64402
|
-
* - `options.errors` - the list of errors. The list is empty by default and remains empty if a validated question has no errors.
|
64403
64549
|
* @see onValidateQuestion
|
64404
64550
|
*/
|
64405
64551
|
_this.onSettingQuestionErrors = _this.addEvent();
|
64406
64552
|
/**
|
64407
64553
|
* Use this event to validate data on your server.
|
64408
64554
|
*
|
64409
|
-
*
|
64410
|
-
*
|
64411
|
-
* - `sender`: `SurveyModel`\
|
64412
|
-
* A survey instance that raised the event.
|
64413
|
-
* - `options.data`: `Object`\
|
64414
|
-
* Question values. You can get an individual question value as follows: `options.data["questionName"]`.
|
64415
|
-
* - `options.errors`: `Object`\
|
64416
|
-
* An object for your error messages. Set error messages as follows: `options.errors["questionName"] = "My error message"`
|
64417
|
-
* - `options.complete()`: Method\
|
64418
|
-
* A method that you should call when a request to the server has completed.
|
64555
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64419
64556
|
*
|
64420
64557
|
* [View Demo](https://surveyjs.io/form-library/examples/javascript-server-side-form-validation/ (linkStyle))
|
64421
64558
|
* @see onValidateQuestion
|
@@ -64425,16 +64562,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64425
64562
|
/**
|
64426
64563
|
* An event that is raised when a panel is being validated. Use this event to specify a custom error message.
|
64427
64564
|
*
|
64428
|
-
*
|
64429
|
-
*
|
64430
|
-
* - `sender`: `SurveyModel`\
|
64431
|
-
* A survey instance that raised the event.
|
64432
|
-
* - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
|
64433
|
-
* A panel being validated.
|
64434
|
-
* - `options.name`: `String`\
|
64435
|
-
* The panel's name.
|
64436
|
-
* - `options.error`: `String`\
|
64437
|
-
* An error message that you should specify if validation fails.
|
64565
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64438
64566
|
*
|
64439
64567
|
* [View Demo](https://surveyjs.io/form-library/examples/add-custom-input-validation/ (linkStyle))
|
64440
64568
|
* @see onValidateQuestion
|
@@ -64443,26 +64571,14 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64443
64571
|
_this.onValidatePanel = _this.addEvent();
|
64444
64572
|
/**
|
64445
64573
|
* Use the event to change the default error text.
|
64446
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64447
|
-
* - `options.text` - an error text.
|
64448
|
-
* - `options.error` - an instance of the `SurveyError` object.
|
64449
|
-
* - `options.obj` - an instance of Question, Panel or Survey object to where error is located.
|
64450
|
-
* - `options.name` - the error name. The following error names are available:
|
64451
|
-
* required, requireoneanswer, requirenumeric, exceedsize, webrequest, webrequestempty, otherempty,
|
64452
|
-
* uploadingfile, requiredinallrowserror, minrowcounterror, keyduplicationerror, custom
|
64453
64574
|
*/
|
64454
64575
|
_this.onErrorCustomText = _this.addEvent();
|
64455
64576
|
/**
|
64456
64577
|
* Use the this event to be notified when the survey finished validate questions on the current page. It commonly happens when a user try to go to the next page or complete the survey
|
64457
|
-
* options.questions - the list of questions that have errors
|
64458
|
-
* options.errors - the list of errors
|
64459
|
-
* options.page - the page where question(s) are located
|
64460
64578
|
*/
|
64461
64579
|
_this.onValidatedErrorsOnCurrentPage = _this.addEvent();
|
64462
64580
|
/**
|
64463
64581
|
* Use this event to modify the HTML content before rendering, for example `completeHtml` or `loadingHtml`.
|
64464
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64465
|
-
* - `options.html` - an HTML that you may change before text processing and then rendering. specifies the modified HTML content.
|
64466
64582
|
* @see completedHtml
|
64467
64583
|
* @see loadingHtml
|
64468
64584
|
* @see QuestionHtmlModel.html
|
@@ -64470,98 +64586,56 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64470
64586
|
_this.onProcessHtml = _this.addEvent();
|
64471
64587
|
/**
|
64472
64588
|
* Use this event to change a question's display text.
|
64473
|
-
*
|
64474
|
-
* Parameters:
|
64475
|
-
*
|
64476
|
-
* - `sender`: `SurveyModel`\
|
64477
|
-
* A survey instance that raised the event.
|
64478
|
-
* - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
|
64479
|
-
* A Question instance for which the event is raised.
|
64480
|
-
* - `options.displayValue`: `String`\
|
64481
|
-
* A question's display text. You can assign a custom value to this parameter.
|
64482
64589
|
*/
|
64483
64590
|
_this.onGetQuestionDisplayValue = _this.addEvent();
|
64484
64591
|
/**
|
64485
64592
|
* Use this event to change the question title in code. If you want to remove question numbering then set showQuestionNumbers to "off".
|
64486
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64487
|
-
* - `options.title` - a calculated question title, based on question `title`, `name`.
|
64488
|
-
* - `options.question` - a question object.
|
64489
64593
|
* @see showQuestionNumbers
|
64490
64594
|
* @see requiredText
|
64491
64595
|
*/
|
64492
64596
|
_this.onGetQuestionTitle = _this.addEvent();
|
64493
64597
|
/**
|
64494
64598
|
* Use this event to change the element title tag name that renders by default.
|
64495
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64496
|
-
* - `options.element` - an element (question, panel, page and survey) that SurveyJS is going to render.
|
64497
|
-
* - `options.tagName` - an element title tagName that are used to render a title. You can change it from the default value.
|
64498
64599
|
* @see showQuestionNumbers
|
64499
64600
|
* @see requiredText
|
64500
64601
|
*/
|
64501
64602
|
_this.onGetTitleTagName = _this.addEvent();
|
64502
64603
|
/**
|
64503
64604
|
* Use this event to change the question no in code. If you want to remove question numbering then set showQuestionNumbers to "off".
|
64504
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64505
|
-
* - `options.no` - a calculated question no, based on question `visibleIndex`, survey `.questionStartIndex` properties. You can change it.
|
64506
|
-
* - `options.question` - a question object.
|
64507
64605
|
* @see showQuestionNumbers
|
64508
64606
|
* @see questionStartIndex
|
64509
64607
|
*/
|
64510
64608
|
_this.onGetQuestionNo = _this.addEvent();
|
64511
64609
|
/**
|
64512
64610
|
* Use this event to change the progress text in code.
|
64513
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64514
|
-
* - `options.text` - a progress text, that SurveyJS will render in progress bar.
|
64515
|
-
* - `options.questionCount` - a number of questions that have input(s). We do not count html or expression questions
|
64516
|
-
* - `options.answeredQuestionCount` - a number of questions that have input(s) and an user has answered.
|
64517
|
-
* - `options.requiredQuestionCount` - a number of required questions that have input(s). We do not count html or expression questions
|
64518
|
-
* - `options.requiredAnsweredQuestionCount` - a number of required questions that have input(s) and an user has answered.
|
64519
64611
|
* @see progressBarType
|
64520
64612
|
*/
|
64521
64613
|
_this.onProgressText = _this.addEvent();
|
64522
64614
|
/**
|
64523
64615
|
* Use this event to process the markdown text.
|
64524
|
-
*
|
64525
|
-
*
|
64526
|
-
* - `options.name` - a property name is going to be rendered.
|
64527
|
-
* - `options.text` - a text that is going to be rendered.
|
64528
|
-
* - `options.html` - an HTML content. It is `null` by default. Use this property to specify the HTML content rendered instead of `options.text`.
|
64616
|
+
*
|
64617
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64529
64618
|
*
|
64530
64619
|
* [View Demo](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/ (linkStyle))
|
64531
64620
|
*/
|
64532
64621
|
_this.onTextMarkdown = _this.addEvent();
|
64533
64622
|
/**
|
64534
64623
|
* Use this event to specity render component name used for text rendering.
|
64535
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64536
|
-
* - `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered.
|
64537
|
-
* - `options.name` - a property name is going to be rendered.
|
64538
|
-
* - `options.renderAs` - a component name used for text rendering.
|
64539
64624
|
*/
|
64540
64625
|
_this.onTextRenderAs = _this.addEvent();
|
64541
64626
|
/**
|
64542
64627
|
* The event fires when it gets response from the [api.surveyjs.io](https://api.surveyjs.io) service on saving survey results. Use it to find out if the results have been saved successfully.
|
64543
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64544
|
-
* - `options.success` - it is `true` if the results has been sent to the service successfully.
|
64545
|
-
* - `options.response` - a response from the service.
|
64546
64628
|
*/
|
64547
64629
|
_this.onSendResult = _this.addEvent();
|
64548
64630
|
/**
|
64549
64631
|
* Use it to get results after calling the `getResult` method. It returns a simple analytics from [api.surveyjs.io](https://api.surveyjs.io) service.
|
64550
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64551
|
-
* - `options.success` - it is `true` if the results were got from the service successfully.
|
64552
|
-
* - `options.data` - the object `{AnswersCount, QuestionResult : {} }`. `AnswersCount` is the number of posted survey results. `QuestionResult` is an object with all possible unique answers to the question and number of these answers.
|
64553
|
-
* - `options.dataList` - an array of objects `{name, value}`, where `name` is a unique value/answer to the question and `value` is a number/count of such answers.
|
64554
|
-
* - `options.response` - the server response.
|
64555
64632
|
* @see getResult
|
64556
64633
|
*/
|
64557
64634
|
_this.onGetResult = _this.addEvent();
|
64558
64635
|
/**
|
64559
64636
|
* An event that is raised on uploading the file in QuestionFile when `storeDataAsText` is set to `false`. Use this event to change the uploaded file name or to prevent a particular file from being uploaded.
|
64560
|
-
*
|
64561
|
-
*
|
64562
|
-
* - `options.name` - the question name.
|
64563
|
-
* - `options.files` - the Javascript File objects array to upload.
|
64564
|
-
* - `options.callback` - a callback function to get the file upload status and the updloaded file content.
|
64637
|
+
*
|
64638
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64565
64639
|
*
|
64566
64640
|
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-file/ (linkStyle))
|
64567
64641
|
* @see uploadFiles
|
@@ -64572,12 +64646,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64572
64646
|
_this.onUploadFiles = _this.addEvent();
|
64573
64647
|
/**
|
64574
64648
|
* An event that is raised on downloading a file in QuestionFile. Use this event to pass the file to a preview.
|
64575
|
-
*
|
64576
|
-
*
|
64577
|
-
* - `options.name` - the question name.
|
64578
|
-
* - `options.content` - the file content.
|
64579
|
-
* - `options.fileValue` - single file question value.
|
64580
|
-
* - `options.callback` - a callback function to get the file downloading status and the downloaded file content.
|
64649
|
+
*
|
64650
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64581
64651
|
*
|
64582
64652
|
* [View Demo](https://surveyjs.io/form-library/examples/questiontype-file/ (linkStyle))
|
64583
64653
|
* @see downloadFile
|
@@ -64587,12 +64657,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64587
64657
|
_this.onDownloadFile = _this.addEvent();
|
64588
64658
|
/**
|
64589
64659
|
* This event is fired on clearing the value in a QuestionFile. Use this event to remove files stored on your server.
|
64590
|
-
*
|
64591
|
-
*
|
64592
|
-
* - `options.name` - the question name.
|
64593
|
-
* - `options.value` - the question value.
|
64594
|
-
* - `options.fileName` - a removed file's name, set it to `null` to clear all files.
|
64595
|
-
* - `options.callback` - a callback function to get the operation status.
|
64660
|
+
*
|
64661
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64596
64662
|
*
|
64597
64663
|
* [View Demo](https://surveyjs.io/form-library/examples/file-delayed-upload/ (linkStyle))
|
64598
64664
|
* @see clearFiles
|
@@ -64603,16 +64669,11 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64603
64669
|
/**
|
64604
64670
|
* An event that is raised after choices for radiogroup, checkbox, and dropdown has been loaded from a RESTful service and before they are assigned to a question.
|
64605
64671
|
* You may change the choices, before they are assigned or disable/enabled make visible/invisible question, based on loaded results.
|
64606
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64607
|
-
* - `question` - the question where loaded choices are going to be assigned.
|
64608
|
-
* - `choices` - the loaded choices. You can change the loaded choices to before they are assigned to question.
|
64609
|
-
* - `serverResult` - a result that comes from the server as it is.
|
64610
64672
|
*/
|
64611
64673
|
_this.onLoadChoicesFromServer = _this.addEvent();
|
64612
64674
|
/**
|
64613
64675
|
* An event that is raised after survey is loaded from api.surveyjs.io service.
|
64614
64676
|
* You can use this event to perform manipulation with the survey model after it was loaded from the web service.
|
64615
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64616
64677
|
* @see surveyId
|
64617
64678
|
* @see loadSurveyFromService
|
64618
64679
|
*/
|
@@ -64621,69 +64682,48 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64621
64682
|
* An event that is raised on processing the text when it finds a text in brackets: `{somevalue}`. By default, it uses the value of survey question values and variables.
|
64622
64683
|
* For example, you may use the text processing in loading choices from the web. If your `choicesByUrl.url` equals to "UrlToServiceToGetAllCities/{country}/{state}",
|
64623
64684
|
* you may set on this event `options.value` to "all" or empty string when the "state" value/question is non selected by a user.
|
64624
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64625
|
-
* - `options.name` - the name of the processing value, for example, "state" in our example.
|
64626
|
-
* - `options.value` - the value of the processing text.
|
64627
|
-
* - `options.isExists` - a boolean value. Set it to `true` if you want to use the value and set it to `false` if you don't.
|
64628
64685
|
*/
|
64629
64686
|
_this.onProcessTextValue = _this.addEvent();
|
64630
64687
|
/**
|
64631
64688
|
* An event that is raised before rendering a question. Use it to override the default question CSS classes.
|
64632
|
-
*
|
64633
|
-
*
|
64634
|
-
* - `options.cssClasses` - an object with CSS classes. For example `{root: "table", button: "button"}`. You can change them to your own CSS classes.
|
64689
|
+
*
|
64690
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64635
64691
|
*
|
64636
64692
|
* [View Demo](https://surveyjs.io/form-library/examples/survey-cssclasses/ (linkStyle))
|
64637
64693
|
*/
|
64638
64694
|
_this.onUpdateQuestionCssClasses = _this.addEvent();
|
64639
64695
|
/**
|
64640
64696
|
* An event that is raised before rendering a panel. Use it to override the default panel CSS classes.
|
64641
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64642
|
-
* - `options.panel` - a panel for which you can change the CSS classes.
|
64643
|
-
* - `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes.
|
64644
64697
|
*/
|
64645
64698
|
_this.onUpdatePanelCssClasses = _this.addEvent();
|
64646
64699
|
/**
|
64647
64700
|
* An event that is raised before rendering a page. Use it to override the default page CSS classes.
|
64648
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64649
|
-
* - `options.page` - a page for which you can change the CSS classes.
|
64650
|
-
* - `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes.
|
64651
64701
|
*/
|
64652
64702
|
_this.onUpdatePageCssClasses = _this.addEvent();
|
64653
64703
|
/**
|
64654
64704
|
* An event that is raised before rendering a choice item in radiogroup, checkbox or dropdown questions. Use it to override the default choice item css.
|
64655
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64656
|
-
* - `options.question` - a question where choice item is rendered.
|
64657
|
-
* - `options.item` - a choice item of ItemValue type. You can get value or text choice properties as options.item.value or options.choice.text
|
64658
|
-
* - `options.css` - a string with css classes divided by space. You can change it.
|
64659
64705
|
*/
|
64660
64706
|
_this.onUpdateChoiceItemCss = _this.addEvent();
|
64661
64707
|
/**
|
64662
64708
|
* An event that is raised right after survey is rendered in DOM.
|
64663
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64664
|
-
* - `options.htmlElement` - a root HTML element bound to the survey object.
|
64665
64709
|
*/
|
64666
64710
|
_this.onAfterRenderSurvey = _this.addEvent();
|
64667
64711
|
/**
|
64668
64712
|
* An event that is raised right after a page is rendered in DOM. Use it to modify HTML elements.
|
64669
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64670
|
-
* - `options.htmlElement` - an HTML element bound to the survey header object.
|
64671
64713
|
*/
|
64672
64714
|
_this.onAfterRenderHeader = _this.addEvent();
|
64673
64715
|
/**
|
64674
64716
|
* An event that is raised right after a page is rendered in DOM. Use it to modify HTML elements.
|
64675
|
-
*
|
64676
|
-
*
|
64677
|
-
* - `options.htmlElement` - an HTML element bound to the page object.
|
64717
|
+
*
|
64718
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64678
64719
|
*
|
64679
64720
|
* [View Demo](https://surveyjs.io/form-library/examples/survey-afterrender/ (linkStyle))
|
64680
64721
|
*/
|
64681
64722
|
_this.onAfterRenderPage = _this.addEvent();
|
64682
64723
|
/**
|
64683
64724
|
* An event that is raised right after a question is rendered in DOM. Use it to modify HTML elements.
|
64684
|
-
*
|
64685
|
-
*
|
64686
|
-
* - `options.htmlElement` - an HTML element bound to the question object.
|
64725
|
+
*
|
64726
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64687
64727
|
*
|
64688
64728
|
* [View Demo](https://surveyjs.io/form-library/examples/survey-afterrender/ (linkStyle))
|
64689
64729
|
*/
|
@@ -64691,45 +64731,24 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64691
64731
|
/**
|
64692
64732
|
* An event that is raised right after a non-composite question (text, comment, dropdown, radiogroup, checkbox) is rendered in DOM. Use it to modify HTML elements.
|
64693
64733
|
* This event is not fired for matrices, panels, multiple text and image picker.
|
64694
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64695
|
-
* - `options.question` - a question object for which the event is fired.
|
64696
|
-
* - `options.htmlElement` - an HTML element bound to the question object.
|
64697
64734
|
*/
|
64698
64735
|
_this.onAfterRenderQuestionInput = _this.addEvent();
|
64699
64736
|
/**
|
64700
64737
|
* An event that is raised right after a panel is rendered in DOM. Use it to modify HTML elements.
|
64701
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64702
|
-
* - `options.panel` - a panel object for which the event is fired
|
64703
|
-
* - `options.htmlElement` - an HTML element bound to the panel object
|
64704
64738
|
*/
|
64705
64739
|
_this.onAfterRenderPanel = _this.addEvent();
|
64706
64740
|
/**
|
64707
64741
|
* The event occurs when an element within a question gets focus.
|
64708
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64709
|
-
* - `options.question` - A [question](https://surveyjs.io/Documentation/Library?id=Question) whose child element gets focus.
|
64710
64742
|
* @see onFocusInPanel
|
64711
64743
|
*/
|
64712
64744
|
_this.onFocusInQuestion = _this.addEvent();
|
64713
64745
|
/**
|
64714
64746
|
* The event occurs when an element within a panel gets focus.
|
64715
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64716
|
-
* - `options.panel` - A [panel](https://surveyjs.io/Documentation/Library?id=PanelModelBase) whose child element gets focus.
|
64717
64747
|
* @see onFocusInQuestion
|
64718
64748
|
*/
|
64719
64749
|
_this.onFocusInPanel = _this.addEvent();
|
64720
64750
|
/**
|
64721
64751
|
* Use this event to change the visibility of an individual choice item in [Checkbox](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel), [Dropdown](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel), [Radiogroup](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel), and other similar question types.
|
64722
|
-
*
|
64723
|
-
* Parameters:
|
64724
|
-
*
|
64725
|
-
* - `sender`: `SurveyModel`\
|
64726
|
-
* A survey instance that raised the event.
|
64727
|
-
* - `options.question`\
|
64728
|
-
* A Question instance to which the choice item belongs.
|
64729
|
-
* - `options.item`\
|
64730
|
-
* The choice item as specified in the [choices](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choices) array.
|
64731
|
-
* - `options.visible`\
|
64732
|
-
* A Boolean value that specifies item visibility. Set it to `false` to hide the item.
|
64733
64752
|
*/
|
64734
64753
|
_this.onShowingChoiceItem = _this.addEvent();
|
64735
64754
|
/**
|
@@ -64737,20 +64756,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64737
64756
|
*
|
64738
64757
|
* This event is raised only for those questions that have the [`choicesLazyLoadEnabled`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesLazyLoadEnabled) property set to `true`.
|
64739
64758
|
*
|
64740
|
-
*
|
64741
|
-
*
|
64742
|
-
* - `sender`: `SurveyModel`\
|
64743
|
-
* A survey instance that raised the event.
|
64744
|
-
* - `options.question`\
|
64745
|
-
* A Question instance for which the event is raised.
|
64746
|
-
* - `options.skip`: `Number`\
|
64747
|
-
* The number of choice items to skip.
|
64748
|
-
* - `options.take`: `Number`\
|
64749
|
-
* The number of choice items to load. You can use the question's [`choicesLazyLoadPageSize`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesLazyLoadPageSize) property to change this number.
|
64750
|
-
* - `options.filter`\
|
64751
|
-
* A search string used to filter choices.
|
64752
|
-
* - `options.setItems(items: Array<any>, totalCount: Number)`\
|
64753
|
-
* A method that you should call to assign loaded items to the question. Item objects should be structured as specified in the [`choices`](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model#choices) property description. If their structure is different, [map their properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) to bring them to the required structure.
|
64759
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64754
64760
|
*
|
64755
64761
|
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
64756
64762
|
*/
|
@@ -64760,45 +64766,25 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64760
64766
|
*
|
64761
64767
|
* If you load choices from a server (use [`choicesByUrl`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesByUrl) or [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad)), display texts become available only when data is loaded, which does not happen until a user opens the drop-down menu. However, a display text for a default choice item is required before that. In this case, you can load data individually for the default item within the `onGetChoiceDisplayValue` event handler.
|
64762
64768
|
*
|
64763
|
-
*
|
64764
|
-
*
|
64765
|
-
* - `sender`: `SurveyModel`\
|
64766
|
-
* A survey instance that raised the event.
|
64767
|
-
* - `options.question`\
|
64768
|
-
* A Question instance for which the event is raised.
|
64769
|
-
* - `options.values`\
|
64770
|
-
* An array of one (in Dropdown) or more (in Tag Box) default values.
|
64771
|
-
* - `options.setItems(displayValues: Array<string>)`\
|
64772
|
-
* A method that you should call to assign display texts to the question.
|
64769
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
64773
64770
|
*
|
64774
64771
|
* [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
|
64775
64772
|
*/
|
64776
64773
|
_this.onGetChoiceDisplayValue = _this.addEvent();
|
64777
64774
|
/**
|
64778
64775
|
* An event that is raised on adding a new row in Matrix Dynamic question.
|
64779
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64780
|
-
* - `options.question` - a matrix question.
|
64781
|
-
* - `options.row` - a new added row.
|
64782
64776
|
* @see QuestionMatrixDynamicModel
|
64783
64777
|
* @see QuestionMatrixDynamicModel.visibleRows
|
64784
64778
|
*/
|
64785
64779
|
_this.onMatrixRowAdded = _this.addEvent();
|
64786
64780
|
/**
|
64787
64781
|
* An event that is raised before adding a new row in Matrix Dynamic question.
|
64788
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64789
|
-
* - `options.question` - a matrix question.
|
64790
|
-
* - `options.canAddRow` - specifies whether a new row can be added
|
64791
64782
|
* @see QuestionMatrixDynamicModel
|
64792
64783
|
* @see QuestionMatrixDynamicModel.visibleRows
|
64793
64784
|
*/
|
64794
64785
|
_this.onMatrixBeforeRowAdded = _this.addEvent();
|
64795
64786
|
/**
|
64796
64787
|
* An event that is raised before removing a row from Matrix Dynamic question. You can disable removing and clear the data instead.
|
64797
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64798
|
-
* - `options.question` - a matrix question.
|
64799
|
-
* - `options.rowIndex` - a row index.
|
64800
|
-
* - `options.row` - a row object.
|
64801
|
-
* - `options.allow` - a boolean property. Set it to `false` to disable the row removing.
|
64802
64788
|
* @see QuestionMatrixDynamicModel
|
64803
64789
|
* @see onMatrixRowRemoved
|
64804
64790
|
* @see onMatrixAllowRemoveRow
|
@@ -64806,10 +64792,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64806
64792
|
_this.onMatrixRowRemoving = _this.addEvent();
|
64807
64793
|
/**
|
64808
64794
|
* An event that is raised on removing a row from Matrix Dynamic question.
|
64809
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64810
|
-
* - `options.question` - a matrix question
|
64811
|
-
* - `options.rowIndex` - a removed row index
|
64812
|
-
* - `options.row` - a removed row object
|
64813
64795
|
* @see QuestionMatrixDynamicModel
|
64814
64796
|
* @see QuestionMatrixDynamicModel.visibleRows
|
64815
64797
|
* @see onMatrixRowRemoving
|
@@ -64818,11 +64800,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64818
64800
|
_this.onMatrixRowRemoved = _this.addEvent();
|
64819
64801
|
/**
|
64820
64802
|
* An event that is raised before rendering "Remove" button for removing a row from Matrix Dynamic question.
|
64821
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64822
|
-
* - `options.question` - a matrix question.
|
64823
|
-
* - `options.rowIndex` - a row index.
|
64824
|
-
* - `options.row` - a row object.
|
64825
|
-
* - `options.allow` - a boolean property. Set it to `false` to disable the row removing.
|
64826
64803
|
* @see QuestionMatrixDynamicModel
|
64827
64804
|
* @see onMatrixRowRemoving
|
64828
64805
|
* @see onMatrixRowRemoved
|
@@ -64830,13 +64807,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64830
64807
|
_this.onMatrixAllowRemoveRow = _this.addEvent();
|
64831
64808
|
/**
|
64832
64809
|
* An event that is raised before creating cell question in the matrix. You can change the cell question type by setting different options.cellType.
|
64833
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64834
|
-
* - `options.question` - the matrix question.
|
64835
|
-
* - `options.cellType` - the cell question type. You can change it.
|
64836
|
-
* - `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
|
64837
|
-
* - `options.column` - the matrix column object.
|
64838
|
-
* - `options.columnName` - the matrix column name.
|
64839
|
-
* - `options.row` - the matrix row object.
|
64840
64810
|
* @see onMatrixBeforeRowAdded
|
64841
64811
|
* @see onMatrixCellCreated
|
64842
64812
|
* @see QuestionMatrixDynamicModel
|
@@ -64845,14 +64815,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64845
64815
|
_this.onMatrixCellCreating = _this.addEvent();
|
64846
64816
|
/**
|
64847
64817
|
* An event that is raised for every cell created in Matrix Dynamic and Matrix Dropdown questions.
|
64848
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64849
|
-
* - `options.question` - the matrix question.
|
64850
|
-
* - `options.cell` - the matrix cell.
|
64851
|
-
* - `options.cellQuestion` - the question/editor in the cell. You may customize it, change it's properties, like choices or visible.
|
64852
|
-
* - `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
|
64853
|
-
* - `options.column` - the matrix column object.
|
64854
|
-
* - `options.columnName` - the matrix column name.
|
64855
|
-
* - `options.row` - the matrix row object.
|
64856
64818
|
* @see onMatrixBeforeRowAdded
|
64857
64819
|
* @see onMatrixCellCreating
|
64858
64820
|
* @see onMatrixRowAdded
|
@@ -64862,13 +64824,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64862
64824
|
_this.onMatrixCellCreated = _this.addEvent();
|
64863
64825
|
/**
|
64864
64826
|
* An event that is raised for every cell after is has been rendered in DOM.
|
64865
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64866
|
-
* - `options.question` - the matrix question.
|
64867
|
-
* - `options.cell` - the matrix cell.
|
64868
|
-
* - `options.cellQuestion` - the question/editor in the cell.
|
64869
|
-
* - `options.htmlElement` - an HTML element bound to the `cellQuestion` object.
|
64870
|
-
* - `options.column` - the matrix column object.
|
64871
|
-
* - `options.row` - the matrix row object.
|
64872
64827
|
* @see onMatrixCellCreated
|
64873
64828
|
* @see QuestionMatrixDynamicModel
|
64874
64829
|
* @see QuestionMatrixDropdownModel
|
@@ -64876,12 +64831,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64876
64831
|
_this.onMatrixAfterCellRender = _this.addEvent();
|
64877
64832
|
/**
|
64878
64833
|
* An event that is raised when cell value is changed in Matrix Dynamic and Matrix Dropdown questions.
|
64879
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64880
|
-
* - `options.question` - the matrix question.
|
64881
|
-
* - `options.columnName` - the matrix column name.
|
64882
|
-
* - `options.value` - a new value.
|
64883
|
-
* - `options.row` - the matrix row object.
|
64884
|
-
* - `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
|
64885
64834
|
* @see onMatrixCellValueChanging
|
64886
64835
|
* @see onMatrixBeforeRowAdded
|
64887
64836
|
* @see onMatrixRowAdded
|
@@ -64891,13 +64840,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64891
64840
|
_this.onMatrixCellValueChanged = _this.addEvent();
|
64892
64841
|
/**
|
64893
64842
|
* An event that is raised on changing cell value in Matrix Dynamic and Matrix Dropdown questions. You may change the `options.value` property to change a cell value.
|
64894
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64895
|
-
* - `options.question` - the matrix question.
|
64896
|
-
* - `options.columnName` - the matrix column name.
|
64897
|
-
* - `options.value` - a new value.
|
64898
|
-
* - `options.oldValue` - the old value.
|
64899
|
-
* - `options.row` - the matrix row object.
|
64900
|
-
* - `options.getCellQuestion(columnName)` - the function that returns a cell question by column name.
|
64901
64843
|
* @see onMatrixCellValueChanged
|
64902
64844
|
* @see onMatrixBeforeRowAdded
|
64903
64845
|
* @see onMatrixRowAdded
|
@@ -64907,13 +64849,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64907
64849
|
_this.onMatrixCellValueChanging = _this.addEvent();
|
64908
64850
|
/**
|
64909
64851
|
* An event that is raised when Matrix Dynamic and Matrix Dropdown questions validate the cell value.
|
64910
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64911
|
-
* - `options.error` - an error string. It is empty by default.
|
64912
|
-
* - `options.question` - the matrix question.
|
64913
|
-
* - `options.columnName` - the matrix column name.
|
64914
|
-
* - `options.value` - a cell value.
|
64915
|
-
* - `options.row` - the matrix row object.
|
64916
|
-
* - `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
|
64917
64852
|
* @see onMatrixBeforeRowAdded
|
64918
64853
|
* @see onMatrixRowAdded
|
64919
64854
|
* @see QuestionMatrixDynamicModel
|
@@ -64922,63 +64857,22 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64922
64857
|
_this.onMatrixCellValidate = _this.addEvent();
|
64923
64858
|
/**
|
64924
64859
|
* An event that is raised on adding a new column in Matrix Dynamic or Matrix Dropdown question.
|
64925
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64926
|
-
* - `options.question` - a matrix question.
|
64927
|
-
* - `options.column` - a new added column.
|
64928
64860
|
*/
|
64929
64861
|
_this.onMatrixColumnAdded = _this.addEvent();
|
64930
64862
|
/**
|
64931
64863
|
* An event that is raised on adding a new item in Multiple Text question.
|
64932
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64933
|
-
* - `options.question` - a multiple text question.
|
64934
|
-
* - `options.item` - a new added item.
|
64935
64864
|
*/
|
64936
64865
|
_this.onMultipleTextItemAdded = _this.addEvent();
|
64937
64866
|
/**
|
64938
64867
|
* An event that is raised after a new panel is added to a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
64939
|
-
*
|
64940
|
-
* Parameters:
|
64941
|
-
*
|
64942
|
-
* - `sender`: `SurveyModel`\
|
64943
|
-
* A survey instance that raised the event.
|
64944
|
-
* - `options.question`: [`QuestionPanelDynamicModel`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model)\
|
64945
|
-
* A Dynamic Panel question.
|
64946
|
-
* - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
|
64947
|
-
* An added panel.
|
64948
|
-
* - `options.panelIndex`: `Number`\
|
64949
|
-
* The panel's index within Dynamic Panel.
|
64950
64868
|
*/
|
64951
64869
|
_this.onDynamicPanelAdded = _this.addEvent();
|
64952
64870
|
/**
|
64953
64871
|
* An event that is raised after a panel is deleted from a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
64954
|
-
*
|
64955
|
-
* Parameters:
|
64956
|
-
*
|
64957
|
-
* - `sender`: `SurveyModel`\
|
64958
|
-
* A survey instance that raised the event.
|
64959
|
-
* - `options.question`: [`QuestionPanelDynamicModel`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model)\
|
64960
|
-
* A Dynamic Panel question.
|
64961
|
-
* - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
|
64962
|
-
* A deleted panel.
|
64963
|
-
* - `options.panelIndex`: `Number`\
|
64964
|
-
* The panel's index within Dynamic Panel.
|
64965
64872
|
*/
|
64966
64873
|
_this.onDynamicPanelRemoved = _this.addEvent();
|
64967
64874
|
/**
|
64968
64875
|
* An event that is raised before a panel is deleted from a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question. Use this event to cancel the deletion.
|
64969
|
-
*
|
64970
|
-
* Parameters:
|
64971
|
-
*
|
64972
|
-
* - `sender`: `SurveyModel`\
|
64973
|
-
* A survey instance that raised the event.
|
64974
|
-
* - `options.question`: [`QuestionPanelDynamicModel`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model)\
|
64975
|
-
* A Dynamic Panel question.
|
64976
|
-
* - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
|
64977
|
-
* A panel to be deleted.
|
64978
|
-
* - `options.panelIndex`: `Number`\
|
64979
|
-
* The panel's index within Dynamic Panel.
|
64980
|
-
* - `options.allow`: `Boolean`\
|
64981
|
-
* Set this property to `false` if you want to cancel the panel deletion.
|
64982
64876
|
*/
|
64983
64877
|
_this.onDynamicPanelRemoving = _this.addEvent();
|
64984
64878
|
/**
|
@@ -64990,126 +64884,68 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
64990
64884
|
_this.onTimer = _this.addEvent();
|
64991
64885
|
/**
|
64992
64886
|
* An event that is raised before displaying a new information in the Timer Panel. Use it to change the default text.
|
64993
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
64994
|
-
* - `options.text` - the timer panel info text.
|
64995
64887
|
*/
|
64996
64888
|
_this.onTimerPanelInfoText = _this.addEvent();
|
64997
64889
|
/**
|
64998
64890
|
* An event that is raised after an item value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
64999
|
-
*
|
65000
|
-
* Parameters:
|
65001
|
-
*
|
65002
|
-
* - `sender`: `SurveyModel`\
|
65003
|
-
* A survey instance that raised the event.
|
65004
|
-
* - `options.question`: [`QuestionPanelDynamicModel`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model)\
|
65005
|
-
* A Dynamic Panel question.
|
65006
|
-
* - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
|
65007
|
-
* A panel that nests the item with a changed value.
|
65008
|
-
* - `options.name`: `String`\
|
65009
|
-
* The item's name.
|
65010
|
-
* - `options.value`: `any`\
|
65011
|
-
* The item's new value.
|
65012
|
-
* - `options.panelIndex`: `Number`\
|
65013
|
-
* The panel's index within Dynamic Panel.
|
65014
|
-
* - `options.panelData`: `Object`\
|
65015
|
-
* The panel's data object that includes all item values.
|
65016
64891
|
*/
|
65017
64892
|
_this.onDynamicPanelItemValueChanged = _this.addEvent();
|
65018
64893
|
/**
|
65019
64894
|
* Use this event to define, whether an answer to a question is correct or not.
|
65020
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
65021
|
-
* - `options.question` - a question on which you have to decide if the answer is correct or not.
|
65022
|
-
* - `options.result` - returns `true`, if an answer is correct, or `false`, if the answer is not correct. Use questions' `value` and `correctAnswer` properties to return the correct value.
|
65023
|
-
* - `options.correctAnswers` - you may change the default number of correct or incorrect answers in the question, for example for matrix, where each row is a quiz question.
|
65024
64895
|
* @see Question.value
|
65025
64896
|
* @see Question.correctAnswer
|
65026
64897
|
*/
|
65027
64898
|
_this.onIsAnswerCorrect = _this.addEvent();
|
65028
64899
|
/**
|
65029
64900
|
* Use this event to control drag&drop operations during design mode.
|
65030
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
65031
|
-
* - `options.allow` - set it to `false` to disable dragging.
|
65032
|
-
* - `options.target` - a target element that is dragged.
|
65033
|
-
* - `options.source` - a source element. It can be `null`, if it is a new element, dragging from toolbox.
|
65034
|
-
* - `options.parent` - a page or panel where target element is dragging.
|
65035
|
-
* - `options.insertBefore` - an element before the target element is dragging. It can be `null` if parent container (page or panel) is empty or dragging an element after the last element in a container.
|
65036
|
-
* - `options.insertAfter` - an element after the target element is dragging. It can be `null` if parent container (page or panel) is empty or dragging element to the first position within the parent container.
|
65037
64901
|
* @see setDesignMode
|
65038
64902
|
* @see isDesignMode
|
65039
64903
|
*/
|
65040
64904
|
_this.onDragDropAllow = _this.addEvent();
|
65041
64905
|
/**
|
65042
64906
|
* Use this event to control scrolling element to top. You can cancel the default behavior by setting options.cancel property to true.
|
65043
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
65044
|
-
* - `options.element` - an element that is going to be scrolled on top.
|
65045
|
-
* - `options.question` - a question that is going to be scrolled on top. It can be null if options.page is not null.
|
65046
|
-
* - `options.page` - a page that is going to be scrolled on top. It can be null if options.question is not null.
|
65047
|
-
* - `options.elementId` - the unique element DOM Id.
|
65048
|
-
* - `options.cancel` - set this property to true to cancel the default scrolling.
|
65049
64907
|
*/
|
65050
64908
|
_this.onScrollingElementToTop = _this.addEvent();
|
65051
64909
|
_this.onLocaleChangedEvent = _this.addEvent();
|
65052
64910
|
/**
|
65053
64911
|
* Use this event to create/customize actions to be displayed in a question's title.
|
65054
|
-
*
|
65055
|
-
*
|
65056
|
-
* - `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed question.
|
65057
|
-
* @see IAction
|
65058
|
-
* @see Question
|
64912
|
+
*
|
64913
|
+
* For information on event handler parameters, refer to descriptions within the interface.
|
65059
64914
|
*
|
65060
64915
|
* [View Demo](https://surveyjs.io/form-library/examples/survey-titleactions/ (linkStyle))
|
65061
|
-
|
64916
|
+
* @see IAction
|
64917
|
+
* @see Question
|
64918
|
+
*/
|
65062
64919
|
_this.onGetQuestionTitleActions = _this.addEvent();
|
65063
64920
|
/**
|
65064
64921
|
* Use this event to create/customize actions to be displayed in a panel's title.
|
65065
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
65066
|
-
* - `options.panel` - A panel ([PanelModel](https://surveyjs.io/Documentation/Library?id=panelmodel) object) for which the event is fired.
|
65067
|
-
* - `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed panel.
|
65068
64922
|
* @see IAction
|
65069
64923
|
* @see PanelModel
|
65070
64924
|
*/
|
65071
64925
|
_this.onGetPanelTitleActions = _this.addEvent();
|
65072
64926
|
/**
|
65073
64927
|
* Use this event to create/customize actions to be displayed in a page's title.
|
65074
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
65075
|
-
* - `options.page` - A page ([PageModel](https://surveyjs.io/Documentation/Library?id=pagemodel) object) for which the event is fired.
|
65076
|
-
* - `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed page.
|
65077
64928
|
* @see IAction
|
65078
64929
|
* @see PageModel
|
65079
64930
|
*/
|
65080
64931
|
_this.onGetPageTitleActions = _this.addEvent();
|
65081
64932
|
/**
|
65082
64933
|
* An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel).
|
65083
|
-
*
|
65084
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
65085
|
-
* - `options.panel` - A Panel whose actions are being modified.
|
65086
|
-
* - `options.actions` - An array of panel [actions](https://surveyjs.io/form-library/documentation/iaction). You can modify the entire array or individual actions within it.
|
65087
|
-
* - `options.question` - A [Dynamic Panel](https://surveyjs.io/form-library/documentation/questionpaneldynamicmodel) to which the Panel belongs. This field is `undefined` if the Panel does not belong to any Dynamic Panel.
|
65088
64934
|
*/
|
65089
64935
|
_this.onGetPanelFooterActions = _this.addEvent();
|
65090
64936
|
/**
|
65091
64937
|
* Use this event to create/customize actions to be displayed in a matrix question's row.
|
65092
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
65093
|
-
* - `options.question` - A matrix question ([QuestionMatrixBaseModel](https://surveyjs.io/Documentation/Library?id=questionmatrixbasemodel) object) for which the event is fired.
|
65094
|
-
* - `options.row` - A matrix row for which the event is fired.
|
65095
|
-
* - `options.actions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed matrix question and row.
|
65096
64938
|
* @see IAction
|
65097
64939
|
* @see QuestionMatrixDropdownModelBase
|
65098
64940
|
*/
|
65099
64941
|
_this.onGetMatrixRowActions = _this.addEvent();
|
65100
64942
|
/**
|
65101
64943
|
* An event that is raised after the survey element content was collapsed or expanded.
|
65102
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
65103
|
-
* - `options.element` - Specifies which survey element content was collapsed or expanded.
|
65104
64944
|
* @see onElementContentVisibilityChanged
|
65105
64945
|
*/
|
65106
64946
|
_this.onElementContentVisibilityChanged = _this.addEvent();
|
65107
64947
|
/**
|
65108
64948
|
* An event that is raised before expression question convert it's value into display value for rendering.
|
65109
|
-
* - `sender`: `SurveyModel` - A survey instance that raised the event.
|
65110
|
-
* - `options.question` - The expression question.
|
65111
|
-
* - `options.value` - The question value.
|
65112
|
-
* - `options.displayValue` - the display value that you can change before rendering.
|
65113
64949
|
*/
|
65114
64950
|
_this.onGetExpressionDisplayValue = _this.addEvent();
|
65115
64951
|
/**
|
@@ -67860,7 +67696,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
67860
67696
|
}
|
67861
67697
|
};
|
67862
67698
|
SurveyModel.prototype.notify = function (message, type) {
|
67863
|
-
this.notifier.notify(message, type);
|
67699
|
+
this.notifier.notify(message, type, type === "error");
|
67864
67700
|
};
|
67865
67701
|
/**
|
67866
67702
|
* Clears the survey data and state. If the survey has a `completed` state, it will get a `running` state.
|
@@ -68933,6 +68769,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
68933
68769
|
this.isCompleted = false;
|
68934
68770
|
return false;
|
68935
68771
|
}
|
68772
|
+
this.checkOnPageTriggers(true);
|
68936
68773
|
var previousCookie = this.hasCookie;
|
68937
68774
|
this.stopTimer();
|
68938
68775
|
this.isCompleted = true;
|
@@ -69108,7 +68945,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
69108
68945
|
};
|
69109
68946
|
SurveyModel.prototype.doNextPage = function () {
|
69110
68947
|
var curPage = this.currentPage;
|
69111
|
-
this.checkOnPageTriggers();
|
68948
|
+
this.checkOnPageTriggers(false);
|
69112
68949
|
if (!this.isCompleted) {
|
69113
68950
|
if (this.sendResultOnPageNext) {
|
69114
68951
|
this.sendResult(this.surveyPostId, this.clientId, true);
|
@@ -69523,7 +69360,6 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
69523
69360
|
this.onDynamicPanelItemValueChanged.fire(this, options);
|
69524
69361
|
};
|
69525
69362
|
SurveyModel.prototype.dragAndDropAllow = function (options) {
|
69526
|
-
options.allow = true;
|
69527
69363
|
this.onDragDropAllow.fire(this, options);
|
69528
69364
|
return options.allow;
|
69529
69365
|
};
|
@@ -70082,7 +69918,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
70082
69918
|
questions[i].onSurveyValueChanged(this.getValue(questions[i].getValueName()));
|
70083
69919
|
}
|
70084
69920
|
};
|
70085
|
-
SurveyModel.prototype.checkOnPageTriggers = function () {
|
69921
|
+
SurveyModel.prototype.checkOnPageTriggers = function (isOnComplete) {
|
70086
69922
|
var questions = this.getCurrentPageQuestions(true);
|
70087
69923
|
var values = {};
|
70088
69924
|
for (var i = 0; i < questions.length; i++) {
|
@@ -70107,7 +69943,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
70107
69943
|
}
|
70108
69944
|
return result;
|
70109
69945
|
};
|
70110
|
-
SurveyModel.prototype.checkTriggers = function (key, isOnNextPage) {
|
69946
|
+
SurveyModel.prototype.checkTriggers = function (key, isOnNextPage, isOnComplete) {
|
69947
|
+
if (isOnComplete === void 0) { isOnComplete = false; }
|
70111
69948
|
if (this.isCompleted || this.triggers.length == 0 || this.isDisplayMode)
|
70112
69949
|
return;
|
70113
69950
|
if (this.isTriggerIsRunning) {
|
@@ -70124,7 +69961,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
70124
69961
|
var prevCanBeCompleted = this.canBeCompletedByTrigger;
|
70125
69962
|
this.canBeCompletedByTrigger = false;
|
70126
69963
|
for (var i = 0; i < this.triggers.length; i++) {
|
70127
|
-
this.triggers[i].checkExpression(isOnNextPage, this.triggerKeys, this.triggerValues, properties);
|
69964
|
+
this.triggers[i].checkExpression(isOnNextPage, isOnComplete, this.triggerKeys, this.triggerValues, properties);
|
70128
69965
|
}
|
70129
69966
|
if (prevCanBeCompleted !== this.canBeCompletedByTrigger) {
|
70130
69967
|
this.updateButtonsVisibility();
|
@@ -71444,11 +71281,12 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
71444
71281
|
};
|
71445
71282
|
Object.defineProperty(SurveyModel.prototype, "timeSpent", {
|
71446
71283
|
/**
|
71447
|
-
*
|
71284
|
+
* Gets or set the time in seconds an end user spends on the survey.
|
71448
71285
|
* @see startTimer
|
71449
71286
|
* @see PageModel.timeSpent
|
71450
71287
|
*/
|
71451
71288
|
get: function () { return this.timerModel.spent; },
|
71289
|
+
set: function (val) { this.timerModel.spent = val; },
|
71452
71290
|
enumerable: false,
|
71453
71291
|
configurable: true
|
71454
71292
|
});
|
@@ -72131,34 +71969,37 @@ var surveyLocalization = {
|
|
72131
71969
|
getLocaleStrings: function (loc) {
|
72132
71970
|
return this.locales[loc];
|
72133
71971
|
},
|
72134
|
-
getCurrentStrings: function (locale) {
|
72135
|
-
var loc = locale && this.locales[locale];
|
72136
|
-
if (!loc)
|
72137
|
-
loc = this.currentLocale ? this.locales[this.currentLocale] : this.locales[this.defaultLocale];
|
72138
|
-
if (!loc)
|
72139
|
-
loc = this.locales[this.defaultLocale];
|
72140
|
-
if (!loc)
|
72141
|
-
loc = this.locales["en"];
|
72142
|
-
return loc;
|
72143
|
-
},
|
72144
71972
|
getString: function (strName, locale) {
|
71973
|
+
var _this = this;
|
72145
71974
|
if (locale === void 0) { locale = null; }
|
72146
|
-
var
|
72147
|
-
|
72148
|
-
|
72149
|
-
|
72150
|
-
|
72151
|
-
|
72152
|
-
|
72153
|
-
|
72154
|
-
|
72155
|
-
|
72156
|
-
|
72157
|
-
|
72158
|
-
|
72159
|
-
|
72160
|
-
|
72161
|
-
|
71975
|
+
var locs = new Array();
|
71976
|
+
var addLocaleCore = function (locName) {
|
71977
|
+
var strs = _this.locales[locName];
|
71978
|
+
if (!!strs)
|
71979
|
+
locs.push(strs);
|
71980
|
+
};
|
71981
|
+
var addLocale = function (locName) {
|
71982
|
+
if (!locName)
|
71983
|
+
return;
|
71984
|
+
addLocaleCore(locName);
|
71985
|
+
var index = locName.indexOf("-");
|
71986
|
+
if (index < 1)
|
71987
|
+
return;
|
71988
|
+
locName = locName.substring(0, index);
|
71989
|
+
addLocaleCore(locName);
|
71990
|
+
};
|
71991
|
+
addLocale(locale);
|
71992
|
+
addLocale(this.currentLocale);
|
71993
|
+
addLocale(this.defaultLocale);
|
71994
|
+
if (this.defaultLocale !== "en") {
|
71995
|
+
addLocaleCore("en");
|
71996
|
+
}
|
71997
|
+
for (var i = 0; i < locs.length; i++) {
|
71998
|
+
var res = locs[i][strName];
|
71999
|
+
if (res !== undefined)
|
72000
|
+
return res;
|
72001
|
+
}
|
72002
|
+
return this.onGetExternalString(strName, locale);
|
72162
72003
|
},
|
72163
72004
|
getLocales: function (removeDefaultLoc) {
|
72164
72005
|
if (removeDefaultLoc === void 0) { removeDefaultLoc = false; }
|
@@ -72440,13 +72281,14 @@ function createTOCListModel(survey) {
|
|
72440
72281
|
});
|
72441
72282
|
var listModel = new _list__WEBPACK_IMPORTED_MODULE_1__["ListModel"](items, function (item) {
|
72442
72283
|
if (!!item.action()) {
|
72443
|
-
listModel.allowSelection = true;
|
72444
72284
|
listModel.selectedItem = item;
|
72445
|
-
listModel.allowSelection = false;
|
72446
72285
|
}
|
72447
72286
|
}, true, items.filter(function (i) { return i.id === survey.currentPage.name; })[0]);
|
72448
72287
|
listModel.allowSelection = false;
|
72449
72288
|
listModel.locOwner = survey;
|
72289
|
+
survey.onCurrentPageChanged.add(function (s, o) {
|
72290
|
+
listModel.selectedItem = items.filter(function (i) { return i.id === survey.currentPage.name; })[0];
|
72291
|
+
});
|
72450
72292
|
return listModel;
|
72451
72293
|
}
|
72452
72294
|
|
@@ -73032,11 +72874,16 @@ var Trigger = /** @class */ (function (_super) {
|
|
73032
72874
|
Trigger.prototype.canBeExecuted = function (isOnNextPage) {
|
73033
72875
|
return true;
|
73034
72876
|
};
|
73035
|
-
Trigger.prototype.
|
72877
|
+
Trigger.prototype.canBeExecutedOnComplete = function () {
|
72878
|
+
return false;
|
72879
|
+
};
|
72880
|
+
Trigger.prototype.checkExpression = function (isOnNextPage, isOnComplete, keys, values, properties) {
|
73036
72881
|
if (properties === void 0) { properties = null; }
|
73037
72882
|
this.isExecutingOnNextPage = isOnNextPage;
|
73038
72883
|
if (!this.canBeExecuted(isOnNextPage))
|
73039
72884
|
return;
|
72885
|
+
if (isOnComplete && !this.canBeExecutedOnComplete())
|
72886
|
+
return;
|
73040
72887
|
if (!this.isCheckRequired(keys))
|
73041
72888
|
return;
|
73042
72889
|
if (!!this.conditionRunner) {
|