survey-react 1.9.122 → 1.9.124
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/README.md +1 -1
- package/defaultV2.css +79 -33
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +3 -3
- package/modern.css +2 -9
- package/modern.css.map +1 -1
- package/modern.min.css +3 -3
- package/package.json +1 -1
- package/survey.css +2 -2
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +656 -643
- package/survey.react.js +517 -273
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +4 -4
package/survey.react.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
3
|
-
* Copyright (c) 2015-
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.124
|
3
|
+
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
6
6
|
(function webpackUniversalModuleDefinition(root, factory) {
|
@@ -1964,6 +1964,13 @@ var Base = /** @class */ (function () {
|
|
1964
1964
|
enumerable: false,
|
1965
1965
|
configurable: true
|
1966
1966
|
});
|
1967
|
+
Object.defineProperty(Base.prototype, "isDesignModeV2", {
|
1968
|
+
get: function () {
|
1969
|
+
return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].supportCreatorV2 && this.isDesignMode;
|
1970
|
+
},
|
1971
|
+
enumerable: false,
|
1972
|
+
configurable: true
|
1973
|
+
});
|
1967
1974
|
Object.defineProperty(Base.prototype, "inSurvey", {
|
1968
1975
|
/**
|
1969
1976
|
* Returns `true` if the object is included in a survey.
|
@@ -2029,10 +2036,12 @@ var Base = /** @class */ (function () {
|
|
2029
2036
|
* The JSON object should contain only serializable properties of this SurveyJS object. Event handlers and properties that do not belong to the SurveyJS object are ignored.
|
2030
2037
|
*
|
2031
2038
|
* @param json A JSON object with properties that you want to apply to the current SurveyJS object.
|
2039
|
+
* @param options An object with configuration options.
|
2040
|
+
* @param {boolean} options.validatePropertyValues Pass `true` if you want to validate property values. Use the [`jsonErrors`](#jsonErrors) array to access validation errors.
|
2032
2041
|
* @see toJSON
|
2033
2042
|
*/
|
2034
|
-
Base.prototype.fromJSON = function (json) {
|
2035
|
-
new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toObject(json, this);
|
2043
|
+
Base.prototype.fromJSON = function (json, options) {
|
2044
|
+
new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toObject(json, this, options);
|
2036
2045
|
this.onSurveyLoad();
|
2037
2046
|
};
|
2038
2047
|
Base.prototype.onSurveyLoad = function () { };
|
@@ -2137,6 +2146,7 @@ var Base = /** @class */ (function () {
|
|
2137
2146
|
Base.prototype.resetPropertyValue = function (name) {
|
2138
2147
|
var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
|
2139
2148
|
if (locStr) {
|
2149
|
+
this.setLocalizableStringText(name, undefined);
|
2140
2150
|
locStr.clear();
|
2141
2151
|
}
|
2142
2152
|
else {
|
@@ -3135,7 +3145,7 @@ var XmlParser = /** @class */ (function () {
|
|
3135
3145
|
* }
|
3136
3146
|
* ```
|
3137
3147
|
*
|
3138
|
-
* Typically, you should assign this object to a question's [`choicesByUrl`](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choicesByUrl) property.
|
3148
|
+
* Typically, you should assign this object to a question's [`choicesByUrl`](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choicesByUrl) property. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
|
3139
3149
|
*/
|
3140
3150
|
var ChoicesRestful = /** @class */ (function (_super) {
|
3141
3151
|
__extends(ChoicesRestful, _super);
|
@@ -3150,6 +3160,10 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
3150
3160
|
_this.createItemValue = function (value) {
|
3151
3161
|
return new _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"](value);
|
3152
3162
|
};
|
3163
|
+
_this.registerPropertyChangedHandlers(["url"], function () {
|
3164
|
+
if (_this.owner)
|
3165
|
+
_this.owner.setPropertyValue("isUsingRestful", !!_this.url);
|
3166
|
+
});
|
3153
3167
|
return _this;
|
3154
3168
|
}
|
3155
3169
|
Object.defineProperty(ChoicesRestful, "EncodeParameters", {
|
@@ -3193,6 +3207,16 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
3193
3207
|
}
|
3194
3208
|
}
|
3195
3209
|
};
|
3210
|
+
Object.defineProperty(ChoicesRestful, "onBeforeSendRequest", {
|
3211
|
+
get: function () {
|
3212
|
+
return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices;
|
3213
|
+
},
|
3214
|
+
set: function (val) {
|
3215
|
+
_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices = val;
|
3216
|
+
},
|
3217
|
+
enumerable: false,
|
3218
|
+
configurable: true
|
3219
|
+
});
|
3196
3220
|
ChoicesRestful.getCachedItemsResult = function (obj) {
|
3197
3221
|
var hash = obj.objHash;
|
3198
3222
|
var res = ChoicesRestful.itemsResult[hash];
|
@@ -3329,8 +3353,8 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
3329
3353
|
}
|
3330
3354
|
};
|
3331
3355
|
var options = { request: xhr };
|
3332
|
-
if (!!
|
3333
|
-
|
3356
|
+
if (!!_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices) {
|
3357
|
+
_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices(this, options);
|
3334
3358
|
}
|
3335
3359
|
this.beforeSendRequest();
|
3336
3360
|
options.request.send();
|
@@ -3432,7 +3456,7 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
3432
3456
|
* @see titleName
|
3433
3457
|
*/
|
3434
3458
|
get: function () {
|
3435
|
-
return this.getPropertyValue("url"
|
3459
|
+
return this.getPropertyValue("url") || "";
|
3436
3460
|
},
|
3437
3461
|
set: function (val) {
|
3438
3462
|
this.setPropertyValue("url", val);
|
@@ -3470,8 +3494,7 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
3470
3494
|
* @see titleName
|
3471
3495
|
*/
|
3472
3496
|
get: function () {
|
3473
|
-
|
3474
|
-
return !!res ? res : "";
|
3497
|
+
return this.getPropertyValue("path") || "";
|
3475
3498
|
},
|
3476
3499
|
set: function (val) {
|
3477
3500
|
this.setPropertyValue("path", val);
|
@@ -3533,6 +3556,11 @@ var ChoicesRestful = /** @class */ (function (_super) {
|
|
3533
3556
|
configurable: true
|
3534
3557
|
});
|
3535
3558
|
Object.defineProperty(ChoicesRestful.prototype, "allowEmptyResponse", {
|
3559
|
+
/**
|
3560
|
+
* Specifies whether the service is allowed to return an empty response or an empty array in a response.
|
3561
|
+
*
|
3562
|
+
* Default value: `false`
|
3563
|
+
*/
|
3536
3564
|
get: function () {
|
3537
3565
|
return this.getPropertyValue("allowEmptyResponse");
|
3538
3566
|
},
|
@@ -3767,10 +3795,10 @@ var ChoicesRestfull = /** @class */ (function (_super) {
|
|
3767
3795
|
};
|
3768
3796
|
Object.defineProperty(ChoicesRestfull, "onBeforeSendRequest", {
|
3769
3797
|
get: function () {
|
3770
|
-
return
|
3798
|
+
return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices;
|
3771
3799
|
},
|
3772
3800
|
set: function (val) {
|
3773
|
-
|
3801
|
+
_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].web.onBeforeRequestChoices = val;
|
3774
3802
|
},
|
3775
3803
|
enumerable: false,
|
3776
3804
|
configurable: true
|
@@ -6128,8 +6156,6 @@ var DragDropInfo = /** @class */ (function () {
|
|
6128
6156
|
__webpack_require__.r(__webpack_exports__);
|
6129
6157
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPageHelperV1", function() { return DragDropPageHelperV1; });
|
6130
6158
|
/* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
|
6131
|
-
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
6132
|
-
|
6133
6159
|
|
6134
6160
|
var DragDropPageHelperV1 = /** @class */ (function () {
|
6135
6161
|
function DragDropPageHelperV1(page) {
|
@@ -6227,7 +6253,7 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
6227
6253
|
var elementsToResetSWNL = [];
|
6228
6254
|
if (!isCancel && !!row) {
|
6229
6255
|
var isSamePanel = false;
|
6230
|
-
if (this.page.
|
6256
|
+
if (this.page.isDesignModeV2) {
|
6231
6257
|
var srcRow = src && src.parent && src.parent.dragDropFindRow(src);
|
6232
6258
|
if (row.panel.elements[targetIndex] && row.panel.elements[targetIndex].startWithNewLine && row.elements.length > 1 && row.panel.elements[targetIndex] === dest) {
|
6233
6259
|
elementsToSetSWNL.push(target);
|
@@ -6246,8 +6272,8 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
6246
6272
|
elementsToResetSWNL.push(target);
|
6247
6273
|
}
|
6248
6274
|
}
|
6275
|
+
this.page.survey.startMovingQuestion();
|
6249
6276
|
if (!!src && !!src.parent) {
|
6250
|
-
this.page.survey.startMovingQuestion();
|
6251
6277
|
isSamePanel = row.panel == src.parent;
|
6252
6278
|
if (isSamePanel) {
|
6253
6279
|
row.panel.dragDropMoveElement(src, target, targetIndex);
|
@@ -6290,7 +6316,7 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
6290
6316
|
var destination = this.dragDropInfo.destination;
|
6291
6317
|
if (!this.dragDropCanDropCore(source, destination))
|
6292
6318
|
return false;
|
6293
|
-
if (this.page.
|
6319
|
+
if (this.page.isDesignModeV2) {
|
6294
6320
|
var rowSource = this.page.dragDropFindRow(source);
|
6295
6321
|
var rowDestination = this.page.dragDropFindRow(destination);
|
6296
6322
|
if (rowSource !== rowDestination) {
|
@@ -6356,8 +6382,6 @@ var DragDropPageHelperV1 = /** @class */ (function () {
|
|
6356
6382
|
__webpack_require__.r(__webpack_exports__);
|
6357
6383
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropPanelHelperV1", function() { return DragDropPanelHelperV1; });
|
6358
6384
|
/* harmony import */ var _drag_drop_helper_v1__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag-drop-helper-v1 */ "./src/drag-drop-helper-v1.ts");
|
6359
|
-
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
6360
|
-
|
6361
6385
|
|
6362
6386
|
var DragDropPanelHelperV1 = /** @class */ (function () {
|
6363
6387
|
function DragDropPanelHelperV1(panel) {
|
@@ -6462,7 +6486,7 @@ var DragDropPanelHelperV1 = /** @class */ (function () {
|
|
6462
6486
|
var index = destRow.elements.indexOf(dragDropInfo.destination);
|
6463
6487
|
if (index == 0 &&
|
6464
6488
|
!dragDropInfo.isBottom) {
|
6465
|
-
if (this.panel.
|
6489
|
+
if (this.panel.isDesignModeV2) {
|
6466
6490
|
}
|
6467
6491
|
else if (destRow.elements[0].startWithNewLine) {
|
6468
6492
|
if (destRow.index > 0) {
|
@@ -6500,7 +6524,7 @@ var DragDropPanelHelperV1 = /** @class */ (function () {
|
|
6500
6524
|
};
|
6501
6525
|
DragDropPanelHelperV1.prototype.dragDropAddTargetToNewRow = function (dragDropInfo, destRow, prevRow) {
|
6502
6526
|
var targetRow = destRow.panel.createRowAndSetLazy(destRow.panel.rows.length);
|
6503
|
-
if (this.panel.
|
6527
|
+
if (this.panel.isDesignModeV2) {
|
6504
6528
|
targetRow.setIsLazyRendering(false);
|
6505
6529
|
}
|
6506
6530
|
targetRow.addElement(dragDropInfo.target);
|
@@ -9426,8 +9450,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9426
9450
|
//import "../../modern.scss";
|
9427
9451
|
var Version;
|
9428
9452
|
var ReleaseDate;
|
9429
|
-
Version = "" + "1.9.
|
9430
|
-
ReleaseDate = "" + "
|
9453
|
+
Version = "" + "1.9.124";
|
9454
|
+
ReleaseDate = "" + "2024-01-04";
|
9431
9455
|
function checkLibraryVersion(ver, libraryName) {
|
9432
9456
|
if (Version != ver) {
|
9433
9457
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -10550,7 +10574,7 @@ var defaultBootstrapMaterialCss = _plugins_themes_bootstrapmaterial_cssbootstrap
|
|
10550
10574
|
/*!***************************************!*\
|
10551
10575
|
!*** ./src/entries/react-ui-model.ts ***!
|
10552
10576
|
\***************************************/
|
10553
|
-
/*! exports provided: Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
|
10577
|
+
/*! exports provided: Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
|
10554
10578
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10555
10579
|
|
10556
10580
|
"use strict";
|
@@ -10648,6 +10672,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
10648
10672
|
|
10649
10673
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixRow", function() { return _react_reactquestion_matrix__WEBPACK_IMPORTED_MODULE_24__["SurveyQuestionMatrixRow"]; });
|
10650
10674
|
|
10675
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixCell", function() { return _react_reactquestion_matrix__WEBPACK_IMPORTED_MODULE_24__["SurveyQuestionMatrixCell"]; });
|
10676
|
+
|
10651
10677
|
/* harmony import */ var _react_reactquestion_html__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../react/reactquestion_html */ "./src/react/reactquestion_html.tsx");
|
10652
10678
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionHtml", function() { return _react_reactquestion_html__WEBPACK_IMPORTED_MODULE_25__["SurveyQuestionHtml"]; });
|
10653
10679
|
|
@@ -10922,7 +10948,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
10922
10948
|
/*!******************************!*\
|
10923
10949
|
!*** ./src/entries/react.ts ***!
|
10924
10950
|
\******************************/
|
10925
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
|
10951
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryNavigateToPage, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, SurveyProgressButtonsModel, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, sanitizeEditableContent, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
|
10926
10952
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
10927
10953
|
|
10928
10954
|
"use strict";
|
@@ -11443,6 +11469,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
11443
11469
|
|
11444
11470
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixRow", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionMatrixRow"]; });
|
11445
11471
|
|
11472
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixCell", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionMatrixCell"]; });
|
11473
|
+
|
11446
11474
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionHtml", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionHtml"]; });
|
11447
11475
|
|
11448
11476
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionFile", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionFile"]; });
|
@@ -16937,7 +16965,7 @@ var Helpers = /** @class */ (function () {
|
|
16937
16965
|
if (x["equals"])
|
16938
16966
|
return x.equals(y);
|
16939
16967
|
if (!!x.toJSON && !!y.toJSON && !!x.getType && !!y.getType) {
|
16940
|
-
if (x.
|
16968
|
+
if (x.isDisposed || y.isDisposed)
|
16941
16969
|
return false;
|
16942
16970
|
if (x.getType() !== y.getType())
|
16943
16971
|
return false;
|
@@ -18345,7 +18373,7 @@ var ItemValue = /** @class */ (function (_super) {
|
|
18345
18373
|
};
|
18346
18374
|
Object.defineProperty(ItemValue.prototype, "visibleIf", {
|
18347
18375
|
get: function () {
|
18348
|
-
return this.
|
18376
|
+
return this.getPropertyValueWithoutDefault("visibleIf") || "";
|
18349
18377
|
},
|
18350
18378
|
set: function (val) {
|
18351
18379
|
this.setPropertyValue("visibleIf", val);
|
@@ -18355,7 +18383,7 @@ var ItemValue = /** @class */ (function (_super) {
|
|
18355
18383
|
});
|
18356
18384
|
Object.defineProperty(ItemValue.prototype, "enableIf", {
|
18357
18385
|
get: function () {
|
18358
|
-
return this.
|
18386
|
+
return this.getPropertyValueWithoutDefault("enableIf") || "";
|
18359
18387
|
},
|
18360
18388
|
set: function (val) {
|
18361
18389
|
this.setPropertyValue("enableIf", val);
|
@@ -18365,7 +18393,8 @@ var ItemValue = /** @class */ (function (_super) {
|
|
18365
18393
|
});
|
18366
18394
|
Object.defineProperty(ItemValue.prototype, "isVisible", {
|
18367
18395
|
get: function () {
|
18368
|
-
|
18396
|
+
var res = this.getPropertyValueWithoutDefault("isVisible");
|
18397
|
+
return res !== undefined ? res : true;
|
18369
18398
|
},
|
18370
18399
|
enumerable: false,
|
18371
18400
|
configurable: true
|
@@ -18375,7 +18404,8 @@ var ItemValue = /** @class */ (function (_super) {
|
|
18375
18404
|
};
|
18376
18405
|
Object.defineProperty(ItemValue.prototype, "isEnabled", {
|
18377
18406
|
get: function () {
|
18378
|
-
|
18407
|
+
var res = this.getPropertyValueWithoutDefault("isEnabled");
|
18408
|
+
return res !== undefined ? res : true;
|
18379
18409
|
},
|
18380
18410
|
enumerable: false,
|
18381
18411
|
configurable: true
|
@@ -18520,7 +18550,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("itemvalue", [
|
|
18520
18550
|
/*!***************************!*\
|
18521
18551
|
!*** ./src/jsonobject.ts ***!
|
18522
18552
|
\***************************/
|
18523
|
-
/*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonObject, Serializer */
|
18553
|
+
/*! exports provided: property, propertyArray, JsonObjectProperty, CustomPropertiesCollection, JsonMetadataClass, JsonMetadata, JsonError, JsonUnknownPropertyError, JsonMissingTypeErrorBase, JsonMissingTypeError, JsonIncorrectTypeError, JsonRequiredPropertyError, JsonRequiredArrayPropertyError, JsonIncorrectPropertyValueError, JsonObject, Serializer */
|
18524
18554
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
18525
18555
|
|
18526
18556
|
"use strict";
|
@@ -18538,6 +18568,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
18538
18568
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectTypeError", function() { return JsonIncorrectTypeError; });
|
18539
18569
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredPropertyError", function() { return JsonRequiredPropertyError; });
|
18540
18570
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonRequiredArrayPropertyError", function() { return JsonRequiredArrayPropertyError; });
|
18571
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonIncorrectPropertyValueError", function() { return JsonIncorrectPropertyValueError; });
|
18541
18572
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "JsonObject", function() { return JsonObject; });
|
18542
18573
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Serializer", function() { return Serializer; });
|
18543
18574
|
/* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
|
@@ -18874,6 +18905,12 @@ var JsonObjectProperty = /** @class */ (function () {
|
|
18874
18905
|
}
|
18875
18906
|
}
|
18876
18907
|
};
|
18908
|
+
JsonObjectProperty.prototype.validateValue = function (value) {
|
18909
|
+
var choices = this.choices;
|
18910
|
+
if (!Array.isArray(choices) || choices.length === 0)
|
18911
|
+
return true;
|
18912
|
+
return choices.indexOf(value) > -1;
|
18913
|
+
};
|
18877
18914
|
JsonObjectProperty.prototype.getObjType = function (objType) {
|
18878
18915
|
if (!this.classNamePart)
|
18879
18916
|
return objType;
|
@@ -19951,8 +19988,8 @@ var JsonMetadata = /** @class */ (function () {
|
|
19951
19988
|
};
|
19952
19989
|
JsonMetadata.prototype.getChemeRefName = function (className, isRoot) {
|
19953
19990
|
//Fix for #6486, according to https://niem.github.io/json/reference/json-schema/references/#:~:text=In%20a%20JSON%20schema%2C%20a,%2C%20an%20in%2Dschema%20reference
|
19954
|
-
|
19955
|
-
|
19991
|
+
//Checked by https://www.jsonschemavalidator.net/
|
19992
|
+
return isRoot ? "#/definitions/" + className : className;
|
19956
19993
|
};
|
19957
19994
|
JsonMetadata.prototype.generateChemaClass = function (className, schemaDef, isRoot) {
|
19958
19995
|
if (!!schemaDef[className])
|
@@ -20107,6 +20144,17 @@ var JsonRequiredArrayPropertyError = /** @class */ (function (_super) {
|
|
20107
20144
|
return JsonRequiredArrayPropertyError;
|
20108
20145
|
}(JsonError));
|
20109
20146
|
|
20147
|
+
var JsonIncorrectPropertyValueError = /** @class */ (function (_super) {
|
20148
|
+
__extends(JsonIncorrectPropertyValueError, _super);
|
20149
|
+
function JsonIncorrectPropertyValueError(property, value) {
|
20150
|
+
var _this = _super.call(this, "incorrectvalue", "The property value: '" + value + "' is incorrect for property '" + property.name + "'.") || this;
|
20151
|
+
_this.property = property;
|
20152
|
+
_this.value = value;
|
20153
|
+
return _this;
|
20154
|
+
}
|
20155
|
+
return JsonIncorrectPropertyValueError;
|
20156
|
+
}(JsonError));
|
20157
|
+
|
20110
20158
|
var JsonObject = /** @class */ (function () {
|
20111
20159
|
function JsonObject() {
|
20112
20160
|
this.errors = new Array();
|
@@ -20123,14 +20171,14 @@ var JsonObject = /** @class */ (function () {
|
|
20123
20171
|
if (storeDefaults === void 0) { storeDefaults = false; }
|
20124
20172
|
return this.toJsonObjectCore(obj, null, storeDefaults);
|
20125
20173
|
};
|
20126
|
-
JsonObject.prototype.toObject = function (jsonObj, obj) {
|
20127
|
-
this.toObjectCore(jsonObj, obj);
|
20174
|
+
JsonObject.prototype.toObject = function (jsonObj, obj, options) {
|
20175
|
+
this.toObjectCore(jsonObj, obj, options);
|
20128
20176
|
var error = this.getRequiredError(obj, jsonObj);
|
20129
20177
|
if (!!error) {
|
20130
20178
|
this.addNewError(error, jsonObj, obj);
|
20131
20179
|
}
|
20132
20180
|
};
|
20133
|
-
JsonObject.prototype.toObjectCore = function (jsonObj, obj) {
|
20181
|
+
JsonObject.prototype.toObjectCore = function (jsonObj, obj, options) {
|
20134
20182
|
if (!jsonObj)
|
20135
20183
|
return;
|
20136
20184
|
var properties = null;
|
@@ -20148,6 +20196,7 @@ var JsonObject = /** @class */ (function () {
|
|
20148
20196
|
obj.startLoadingFromJson(jsonObj);
|
20149
20197
|
}
|
20150
20198
|
properties = this.addDynamicProperties(obj, jsonObj, properties);
|
20199
|
+
this.options = options;
|
20151
20200
|
for (var key in jsonObj) {
|
20152
20201
|
if (key === JsonObject.typePropertyName)
|
20153
20202
|
continue;
|
@@ -20162,8 +20211,9 @@ var JsonObject = /** @class */ (function () {
|
|
20162
20211
|
}
|
20163
20212
|
continue;
|
20164
20213
|
}
|
20165
|
-
this.valueToObj(jsonObj[key], obj, property, jsonObj);
|
20214
|
+
this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
|
20166
20215
|
}
|
20216
|
+
this.options = undefined;
|
20167
20217
|
if (obj.endLoadingFromJson) {
|
20168
20218
|
obj.endLoadingFromJson();
|
20169
20219
|
}
|
@@ -20236,7 +20286,7 @@ var JsonObject = /** @class */ (function () {
|
|
20236
20286
|
}
|
20237
20287
|
}
|
20238
20288
|
};
|
20239
|
-
JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj) {
|
20289
|
+
JsonObject.prototype.valueToObj = function (value, obj, property, jsonObj, options) {
|
20240
20290
|
if (value === null || value === undefined)
|
20241
20291
|
return;
|
20242
20292
|
this.removePos(property, value);
|
@@ -20250,17 +20300,22 @@ var JsonObject = /** @class */ (function () {
|
|
20250
20300
|
this.addNewError(new JsonRequiredArrayPropertyError(propName, obj.getType()), !!jsonObj ? jsonObj : value, obj);
|
20251
20301
|
}
|
20252
20302
|
if (this.isValueArray(value)) {
|
20253
|
-
this.valueToArray(value, obj, property.name, property);
|
20303
|
+
this.valueToArray(value, obj, property.name, property, options);
|
20254
20304
|
return;
|
20255
20305
|
}
|
20256
20306
|
var newObj = this.createNewObj(value, property);
|
20257
20307
|
if (newObj.newObj) {
|
20258
|
-
this.toObjectCore(value, newObj.newObj);
|
20308
|
+
this.toObjectCore(value, newObj.newObj, options);
|
20259
20309
|
value = newObj.newObj;
|
20260
20310
|
}
|
20261
20311
|
if (!newObj.error) {
|
20262
20312
|
if (property != null) {
|
20263
20313
|
property.setValue(obj, value, this);
|
20314
|
+
if (!!options && options.validatePropertyValues) {
|
20315
|
+
if (!property.validateValue(value)) {
|
20316
|
+
this.addNewError(new JsonIncorrectPropertyValueError(property, value), jsonObj, obj);
|
20317
|
+
}
|
20318
|
+
}
|
20264
20319
|
}
|
20265
20320
|
else {
|
20266
20321
|
obj[property.name] = value;
|
@@ -20359,17 +20414,17 @@ var JsonObject = /** @class */ (function () {
|
|
20359
20414
|
error.at = posObj.start;
|
20360
20415
|
error.end = posObj.end;
|
20361
20416
|
};
|
20362
|
-
JsonObject.prototype.valueToArray = function (value, obj, key, property) {
|
20417
|
+
JsonObject.prototype.valueToArray = function (value, obj, key, property, options) {
|
20363
20418
|
if (obj[key] && !this.isValueArray(obj[key]))
|
20364
20419
|
return;
|
20365
20420
|
if (obj[key] && value.length > 0)
|
20366
20421
|
obj[key].splice(0, obj[key].length);
|
20367
20422
|
var valueRes = obj[key] ? obj[key] : [];
|
20368
|
-
this.addValuesIntoArray(value, valueRes, property);
|
20423
|
+
this.addValuesIntoArray(value, valueRes, property, options);
|
20369
20424
|
if (!obj[key])
|
20370
20425
|
obj[key] = valueRes;
|
20371
20426
|
};
|
20372
|
-
JsonObject.prototype.addValuesIntoArray = function (value, result, property) {
|
20427
|
+
JsonObject.prototype.addValuesIntoArray = function (value, result, property, options) {
|
20373
20428
|
for (var i = 0; i < value.length; i++) {
|
20374
20429
|
var newValue = this.createNewObj(value[i], property);
|
20375
20430
|
if (newValue.newObj) {
|
@@ -20380,7 +20435,7 @@ var JsonObject = /** @class */ (function () {
|
|
20380
20435
|
newValue.newObj.valueName = value[i].valueName.toString();
|
20381
20436
|
}
|
20382
20437
|
result.push(newValue.newObj);
|
20383
|
-
this.toObjectCore(value[i], newValue.newObj);
|
20438
|
+
this.toObjectCore(value[i], newValue.newObj, options);
|
20384
20439
|
}
|
20385
20440
|
else {
|
20386
20441
|
if (!newValue.error) {
|
@@ -21222,14 +21277,21 @@ var LocalizableString = /** @class */ (function () {
|
|
21222
21277
|
if (this.htmlValues[loc] !== undefined)
|
21223
21278
|
return !!this.htmlValues[loc];
|
21224
21279
|
var renderedText = this.calculatedText;
|
21225
|
-
if (!renderedText)
|
21280
|
+
if (!renderedText) {
|
21281
|
+
this.setHtmlValue(loc, "");
|
21226
21282
|
return false;
|
21227
|
-
|
21283
|
+
}
|
21284
|
+
if (!!this.getLocalizationName() && renderedText === this.getLocalizationStr()) {
|
21285
|
+
this.setHtmlValue(loc, "");
|
21228
21286
|
return false;
|
21287
|
+
}
|
21229
21288
|
var res = this.owner.getMarkdownHtml(renderedText, this.name);
|
21230
|
-
this.
|
21289
|
+
this.setHtmlValue(loc, res);
|
21231
21290
|
return !!res;
|
21232
21291
|
};
|
21292
|
+
LocalizableString.prototype.setHtmlValue = function (loc, val) {
|
21293
|
+
this.htmlValues[loc] = val;
|
21294
|
+
};
|
21233
21295
|
LocalizableString.prototype.getHtmlValue = function () {
|
21234
21296
|
var loc = this.locale;
|
21235
21297
|
if (!loc)
|
@@ -35678,8 +35740,7 @@ var Question = /** @class */ (function (_super) {
|
|
35678
35740
|
if (this.forceIsInputReadOnly !== undefined) {
|
35679
35741
|
return this.forceIsInputReadOnly;
|
35680
35742
|
}
|
35681
|
-
|
35682
|
-
return this.isReadOnly || isDesignModeV2;
|
35743
|
+
return this.isReadOnly || this.isDesignModeV2;
|
35683
35744
|
},
|
35684
35745
|
enumerable: false,
|
35685
35746
|
configurable: true
|
@@ -36780,6 +36841,9 @@ var Question = /** @class */ (function (_super) {
|
|
36780
36841
|
if (this.questionComment === newValue)
|
36781
36842
|
return;
|
36782
36843
|
this.questionComment = newValue;
|
36844
|
+
this.setCommentIntoData(newValue);
|
36845
|
+
};
|
36846
|
+
Question.prototype.setCommentIntoData = function (newValue) {
|
36783
36847
|
if (this.data != null) {
|
36784
36848
|
this.data.setComment(this.getValueName(), newValue, this.isSurveyInputTextUpdate ? "text" : false);
|
36785
36849
|
}
|
@@ -37638,7 +37702,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
37638
37702
|
_this.onVisibleChoicesChanged();
|
37639
37703
|
}
|
37640
37704
|
});
|
37641
|
-
_this.registerPropertyChangedHandlers(["choicesFromQuestion", "choicesFromQuestionMode", "choiceValuesFromQuestion",
|
37705
|
+
_this.registerPropertyChangedHandlers(["choicesFromQuestion", "choicesFromQuestionMode", "choiceValuesFromQuestion",
|
37706
|
+
"choiceTextsFromQuestion", "showNoneItem", "isUsingRestful"], function () {
|
37642
37707
|
_this.onVisibleChoicesChanged();
|
37643
37708
|
});
|
37644
37709
|
_this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
|
@@ -37669,7 +37734,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
37669
37734
|
}
|
37670
37735
|
Object.defineProperty(QuestionSelectBase.prototype, "waitingChoicesByURL", {
|
37671
37736
|
get: function () {
|
37672
|
-
return !this.isChoicesLoaded &&
|
37737
|
+
return !this.isChoicesLoaded && this.hasChoicesUrl;
|
37673
37738
|
},
|
37674
37739
|
enumerable: false,
|
37675
37740
|
configurable: true
|
@@ -37725,6 +37790,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
37725
37790
|
var mode = selBaseQuestion ? "select" : (arrayQuestion ? "array" : undefined);
|
37726
37791
|
this.setPropertyValue("carryForwardQuestionType", mode);
|
37727
37792
|
};
|
37793
|
+
Object.defineProperty(QuestionSelectBase.prototype, "isUsingRestful", {
|
37794
|
+
get: function () {
|
37795
|
+
return this.getPropertyValueWithoutDefault("isUsingRestful") || false;
|
37796
|
+
},
|
37797
|
+
enumerable: false,
|
37798
|
+
configurable: true
|
37799
|
+
});
|
37800
|
+
QuestionSelectBase.prototype.updateIsUsingRestful = function () {
|
37801
|
+
this.setPropertyValueDirectly("isUsingRestful", this.hasChoicesUrl);
|
37802
|
+
};
|
37728
37803
|
QuestionSelectBase.prototype.supportGoNextPageError = function () {
|
37729
37804
|
return !this.isOtherSelected || !!this.otherValue;
|
37730
37805
|
};
|
@@ -38163,7 +38238,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
38163
38238
|
if (this.getStoreOthersAsComment() && !this.autoOtherMode) {
|
38164
38239
|
this.prevOtherValue = this.otherValue;
|
38165
38240
|
}
|
38166
|
-
this.
|
38241
|
+
this.makeCommentEmpty = true;
|
38242
|
+
this.otherValueCore = "";
|
38243
|
+
this.setPropertyValue("comment", "");
|
38244
|
+
}
|
38245
|
+
};
|
38246
|
+
QuestionSelectBase.prototype.setValueCore = function (newValue) {
|
38247
|
+
_super.prototype.setValueCore.call(this, newValue);
|
38248
|
+
if (this.makeCommentEmpty) {
|
38249
|
+
this.setCommentIntoData("");
|
38250
|
+
this.makeCommentEmpty = false;
|
38167
38251
|
}
|
38168
38252
|
};
|
38169
38253
|
QuestionSelectBase.prototype.setNewValue = function (newValue) {
|
@@ -38223,7 +38307,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
38223
38307
|
var value = this.value;
|
38224
38308
|
var valueArray = Array.isArray(value) ? value : [value];
|
38225
38309
|
var hasItemWithoutValues = valueArray.some(function (val) { return !_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].getItemByValue(_this.choices, val); });
|
38226
|
-
if (hasItemWithoutValues && (this.choicesLazyLoadEnabled ||
|
38310
|
+
if (hasItemWithoutValues && (this.choicesLazyLoadEnabled || this.hasChoicesUrl)) {
|
38227
38311
|
this.waitingGetChoiceDisplayValueResponse = true;
|
38228
38312
|
this.updateIsReady();
|
38229
38313
|
this.survey.getChoiceDisplayValue({
|
@@ -38286,9 +38370,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
38286
38370
|
};
|
38287
38371
|
Object.defineProperty(QuestionSelectBase.prototype, "choicesByUrl", {
|
38288
38372
|
/**
|
38289
|
-
* Configures access to a RESTful service that returns choice items. Refer to the [ChoicesRestful](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information.
|
38373
|
+
* Configures access to a RESTful service that returns choice items. Refer to the [`ChoicesRestful`](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
|
38290
38374
|
*
|
38291
|
-
* [View Demo](https://surveyjs.io/form-library/examples/
|
38375
|
+
* [View Demo](https://surveyjs.io/form-library/examples/dropdown-menu-load-data-from-restful-service/ (linkStyle))
|
38292
38376
|
* @see choices
|
38293
38377
|
* @see [settings.specialChoicesOrder](https://surveyjs.io/form-library/documentation/api-reference/settings#specialChoicesOrder)
|
38294
38378
|
*/
|
@@ -38613,7 +38697,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
38613
38697
|
QuestionSelectBase.prototype.addToVisibleChoices = function (items, isAddAll) {
|
38614
38698
|
this.headItemsCount = 0;
|
38615
38699
|
this.footItemsCount = 0;
|
38616
|
-
this.
|
38700
|
+
if (!this.hasChoicesUrl) {
|
38701
|
+
this.addNewItemToVisibleChoices(items, isAddAll);
|
38702
|
+
}
|
38617
38703
|
var dict = new Array();
|
38618
38704
|
this.addNonChoicesItems(dict, isAddAll);
|
38619
38705
|
dict.sort(function (a, b) {
|
@@ -38675,8 +38761,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
38675
38761
|
};
|
38676
38762
|
Object.defineProperty(QuestionSelectBase.prototype, "isAddDefaultItems", {
|
38677
38763
|
get: function () {
|
38678
|
-
return _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].
|
38679
|
-
|
38764
|
+
return _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].showDefaultItemsInCreatorV2 && this.isDesignModeV2 &&
|
38765
|
+
!this.customWidget && !this.isContentElement;
|
38680
38766
|
},
|
38681
38767
|
enumerable: false,
|
38682
38768
|
configurable: true
|
@@ -38775,6 +38861,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
38775
38861
|
question.addDependedQuestion(this);
|
38776
38862
|
return this.getChoicesFromArrayQuestion(question);
|
38777
38863
|
}
|
38864
|
+
if (this.isDesignModeV2 && this.hasChoicesUrl)
|
38865
|
+
return [];
|
38778
38866
|
return this.choicesFromUrl ? this.choicesFromUrl : this.getChoices();
|
38779
38867
|
},
|
38780
38868
|
enumerable: false,
|
@@ -38937,7 +39025,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
38937
39025
|
return (this.storeOthersAsComment === true ||
|
38938
39026
|
(this.storeOthersAsComment == "default" &&
|
38939
39027
|
(this.survey != null ? this.survey.storeOthersAsComment : true)) ||
|
38940
|
-
(
|
39028
|
+
(this.hasChoicesUrl && !this.choicesFromUrl));
|
38941
39029
|
};
|
38942
39030
|
QuestionSelectBase.prototype.onSurveyLoad = function () {
|
38943
39031
|
this.runChoicesByUrl();
|
@@ -38999,7 +39087,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
38999
39087
|
}
|
39000
39088
|
};
|
39001
39089
|
QuestionSelectBase.prototype.runChoicesByUrl = function () {
|
39002
|
-
|
39090
|
+
this.updateIsUsingRestful();
|
39091
|
+
if (!this.choicesByUrl || this.isLoadingFromJson || this.isRunningChoices || this.isDesignModeV2)
|
39003
39092
|
return;
|
39004
39093
|
var processor = this.surveyImpl
|
39005
39094
|
? this.surveyImpl.getTextProcessor()
|
@@ -39173,6 +39262,13 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
39173
39262
|
QuestionSelectBase.prototype.randomizeArray = function (array) {
|
39174
39263
|
return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].randomizeArray(array);
|
39175
39264
|
};
|
39265
|
+
Object.defineProperty(QuestionSelectBase.prototype, "hasChoicesUrl", {
|
39266
|
+
get: function () {
|
39267
|
+
return this.choicesByUrl && !!this.choicesByUrl.url;
|
39268
|
+
},
|
39269
|
+
enumerable: false,
|
39270
|
+
configurable: true
|
39271
|
+
});
|
39176
39272
|
QuestionSelectBase.prototype.clearIncorrectValues = function () {
|
39177
39273
|
if (!this.hasValueToClearIncorrectValues())
|
39178
39274
|
return;
|
@@ -39181,8 +39277,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
39181
39277
|
if (!!this.survey &&
|
39182
39278
|
this.survey.questionsByValueName(this.getValueName()).length > 1)
|
39183
39279
|
return;
|
39184
|
-
if (
|
39185
|
-
!this.choicesByUrl.isEmpty &&
|
39280
|
+
if (this.hasChoicesUrl &&
|
39186
39281
|
(!this.choicesFromUrl || this.choicesFromUrl.length == 0))
|
39187
39282
|
return;
|
39188
39283
|
if (this.clearIncorrectValuesCallback) {
|
@@ -41111,8 +41206,20 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
41111
41206
|
_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("checkbox", [
|
41112
41207
|
{ name: "showSelectAllItem:boolean", alternativeName: "hasSelectAll" },
|
41113
41208
|
{ name: "separateSpecialChoices", visible: true },
|
41114
|
-
{ name: "maxSelectedChoices:number", default: 0
|
41115
|
-
|
41209
|
+
{ name: "maxSelectedChoices:number", default: 0, onSettingValue: function (obj, val) {
|
41210
|
+
if (val <= 0)
|
41211
|
+
return 0;
|
41212
|
+
var min = obj.minSelectedChoices;
|
41213
|
+
return min > 0 && val < min ? min : val;
|
41214
|
+
}
|
41215
|
+
},
|
41216
|
+
{ name: "minSelectedChoices:number", default: 0, onSettingValue: function (obj, val) {
|
41217
|
+
if (val <= 0)
|
41218
|
+
return 0;
|
41219
|
+
var max = obj.maxSelectedChoices;
|
41220
|
+
return max > 0 && val > max ? max : val;
|
41221
|
+
}
|
41222
|
+
},
|
41116
41223
|
{
|
41117
41224
|
name: "selectAllText",
|
41118
41225
|
serializationProperty: "locSelectAllText",
|
@@ -46058,6 +46165,23 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
46058
46165
|
QuestionMatrixModel.prototype.getType = function () {
|
46059
46166
|
return "matrix";
|
46060
46167
|
};
|
46168
|
+
Object.defineProperty(QuestionMatrixModel.prototype, "cellComponent", {
|
46169
|
+
/**
|
46170
|
+
* The name of a component used to render cells.
|
46171
|
+
*/
|
46172
|
+
get: function () {
|
46173
|
+
return this.getPropertyValue("cellComponent");
|
46174
|
+
},
|
46175
|
+
enumerable: false,
|
46176
|
+
configurable: true
|
46177
|
+
});
|
46178
|
+
Object.defineProperty(QuestionMatrixModel.prototype, "itemComponent", {
|
46179
|
+
set: function (value) {
|
46180
|
+
this.setPropertyValue("cellComponent", value);
|
46181
|
+
},
|
46182
|
+
enumerable: false,
|
46183
|
+
configurable: true
|
46184
|
+
});
|
46061
46185
|
Object.defineProperty(QuestionMatrixModel.prototype, "hasSingleInput", {
|
46062
46186
|
get: function () {
|
46063
46187
|
return false;
|
@@ -46138,13 +46262,15 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
46138
46262
|
var isChecked = row.value == column.value;
|
46139
46263
|
var isDisabled = this.isReadOnly;
|
46140
46264
|
var allowHover = !isChecked && !isDisabled;
|
46265
|
+
var hasCellText = this.hasCellText;
|
46266
|
+
var css = this.cssClasses;
|
46141
46267
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]()
|
46142
|
-
.append(
|
46143
|
-
.append(
|
46144
|
-
.append(
|
46145
|
-
.append(
|
46146
|
-
.append(
|
46147
|
-
.append(
|
46268
|
+
.append(css.cell, hasCellText)
|
46269
|
+
.append(hasCellText ? css.cellText : css.label)
|
46270
|
+
.append(css.itemOnError, !hasCellText && this.hasCssError())
|
46271
|
+
.append(hasCellText ? css.cellTextSelected : css.itemChecked, isChecked)
|
46272
|
+
.append(hasCellText ? css.cellTextDisabled : css.itemDisabled, isDisabled)
|
46273
|
+
.append(css.itemHover, allowHover && !hasCellText)
|
46148
46274
|
.toString();
|
46149
46275
|
};
|
46150
46276
|
Object.defineProperty(QuestionMatrixModel.prototype, "itemSvgIcon", {
|
@@ -46479,6 +46605,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("matrix", [
|
|
46479
46605
|
},
|
46480
46606
|
"isAllRowRequired:boolean",
|
46481
46607
|
"hideIfRowsEmpty:boolean",
|
46608
|
+
{ name: "cellComponent", visible: false, default: "survey-matrix-cell" }
|
46482
46609
|
], function () {
|
46483
46610
|
return new QuestionMatrixModel("");
|
46484
46611
|
}, "matrixbase");
|
@@ -46776,6 +46903,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
46776
46903
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
46777
46904
|
/* harmony import */ var _question_matrixdropdowncolumn__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./question_matrixdropdowncolumn */ "./src/question_matrixdropdowncolumn.ts");
|
46778
46905
|
/* harmony import */ var _question_matrixdropdownrendered__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./question_matrixdropdownrendered */ "./src/question_matrixdropdownrendered.ts");
|
46906
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
46779
46907
|
var __extends = (undefined && undefined.__extends) || (function () {
|
46780
46908
|
var extendStatics = function (d, b) {
|
46781
46909
|
extendStatics = Object.setPrototypeOf ||
|
@@ -46805,6 +46933,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
46805
46933
|
|
46806
46934
|
|
46807
46935
|
|
46936
|
+
|
46808
46937
|
var MatrixDropdownCell = /** @class */ (function () {
|
46809
46938
|
function MatrixDropdownCell(column, row, data) {
|
46810
46939
|
this.column = column;
|
@@ -47152,12 +47281,17 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
47152
47281
|
if (!!this.data) {
|
47153
47282
|
values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
|
47154
47283
|
}
|
47155
|
-
|
47284
|
+
var rowIndex = this.rowIndex;
|
47285
|
+
values[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
|
47156
47286
|
values[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
|
47157
47287
|
var newProps = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].createCopy(properties);
|
47158
47288
|
newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
|
47289
|
+
var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
|
47159
47290
|
for (var i = 0; i < this.cells.length; i++) {
|
47160
|
-
|
47291
|
+
if (i > 0) {
|
47292
|
+
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_14__["mergeValues"])(this.value, rowValues);
|
47293
|
+
}
|
47294
|
+
values[MatrixDropdownRowModelBase.RowVariableName] = rowValues;
|
47161
47295
|
this.cells[i].runCondition(values, newProps);
|
47162
47296
|
}
|
47163
47297
|
if (!!this.detailPanel) {
|
@@ -47237,7 +47371,7 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
47237
47371
|
if (this.data.isValidateOnValueChanging && this.hasQuestonError(changedQuestion))
|
47238
47372
|
return;
|
47239
47373
|
var isDeleting = newColumnValue == null && !changedQuestion ||
|
47240
|
-
isComment && !newColumnValue && !!changedQuestion
|
47374
|
+
isComment && !newColumnValue && !!changedQuestion;
|
47241
47375
|
this.data.onRowChanged(this, changedName, newValue, isDeleting);
|
47242
47376
|
if (changedName) {
|
47243
47377
|
this.runTriggers(MatrixDropdownTotalRowModel.RowVariableName + "." + changedName, newValue);
|
@@ -47938,6 +48072,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
47938
48072
|
this.resetRenderedTable();
|
47939
48073
|
this.fireCallback(this.columnsChangedCallback);
|
47940
48074
|
};
|
48075
|
+
//For internal use
|
47941
48076
|
QuestionMatrixDropdownModelBase.prototype.resetRenderedTable = function () {
|
47942
48077
|
if (this.lockResetRenderedTable || this.isUpdateLocked)
|
47943
48078
|
return;
|
@@ -48300,7 +48435,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
48300
48435
|
if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isArraysEqual(curVisibleChoices, newVisibleChoices, true, false, false))
|
48301
48436
|
return true;
|
48302
48437
|
}
|
48303
|
-
return curVis
|
48438
|
+
return curVis !== column.isColumnVisible;
|
48304
48439
|
};
|
48305
48440
|
QuestionMatrixDropdownModelBase.prototype.updateNewVisibleChoices = function (q, dest) {
|
48306
48441
|
var choices = q.visibleChoices;
|
@@ -49405,16 +49540,17 @@ function onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data) {
|
|
49405
49540
|
cellQuestion.choicesByUrl.run(data.getTextProcessor());
|
49406
49541
|
}
|
49407
49542
|
}
|
49543
|
+
function onUpdateSelectDropdownCellQuestion(cellQuestion, column, question, data) {
|
49544
|
+
onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
|
49545
|
+
if (!!cellQuestion.locPlaceholder && cellQuestion.locPlaceholder.isEmpty && !question.locPlaceholder.isEmpty) {
|
49546
|
+
cellQuestion.optionsCaption = question.optionsCaption;
|
49547
|
+
}
|
49548
|
+
}
|
49408
49549
|
var matrixDropdownColumnTypes = {
|
49409
49550
|
dropdown: {
|
49410
49551
|
onCellQuestionUpdate: function (cellQuestion, column, question, data) {
|
49411
|
-
|
49412
|
-
|
49413
|
-
cellQuestion.locPlaceholder.isEmpty &&
|
49414
|
-
!question.locPlaceholder.isEmpty) {
|
49415
|
-
cellQuestion.optionsCaption = question.optionsCaption;
|
49416
|
-
}
|
49417
|
-
},
|
49552
|
+
onUpdateSelectDropdownCellQuestion(cellQuestion, column, question, data);
|
49553
|
+
}
|
49418
49554
|
},
|
49419
49555
|
checkbox: {
|
49420
49556
|
onCellQuestionUpdate: function (cellQuestion, column, question, data) {
|
@@ -49430,7 +49566,11 @@ var matrixDropdownColumnTypes = {
|
|
49430
49566
|
column.colCount > -1 ? column.colCount : question.columnColCount;
|
49431
49567
|
},
|
49432
49568
|
},
|
49433
|
-
tagbox: {
|
49569
|
+
tagbox: {
|
49570
|
+
onCellQuestionUpdate: function (cellQuestion, column, question, data) {
|
49571
|
+
onUpdateSelectBaseCellQuestion(cellQuestion, column, question, data);
|
49572
|
+
}
|
49573
|
+
},
|
49434
49574
|
text: {},
|
49435
49575
|
comment: {},
|
49436
49576
|
boolean: {
|
@@ -50372,6 +50512,13 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
50372
50512
|
this.classNameValue = "";
|
50373
50513
|
this.idValue = QuestionMatrixDropdownRenderedCell.counter++;
|
50374
50514
|
}
|
50515
|
+
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "requiredText", {
|
50516
|
+
get: function () {
|
50517
|
+
return this.column && this.column.isRenderedRequired ? this.column.requiredText : undefined;
|
50518
|
+
},
|
50519
|
+
enumerable: false,
|
50520
|
+
configurable: true
|
50521
|
+
});
|
50375
50522
|
Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "hasQuestion", {
|
50376
50523
|
get: function () {
|
50377
50524
|
return !!this.question && !this.isErrorsCell;
|
@@ -50488,6 +50635,8 @@ var QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
|
50488
50635
|
return "";
|
50489
50636
|
return this.cell.column.locCellHint.renderedHtml;
|
50490
50637
|
}
|
50638
|
+
if (this.hasQuestion && this.question.isVisible && this.question.title)
|
50639
|
+
return this.question.title;
|
50491
50640
|
return this.cell.column.title;
|
50492
50641
|
}
|
50493
50642
|
if (this.hasQuestion && this.question.isVisible) {
|
@@ -50704,9 +50853,9 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50704
50853
|
enumerable: false,
|
50705
50854
|
configurable: true
|
50706
50855
|
});
|
50707
|
-
Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "
|
50856
|
+
Object.defineProperty(QuestionMatrixDropdownRenderedTable.prototype, "isRowsDragAndDrop", {
|
50708
50857
|
get: function () {
|
50709
|
-
return this.matrix.
|
50858
|
+
return this.matrix.isRowsDragAndDrop && this.matrix.isColumnLayoutHorizontal;
|
50710
50859
|
},
|
50711
50860
|
enumerable: false,
|
50712
50861
|
configurable: true
|
@@ -50865,7 +51014,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50865
51014
|
if (!isShown)
|
50866
51015
|
return;
|
50867
51016
|
this.headerRowValue = this.createRenderedRow(this.cssClasses);
|
50868
|
-
if (this.
|
51017
|
+
if (this.isRowsDragAndDrop) {
|
50869
51018
|
this.headerRow.cells.push(this.createHeaderCell(null, "action"));
|
50870
51019
|
}
|
50871
51020
|
if (this.hasActionCellInRows("start")) {
|
@@ -50909,7 +51058,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
50909
51058
|
if (!this.showFooter)
|
50910
51059
|
return;
|
50911
51060
|
this.footerRowValue = this.createRenderedRow(this.cssClasses);
|
50912
|
-
if (this.
|
51061
|
+
if (this.isRowsDragAndDrop) {
|
50913
51062
|
this.footerRow.cells.push(this.createHeaderCell(null));
|
50914
51063
|
}
|
50915
51064
|
if (this.hasActionCellInRows("start")) {
|
@@ -51154,7 +51303,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
51154
51303
|
};
|
51155
51304
|
QuestionMatrixDropdownRenderedTable.prototype.createHorizontalRow = function (row, useAsHeader) {
|
51156
51305
|
var res = this.createRenderedRow(this.cssClasses);
|
51157
|
-
if (this.
|
51306
|
+
if (this.isRowsDragAndDrop) {
|
51158
51307
|
var rowIndex = this.matrix.visibleRows.indexOf(row);
|
51159
51308
|
res.cells.push(this.getRowDragCell(rowIndex));
|
51160
51309
|
}
|
@@ -51302,9 +51451,6 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
51302
51451
|
.append(hCell.className)
|
51303
51452
|
.append(this.cssClasses.rowTextCell)
|
51304
51453
|
.append(this.cssClasses.columnTitleCell).toString();
|
51305
|
-
if (!choice) {
|
51306
|
-
this.setRequriedToHeaderCell(column, hCell);
|
51307
|
-
}
|
51308
51454
|
res.cells.push(hCell);
|
51309
51455
|
}
|
51310
51456
|
var rows = this.matrix.visibleRows;
|
@@ -51434,26 +51580,11 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
51434
51580
|
};
|
51435
51581
|
QuestionMatrixDropdownRenderedTable.prototype.setHeaderCell = function (column, cell) {
|
51436
51582
|
this.setHeaderCellWidth(column, cell);
|
51437
|
-
this.setRequriedToHeaderCell(column, cell);
|
51438
51583
|
};
|
51439
51584
|
QuestionMatrixDropdownRenderedTable.prototype.setHeaderCellWidth = function (column, cell) {
|
51440
51585
|
cell.minWidth = column != null ? this.matrix.getColumnWidth(column) : this.matrix.getRowTitleWidth();
|
51441
51586
|
cell.width = column != null ? column.width : this.matrix.getRowTitleWidth();
|
51442
51587
|
};
|
51443
|
-
QuestionMatrixDropdownRenderedTable.prototype.setRequriedToHeaderCell = function (column, cell) {
|
51444
|
-
if (!!column && column.isRequired && this.matrix.survey) {
|
51445
|
-
cell.requiredText = this.matrix.survey.requiredText;
|
51446
|
-
}
|
51447
|
-
};
|
51448
|
-
QuestionMatrixDropdownRenderedTable.prototype.createRemoveRowCell = function (row) {
|
51449
|
-
var res = new QuestionMatrixDropdownRenderedCell();
|
51450
|
-
res.row = row;
|
51451
|
-
res.isRemoveRow = this.canRemoveRow(row);
|
51452
|
-
if (!!this.cssClasses.cell) {
|
51453
|
-
res.className = this.cssClasses.cell;
|
51454
|
-
}
|
51455
|
-
return res;
|
51456
|
-
};
|
51457
51588
|
QuestionMatrixDropdownRenderedTable.prototype.createTextCell = function (locTitle) {
|
51458
51589
|
var cell = new QuestionMatrixDropdownRenderedCell();
|
51459
51590
|
cell.locTitle = locTitle;
|
@@ -51611,7 +51742,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
51611
51742
|
_this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
|
51612
51743
|
_this.updateShowTableAndAddRow();
|
51613
51744
|
});
|
51614
|
-
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop"], function () { _this.clearRowsAndResetRenderedTable(); });
|
51745
|
+
_this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly"], function () { _this.clearRowsAndResetRenderedTable(); });
|
51615
51746
|
_this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_9__["DragOrClickHelper"](_this.startDragMatrixRow);
|
51616
51747
|
return _this;
|
51617
51748
|
}
|
@@ -51630,7 +51761,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
51630
51761
|
return true;
|
51631
51762
|
};
|
51632
51763
|
QuestionMatrixDynamicModel.prototype.onPointerDown = function (pointerDownEvent, row) {
|
51633
|
-
if (!row || !this.
|
51764
|
+
if (!row || !this.isRowsDragAndDrop)
|
51634
51765
|
return;
|
51635
51766
|
if (this.isBanStartDrag(pointerDownEvent))
|
51636
51767
|
return;
|
@@ -51827,8 +51958,6 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
51827
51958
|
* Default value: `false`
|
51828
51959
|
*/
|
51829
51960
|
get: function () {
|
51830
|
-
if (this.readOnly)
|
51831
|
-
return false;
|
51832
51961
|
return this.getPropertyValue("allowRowsDragAndDrop");
|
51833
51962
|
},
|
51834
51963
|
set: function (val) {
|
@@ -51837,6 +51966,13 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
51837
51966
|
enumerable: false,
|
51838
51967
|
configurable: true
|
51839
51968
|
});
|
51969
|
+
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "isRowsDragAndDrop", {
|
51970
|
+
get: function () {
|
51971
|
+
return this.allowRowsDragAndDrop && !this.isReadOnly;
|
51972
|
+
},
|
51973
|
+
enumerable: false,
|
51974
|
+
configurable: true
|
51975
|
+
});
|
51840
51976
|
Object.defineProperty(QuestionMatrixDynamicModel.prototype, "iconDragElement", {
|
51841
51977
|
get: function () {
|
51842
51978
|
return this.cssClasses.iconDragElement;
|
@@ -54033,7 +54169,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
54033
54169
|
_this.registerPropertyChangedHandlers(["panelsState"], function () {
|
54034
54170
|
_this.setPanelsState();
|
54035
54171
|
});
|
54036
|
-
_this.registerPropertyChangedHandlers(["isMobile"], function () {
|
54172
|
+
_this.registerPropertyChangedHandlers(["isMobile", "newPanelPosition", "showRangeInProgress", "renderMode"], function () {
|
54037
54173
|
_this.updateFooterActions();
|
54038
54174
|
});
|
54039
54175
|
_this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
|
@@ -54256,9 +54392,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
54256
54392
|
* @see visiblePanels
|
54257
54393
|
*/
|
54258
54394
|
get: function () {
|
54259
|
-
return this.
|
54395
|
+
return this.getPropertyValue("templateVisibleIf");
|
54260
54396
|
},
|
54261
54397
|
set: function (val) {
|
54398
|
+
this.setPropertyValue("templateVisibleIf", val);
|
54262
54399
|
this.template.visibleIf = val;
|
54263
54400
|
},
|
54264
54401
|
enumerable: false,
|
@@ -54862,6 +54999,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
54862
54999
|
* Specifies whether users are allowed to add new panels.
|
54863
55000
|
*
|
54864
55001
|
* Default value: `true`
|
55002
|
+
*
|
55003
|
+
* By default, users add new panels to the end. If you want to let users insert a new panel after the current panel, set the [`newPanelPosition`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#newPanelPosition) property to `"next"`.
|
54865
55004
|
* @see canAddPanel
|
54866
55005
|
* @see allowRemovePanel
|
54867
55006
|
*/
|
@@ -54874,6 +55013,26 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
54874
55013
|
enumerable: false,
|
54875
55014
|
configurable: true
|
54876
55015
|
});
|
55016
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "newPanelPosition", {
|
55017
|
+
/**
|
55018
|
+
* Specifies the position of newly added panels.
|
55019
|
+
*
|
55020
|
+
* Possible values:
|
55021
|
+
*
|
55022
|
+
* - `"last"` (default) - New panels are added to the end.
|
55023
|
+
* - `"next"` - New panels are inserted after the current panel.
|
55024
|
+
* @see allowAddPanel
|
55025
|
+
* @see addPanel
|
55026
|
+
*/
|
55027
|
+
get: function () {
|
55028
|
+
return this.getPropertyValue("newPanelPosition");
|
55029
|
+
},
|
55030
|
+
set: function (val) {
|
55031
|
+
this.setPropertyValue("newPanelPosition", val);
|
55032
|
+
},
|
55033
|
+
enumerable: false,
|
55034
|
+
configurable: true
|
55035
|
+
});
|
54877
55036
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "allowRemovePanel", {
|
54878
55037
|
/**
|
54879
55038
|
* Specifies whether users are allowed to delete panels.
|
@@ -54977,7 +55136,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
54977
55136
|
},
|
54978
55137
|
set: function (val) {
|
54979
55138
|
this.setPropertyValue("showRangeInProgress", val);
|
54980
|
-
this.updateFooterActions();
|
54981
55139
|
this.fireCallback(this.currentIndexChangedCallback);
|
54982
55140
|
},
|
54983
55141
|
enumerable: false,
|
@@ -55000,7 +55158,6 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
55000
55158
|
},
|
55001
55159
|
set: function (val) {
|
55002
55160
|
this.setPropertyValue("renderMode", val);
|
55003
|
-
this.updateFooterActions();
|
55004
55161
|
this.fireCallback(this.renderModeChangedCallback);
|
55005
55162
|
},
|
55006
55163
|
enumerable: false,
|
@@ -55083,7 +55240,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
55083
55240
|
get: function () {
|
55084
55241
|
if (this.isDesignMode)
|
55085
55242
|
return false;
|
55086
|
-
if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList &&
|
55243
|
+
if (this.isDefaultV2Theme && !this.legacyNavigation && !this.isRenderModeList &&
|
55244
|
+
(this.currentIndex < this.visiblePanelCount - 1 && this.newPanelPosition !== "next")) {
|
55087
55245
|
return false;
|
55088
55246
|
}
|
55089
55247
|
return (this.allowAddPanel &&
|
@@ -55240,6 +55398,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
55240
55398
|
* @param index *(Optional)* An index at which to insert the new panel. `undefined` adds the panel to the end or inserts it after the current panel if [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`. A negative index (for instance, -1) adds the panel to the end in all cases, regardless of the `renderMode` value.
|
55241
55399
|
* @see panelCount
|
55242
55400
|
* @see panels
|
55401
|
+
* @see allowAddPanel
|
55402
|
+
* @see newPanelPosition
|
55243
55403
|
*/
|
55244
55404
|
QuestionPanelDynamicModel.prototype.addPanel = function (index) {
|
55245
55405
|
var curIndex = this.currentIndex;
|
@@ -55304,13 +55464,23 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
55304
55464
|
var _this = this;
|
55305
55465
|
if (!this.canRemovePanel)
|
55306
55466
|
return;
|
55307
|
-
if (this.
|
55467
|
+
if (this.isRequireConfirmOnDelete(value)) {
|
55308
55468
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_9__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removePanel(value); });
|
55309
55469
|
}
|
55310
55470
|
else {
|
55311
55471
|
this.removePanel(value);
|
55312
55472
|
}
|
55313
55473
|
};
|
55474
|
+
QuestionPanelDynamicModel.prototype.isRequireConfirmOnDelete = function (val) {
|
55475
|
+
if (!this.confirmDelete)
|
55476
|
+
return false;
|
55477
|
+
var index = this.getVisualPanelIndex(val);
|
55478
|
+
if (index < 0 || index >= this.visiblePanelCount)
|
55479
|
+
return false;
|
55480
|
+
var panelValue = this.visiblePanels[index].getValue();
|
55481
|
+
return !this.isValueEmpty(panelValue) &&
|
55482
|
+
(this.isValueEmpty(this.defaultPanelValue) || !this.isTwoValueEquals(panelValue, this.defaultPanelValue));
|
55483
|
+
};
|
55314
55484
|
/**
|
55315
55485
|
* Switches Dynamic Panel to the next panel. Returns `true` in case of success, or `false` if `renderMode` is `"list"` or the current panel contains validation errors.
|
55316
55486
|
* @see renderMode
|
@@ -55540,6 +55710,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
55540
55710
|
if (this.isReadOnly || !this.allowAddPanel) {
|
55541
55711
|
this.updateNoEntriesTextDefaultLoc();
|
55542
55712
|
}
|
55713
|
+
this.updateFooterActions();
|
55543
55714
|
_super.prototype.onSurveyLoad.call(this);
|
55544
55715
|
};
|
55545
55716
|
QuestionPanelDynamicModel.prototype.onFirstRendering = function () {
|
@@ -56364,6 +56535,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].addClass("paneldynamic",
|
|
56364
56535
|
{ name: "noEntriesText:text", serializationProperty: "locNoEntriesText" },
|
56365
56536
|
{ name: "allowAddPanel:boolean", default: true },
|
56366
56537
|
{ name: "allowRemovePanel:boolean", default: true },
|
56538
|
+
{ name: "newPanelPosition", choices: ["next", "last"], default: "last", category: "layout" },
|
56367
56539
|
{
|
56368
56540
|
name: "panelCount:number",
|
56369
56541
|
isBindable: true,
|
@@ -58989,6 +59161,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
58989
59161
|
_this.onOpened = _this.addEvent();
|
58990
59162
|
_this.createLocalizableString("placeholder", _this, false, true);
|
58991
59163
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
59164
|
+
_this.createLocalizableString("readOnlyText", _this, true);
|
58992
59165
|
_this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
|
58993
59166
|
_this.updateReadOnlyText();
|
58994
59167
|
});
|
@@ -59050,6 +59223,23 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
59050
59223
|
enumerable: false,
|
59051
59224
|
configurable: true
|
59052
59225
|
});
|
59226
|
+
Object.defineProperty(QuestionTagboxModel.prototype, "readOnlyText", {
|
59227
|
+
get: function () {
|
59228
|
+
return this.getLocalizableStringText("readOnlyText");
|
59229
|
+
},
|
59230
|
+
set: function (val) {
|
59231
|
+
this.setLocalizableStringText("readOnlyText", val);
|
59232
|
+
},
|
59233
|
+
enumerable: false,
|
59234
|
+
configurable: true
|
59235
|
+
});
|
59236
|
+
Object.defineProperty(QuestionTagboxModel.prototype, "locReadOnlyText", {
|
59237
|
+
get: function () {
|
59238
|
+
return this.getLocalizableString("readOnlyText");
|
59239
|
+
},
|
59240
|
+
enumerable: false,
|
59241
|
+
configurable: true
|
59242
|
+
});
|
59053
59243
|
QuestionTagboxModel.prototype.getType = function () {
|
59054
59244
|
return "tagbox";
|
59055
59245
|
};
|
@@ -59175,9 +59365,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
59175
59365
|
enumerable: false,
|
59176
59366
|
configurable: true
|
59177
59367
|
});
|
59178
|
-
__decorate([
|
59179
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: "" })
|
59180
|
-
], QuestionTagboxModel.prototype, "readOnlyText", void 0);
|
59181
59368
|
__decorate([
|
59182
59369
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
59183
59370
|
], QuestionTagboxModel.prototype, "allowClear", void 0);
|
@@ -63738,6 +63925,9 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
63738
63925
|
SurveyQuestionDropdownBase.prototype.getValueCore = function () {
|
63739
63926
|
return this.questionBase.renderedValue;
|
63740
63927
|
};
|
63928
|
+
SurveyQuestionDropdownBase.prototype.renderReadOnlyElement = function () {
|
63929
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, this.question.readOnlyText);
|
63930
|
+
};
|
63741
63931
|
SurveyQuestionDropdownBase.prototype.renderSelect = function (cssClasses) {
|
63742
63932
|
var _a, _b;
|
63743
63933
|
var selectElement = null;
|
@@ -63747,7 +63937,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
|
|
63747
63937
|
// @ts-ignore
|
63748
63938
|
selectElement = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), disabled: true },
|
63749
63939
|
text,
|
63750
|
-
|
63940
|
+
this.renderReadOnlyElement());
|
63751
63941
|
}
|
63752
63942
|
else {
|
63753
63943
|
if (!this.question["dropdownListModel"]) {
|
@@ -67724,18 +67914,20 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Inst
|
|
67724
67914
|
/*!********************************************!*\
|
67725
67915
|
!*** ./src/react/reactquestion_matrix.tsx ***!
|
67726
67916
|
\********************************************/
|
67727
|
-
/*! exports provided: SurveyQuestionMatrix, SurveyQuestionMatrixRow */
|
67917
|
+
/*! exports provided: SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell */
|
67728
67918
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
67729
67919
|
|
67730
67920
|
"use strict";
|
67731
67921
|
__webpack_require__.r(__webpack_exports__);
|
67732
67922
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrix", function() { return SurveyQuestionMatrix; });
|
67733
67923
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixRow", function() { return SurveyQuestionMatrixRow; });
|
67924
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixCell", function() { return SurveyQuestionMatrixCell; });
|
67734
67925
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
67735
67926
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
67736
67927
|
/* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
|
67737
67928
|
/* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
|
67738
67929
|
/* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/react/reactsurveymodel.tsx");
|
67930
|
+
/* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
|
67739
67931
|
var __extends = (undefined && undefined.__extends) || (function () {
|
67740
67932
|
var extendStatics = function (d, b) {
|
67741
67933
|
extendStatics = Object.setPrototypeOf ||
|
@@ -67755,6 +67947,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
67755
67947
|
|
67756
67948
|
|
67757
67949
|
|
67950
|
+
|
67758
67951
|
var SurveyQuestionMatrix = /** @class */ (function (_super) {
|
67759
67952
|
__extends(SurveyQuestionMatrix, _super);
|
67760
67953
|
function SurveyQuestionMatrix(props) {
|
@@ -67824,10 +68017,7 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
|
|
67824
68017
|
var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
67825
68018
|
__extends(SurveyQuestionMatrixRow, _super);
|
67826
68019
|
function SurveyQuestionMatrixRow(props) {
|
67827
|
-
|
67828
|
-
_this.handleOnChange = _this.handleOnChange.bind(_this);
|
67829
|
-
_this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
|
67830
|
-
return _this;
|
68020
|
+
return _super.call(this, props) || this;
|
67831
68021
|
}
|
67832
68022
|
Object.defineProperty(SurveyQuestionMatrixRow.prototype, "question", {
|
67833
68023
|
get: function () {
|
@@ -67843,13 +68033,6 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
67843
68033
|
enumerable: false,
|
67844
68034
|
configurable: true
|
67845
68035
|
});
|
67846
|
-
SurveyQuestionMatrixRow.prototype.handleOnChange = function (event) {
|
67847
|
-
this.row.value = event.target.value;
|
67848
|
-
this.setState({ value: this.row.value });
|
67849
|
-
};
|
67850
|
-
SurveyQuestionMatrixRow.prototype.handleOnMouseDown = function (event) {
|
67851
|
-
this.question.onMouseDown();
|
67852
|
-
};
|
67853
68036
|
SurveyQuestionMatrixRow.prototype.wrapCell = function (cell, element, reason) {
|
67854
68037
|
if (!reason) {
|
67855
68038
|
return element;
|
@@ -67884,30 +68067,35 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
67884
68067
|
var _this = this;
|
67885
68068
|
var tds = [];
|
67886
68069
|
var row = this.row;
|
67887
|
-
|
68070
|
+
var cellComponent = this.question.cellComponent;
|
68071
|
+
var _loop_1 = function () {
|
67888
68072
|
var td = null;
|
67889
|
-
var column =
|
68073
|
+
var column = this_1.question.visibleColumns[i];
|
67890
68074
|
var key = "value" + i;
|
67891
|
-
var
|
67892
|
-
|
67893
|
-
|
67894
|
-
if (this.question.hasCellText) {
|
67895
|
-
var getHandler = !this.question.isInputReadOnly
|
68075
|
+
var itemClass = this_1.question.getItemClass(row, column);
|
68076
|
+
if (this_1.question.hasCellText) {
|
68077
|
+
var getHandler = !this_1.question.isInputReadOnly
|
67896
68078
|
? function (column) { return function () { return _this.cellClick(row, column); }; }
|
67897
68079
|
: null;
|
67898
|
-
td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, className: itemClass, onClick: getHandler ? getHandler(column) : function () { } },
|
68080
|
+
td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, className: itemClass, onClick: getHandler ? getHandler(column) : function () { } }, this_1.renderLocString(this_1.question.getCellDisplayLocText(row.name, column))));
|
67899
68081
|
}
|
67900
68082
|
else {
|
67901
|
-
|
67902
|
-
|
67903
|
-
|
67904
|
-
|
67905
|
-
|
67906
|
-
|
67907
|
-
|
67908
|
-
|
68083
|
+
var renderedCell = _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.createElement(cellComponent, {
|
68084
|
+
question: this_1.question,
|
68085
|
+
row: this_1.row,
|
68086
|
+
column: column,
|
68087
|
+
columnIndex: i,
|
68088
|
+
cssClasses: this_1.cssClasses,
|
68089
|
+
isDisplayMode: this_1.isDisplayMode,
|
68090
|
+
cellChanged: function () { _this.cellClick(_this.row, column); }
|
68091
|
+
});
|
68092
|
+
td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, "data-responsive-title": column.locText.renderedHtml, className: this_1.question.cssClasses.cell }, renderedCell));
|
67909
68093
|
}
|
67910
68094
|
tds.push(td);
|
68095
|
+
};
|
68096
|
+
var this_1 = this;
|
68097
|
+
for (var i = 0; i < this.question.visibleColumns.length; i++) {
|
68098
|
+
_loop_1();
|
67911
68099
|
}
|
67912
68100
|
return tds;
|
67913
68101
|
};
|
@@ -67918,6 +68106,77 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
|
|
67918
68106
|
return SurveyQuestionMatrixRow;
|
67919
68107
|
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
67920
68108
|
|
68109
|
+
var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
|
68110
|
+
__extends(SurveyQuestionMatrixCell, _super);
|
68111
|
+
function SurveyQuestionMatrixCell(props) {
|
68112
|
+
var _this = _super.call(this, props) || this;
|
68113
|
+
_this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
|
68114
|
+
_this.handleOnChange = _this.handleOnChange.bind(_this);
|
68115
|
+
return _this;
|
68116
|
+
}
|
68117
|
+
SurveyQuestionMatrixCell.prototype.handleOnChange = function (event) {
|
68118
|
+
if (!!this.props.cellChanged) {
|
68119
|
+
this.props.cellChanged();
|
68120
|
+
}
|
68121
|
+
};
|
68122
|
+
SurveyQuestionMatrixCell.prototype.handleOnMouseDown = function (event) {
|
68123
|
+
this.question.onMouseDown();
|
68124
|
+
};
|
68125
|
+
Object.defineProperty(SurveyQuestionMatrixCell.prototype, "question", {
|
68126
|
+
get: function () {
|
68127
|
+
return this.props.question;
|
68128
|
+
},
|
68129
|
+
enumerable: false,
|
68130
|
+
configurable: true
|
68131
|
+
});
|
68132
|
+
Object.defineProperty(SurveyQuestionMatrixCell.prototype, "row", {
|
68133
|
+
get: function () {
|
68134
|
+
return this.props.row;
|
68135
|
+
},
|
68136
|
+
enumerable: false,
|
68137
|
+
configurable: true
|
68138
|
+
});
|
68139
|
+
Object.defineProperty(SurveyQuestionMatrixCell.prototype, "column", {
|
68140
|
+
get: function () {
|
68141
|
+
return this.props.column;
|
68142
|
+
},
|
68143
|
+
enumerable: false,
|
68144
|
+
configurable: true
|
68145
|
+
});
|
68146
|
+
Object.defineProperty(SurveyQuestionMatrixCell.prototype, "columnIndex", {
|
68147
|
+
get: function () {
|
68148
|
+
return this.props.columnIndex;
|
68149
|
+
},
|
68150
|
+
enumerable: false,
|
68151
|
+
configurable: true
|
68152
|
+
});
|
68153
|
+
SurveyQuestionMatrixCell.prototype.canRender = function () {
|
68154
|
+
return !!this.question && !!this.row;
|
68155
|
+
};
|
68156
|
+
SurveyQuestionMatrixCell.prototype.renderElement = function () {
|
68157
|
+
var isChecked = this.row.value == this.column.value;
|
68158
|
+
var inputId = this.question.inputId + "_" + this.row.name + "_" + this.columnIndex;
|
68159
|
+
var itemClass = this.question.getItemClass(this.row, this.column);
|
68160
|
+
var mobileSpan = this.question.isMobile ?
|
68161
|
+
(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
|
68162
|
+
: undefined;
|
68163
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
|
68164
|
+
this.renderInput(inputId, isChecked),
|
68165
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
|
68166
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
|
68167
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.itemSvgIcon })) :
|
68168
|
+
null),
|
68169
|
+
mobileSpan));
|
68170
|
+
};
|
68171
|
+
SurveyQuestionMatrixCell.prototype.renderInput = function (inputId, isChecked) {
|
68172
|
+
return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.isDisplayMode, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }));
|
68173
|
+
};
|
68174
|
+
return SurveyQuestionMatrixCell;
|
68175
|
+
}(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
|
68176
|
+
|
68177
|
+
_element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("survey-matrix-cell", function (props) {
|
68178
|
+
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixCell, props);
|
68179
|
+
});
|
67921
68180
|
_reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Instance.registerQuestion("matrix", function (props) {
|
67922
68181
|
return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrix, props);
|
67923
68182
|
});
|
@@ -69474,6 +69733,14 @@ var SurveyQuestionTagbox = /** @class */ (function (_super) {
|
|
69474
69733
|
select,
|
69475
69734
|
comment));
|
69476
69735
|
};
|
69736
|
+
SurveyQuestionTagbox.prototype.renderReadOnlyElement = function () {
|
69737
|
+
if (this.question.locReadOnlyText) {
|
69738
|
+
return this.renderLocString(this.question.locReadOnlyText);
|
69739
|
+
}
|
69740
|
+
else {
|
69741
|
+
return null;
|
69742
|
+
}
|
69743
|
+
};
|
69477
69744
|
return SurveyQuestionTagbox;
|
69478
69745
|
}(_dropdown_base__WEBPACK_IMPORTED_MODULE_2__["SurveyQuestionDropdownBase"]));
|
69479
69746
|
|
@@ -70502,14 +70769,8 @@ var settings = {
|
|
70502
70769
|
showEmptyTitles: true
|
70503
70770
|
},
|
70504
70771
|
//#region designMode section, Obsolete properties
|
70505
|
-
/**
|
70506
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyDescriptions`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
70507
|
-
*/
|
70508
70772
|
get allowShowEmptyDescriptionInDesignMode() { return this.designMode.showEmptyDescriptions; },
|
70509
70773
|
set allowShowEmptyDescriptionInDesignMode(val) { this.designMode.showEmptyDescriptions = val; },
|
70510
|
-
/**
|
70511
|
-
* This property is obsolete. Use the [`settings.designMode.showEmptyTitles`](https://surveyjs.io/form-library/documentation/api-reference/settings#designMode) property instead.
|
70512
|
-
*/
|
70513
70774
|
get allowShowEmptyTitleInDesignMode() { return this.designMode.showEmptyTitles; },
|
70514
70775
|
set allowShowEmptyTitleInDesignMode(val) { this.designMode.showEmptyTitles = val; },
|
70515
70776
|
//#endregion
|
@@ -70533,19 +70794,10 @@ var settings = {
|
|
70533
70794
|
defaultLocaleName: "default"
|
70534
70795
|
},
|
70535
70796
|
//#region localization section, obsolete properties
|
70536
|
-
/**
|
70537
|
-
* This property is obsolete. Use the [`settings.localization.useLocalTimeZone`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
70538
|
-
*/
|
70539
70797
|
get useLocalTimeZone() { return this.localization.useLocalTimeZone; },
|
70540
70798
|
set useLocalTimeZone(val) { this.localization.useLocalTimeZone = val; },
|
70541
|
-
/**
|
70542
|
-
* This property is obsolete. Use the [`settings.localization.storeDuplicatedTranslations`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
70543
|
-
*/
|
70544
70799
|
get storeDuplicatedTranslations() { return this.localization.storeDuplicatedTranslations; },
|
70545
70800
|
set storeDuplicatedTranslations(val) { this.localization.storeDuplicatedTranslations = val; },
|
70546
|
-
/**
|
70547
|
-
* This property is obsolete. Use the [`settings.localization.defaultLocaleName`](https://surveyjs.io/form-library/documentation/api-reference/settings#localization) property instead.
|
70548
|
-
*/
|
70549
70801
|
get defaultLocaleName() { return this.localization.defaultLocaleName; },
|
70550
70802
|
set defaultLocaleName(val) { this.localization.defaultLocaleName = val; },
|
70551
70803
|
//#endregion
|
@@ -70558,41 +70810,41 @@ var settings = {
|
|
70558
70810
|
* Specifies whether to encode URL parameters when you access a web service. Default value: `true`.
|
70559
70811
|
*
|
70560
70812
|
* - `cacheLoadedChoices`: `boolean`\
|
70561
|
-
* Specifies whether to cache [choices](https://surveyjs.io/form-library/documentation/api-reference/
|
70813
|
+
* Specifies whether to cache [choices loaded from a web service](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl). Default value: `true`.
|
70562
70814
|
*
|
70563
70815
|
* - `disableQuestionWhileLoadingChoices`: `boolean`\
|
70564
70816
|
* Disables a question while its choices are being loaded from a web service. Default value: `false`.
|
70565
70817
|
*
|
70566
70818
|
* - `surveyServiceUrl`: `string`\
|
70567
70819
|
* The URL of the SurveyJS Service API endpoint.
|
70820
|
+
*
|
70821
|
+
* - `onBeforeRequestChoices`: `(sender: ChoicesRestful, options: { request: XMLHttpRequest })`\
|
70822
|
+
* An event that is raised before a request for choices is send. Applies to questions with a specified [`choiceByUrl`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choicesByUrl) property. Use the `options.request` parameter to access and modify the `XMLHttpRequest` object. For instance, you can add authentication headers to it:
|
70823
|
+
*
|
70824
|
+
* ```js
|
70825
|
+
* import { settings } from "survey-core";
|
70826
|
+
*
|
70827
|
+
* settings.web.onBeforeSendRequest = (sender, options) => {
|
70828
|
+
* options.request.setRequestHeader('RequestVerificationToken', requestVerificationToken);
|
70829
|
+
* };
|
70830
|
+
* ```
|
70568
70831
|
*/
|
70569
70832
|
web: {
|
70833
|
+
onBeforeRequestChoices: function (sender, options) { },
|
70570
70834
|
encodeUrlParams: true,
|
70571
70835
|
cacheLoadedChoices: true,
|
70572
70836
|
disableQuestionWhileLoadingChoices: false,
|
70573
70837
|
surveyServiceUrl: "https://api.surveyjs.io/public/v1/Survey"
|
70574
70838
|
},
|
70575
70839
|
//#region web section, obsolete properties
|
70576
|
-
/**
|
70577
|
-
* This property is obsolete. Use the [`settings.web.encodeUrlParams`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
70578
|
-
*/
|
70579
70840
|
get webserviceEncodeParameters() { return this.web.encodeUrlParams; },
|
70580
70841
|
set webserviceEncodeParameters(val) { this.web.encodeUrlParams = val; },
|
70581
|
-
/**
|
70582
|
-
* This property is obsolete. Use the [`settings.web.cacheLoadedChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
70583
|
-
*/
|
70584
70842
|
get useCachingForChoicesRestful() { return this.web.cacheLoadedChoices; },
|
70585
70843
|
set useCachingForChoicesRestful(val) { this.web.cacheLoadedChoices = val; },
|
70586
70844
|
get useCachingForChoicesRestfull() { return this.web.cacheLoadedChoices; },
|
70587
70845
|
set useCachingForChoicesRestfull(val) { this.web.cacheLoadedChoices = val; },
|
70588
|
-
/**
|
70589
|
-
* This property is obsolete. Use the [`settings.web.disableQuestionWhileLoadingChoices`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
70590
|
-
*/
|
70591
70846
|
get disableOnGettingChoicesFromWeb() { return this.web.disableQuestionWhileLoadingChoices; },
|
70592
70847
|
set disableOnGettingChoicesFromWeb(val) { this.web.disableQuestionWhileLoadingChoices = val; },
|
70593
|
-
/**
|
70594
|
-
* This property is obsolete. Use the [`settings.web.surveyServiceUrl`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) property instead.
|
70595
|
-
*/
|
70596
70848
|
get surveyServiceUrl() { return this.web.surveyServiceUrl; },
|
70597
70849
|
set surveyServiceUrl(val) { this.web.surveyServiceUrl = val; },
|
70598
70850
|
//#endregion
|
@@ -70618,19 +70870,10 @@ var settings = {
|
|
70618
70870
|
executeSkipOnValueChanged: true
|
70619
70871
|
},
|
70620
70872
|
//#region triggers section, Obsolete properties
|
70621
|
-
/**
|
70622
|
-
* This property is obsolete. Use the [`settings.triggers.executeCompleteOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
70623
|
-
*/
|
70624
70873
|
get executeCompleteTriggerOnValueChanged() { return this.triggers.executeCompleteOnValueChanged; },
|
70625
70874
|
set executeCompleteTriggerOnValueChanged(val) { this.triggers.executeCompleteOnValueChanged = val; },
|
70626
|
-
/**
|
70627
|
-
* This property is obsolete. Use the [`settings.triggers.changeNavigationButtonsOnComplete`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
70628
|
-
*/
|
70629
70875
|
get changeNavigationButtonsOnCompleteTrigger() { return this.triggers.changeNavigationButtonsOnComplete; },
|
70630
70876
|
set changeNavigationButtonsOnCompleteTrigger(val) { this.triggers.changeNavigationButtonsOnComplete = val; },
|
70631
|
-
/**
|
70632
|
-
* This property is obsolete. Use the [`settings.triggers.executeSkipOnValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/settings#triggers) property instead.
|
70633
|
-
*/
|
70634
70877
|
get executeSkipTriggerOnValueChanged() { return this.triggers.executeSkipOnValueChanged; },
|
70635
70878
|
set executeSkipTriggerOnValueChanged(val) { this.triggers.executeSkipOnValueChanged = val; },
|
70636
70879
|
//#endregion
|
@@ -70668,19 +70911,10 @@ var settings = {
|
|
70668
70911
|
localizableStringSerializeAsObject: false
|
70669
70912
|
},
|
70670
70913
|
//#region serialization section, Obsolete properties
|
70671
|
-
/**
|
70672
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
70673
|
-
*/
|
70674
70914
|
get itemValueAlwaysSerializeAsObject() { return this.serialization.itemValueSerializeAsObject; },
|
70675
70915
|
set itemValueAlwaysSerializeAsObject(val) { this.serialization.itemValueSerializeAsObject = val; },
|
70676
|
-
/**
|
70677
|
-
* This property is obsolete. Use the [`settings.serialization.itemValueSerializeDisplayText`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
70678
|
-
*/
|
70679
70916
|
get itemValueAlwaysSerializeText() { return this.serialization.itemValueSerializeDisplayText; },
|
70680
70917
|
set itemValueAlwaysSerializeText(val) { this.serialization.itemValueSerializeDisplayText = val; },
|
70681
|
-
/**
|
70682
|
-
* This property is obsolete. Use the [`settings.serialization.localizableStringSerializeAsObject`](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization) property instead.
|
70683
|
-
*/
|
70684
70918
|
get serializeLocalizableStringAsObject() { return this.serialization.localizableStringSerializeAsObject; },
|
70685
70919
|
set serializeLocalizableStringAsObject(val) { this.serialization.localizableStringSerializeAsObject = val; },
|
70686
70920
|
//#endregion
|
@@ -70699,9 +70933,6 @@ var settings = {
|
|
70699
70933
|
firstBatchSize: 3
|
70700
70934
|
},
|
70701
70935
|
//#region lazyRender section, Obsolete properties
|
70702
|
-
/**
|
70703
|
-
* This property is obsolete. Use the [`settings.lazyRender.enabled`](https://surveyjs.io/form-library/documentation/api-reference/settings#lazyRender) property instead.
|
70704
|
-
*/
|
70705
70936
|
get lazyRowsRendering() { return this.lazyRender.enabled; },
|
70706
70937
|
set lazyRowsRendering(val) { this.lazyRender.enabled = val; },
|
70707
70938
|
get lazyRowsRenderingStartRow() { return this.lazyRender.firstBatchSize; },
|
@@ -70751,34 +70982,16 @@ var settings = {
|
|
70751
70982
|
rateSize: "small",
|
70752
70983
|
},
|
70753
70984
|
//#region matrix section, Obsolete properties
|
70754
|
-
/**
|
70755
|
-
* This property is obsolete. Use the [`settings.matrix.defaultRowName`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
70756
|
-
*/
|
70757
70985
|
get matrixDefaultRowName() { return this.matrix.defaultRowName; },
|
70758
70986
|
set matrixDefaultRowName(val) { this.matrix.defaultRowName = val; },
|
70759
|
-
/**
|
70760
|
-
* This property is obsolete. Use the [`settings.matrix.defaultCellType`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
70761
|
-
*/
|
70762
70987
|
get matrixDefaultCellType() { return this.matrix.defaultCellType; },
|
70763
70988
|
set matrixDefaultCellType(val) { this.matrix.defaultCellType = val; },
|
70764
|
-
/**
|
70765
|
-
* This property is obsolete. Use the [`settings.matrix.totalsSuffix`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
70766
|
-
*/
|
70767
70989
|
get matrixTotalValuePostFix() { return this.matrix.totalsSuffix; },
|
70768
70990
|
set matrixTotalValuePostFix(val) { this.matrix.totalsSuffix = val; },
|
70769
|
-
/**
|
70770
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
70771
|
-
*/
|
70772
70991
|
get matrixMaximumRowCount() { return this.matrix.maxRowCount; },
|
70773
70992
|
set matrixMaximumRowCount(val) { this.matrix.maxRowCount = val; },
|
70774
|
-
/**
|
70775
|
-
* This property is obsolete. Use the [`settings.matrix.maxRowCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
70776
|
-
*/
|
70777
70993
|
get matrixMaxRowCountInCondition() { return this.matrix.maxRowCountInCondition; },
|
70778
70994
|
set matrixMaxRowCountInCondition(val) { this.matrix.maxRowCountInCondition = val; },
|
70779
|
-
/**
|
70780
|
-
* This property is obsolete. Use the [`settings.matrix.renderRemoveAsIcon`](https://surveyjs.io/form-library/documentation/api-reference/settings#matrix) property instead.
|
70781
|
-
*/
|
70782
70995
|
get matrixRenderRemoveAsIcon() { return this.matrix.renderRemoveAsIcon; },
|
70783
70996
|
set matrixRenderRemoveAsIcon(val) { this.matrix.renderRemoveAsIcon = val; },
|
70784
70997
|
//#endregion
|
@@ -70800,14 +71013,8 @@ var settings = {
|
|
70800
71013
|
maxPanelCountInCondition: 1
|
70801
71014
|
},
|
70802
71015
|
//#region panel section, Obsolete properties
|
70803
|
-
/**
|
70804
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCountInCondition`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
70805
|
-
*/
|
70806
71016
|
get panelDynamicMaxPanelCountInCondition() { return this.panel.maxPanelCountInCondition; },
|
70807
71017
|
set panelDynamicMaxPanelCountInCondition(val) { this.panel.maxPanelCountInCondition = val; },
|
70808
|
-
/**
|
70809
|
-
* This property is obsolete. Use the [`settings.panel.maxPanelCount`](https://surveyjs.io/form-library/documentation/api-reference/settings#panel) property instead.
|
70810
|
-
*/
|
70811
71018
|
get panelMaximumPanelCount() { return this.panel.maxPanelCount; },
|
70812
71019
|
set panelMaximumPanelCount(val) { this.panel.maxPanelCount = val; },
|
70813
71020
|
//#endregion
|
@@ -70828,14 +71035,8 @@ var settings = {
|
|
70828
71035
|
textRenderMode: "input"
|
70829
71036
|
},
|
70830
71037
|
//#region readOnly section, Obsolete properties
|
70831
|
-
/**
|
70832
|
-
* This property is obsolete. Use the [`settings.readOnly.commentRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
70833
|
-
*/
|
70834
71038
|
get readOnlyCommentRenderMode() { return this.readOnly.commentRenderMode; },
|
70835
71039
|
set readOnlyCommentRenderMode(val) { this.readOnly.commentRenderMode = val; },
|
70836
|
-
/**
|
70837
|
-
* This property is obsolete. Use the [`settings.readOnly.textRenderMode`](https://surveyjs.io/form-library/documentation/api-reference/settings#readOnly) property instead.
|
70838
|
-
*/
|
70839
71040
|
get readOnlyTextRenderMode() { return this.readOnly.textRenderMode; },
|
70840
71041
|
set readOnlyTextRenderMode(val) { this.readOnly.textRenderMode = val; },
|
70841
71042
|
//#endregion
|
@@ -70855,14 +71056,8 @@ var settings = {
|
|
70855
71056
|
includeQuestionsWithHiddenTitle: false
|
70856
71057
|
},
|
70857
71058
|
//#region numbering section, Obsolete properties
|
70858
|
-
/**
|
70859
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenTitle`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
70860
|
-
*/
|
70861
71059
|
get setQuestionVisibleIndexForHiddenTitle() { return this.numbering.includeQuestionsWithHiddenTitle; },
|
70862
71060
|
set setQuestionVisibleIndexForHiddenTitle(val) { this.numbering.includeQuestionsWithHiddenTitle = val; },
|
70863
|
-
/**
|
70864
|
-
* This property is obsolete. Use the [`settings.numbering.includeQuestionsWithHiddenNumber`](https://surveyjs.io/form-library/documentation/api-reference/settings#numbering) property instead.
|
70865
|
-
*/
|
70866
71061
|
get setQuestionVisibleIndexForHiddenNumber() { return this.numbering.includeQuestionsWithHiddenNumber; },
|
70867
71062
|
set setQuestionVisibleIndexForHiddenNumber(val) { this.numbering.includeQuestionsWithHiddenNumber = val; },
|
70868
71063
|
//#endregion
|
@@ -72260,6 +72455,16 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
72260
72455
|
enumerable: false,
|
72261
72456
|
configurable: true
|
72262
72457
|
});
|
72458
|
+
Object.defineProperty(SurveyElement.prototype, "cssClassesValue", {
|
72459
|
+
get: function () {
|
72460
|
+
return this.getPropertyValueWithoutDefault("cssClassesValue");
|
72461
|
+
},
|
72462
|
+
set: function (val) {
|
72463
|
+
this.setPropertyValue("cssClassesValue", val);
|
72464
|
+
},
|
72465
|
+
enumerable: false,
|
72466
|
+
configurable: true
|
72467
|
+
});
|
72263
72468
|
SurveyElement.prototype.ensureCssClassesValue = function () {
|
72264
72469
|
if (!this.cssClassesValue) {
|
72265
72470
|
this.cssClassesValue = this.calcCssClasses(this.css);
|
@@ -72313,7 +72518,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
72313
72518
|
SurveyElement.prototype.getIsLoadingFromJson = function () {
|
72314
72519
|
if (_super.prototype.getIsLoadingFromJson.call(this))
|
72315
72520
|
return true;
|
72316
|
-
return this.
|
72521
|
+
return this.surveyValue ? this.surveyValue.isLoadingFromJson : false;
|
72317
72522
|
};
|
72318
72523
|
Object.defineProperty(SurveyElement.prototype, "name", {
|
72319
72524
|
/**
|
@@ -72838,9 +73043,6 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
72838
73043
|
__decorate([
|
72839
73044
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
72840
73045
|
], SurveyElement.prototype, "isDragMe", void 0);
|
72841
|
-
__decorate([
|
72842
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
72843
|
-
], SurveyElement.prototype, "cssClassesValue", void 0);
|
72844
73046
|
__decorate([
|
72845
73047
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
72846
73048
|
], SurveyElement.prototype, "hasVisibleErrors", void 0);
|
@@ -73801,6 +74003,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
73801
74003
|
_this.registerPropertyChangedHandlers(["renderBackgroundImage", "backgroundOpacity", "backgroundImageFit", "fitToContainer", "backgroundImageAttachment"], function () {
|
73802
74004
|
_this.updateBackgroundImageStyle();
|
73803
74005
|
});
|
74006
|
+
_this.registerPropertyChangedHandlers(["showPrevButton", "showCompleteButton"], function () { _this.updateButtonsVisibility(); });
|
73804
74007
|
_this.onGetQuestionNo.onCallbacksChanged = function () {
|
73805
74008
|
_this.resetVisibleIndexes();
|
73806
74009
|
};
|
@@ -74384,6 +74587,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
74384
74587
|
* - `"none"` - Hides the navigation buttons. This setting may be useful if you [implement custom external navigation](https://surveyjs.io/form-library/examples/external-form-navigation-system/).
|
74385
74588
|
* @see goNextPageAutomatic
|
74386
74589
|
* @see showPrevButton
|
74590
|
+
* @see showCompleteButton
|
74387
74591
|
*/
|
74388
74592
|
get: function () {
|
74389
74593
|
return this.getPropertyValue("showNavigationButtons");
|
@@ -74404,6 +74608,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
74404
74608
|
/**
|
74405
74609
|
* Specifies whether to display the Previous button. Set this property to `false` if respondents should not move backward along the survey.
|
74406
74610
|
* @see showNavigationButtons
|
74611
|
+
* @see showCompleteButton
|
74407
74612
|
*/
|
74408
74613
|
get: function () {
|
74409
74614
|
return this.getPropertyValue("showPrevButton");
|
@@ -74414,6 +74619,21 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
74414
74619
|
enumerable: false,
|
74415
74620
|
configurable: true
|
74416
74621
|
});
|
74622
|
+
Object.defineProperty(SurveyModel.prototype, "showCompleteButton", {
|
74623
|
+
/**
|
74624
|
+
* Specifies whether to display the Complete button. Set this property to `false` if respondents should not complete the survey.
|
74625
|
+
* @see showNavigationButtons
|
74626
|
+
* @see showPrevButton
|
74627
|
+
*/
|
74628
|
+
get: function () {
|
74629
|
+
return this.getPropertyValue("showCompleteButton", true);
|
74630
|
+
},
|
74631
|
+
set: function (val) {
|
74632
|
+
this.setPropertyValue("showCompleteButton", val);
|
74633
|
+
},
|
74634
|
+
enumerable: false,
|
74635
|
+
configurable: true
|
74636
|
+
});
|
74417
74637
|
Object.defineProperty(SurveyModel.prototype, "showTOC", {
|
74418
74638
|
/**
|
74419
74639
|
* Gets or sets the visibility of the table of contents.
|
@@ -74863,7 +75083,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
74863
75083
|
* [Survey Localization demo](https://surveyjs.io/form-library/examples/survey-localization/ (linkStyle))
|
74864
75084
|
*/
|
74865
75085
|
get: function () {
|
74866
|
-
return this.
|
75086
|
+
return this.getPropertyValueWithoutDefault("locale") || _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale;
|
74867
75087
|
},
|
74868
75088
|
set: function (value) {
|
74869
75089
|
if (value === _surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].defaultLocale && !_surveyStrings__WEBPACK_IMPORTED_MODULE_8__["surveyLocalization"].currentLocale) {
|
@@ -75264,6 +75484,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
75264
75484
|
if (newVal !== this._isCompact) {
|
75265
75485
|
this._isCompact = newVal;
|
75266
75486
|
this.updateElementCss();
|
75487
|
+
this.triggerResponsiveness(true);
|
75267
75488
|
}
|
75268
75489
|
},
|
75269
75490
|
enumerable: false,
|
@@ -77215,21 +77436,16 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
77215
77436
|
var visPages = this.visiblePages;
|
77216
77437
|
var firstErrorPage = null;
|
77217
77438
|
var res = true;
|
77439
|
+
var rec = { fireCallback: fireCallback, focuseOnFirstError: focusOnFirstError, firstErrorQuestion: null, result: false };
|
77218
77440
|
for (var i = 0; i < visPages.length; i++) {
|
77219
|
-
if (!visPages[i].validate(fireCallback,
|
77441
|
+
if (!visPages[i].validate(fireCallback, focusOnFirstError, rec)) {
|
77220
77442
|
if (!firstErrorPage)
|
77221
77443
|
firstErrorPage = visPages[i];
|
77222
77444
|
res = false;
|
77223
77445
|
}
|
77224
77446
|
}
|
77225
|
-
if (focusOnFirstError && !!firstErrorPage) {
|
77226
|
-
|
77227
|
-
for (var i_2 = 0; i_2 < questions.length; i_2++) {
|
77228
|
-
if (questions[i_2].errors.length > 0) {
|
77229
|
-
questions[i_2].focus(true);
|
77230
|
-
break;
|
77231
|
-
}
|
77232
|
-
}
|
77447
|
+
if (focusOnFirstError && !!firstErrorPage && !!rec.firstErrorQuestion) {
|
77448
|
+
rec.firstErrorQuestion.focus(true);
|
77233
77449
|
}
|
77234
77450
|
if (!res || !onAsyncValidation)
|
77235
77451
|
return res;
|
@@ -77759,7 +77975,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
77759
77975
|
var state = this.state;
|
77760
77976
|
return this.isEditMode && (this.state === "running" &&
|
77761
77977
|
(this.isLastPage && !this.isShowPreviewBeforeComplete || this.canBeCompletedByTrigger)
|
77762
|
-
|| state === "preview");
|
77978
|
+
|| state === "preview") && this.showCompleteButton;
|
77763
77979
|
};
|
77764
77980
|
SurveyModel.prototype.calcIsPreviewButtonVisible = function () {
|
77765
77981
|
return (this.isEditMode &&
|
@@ -79269,8 +79485,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
79269
79485
|
this.calculatedValues[i].doCalculation(this.calculatedValues, this.conditionValues, properties);
|
79270
79486
|
}
|
79271
79487
|
_super.prototype.runConditionCore.call(this, this.conditionValues, properties);
|
79272
|
-
for (var
|
79273
|
-
pages[
|
79488
|
+
for (var i_2 = 0; i_2 < pages.length; i_2++) {
|
79489
|
+
pages[i_2].runCondition(this.conditionValues, properties);
|
79274
79490
|
}
|
79275
79491
|
};
|
79276
79492
|
SurveyModel.prototype.runQuestionsTriggers = function (name, value) {
|
@@ -79442,13 +79658,13 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
79442
79658
|
page.num = isPageVisible ? page.visibleIndex + 1 : -1;
|
79443
79659
|
}
|
79444
79660
|
};
|
79445
|
-
SurveyModel.prototype.fromJSON = function (json) {
|
79661
|
+
SurveyModel.prototype.fromJSON = function (json, options) {
|
79446
79662
|
if (!json)
|
79447
79663
|
return;
|
79448
79664
|
this.questionHashesClear();
|
79449
79665
|
this.jsonErrors = null;
|
79450
79666
|
var jsonConverter = new _jsonobject__WEBPACK_IMPORTED_MODULE_1__["JsonObject"]();
|
79451
|
-
jsonConverter.toObject(json, this);
|
79667
|
+
jsonConverter.toObject(json, this, options);
|
79452
79668
|
if (jsonConverter.errors.length > 0) {
|
79453
79669
|
this.jsonErrors = jsonConverter.errors;
|
79454
79670
|
}
|
@@ -80044,7 +80260,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
80044
80260
|
}
|
80045
80261
|
this.updateVisibleIndexes();
|
80046
80262
|
this.setCalculatedWidthModeUpdater();
|
80047
|
-
if (
|
80263
|
+
if (this.canFireAddElement()) {
|
80048
80264
|
this.onQuestionAdded.fire(this, {
|
80049
80265
|
question: question,
|
80050
80266
|
name: question.name,
|
@@ -80056,6 +80272,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
80056
80272
|
});
|
80057
80273
|
}
|
80058
80274
|
};
|
80275
|
+
SurveyModel.prototype.canFireAddElement = function () {
|
80276
|
+
return !this.isMovingQuestion || this.isDesignMode && !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].supportCreatorV2;
|
80277
|
+
};
|
80059
80278
|
SurveyModel.prototype.questionRemoved = function (question) {
|
80060
80279
|
this.questionHashesRemoved(question, question.name, question.getValueName());
|
80061
80280
|
this.updateVisibleIndexes();
|
@@ -80129,15 +80348,17 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
80129
80348
|
}
|
80130
80349
|
this.questionHashesPanelAdded(panel);
|
80131
80350
|
this.updateVisibleIndexes();
|
80132
|
-
this.
|
80133
|
-
|
80134
|
-
|
80135
|
-
|
80136
|
-
|
80137
|
-
|
80138
|
-
|
80139
|
-
|
80140
|
-
|
80351
|
+
if (this.canFireAddElement()) {
|
80352
|
+
this.onPanelAdded.fire(this, {
|
80353
|
+
panel: panel,
|
80354
|
+
name: panel.name,
|
80355
|
+
index: index,
|
80356
|
+
parent: parentPanel,
|
80357
|
+
page: rootPanel,
|
80358
|
+
parentPanel: parentPanel,
|
80359
|
+
rootPanel: rootPanel,
|
80360
|
+
});
|
80361
|
+
}
|
80141
80362
|
};
|
80142
80363
|
SurveyModel.prototype.panelRemoved = function (panel) {
|
80143
80364
|
this.updateVisibleIndexes();
|
@@ -80866,7 +81087,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
80866
81087
|
var containerLayoutElements = [];
|
80867
81088
|
for (var _i = 0, _a = this.layoutElements; _i < _a.length; _i++) {
|
80868
81089
|
var layoutElement = _a[_i];
|
80869
|
-
if (isStrCiEqual(layoutElement.id, "timerpanel")) {
|
81090
|
+
if (this.mode !== "display" && isStrCiEqual(layoutElement.id, "timerpanel")) {
|
80870
81091
|
if (container === "header") {
|
80871
81092
|
if (this.isTimerPanelShowingOnTop && !this.isShowStartingPage) {
|
80872
81093
|
containerLayoutElements.push(layoutElement);
|
@@ -81174,7 +81395,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
|
|
81174
81395
|
onSetValue: function (obj, value, jsonConverter) {
|
81175
81396
|
obj.pages.splice(0, obj.pages.length);
|
81176
81397
|
var page = obj.addNewPage("");
|
81177
|
-
jsonConverter.toObject({ questions: value }, page);
|
81398
|
+
jsonConverter.toObject({ questions: value }, page, jsonConverter === null || jsonConverter === void 0 ? void 0 : jsonConverter.options);
|
81178
81399
|
},
|
81179
81400
|
},
|
81180
81401
|
{
|
@@ -81766,9 +81987,12 @@ var SurveyTimerModel = /** @class */ (function (_super) {
|
|
81766
81987
|
_this.progress = Math.floor((spent + 1) / limit * 100) / 100;
|
81767
81988
|
}, 0);
|
81768
81989
|
}
|
81769
|
-
else if (spent
|
81990
|
+
else if (spent <= limit) {
|
81770
81991
|
this.progress = Math.floor((spent + 1) / limit * 100) / 100;
|
81771
81992
|
}
|
81993
|
+
if (this.progress > 1) {
|
81994
|
+
this.progress = undefined;
|
81995
|
+
}
|
81772
81996
|
}
|
81773
81997
|
};
|
81774
81998
|
SurveyTimerModel.prototype.updateText = function () {
|
@@ -83309,12 +83533,13 @@ var CssClassBuilder = /** @class */ (function () {
|
|
83309
83533
|
/*!******************************!*\
|
83310
83534
|
!*** ./src/utils/devices.ts ***!
|
83311
83535
|
\******************************/
|
83312
|
-
/*! exports provided: IsMobile, IsTouch, _setIsTouch */
|
83536
|
+
/*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch */
|
83313
83537
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
83314
83538
|
|
83315
83539
|
"use strict";
|
83316
83540
|
__webpack_require__.r(__webpack_exports__);
|
83317
83541
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsMobile", function() { return IsMobile; });
|
83542
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseInfo", function() { return mouseInfo; });
|
83318
83543
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return IsTouch; });
|
83319
83544
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setIsTouch", function() { return _setIsTouch; });
|
83320
83545
|
// isMobile
|
@@ -83338,12 +83563,18 @@ if (typeof navigator !== "undefined" &&
|
|
83338
83563
|
})(vendor);
|
83339
83564
|
var _IPad = false;
|
83340
83565
|
var IsMobile = _isMobile || _IPad;
|
83341
|
-
|
83342
|
-
|
83343
|
-
|
83344
|
-
|
83345
|
-
|
83346
|
-
|
83566
|
+
var mouseInfo = {
|
83567
|
+
get isTouch() {
|
83568
|
+
return !this.hasMouse && this.hasTouchEvent;
|
83569
|
+
},
|
83570
|
+
get hasTouchEvent() {
|
83571
|
+
return typeof window !== "undefined" && ("ontouchstart" in window || navigator.maxTouchPoints > 0);
|
83572
|
+
},
|
83573
|
+
hasMouse: true
|
83574
|
+
};
|
83575
|
+
var pointerMatches = (typeof matchMedia !== "undefined" && !!matchMedia && matchMedia("(pointer:fine)")) || undefined;
|
83576
|
+
mouseInfo.hasMouse = !!pointerMatches && !!pointerMatches.matches;
|
83577
|
+
var IsTouch = mouseInfo.isTouch;
|
83347
83578
|
//for tests
|
83348
83579
|
function _setIsTouch(val) {
|
83349
83580
|
IsTouch = val;
|
@@ -84682,7 +84913,7 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
84682
84913
|
if (properties === void 0) { properties = null; }
|
84683
84914
|
if (!this.regex || this.isValueEmpty(value))
|
84684
84915
|
return null;
|
84685
|
-
var re =
|
84916
|
+
var re = this.createRegExp();
|
84686
84917
|
if (Array.isArray(value)) {
|
84687
84918
|
for (var i = 0; i < value.length; i++) {
|
84688
84919
|
var res = this.hasError(re, value[i], name);
|
@@ -84710,6 +84941,19 @@ var RegexValidator = /** @class */ (function (_super) {
|
|
84710
84941
|
enumerable: false,
|
84711
84942
|
configurable: true
|
84712
84943
|
});
|
84944
|
+
Object.defineProperty(RegexValidator.prototype, "insensitive", {
|
84945
|
+
get: function () {
|
84946
|
+
return this.getPropertyValue("insensitive");
|
84947
|
+
},
|
84948
|
+
set: function (val) {
|
84949
|
+
this.setPropertyValue("insensitive", val);
|
84950
|
+
},
|
84951
|
+
enumerable: false,
|
84952
|
+
configurable: true
|
84953
|
+
});
|
84954
|
+
RegexValidator.prototype.createRegExp = function () {
|
84955
|
+
return new RegExp(this.regex, this.insensitive ? "i" : "");
|
84956
|
+
};
|
84713
84957
|
return RegexValidator;
|
84714
84958
|
}(SurveyValidator));
|
84715
84959
|
|
@@ -84850,7 +85094,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("textvalidator",
|
|
84850
85094
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("answercountvalidator", ["minCount:number", "maxCount:number"], function () {
|
84851
85095
|
return new AnswerCountValidator();
|
84852
85096
|
}, "surveyvalidator");
|
84853
|
-
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("regexvalidator", ["regex"], function () {
|
85097
|
+
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("regexvalidator", ["regex", { name: "insensitive:boolean", visible: false }], function () {
|
84854
85098
|
return new RegexValidator();
|
84855
85099
|
}, "surveyvalidator");
|
84856
85100
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("emailvalidator", [], function () {
|