survey-react 1.10.2 → 1.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaultV2.css +57 -19
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +13 -1
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +387 -1
- package/survey.css.map +1 -1
- package/survey.min.css +2 -2
- package/survey.react.d.ts +44 -19
- package/survey.react.js +317 -168
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.10.
|
2
|
+
* surveyjs - Survey JavaScript library v1.10.4
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -745,9 +745,9 @@ function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOpti
|
|
745
745
|
}, listOptions.allowSelection, listOptions.selectedItem);
|
746
746
|
listModel.locOwner = locOwner;
|
747
747
|
listModel.setOnFilterStringChangedCallback(listOptions.onFilterStringChangedCallback);
|
748
|
-
var
|
749
|
-
|
750
|
-
});
|
748
|
+
var options = popupOptions || {};
|
749
|
+
options.onDispose = function () { listModel.dispose(); };
|
750
|
+
var innerPopupModel = new _popup__WEBPACK_IMPORTED_MODULE_4__["PopupModel"]("sv-list", { model: listModel }, options);
|
751
751
|
innerPopupModel.displayMode = popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.displayMode;
|
752
752
|
var newActionOptions = Object.assign({}, actionOptions, {
|
753
753
|
component: "sv-action-bar-item-dropdown",
|
@@ -771,7 +771,6 @@ var BaseAction = /** @class */ (function (_super) {
|
|
771
771
|
function BaseAction() {
|
772
772
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
773
773
|
_this.rendredIdValue = BaseAction.getNextRendredId();
|
774
|
-
_this.iconSize = 24;
|
775
774
|
return _this;
|
776
775
|
}
|
777
776
|
BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
|
@@ -974,7 +973,7 @@ var BaseAction = /** @class */ (function (_super) {
|
|
974
973
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
975
974
|
], BaseAction.prototype, "iconName", void 0);
|
976
975
|
__decorate([
|
977
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
976
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: 24 })
|
978
977
|
], BaseAction.prototype, "iconSize", void 0);
|
979
978
|
__decorate([
|
980
979
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
@@ -1848,6 +1847,8 @@ var Base = /** @class */ (function () {
|
|
1848
1847
|
* A new value for the property.
|
1849
1848
|
* - `options.oldValue`: `any`\
|
1850
1849
|
* An old value of the property. If the property is an array, `oldValue` contains the same array as `newValue` does.
|
1850
|
+
*
|
1851
|
+
* If you need to add and remove property change event handlers dynamically, use the [`registerPropertyChangedHandlers`](#registerPropertyChangedHandlers) and [`unregisterPropertyChangedHandlers`](#unregisterPropertyChangedHandlers) methods instead.
|
1851
1852
|
*/
|
1852
1853
|
this.onPropertyChanged = this.addEvent();
|
1853
1854
|
/**
|
@@ -2418,9 +2419,11 @@ var Base = /** @class */ (function () {
|
|
2418
2419
|
return res;
|
2419
2420
|
};
|
2420
2421
|
/**
|
2421
|
-
* Registers a
|
2422
|
+
* Registers a single value change handler for one or multiple properties.
|
2423
|
+
*
|
2424
|
+
* The `registerPropertyChangedHandlers` and [`unregisterPropertyChangedHandlers`](#unregisterPropertyChangedHandlers) methods allow you to manage property change event handlers dynamically. If you only need to attach an event handler without removing it afterwards, you can use the [`onPropertyChanged`](#onPropertyChanged) event instead.
|
2422
2425
|
* @param propertyNames An array of one or multiple property names.
|
2423
|
-
* @param handler A function to call when one of the listed properties change.
|
2426
|
+
* @param handler A function to call when one of the listed properties change. Accepts a new property value as an argument.
|
2424
2427
|
* @param key *(Optional)* A key that identifies the current registration. If a function for one of the properties is already registered with the same key, the function will be overwritten. You can also use the key to subsequently unregister handlers.
|
2425
2428
|
* @see unregisterPropertyChangedHandlers
|
2426
2429
|
*/
|
@@ -3967,13 +3970,18 @@ var ProcessValue = /** @class */ (function () {
|
|
3967
3970
|
};
|
3968
3971
|
ProcessValue.prototype.isAnyKeyChanged = function (keys, usedNames) {
|
3969
3972
|
for (var i = 0; i < usedNames.length; i++) {
|
3970
|
-
var
|
3971
|
-
if (
|
3973
|
+
var name_1 = usedNames[i];
|
3974
|
+
if (!name_1)
|
3975
|
+
continue;
|
3976
|
+
var lowerName = name_1.toLowerCase();
|
3977
|
+
if (keys.hasOwnProperty(name_1))
|
3972
3978
|
return true;
|
3973
|
-
|
3979
|
+
if (name_1 !== lowerName && keys.hasOwnProperty(lowerName))
|
3980
|
+
return true;
|
3981
|
+
var firstName = this.getFirstName(name_1);
|
3974
3982
|
if (!keys.hasOwnProperty(firstName))
|
3975
3983
|
continue;
|
3976
|
-
if (
|
3984
|
+
if (name_1 === firstName)
|
3977
3985
|
return true;
|
3978
3986
|
var keyValue = keys[firstName];
|
3979
3987
|
if (keyValue == undefined)
|
@@ -3983,9 +3991,9 @@ var ProcessValue = /** @class */ (function () {
|
|
3983
3991
|
return true;
|
3984
3992
|
var v = {};
|
3985
3993
|
v[firstName] = keyValue["oldValue"];
|
3986
|
-
var oldValue = this.getValue(
|
3994
|
+
var oldValue = this.getValue(name_1, v);
|
3987
3995
|
v[firstName] = keyValue["newValue"];
|
3988
|
-
var newValue = this.getValue(
|
3996
|
+
var newValue = this.getValue(name_1, v);
|
3989
3997
|
if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(oldValue, newValue, false, false, false))
|
3990
3998
|
return true;
|
3991
3999
|
}
|
@@ -6036,6 +6044,8 @@ var defaultV2Css = {
|
|
6036
6044
|
selectWrapper: "sv-dropdown_select-wrapper",
|
6037
6045
|
controlValue: "sd-dropdown__value",
|
6038
6046
|
controlDisabled: "sd-input--disabled",
|
6047
|
+
controlReadOnly: "sd-input--readonly",
|
6048
|
+
controlPreview: "sd-input--preview",
|
6039
6049
|
controlEmpty: "sd-dropdown--empty",
|
6040
6050
|
filterStringInput: "sd-dropdown__filter-string-input",
|
6041
6051
|
chevronButton: "sd-dropdown_chevron-button",
|
@@ -7310,10 +7320,9 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
7310
7320
|
var pageY = event.pageY;
|
7311
7321
|
var clientX = event.clientX;
|
7312
7322
|
var clientY = event.clientY;
|
7313
|
-
|
7314
|
-
|
7315
|
-
|
7316
|
-
}
|
7323
|
+
//https://github.com/surveyjs/survey-creator/issues/5484
|
7324
|
+
rootElementX -= rootElementScrollLeft;
|
7325
|
+
rootElementY -= rootElementScrollTop;
|
7317
7326
|
var shortcutBottomCoordinate = this.getShortcutBottomCoordinate(clientY, shortcutHeight, shortcutYOffset);
|
7318
7327
|
var shortcutRightCoordinate = this.getShortcutRightCoordinate(clientX, shortcutWidth, shortcutXOffset);
|
7319
7328
|
if (shortcutRightCoordinate >= documentRight) { // right boundary
|
@@ -7365,17 +7374,12 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
7365
7374
|
DragDropDOMAdapter.prototype.getShortcutRightCoordinate = function (currentX, shortcutWidth, shortcutXOffset) {
|
7366
7375
|
return currentX + shortcutWidth - shortcutXOffset;
|
7367
7376
|
};
|
7368
|
-
DragDropDOMAdapter.prototype.
|
7377
|
+
DragDropDOMAdapter.prototype.requestAnimationFrame = function (callback) {
|
7378
|
+
return requestAnimationFrame(callback);
|
7379
|
+
};
|
7380
|
+
DragDropDOMAdapter.prototype.scrollByDrag = function (scrollableParentNode, clientY, clientX) {
|
7369
7381
|
var _this = this;
|
7370
|
-
cancelAnimationFrame(this.scrollIntervalId);
|
7371
7382
|
var startScrollBoundary = 100;
|
7372
|
-
var displayProp = this.draggedElementShortcut.style.display;
|
7373
|
-
//this.draggedElementShortcut.hidden = true;
|
7374
|
-
this.draggedElementShortcut.style.display = "none";
|
7375
|
-
var dragOverNode = this.documentOrShadowRoot.elementFromPoint(clientX, clientY);
|
7376
|
-
//this.draggedElementShortcut.hidden = false;
|
7377
|
-
this.draggedElementShortcut.style.display = displayProp || "block";
|
7378
|
-
var scrollableParentNode = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["findScrollableParent"])(dragOverNode);
|
7379
7383
|
var top;
|
7380
7384
|
var bottom;
|
7381
7385
|
var left;
|
@@ -7393,21 +7397,36 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
7393
7397
|
right = scrollableParentNode.getBoundingClientRect().right;
|
7394
7398
|
}
|
7395
7399
|
var repeat = function () {
|
7396
|
-
|
7400
|
+
var isTop = clientY - top <= startScrollBoundary;
|
7401
|
+
var isBottom = bottom - clientY <= startScrollBoundary;
|
7402
|
+
var isLeft = clientX - left <= startScrollBoundary;
|
7403
|
+
var isRight = right - clientX <= startScrollBoundary;
|
7404
|
+
if (isTop && !isLeft && !isRight) {
|
7397
7405
|
scrollableParentNode.scrollTop -= 15;
|
7398
7406
|
}
|
7399
|
-
else if (
|
7407
|
+
else if (isBottom && !isLeft && !isRight) {
|
7400
7408
|
scrollableParentNode.scrollTop += 15;
|
7401
7409
|
}
|
7402
|
-
else if (
|
7410
|
+
else if (isRight && !isTop && !isBottom) {
|
7403
7411
|
scrollableParentNode.scrollLeft += 15;
|
7404
7412
|
}
|
7405
|
-
else if (
|
7413
|
+
else if (isLeft && !isTop && !isBottom) {
|
7406
7414
|
scrollableParentNode.scrollLeft -= 15;
|
7407
7415
|
}
|
7408
|
-
_this.scrollIntervalId = requestAnimationFrame(repeat);
|
7416
|
+
_this.scrollIntervalId = _this.requestAnimationFrame(repeat);
|
7409
7417
|
};
|
7410
|
-
this.scrollIntervalId = requestAnimationFrame(repeat);
|
7418
|
+
this.scrollIntervalId = this.requestAnimationFrame(repeat);
|
7419
|
+
};
|
7420
|
+
DragDropDOMAdapter.prototype.doScroll = function (clientY, clientX) {
|
7421
|
+
cancelAnimationFrame(this.scrollIntervalId);
|
7422
|
+
var displayProp = this.draggedElementShortcut.style.display;
|
7423
|
+
//this.draggedElementShortcut.hidden = true;
|
7424
|
+
this.draggedElementShortcut.style.display = "none";
|
7425
|
+
var dragOverNode = this.documentOrShadowRoot.elementFromPoint(clientX, clientY);
|
7426
|
+
//this.draggedElementShortcut.hidden = false;
|
7427
|
+
this.draggedElementShortcut.style.display = displayProp || "block";
|
7428
|
+
var scrollableParentNode = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["findScrollableParent"])(dragOverNode);
|
7429
|
+
this.scrollByDrag(scrollableParentNode, clientY, clientX);
|
7411
7430
|
};
|
7412
7431
|
DragDropDOMAdapter.prototype.doStartDrag = function (event, draggedElement, parentElement, draggedElementNode) {
|
7413
7432
|
if (_utils_devices__WEBPACK_IMPORTED_MODULE_1__["IsTouch"]) {
|
@@ -7701,7 +7720,6 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7701
7720
|
if (!draggedElementShortcut)
|
7702
7721
|
return;
|
7703
7722
|
draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
|
7704
|
-
draggedElementShortcut.style.cssText = " \n cursor: grabbing;\n position: absolute;\n z-index: 10000;\n border-radius: calc(12.5 * var(--sjs-base-unit, var(--base-unit, 8px)));\n min-width: 100px;\n max-width: 400px;\n box-shadow: var(--sjs-shadow-medium, 0px 2px 6px 0px rgba(0, 0, 0, 0.1)), var(--sjs-shadow-large, 0px 8px 16px 0px rgba(0, 0, 0, 0.1));\n background-color: var(--sjs-general-backcolor, var(--background, #fff));\n font-family: var(--sjs-font-family, var(--font-family, var(--sjs-default-font-family)));\n ";
|
7705
7723
|
var isDeepClone = true;
|
7706
7724
|
var clone = draggedElementNode.cloneNode(isDeepClone);
|
7707
7725
|
draggedElementShortcut.appendChild(clone);
|
@@ -8159,7 +8177,8 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8159
8177
|
};
|
8160
8178
|
DropdownListModel.prototype.createPopup = function () {
|
8161
8179
|
var _this = this;
|
8162
|
-
|
8180
|
+
var popupOptions = { verticalPosition: "bottom", horizontalPosition: "center", showPointer: false };
|
8181
|
+
this._popupModel = new _popup__WEBPACK_IMPORTED_MODULE_5__["PopupModel"]("sv-list", { model: this.listModel }, popupOptions);
|
8163
8182
|
this._popupModel.displayMode = _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"] ? "overlay" : "popup";
|
8164
8183
|
this._popupModel.positionMode = "fixed";
|
8165
8184
|
this._popupModel.isFocusedContainer = false;
|
@@ -8220,7 +8239,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8220
8239
|
DropdownListModel.prototype.onHidePopup = function () {
|
8221
8240
|
this.resetFilterString();
|
8222
8241
|
this.question.suggestedItem = null;
|
8223
|
-
this.listModel.refresh();
|
8224
8242
|
};
|
8225
8243
|
DropdownListModel.prototype.getAvailableItems = function () {
|
8226
8244
|
return this.question.visibleChoices;
|
@@ -9806,8 +9824,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9806
9824
|
|
9807
9825
|
var Version;
|
9808
9826
|
var ReleaseDate;
|
9809
|
-
Version = "" + "1.10.
|
9810
|
-
ReleaseDate = "" + "2024-
|
9827
|
+
Version = "" + "1.10.4";
|
9828
|
+
ReleaseDate = "" + "2024-05-15";
|
9811
9829
|
function checkLibraryVersion(ver, libraryName) {
|
9812
9830
|
if (Version != ver) {
|
9813
9831
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -16517,6 +16535,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
16517
16535
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
16518
16536
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
16519
16537
|
/* harmony import */ var _console_warnings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./console-warnings */ "./src/console-warnings.ts");
|
16538
|
+
/* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
|
16539
|
+
|
16520
16540
|
|
16521
16541
|
|
16522
16542
|
|
@@ -16639,7 +16659,7 @@ function avg(params) {
|
|
16639
16659
|
}
|
16640
16660
|
FunctionFactory.Instance.register("avg", avg);
|
16641
16661
|
function getInArrayParams(params) {
|
16642
|
-
if (params.length
|
16662
|
+
if (params.length < 2 || params.length > 3)
|
16643
16663
|
return null;
|
16644
16664
|
var arr = params[0];
|
16645
16665
|
if (!arr)
|
@@ -16649,16 +16669,22 @@ function getInArrayParams(params) {
|
|
16649
16669
|
var name = params[1];
|
16650
16670
|
if (typeof name !== "string" && !(name instanceof String))
|
16651
16671
|
return null;
|
16652
|
-
|
16672
|
+
var expression = params.length === 3 ? params[2] : undefined;
|
16673
|
+
if (typeof expression !== "string" && !(expression instanceof String)) {
|
16674
|
+
expression = undefined;
|
16675
|
+
}
|
16676
|
+
return { data: arr, name: name, expression: expression };
|
16653
16677
|
}
|
16654
16678
|
function convertToNumber(val) {
|
16655
16679
|
if (typeof val === "string")
|
16656
16680
|
return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val) ? _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].getNumber(val) : undefined;
|
16657
16681
|
return val;
|
16658
16682
|
}
|
16659
|
-
function processItemInArray(item, name, res, func, needToConvert) {
|
16683
|
+
function processItemInArray(item, name, res, func, needToConvert, condition) {
|
16660
16684
|
if (!item || _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(item[name]))
|
16661
16685
|
return res;
|
16686
|
+
if (condition && !condition.run(item))
|
16687
|
+
return res;
|
16662
16688
|
var val = needToConvert ? convertToNumber(item[name]) : 1;
|
16663
16689
|
return func(res, val);
|
16664
16690
|
}
|
@@ -16667,15 +16693,19 @@ function calcInArray(params, func, needToConvert) {
|
|
16667
16693
|
var v = getInArrayParams(params);
|
16668
16694
|
if (!v)
|
16669
16695
|
return undefined;
|
16696
|
+
var condition = !!v.expression ? new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](v.expression) : undefined;
|
16697
|
+
if (condition && condition.isAsync) {
|
16698
|
+
condition = undefined;
|
16699
|
+
}
|
16670
16700
|
var res = undefined;
|
16671
16701
|
if (Array.isArray(v.data)) {
|
16672
16702
|
for (var i = 0; i < v.data.length; i++) {
|
16673
|
-
res = processItemInArray(v.data[i], v.name, res, func, needToConvert);
|
16703
|
+
res = processItemInArray(v.data[i], v.name, res, func, needToConvert, condition);
|
16674
16704
|
}
|
16675
16705
|
}
|
16676
16706
|
else {
|
16677
16707
|
for (var key in v.data) {
|
16678
|
-
res = processItemInArray(v.data[key], v.name, res, func, needToConvert);
|
16708
|
+
res = processItemInArray(v.data[key], v.name, res, func, needToConvert, condition);
|
16679
16709
|
}
|
16680
16710
|
}
|
16681
16711
|
return res;
|
@@ -20441,10 +20471,18 @@ var JsonMetadata = /** @class */ (function () {
|
|
20441
20471
|
return metaClass.getAllProperties();
|
20442
20472
|
};
|
20443
20473
|
JsonMetadata.prototype.getPropertiesByObj = function (obj) {
|
20444
|
-
|
20474
|
+
var type = !!obj && !!obj.getType ? obj.getType() : undefined;
|
20475
|
+
if (!type)
|
20445
20476
|
return [];
|
20446
|
-
var props = this.getProperties(
|
20477
|
+
var props = this.getProperties(type);
|
20447
20478
|
var dynamicProps = this.getDynamicPropertiesByObj(obj);
|
20479
|
+
for (var i = dynamicProps.length - 1; i >= 0; i--) {
|
20480
|
+
if (this.findProperty(type, dynamicProps[i].name)) {
|
20481
|
+
dynamicProps.splice(i, 1);
|
20482
|
+
}
|
20483
|
+
}
|
20484
|
+
if (dynamicProps.length === 0)
|
20485
|
+
return props;
|
20448
20486
|
return [].concat(props).concat(dynamicProps);
|
20449
20487
|
};
|
20450
20488
|
JsonMetadata.prototype.addDynamicPropertiesIntoObj = function (dest, src, props) {
|
@@ -21155,7 +21193,7 @@ var JsonObject = /** @class */ (function () {
|
|
21155
21193
|
this.removePosFromObj(value);
|
21156
21194
|
};
|
21157
21195
|
JsonObject.prototype.removePosFromObj = function (obj) {
|
21158
|
-
if (!obj)
|
21196
|
+
if (!obj || typeof obj.getType === "function")
|
21159
21197
|
return;
|
21160
21198
|
if (Array.isArray(obj)) {
|
21161
21199
|
for (var i = 0; i < obj.length; i++) {
|
@@ -23652,7 +23690,7 @@ var englishStrings = {
|
|
23652
23690
|
questionsProgressText: "Answered {0}/{1} questions",
|
23653
23691
|
emptySurvey: "The survey doesn't contain any visible elements.",
|
23654
23692
|
completingSurvey: "Thank you for completing the survey",
|
23655
|
-
completingSurveyBefore: "
|
23693
|
+
completingSurveyBefore: "You have already completed this survey.",
|
23656
23694
|
loadingSurvey: "Loading Survey...",
|
23657
23695
|
placeholder: "Select...",
|
23658
23696
|
ratingOptionsCaption: "Select...",
|
@@ -23702,7 +23740,7 @@ var englishStrings = {
|
|
23702
23740
|
savingData: "The results are being saved on the server...",
|
23703
23741
|
savingDataError: "An error occurred and we could not save the results.",
|
23704
23742
|
savingDataSuccess: "The results were saved successfully!",
|
23705
|
-
savingExceedSize: "Your response exceeds 64KB. Please reduce the size of your file(s) and try again or contact
|
23743
|
+
savingExceedSize: "Your response exceeds 64KB. Please reduce the size of your file(s) and try again or contact the survey owner.",
|
23706
23744
|
saveAgainButton: "Try again",
|
23707
23745
|
timerMin: "min",
|
23708
23746
|
timerSec: "sec",
|
@@ -31445,6 +31483,9 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
31445
31483
|
}
|
31446
31484
|
return result;
|
31447
31485
|
};
|
31486
|
+
InputMaskNumeric.prototype.numericalCompositionIsEmpty = function (number) {
|
31487
|
+
return !number.integralPart && !number.fractionalPart;
|
31488
|
+
};
|
31448
31489
|
InputMaskNumeric.prototype.displayNumber = function (parsedNumber, insertThousandsSeparator, matchWholeMask) {
|
31449
31490
|
if (insertThousandsSeparator === void 0) { insertThousandsSeparator = true; }
|
31450
31491
|
if (matchWholeMask === void 0) { matchWholeMask = false; }
|
@@ -31549,6 +31590,8 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
31549
31590
|
};
|
31550
31591
|
InputMaskNumeric.prototype.getNumberUnmaskedValue = function (str) {
|
31551
31592
|
var parsedNumber = this.parseNumber(str);
|
31593
|
+
if (this.numericalCompositionIsEmpty(parsedNumber))
|
31594
|
+
return undefined;
|
31552
31595
|
return this.convertNumber(parsedNumber);
|
31553
31596
|
};
|
31554
31597
|
InputMaskNumeric.prototype.getTextAlignment = function () {
|
@@ -33475,7 +33518,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
33475
33518
|
if (rec.result !== true)
|
33476
33519
|
rec.result = false;
|
33477
33520
|
this.hasErrorsCore(rec);
|
33478
|
-
if (rec.firstErrorQuestion) {
|
33521
|
+
if (rec.focuseOnFirstError && rec.firstErrorQuestion) {
|
33479
33522
|
rec.firstErrorQuestion.focus(true);
|
33480
33523
|
}
|
33481
33524
|
return !rec.result;
|
@@ -37154,14 +37197,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
37154
37197
|
/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./popup */ "./src/popup.ts");
|
37155
37198
|
/* harmony import */ var _popup_dropdown_view_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./popup-dropdown-view-model */ "./src/popup-dropdown-view-model.ts");
|
37156
37199
|
/* harmony import */ var _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./popup-modal-view-model */ "./src/popup-modal-view-model.ts");
|
37200
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
37201
|
+
__assign = Object.assign || function(t) {
|
37202
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
37203
|
+
s = arguments[i];
|
37204
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
37205
|
+
t[p] = s[p];
|
37206
|
+
}
|
37207
|
+
return t;
|
37208
|
+
};
|
37209
|
+
return __assign.apply(this, arguments);
|
37210
|
+
};
|
37157
37211
|
|
37158
37212
|
|
37159
37213
|
|
37160
37214
|
|
37161
37215
|
function createPopupModalViewModel(options, rootElement) {
|
37162
37216
|
var _a;
|
37163
|
-
var
|
37164
|
-
|
37217
|
+
var popupOptions = __assign({}, options);
|
37218
|
+
popupOptions.verticalPosition = "top";
|
37219
|
+
popupOptions.horizontalPosition = "left";
|
37220
|
+
popupOptions.showPointer = false;
|
37221
|
+
popupOptions.isModal = true;
|
37222
|
+
popupOptions.displayMode = options.displayMode || "popup";
|
37223
|
+
var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_1__["PopupModel"](options.componentName, options.data, popupOptions);
|
37165
37224
|
popupModel.isFocusedContent = (_a = options.isFocusedContent) !== null && _a !== void 0 ? _a : true;
|
37166
37225
|
var popupViewModel = new _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_3__["PopupModalViewModel"](popupModel);
|
37167
37226
|
if (!!rootElement && !!rootElement.appendChild) {
|
@@ -37665,36 +37724,29 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
37665
37724
|
|
37666
37725
|
var PopupModel = /** @class */ (function (_super) {
|
37667
37726
|
__extends(PopupModel, _super);
|
37668
|
-
function PopupModel(contentComponentName, contentComponentData,
|
37669
|
-
if (verticalPosition === void 0) { verticalPosition = "bottom"; }
|
37670
|
-
if (horizontalPosition === void 0) { horizontalPosition = "left"; }
|
37671
|
-
if (showPointer === void 0) { showPointer = true; }
|
37672
|
-
if (isModal === void 0) { isModal = false; }
|
37673
|
-
if (onCancel === void 0) { onCancel = function () { }; }
|
37674
|
-
if (onApply === void 0) { onApply = function () { return true; }; }
|
37675
|
-
if (onHide === void 0) { onHide = function () { }; }
|
37676
|
-
if (onShow === void 0) { onShow = function () { }; }
|
37677
|
-
if (cssClass === void 0) { cssClass = ""; }
|
37678
|
-
if (title === void 0) { title = ""; }
|
37679
|
-
if (onDispose === void 0) { onDispose = function () { }; }
|
37727
|
+
function PopupModel(contentComponentName, contentComponentData, option1, option2) {
|
37680
37728
|
var _this = _super.call(this) || this;
|
37681
|
-
_this.onDispose = onDispose;
|
37682
37729
|
_this.focusFirstInputSelector = "";
|
37730
|
+
_this.onCancel = function () { };
|
37731
|
+
_this.onApply = function () { return true; };
|
37732
|
+
_this.onHide = function () { };
|
37733
|
+
_this.onShow = function () { };
|
37734
|
+
_this.onDispose = function () { };
|
37683
37735
|
_this.onVisibilityChanged = _this.addEvent();
|
37684
37736
|
_this.onFooterActionsCreated = _this.addEvent();
|
37685
37737
|
_this.onRecalculatePosition = _this.addEvent();
|
37686
37738
|
_this.contentComponentName = contentComponentName;
|
37687
37739
|
_this.contentComponentData = contentComponentData;
|
37688
|
-
|
37689
|
-
|
37690
|
-
|
37691
|
-
|
37692
|
-
|
37693
|
-
|
37694
|
-
|
37695
|
-
|
37696
|
-
|
37697
|
-
|
37740
|
+
if (!!option1 && typeof option1 === "string") {
|
37741
|
+
_this.verticalPosition = option1;
|
37742
|
+
_this.horizontalPosition = option2;
|
37743
|
+
}
|
37744
|
+
else if (!!option1) {
|
37745
|
+
var popupOptions = option1;
|
37746
|
+
for (var key in popupOptions) {
|
37747
|
+
_this[key] = popupOptions[key];
|
37748
|
+
}
|
37749
|
+
}
|
37698
37750
|
return _this;
|
37699
37751
|
}
|
37700
37752
|
PopupModel.prototype.refreshInnerModel = function () {
|
@@ -37750,7 +37802,7 @@ var PopupModel = /** @class */ (function (_super) {
|
|
37750
37802
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "left" })
|
37751
37803
|
], PopupModel.prototype, "horizontalPosition", void 0);
|
37752
37804
|
__decorate([
|
37753
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue:
|
37805
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
|
37754
37806
|
], PopupModel.prototype, "showPointer", void 0);
|
37755
37807
|
__decorate([
|
37756
37808
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
|
@@ -37761,18 +37813,6 @@ var PopupModel = /** @class */ (function (_super) {
|
|
37761
37813
|
__decorate([
|
37762
37814
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
|
37763
37815
|
], PopupModel.prototype, "isFocusedContainer", void 0);
|
37764
|
-
__decorate([
|
37765
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { } })
|
37766
|
-
], PopupModel.prototype, "onCancel", void 0);
|
37767
|
-
__decorate([
|
37768
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { return true; } })
|
37769
|
-
], PopupModel.prototype, "onApply", void 0);
|
37770
|
-
__decorate([
|
37771
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { } })
|
37772
|
-
], PopupModel.prototype, "onHide", void 0);
|
37773
|
-
__decorate([
|
37774
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { } })
|
37775
|
-
], PopupModel.prototype, "onShow", void 0);
|
37776
37816
|
__decorate([
|
37777
37817
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "" })
|
37778
37818
|
], PopupModel.prototype, "cssClass", void 0);
|
@@ -40931,7 +40971,6 @@ var Question = /** @class */ (function (_super) {
|
|
40931
40971
|
};
|
40932
40972
|
Question.prototype.isDefaultRendering = function () {
|
40933
40973
|
return (!!this.customWidget ||
|
40934
|
-
this.renderAs === "default" ||
|
40935
40974
|
this.getComponentName() === "default");
|
40936
40975
|
};
|
40937
40976
|
//ISurveyErrorOwner
|
@@ -41755,7 +41794,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
41755
41794
|
return "itemvalue";
|
41756
41795
|
};
|
41757
41796
|
QuestionSelectBase.prototype.createItemValue = function (value, text) {
|
41758
|
-
var res = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass(this.getItemValueType(), value);
|
41797
|
+
var res = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass(this.getItemValueType(), { value: value });
|
41759
41798
|
res.locOwner = this;
|
41760
41799
|
if (!!text)
|
41761
41800
|
res.text = text;
|
@@ -42209,7 +42248,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42209
42248
|
QuestionSelectBase.prototype.canSurveyChangeItemVisibility = function () {
|
42210
42249
|
return !!this.survey && this.survey.canChangeChoiceItemsVisibility();
|
42211
42250
|
};
|
42212
|
-
QuestionSelectBase.prototype.
|
42251
|
+
QuestionSelectBase.prototype.changeItemVisibility = function () {
|
42213
42252
|
var _this = this;
|
42214
42253
|
return this.canSurveyChangeItemVisibility() ?
|
42215
42254
|
function (item, val) { return _this.survey.getChoiceItemVisibility(_this, item, val); }
|
@@ -42217,7 +42256,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42217
42256
|
};
|
42218
42257
|
QuestionSelectBase.prototype.runConditionsForItems = function (values, properties) {
|
42219
42258
|
this.filteredChoicesValue = [];
|
42220
|
-
var calcVisibility = this.
|
42259
|
+
var calcVisibility = this.changeItemVisibility();
|
42221
42260
|
return _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].runConditionsForItems(this.activeChoices, this.getFilteredChoices(), this.areInvisibleElementsShowing
|
42222
42261
|
? null
|
42223
42262
|
: this.conditionChoicesVisibleIfRunner, values, properties, !this.survey || !this.survey.areInvisibleElementsShowing, function (item, val) {
|
@@ -42875,7 +42914,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42875
42914
|
QuestionSelectBase.prototype.canShowOptionItem = function (item, isAddAll, hasItem) {
|
42876
42915
|
var res = (isAddAll && (!!this.canShowOptionItemCallback ? this.canShowOptionItemCallback(item) : true)) || hasItem;
|
42877
42916
|
if (this.canSurveyChangeItemVisibility()) {
|
42878
|
-
var calc = this.
|
42917
|
+
var calc = this.changeItemVisibility();
|
42879
42918
|
return calc(item, res);
|
42880
42919
|
}
|
42881
42920
|
return res;
|
@@ -42972,7 +43011,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
42972
43011
|
}
|
42973
43012
|
}
|
42974
43013
|
}
|
42975
|
-
return strs.join("
|
43014
|
+
return strs.join(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].choicesSeparator);
|
42976
43015
|
};
|
42977
43016
|
QuestionSelectBase.prototype.getItemDisplayValue = function (item, val) {
|
42978
43017
|
if (item === this.otherItem) {
|
@@ -43423,8 +43462,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
43423
43462
|
var superVal = _super.prototype.isVisibleCore.call(this);
|
43424
43463
|
if (!this.hideIfChoicesEmpty || !superVal)
|
43425
43464
|
return superVal;
|
43426
|
-
var
|
43427
|
-
return !
|
43465
|
+
var choices = this.isUsingCarryForward ? this.visibleChoices : this.getFilteredChoices();
|
43466
|
+
return !choices || choices.length > 0;
|
43428
43467
|
};
|
43429
43468
|
QuestionSelectBase.prototype.sortVisibleChoices = function (array) {
|
43430
43469
|
if (this.isDesignMode)
|
@@ -44144,6 +44183,7 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
44144
44183
|
this.value = val == true ? this.getValueTrue() : this.getValueFalse();
|
44145
44184
|
this.booleanValueRendered = val;
|
44146
44185
|
}
|
44186
|
+
this.updateThumbMargin();
|
44147
44187
|
};
|
44148
44188
|
Object.defineProperty(QuestionBooleanModel.prototype, "defaultValue", {
|
44149
44189
|
get: function () {
|
@@ -44183,6 +44223,27 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
44183
44223
|
enumerable: false,
|
44184
44224
|
configurable: true
|
44185
44225
|
});
|
44226
|
+
QuestionBooleanModel.prototype.updateThumbMargin = function () {
|
44227
|
+
var _this = this;
|
44228
|
+
if (!this.isIndeterminate && this.leftAnswerElement) {
|
44229
|
+
if (!this.swapOrder && this.value === this.getValueTrue() || this.swapOrder && this.value === this.getValueFalse()) {
|
44230
|
+
var el_1 = this.leftAnswerElement;
|
44231
|
+
setTimeout(function () {
|
44232
|
+
_this.thumbMargin = el_1.clientWidth + (_this.swapOrder ? 4 : 2) + "px";
|
44233
|
+
}, 50);
|
44234
|
+
}
|
44235
|
+
}
|
44236
|
+
this.thumbMargin = undefined;
|
44237
|
+
};
|
44238
|
+
QuestionBooleanModel.prototype.afterRender = function (el) {
|
44239
|
+
_super.prototype.afterRender.call(this, el);
|
44240
|
+
this.leftAnswerElement = el.querySelectorAll("." + this.cssClasses.sliderGhost)[0];
|
44241
|
+
this.updateThumbMargin();
|
44242
|
+
};
|
44243
|
+
QuestionBooleanModel.prototype.beforeDestroyQuestionElement = function (el) {
|
44244
|
+
_super.prototype.beforeDestroyQuestionElement.call(this, el);
|
44245
|
+
this.leftAnswerElement = undefined;
|
44246
|
+
};
|
44186
44247
|
Object.defineProperty(QuestionBooleanModel.prototype, "isLabelRendered", {
|
44187
44248
|
get: function () {
|
44188
44249
|
return this.titleLocation === "hidden";
|
@@ -44453,6 +44514,12 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
44453
44514
|
__decorate([
|
44454
44515
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
44455
44516
|
], QuestionBooleanModel.prototype, "booleanValueRendered", void 0);
|
44517
|
+
__decorate([
|
44518
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
44519
|
+
], QuestionBooleanModel.prototype, "leftAnswerElement", void 0);
|
44520
|
+
__decorate([
|
44521
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
44522
|
+
], QuestionBooleanModel.prototype, "thumbMargin", void 0);
|
44456
44523
|
__decorate([
|
44457
44524
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
44458
44525
|
], QuestionBooleanModel.prototype, "showTitle", void 0);
|
@@ -45386,7 +45453,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
45386
45453
|
QuestionCheckboxModel.prototype.getConditionJson = function (operator, path) {
|
45387
45454
|
if (operator === void 0) { operator = null; }
|
45388
45455
|
if (path === void 0) { path = null; }
|
45389
|
-
var json = _super.prototype.getConditionJson.call(this);
|
45456
|
+
var json = _super.prototype.getConditionJson.call(this, operator, path);
|
45390
45457
|
if (operator == "contains" || operator == "notcontains") {
|
45391
45458
|
json["type"] = "radiogroup";
|
45392
45459
|
}
|
@@ -48425,7 +48492,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
48425
48492
|
_super.prototype.updateElementCssCore.call(this, cssClasses);
|
48426
48493
|
this.prevFileAction.iconName = this.cssClasses.leftIconId;
|
48427
48494
|
this.nextFileAction.iconName = this.cssClasses.rightIconId;
|
48428
|
-
|
48495
|
+
this.updateCurrentMode();
|
48429
48496
|
};
|
48430
48497
|
QuestionFileModel.prototype.getFileIndexCaption = function () {
|
48431
48498
|
return this.getLocalizationFormatString("indexText", this.indexToShow + 1, this.pagesCount);
|
@@ -49067,11 +49134,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
49067
49134
|
this.actionsContainer.containerCss = classes.actionsContainer;
|
49068
49135
|
return classes;
|
49069
49136
|
};
|
49070
|
-
//todo remove in v2
|
49071
|
-
QuestionFileModel.prototype.updateElementCss = function (reNew) {
|
49072
|
-
_super.prototype.updateElementCss.call(this, reNew);
|
49073
|
-
this.updateCurrentMode();
|
49074
|
-
};
|
49075
49137
|
QuestionFileModel.prototype.onSurveyLoad = function () {
|
49076
49138
|
_super.prototype.onSurveyLoad.call(this);
|
49077
49139
|
this.updateCurrentMode();
|
@@ -49477,7 +49539,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
49477
49539
|
|
49478
49540
|
|
49479
49541
|
|
49480
|
-
var
|
49542
|
+
var youtubeDomains = ["www.youtube.com", "m.youtube.com", "youtube.com", "youtu.be"];
|
49481
49543
|
var videoSuffics = [".mp4", ".mov", ".wmv", ".flv", ".avi", ".mkv"];
|
49482
49544
|
var youtubeUrl = "https://www.youtube.com/";
|
49483
49545
|
var youtubeEmbed = "embed";
|
@@ -49485,8 +49547,9 @@ function isUrlYoutubeVideo(url) {
|
|
49485
49547
|
if (!url)
|
49486
49548
|
return false;
|
49487
49549
|
url = url.toLowerCase();
|
49488
|
-
|
49489
|
-
|
49550
|
+
url = url.replace(/^https?:\/\//, "");
|
49551
|
+
for (var i = 0; i < youtubeDomains.length; i++) {
|
49552
|
+
if (url.indexOf(youtubeDomains[i] + "/") === 0)
|
49490
49553
|
return true;
|
49491
49554
|
}
|
49492
49555
|
return false;
|
@@ -49502,7 +49565,7 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
49502
49565
|
var _this = _super.call(this, name) || this;
|
49503
49566
|
var locImageLink = _this.createLocalizableString("imageLink", _this, false);
|
49504
49567
|
locImageLink.onGetTextCallback = function (text) {
|
49505
|
-
return getCorrectImageLink(text);
|
49568
|
+
return getCorrectImageLink(text, _this.contentMode == "youtube");
|
49506
49569
|
};
|
49507
49570
|
_this.createLocalizableString("altText", _this, false);
|
49508
49571
|
_this.registerPropertyChangedHandlers(["contentMode", "imageLink"], function () { return _this.calculateRenderedMode(); });
|
@@ -49734,9 +49797,10 @@ var QuestionImageModel = /** @class */ (function (_super) {
|
|
49734
49797
|
return QuestionImageModel;
|
49735
49798
|
}(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
|
49736
49799
|
|
49737
|
-
function getCorrectImageLink(val) {
|
49800
|
+
function getCorrectImageLink(val, isYouTube) {
|
49738
49801
|
if (!val || !isUrlYoutubeVideo(val))
|
49739
|
-
return val;
|
49802
|
+
return isYouTube ? "" : val;
|
49803
|
+
//if(!val || !isUrlYoutubeVideo(val)) return val;
|
49740
49804
|
var res = val.toLocaleLowerCase();
|
49741
49805
|
if (res.indexOf(youtubeEmbed) > -1)
|
49742
49806
|
return val;
|
@@ -51145,7 +51209,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
51145
51209
|
if (operator === void 0) { operator = null; }
|
51146
51210
|
if (path === void 0) { path = null; }
|
51147
51211
|
if (!path)
|
51148
|
-
return _super.prototype.getConditionJson.call(this);
|
51212
|
+
return _super.prototype.getConditionJson.call(this, operator);
|
51149
51213
|
var question = new _question_dropdown__WEBPACK_IMPORTED_MODULE_9__["QuestionDropdownModel"](path);
|
51150
51214
|
question.choices = this.columns;
|
51151
51215
|
var json = new _jsonobject__WEBPACK_IMPORTED_MODULE_3__["JsonObject"]().toJsonObject(question);
|
@@ -52982,7 +53046,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
52982
53046
|
if (operator === void 0) { operator = null; }
|
52983
53047
|
if (path === void 0) { path = null; }
|
52984
53048
|
if (!path)
|
52985
|
-
return _super.prototype.getConditionJson.call(this);
|
53049
|
+
return _super.prototype.getConditionJson.call(this, operator);
|
52986
53050
|
var columnName = "";
|
52987
53051
|
for (var i = path.length - 1; i >= 0; i--) {
|
52988
53052
|
if (path[i] == ".")
|
@@ -54433,9 +54497,9 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
54433
54497
|
* @see isRequired
|
54434
54498
|
* @see readOnly
|
54435
54499
|
*/
|
54436
|
-
get: function () { return this.
|
54500
|
+
get: function () { return this.templateQuestion.visible; },
|
54437
54501
|
set: function (val) {
|
54438
|
-
this.
|
54502
|
+
this.templateQuestion.visible = val;
|
54439
54503
|
},
|
54440
54504
|
enumerable: false,
|
54441
54505
|
configurable: true
|
@@ -56483,7 +56547,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
56483
56547
|
QuestionMatrixDropdownRenderedTable.prototype.getMultipleColumnChoices = function (column) {
|
56484
56548
|
var choices = column.templateQuestion.choices;
|
56485
56549
|
if (!!choices && Array.isArray(choices) && choices.length == 0)
|
56486
|
-
return this.matrix.choices;
|
56550
|
+
return [].concat(this.matrix.choices, column.getVisibleMultipleChoices());
|
56487
56551
|
choices = column.getVisibleMultipleChoices();
|
56488
56552
|
if (!choices || !Array.isArray(choices))
|
56489
56553
|
return null;
|
@@ -56663,11 +56727,11 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
56663
56727
|
function QuestionMatrixDynamicModel(name) {
|
56664
56728
|
var _this = _super.call(this, name) || this;
|
56665
56729
|
_this.rowCounter = 0;
|
56666
|
-
_this.initialRowCount = 2;
|
56667
56730
|
_this.setRowCountValueFromData = false;
|
56668
56731
|
_this.startDragMatrixRow = function (event, currentTarget) {
|
56669
56732
|
_this.dragDropMatrixRows.startDrag(event, _this.draggedRow, _this, event.target);
|
56670
56733
|
};
|
56734
|
+
_this.initialRowCount = _this.getDefaultPropertyValue("rowCount");
|
56671
56735
|
_this.createLocalizableString("confirmDeleteText", _this, false, "confirmDelete");
|
56672
56736
|
var locAddRowText = _this.createLocalizableString("addRowText", _this);
|
56673
56737
|
locAddRowText.onGetTextCallback = function (text) {
|
@@ -57544,6 +57608,12 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
|
|
57544
57608
|
this.setPropertyValueDirectly("rowCount", val.length);
|
57545
57609
|
return true;
|
57546
57610
|
};
|
57611
|
+
QuestionMatrixDynamicModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
57612
|
+
if (clearData === void 0) { clearData = false; }
|
57613
|
+
this.setRowCountValueFromData = true;
|
57614
|
+
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
57615
|
+
this.setRowCountValueFromData = false;
|
57616
|
+
};
|
57547
57617
|
QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
|
57548
57618
|
if (!val || !Array.isArray(val))
|
57549
57619
|
return;
|
@@ -58407,7 +58477,7 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
58407
58477
|
if (operator === void 0) { operator = null; }
|
58408
58478
|
if (path === void 0) { path = null; }
|
58409
58479
|
if (!path)
|
58410
|
-
return _super.prototype.getConditionJson.call(this);
|
58480
|
+
return _super.prototype.getConditionJson.call(this, operator);
|
58411
58481
|
var item = this.getItemByName(path);
|
58412
58482
|
if (!item)
|
58413
58483
|
return null;
|
@@ -59666,14 +59736,23 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
59666
59736
|
});
|
59667
59737
|
QuestionPanelDynamicModel.prototype.getPanelsAnimationOptions = function () {
|
59668
59738
|
var _this = this;
|
59669
|
-
var
|
59739
|
+
var getDirectionCssClass = function () {
|
59670
59740
|
if (_this.isRenderModeList)
|
59671
59741
|
return "";
|
59742
|
+
var cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]();
|
59743
|
+
var isRemoving = false;
|
59672
59744
|
var leavingPanel = _this.renderedPanels.filter(function (el) { return el !== _this.currentPanel; })[0];
|
59673
59745
|
var leavingPanelIndex = _this.visiblePanels.indexOf(leavingPanel);
|
59674
|
-
if (leavingPanelIndex < 0)
|
59746
|
+
if (leavingPanelIndex < 0) {
|
59747
|
+
isRemoving = true;
|
59675
59748
|
leavingPanelIndex = _this.removedPanelIndex;
|
59676
|
-
|
59749
|
+
}
|
59750
|
+
return cssClass
|
59751
|
+
.append("sv-pd-animation-adding", !!_this.focusNewPanelCallback)
|
59752
|
+
.append("sv-pd-animation-removing", isRemoving)
|
59753
|
+
.append("sv-pd-animation-left", leavingPanelIndex <= _this.currentIndex)
|
59754
|
+
.append("sv-pd-animation-right", leavingPanelIndex > _this.currentIndex)
|
59755
|
+
.toString();
|
59677
59756
|
};
|
59678
59757
|
return {
|
59679
59758
|
getAnimatedElement: function (panel) {
|
@@ -59684,7 +59763,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
59684
59763
|
}
|
59685
59764
|
},
|
59686
59765
|
getEnterOptions: function () {
|
59687
|
-
var cssClass =
|
59766
|
+
var cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]().append(_this.cssClasses.panelWrapperFadeIn).append(getDirectionCssClass()).toString();
|
59688
59767
|
return {
|
59689
59768
|
onBeforeRunAnimation: function (el) {
|
59690
59769
|
var _a;
|
@@ -59703,7 +59782,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
59703
59782
|
};
|
59704
59783
|
},
|
59705
59784
|
getLeaveOptions: function () {
|
59706
|
-
var cssClass =
|
59785
|
+
var cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]().append(_this.cssClasses.panelWrapperFadeOut).append(getDirectionCssClass()).toString();
|
59707
59786
|
return {
|
59708
59787
|
onBeforeRunAnimation: function (el) {
|
59709
59788
|
var _a;
|
@@ -60883,7 +60962,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
60883
60962
|
if (operator === void 0) { operator = null; }
|
60884
60963
|
if (path === void 0) { path = null; }
|
60885
60964
|
if (!path)
|
60886
|
-
return _super.prototype.getConditionJson.call(this, operator
|
60965
|
+
return _super.prototype.getConditionJson.call(this, operator);
|
60887
60966
|
var questionName = path;
|
60888
60967
|
var pos = path.indexOf(".");
|
60889
60968
|
if (pos > -1) {
|
@@ -61992,6 +62071,13 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
|
|
61992
62071
|
QuestionRadiogroupModel.prototype.supportGoNextPageAutomatic = function () {
|
61993
62072
|
return this.isMouseDown === true && !this.isOtherSelected;
|
61994
62073
|
};
|
62074
|
+
QuestionRadiogroupModel.prototype.getConditionJson = function (operator, path) {
|
62075
|
+
if (operator === void 0) { operator = null; }
|
62076
|
+
if (path === void 0) { path = null; }
|
62077
|
+
var json = _super.prototype.getConditionJson.call(this, operator, path);
|
62078
|
+
delete json["showClearButton"];
|
62079
|
+
return json;
|
62080
|
+
};
|
61995
62081
|
QuestionRadiogroupModel.prototype.setNewComment = function (newValue) {
|
61996
62082
|
this.isMouseDown = true;
|
61997
62083
|
_super.prototype.setNewComment.call(this, newValue);
|
@@ -62961,6 +63047,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
62961
63047
|
_this.registerFunctionOnPropertiesValueChanged(["rateColorMode", "scaleColorMode"], function () {
|
62962
63048
|
_this.updateColors(_this.survey.themeVariables);
|
62963
63049
|
});
|
63050
|
+
_this.registerFunctionOnPropertiesValueChanged(["displayMode"], function () {
|
63051
|
+
_this.updateRenderAsBasedOnDisplayMode(true);
|
63052
|
+
});
|
62964
63053
|
_this.registerSychProperties(["autoGenerate"], function () {
|
62965
63054
|
if (!_this.autoGenerate && _this.rateValues.length === 0) {
|
62966
63055
|
_this.setPropertyValue("rateValues", _this.visibleRateValues);
|
@@ -63376,6 +63465,27 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
63376
63465
|
enumerable: false,
|
63377
63466
|
configurable: true
|
63378
63467
|
});
|
63468
|
+
QuestionRatingModel.prototype.updateRenderAsBasedOnDisplayMode = function (isOnChange) {
|
63469
|
+
if (this.isDesignMode) {
|
63470
|
+
if (isOnChange || this.renderAs === "dropdown") {
|
63471
|
+
this.renderAs = "default";
|
63472
|
+
}
|
63473
|
+
}
|
63474
|
+
else {
|
63475
|
+
if (isOnChange || this.displayMode !== "auto") {
|
63476
|
+
this.renderAs = this.displayMode === "dropdown" ? "dropdown" : "default";
|
63477
|
+
}
|
63478
|
+
}
|
63479
|
+
};
|
63480
|
+
QuestionRatingModel.prototype.onSurveyLoad = function () {
|
63481
|
+
_super.prototype.onSurveyLoad.call(this);
|
63482
|
+
if (this.renderAs === "dropdown" && this.displayMode === "auto") {
|
63483
|
+
this.displayMode = this.renderAs;
|
63484
|
+
}
|
63485
|
+
else {
|
63486
|
+
this.updateRenderAsBasedOnDisplayMode();
|
63487
|
+
}
|
63488
|
+
};
|
63379
63489
|
Object.defineProperty(QuestionRatingModel.prototype, "rateDisplayMode", {
|
63380
63490
|
get: function () {
|
63381
63491
|
return this.rateType;
|
@@ -63653,7 +63763,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
63653
63763
|
.append(this.cssClasses.control)
|
63654
63764
|
.append(this.cssClasses.controlEmpty, this.isEmpty())
|
63655
63765
|
.append(this.cssClasses.onError, this.hasCssError())
|
63656
|
-
.append(this.cssClasses.controlDisabled, this.
|
63766
|
+
.append(this.cssClasses.controlDisabled, this.isDisabledStyle)
|
63767
|
+
.append(this.cssClasses.controlReadOnly, this.isReadOnlyStyle)
|
63768
|
+
.append(this.cssClasses.controlPreview, this.isPreviewStyle)
|
63657
63769
|
.toString();
|
63658
63770
|
};
|
63659
63771
|
Object.defineProperty(QuestionRatingModel.prototype, "placeholder", {
|
@@ -63783,6 +63895,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
63783
63895
|
if (!this.survey)
|
63784
63896
|
return;
|
63785
63897
|
this.updateColors(this.survey.themeVariables);
|
63898
|
+
this.updateRenderAsBasedOnDisplayMode();
|
63786
63899
|
};
|
63787
63900
|
QuestionRatingModel.prototype.dispose = function () {
|
63788
63901
|
_super.prototype.dispose.call(this);
|
@@ -63813,18 +63926,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
63813
63926
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
63814
63927
|
], QuestionRatingModel.prototype, "displayRateDescriptionsAsExtremeItems", void 0);
|
63815
63928
|
__decorate([
|
63816
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])(
|
63817
|
-
onSet: function (val, target) {
|
63818
|
-
if (!target.isDesignMode) {
|
63819
|
-
if (val === "dropdown") {
|
63820
|
-
target.renderAs = "dropdown";
|
63821
|
-
}
|
63822
|
-
else {
|
63823
|
-
target.renderAs = "default";
|
63824
|
-
}
|
63825
|
-
}
|
63826
|
-
}
|
63827
|
-
})
|
63929
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
63828
63930
|
], QuestionRatingModel.prototype, "displayMode", void 0);
|
63829
63931
|
__decorate([
|
63830
63932
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
@@ -64628,7 +64730,14 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
64628
64730
|
};
|
64629
64731
|
QuestionTagboxModel.prototype.onSurveyLoad = function () {
|
64630
64732
|
_super.prototype.onSurveyLoad.call(this);
|
64631
|
-
|
64733
|
+
this.createDropdownListModel();
|
64734
|
+
};
|
64735
|
+
QuestionTagboxModel.prototype.onSetData = function () {
|
64736
|
+
_super.prototype.onSetData.call(this);
|
64737
|
+
this.createDropdownListModel();
|
64738
|
+
};
|
64739
|
+
QuestionTagboxModel.prototype.createDropdownListModel = function () {
|
64740
|
+
if (!this.dropdownListModel && !this.isLoadingFromJson) {
|
64632
64741
|
this.dropdownListModel = new _dropdownMultiSelectListModel__WEBPACK_IMPORTED_MODULE_4__["DropdownMultiSelectListModel"](this);
|
64633
64742
|
}
|
64634
64743
|
};
|
@@ -66553,7 +66662,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
|
|
66553
66662
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, _this.question.swapOrder); } },
|
66554
66663
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(this.question.swapOrder) }, this.renderLocString(this.question.locLabelLeft))),
|
66555
66664
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
|
66556
|
-
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.slider }, this.question.isDeterminated && cssClasses.sliderText ?
|
66665
|
+
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.slider, style: { marginLeft: this.question.thumbMargin } }, this.question.isDeterminated && cssClasses.sliderText ?
|
66557
66666
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.sliderText }, this.renderLocString(this.question.getCheckedLabel()))
|
66558
66667
|
: null)),
|
66559
66668
|
react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, !_this.question.swapOrder); } },
|
@@ -76501,20 +76610,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
76501
76610
|
var RendererFactory = /** @class */ (function () {
|
76502
76611
|
function RendererFactory() {
|
76503
76612
|
this.renderersHash = {};
|
76613
|
+
this.defaultHash = {};
|
76504
76614
|
}
|
76505
76615
|
RendererFactory.prototype.unregisterRenderer = function (questionType, rendererAs) {
|
76506
76616
|
delete this.renderersHash[questionType][rendererAs];
|
76617
|
+
if (this.defaultHash[questionType] === rendererAs) {
|
76618
|
+
delete this.defaultHash[questionType];
|
76619
|
+
}
|
76507
76620
|
};
|
76508
|
-
RendererFactory.prototype.registerRenderer = function (questionType, renderAs, renderer) {
|
76621
|
+
RendererFactory.prototype.registerRenderer = function (questionType, renderAs, renderer, useAsDefault) {
|
76622
|
+
if (useAsDefault === void 0) { useAsDefault = false; }
|
76509
76623
|
if (!this.renderersHash[questionType]) {
|
76510
76624
|
this.renderersHash[questionType] = {};
|
76511
76625
|
}
|
76512
76626
|
this.renderersHash[questionType][renderAs] = renderer;
|
76627
|
+
if (useAsDefault) {
|
76628
|
+
this.defaultHash[questionType] = renderAs;
|
76629
|
+
}
|
76513
76630
|
};
|
76514
76631
|
RendererFactory.prototype.getRenderer = function (questionType, renderAs) {
|
76515
|
-
|
76516
|
-
|
76517
|
-
|
76632
|
+
var qHash = this.renderersHash[questionType];
|
76633
|
+
if (!!qHash) {
|
76634
|
+
if (!!renderAs && qHash[renderAs])
|
76635
|
+
return qHash[renderAs];
|
76636
|
+
var dVal = this.defaultHash[questionType];
|
76637
|
+
if (!!dVal && qHash[dVal])
|
76638
|
+
return qHash[dVal];
|
76639
|
+
}
|
76640
|
+
return "default";
|
76518
76641
|
};
|
76519
76642
|
RendererFactory.prototype.getRendererByQuestion = function (question) {
|
76520
76643
|
return this.getRenderer(question.getType(), question.renderAs);
|
@@ -76930,6 +77053,7 @@ var settings = {
|
|
76930
77053
|
* A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`.
|
76931
77054
|
*
|
76932
77055
|
* Default value: `"|"`
|
77056
|
+
* @see [settings.choicesSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#choicesSeparator)
|
76933
77057
|
*/
|
76934
77058
|
itemValueSeparator: "|",
|
76935
77059
|
/**
|
@@ -77084,6 +77208,13 @@ var settings = {
|
|
77084
77208
|
dontKnowItem: [3],
|
77085
77209
|
otherItem: [4]
|
77086
77210
|
},
|
77211
|
+
/**
|
77212
|
+
* One or several characters used to separate choice options in a list.
|
77213
|
+
*
|
77214
|
+
* Default value: `", "`
|
77215
|
+
* @see [settings.itemValueSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#itemValueSeparator)
|
77216
|
+
*/
|
77217
|
+
choicesSeparator: ", ",
|
77087
77218
|
/**
|
77088
77219
|
* A list of supported validators by question type.
|
77089
77220
|
*/
|
@@ -79076,7 +79207,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
79076
79207
|
configurable: true
|
79077
79208
|
});
|
79078
79209
|
SurveyElement.prototype.getIsAnimationAllowed = function () {
|
79079
|
-
return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey;
|
79210
|
+
return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey && !this.survey["isEndLoadingFromJson"];
|
79080
79211
|
};
|
79081
79212
|
SurveyElement.prototype.dispose = function () {
|
79082
79213
|
_super.prototype.dispose.call(this);
|
@@ -86126,14 +86257,20 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
86126
86257
|
SurveyModel.prototype.setVariable = function (name, newValue) {
|
86127
86258
|
if (!name)
|
86128
86259
|
return;
|
86260
|
+
var oldValue = this.getVariable(name);
|
86129
86261
|
if (!!this.valuesHash) {
|
86130
86262
|
delete this.valuesHash[name];
|
86131
86263
|
}
|
86132
86264
|
name = name.toLowerCase();
|
86133
86265
|
this.variablesHash[name] = newValue;
|
86134
86266
|
this.notifyElementsOnAnyValueOrVariableChanged(name);
|
86135
|
-
|
86136
|
-
|
86267
|
+
if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(oldValue, newValue)) {
|
86268
|
+
this.runConditionOnValueChanged(name, newValue);
|
86269
|
+
var triggerKeys = {};
|
86270
|
+
triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
|
86271
|
+
this.checkTriggers(triggerKeys, false, false, name);
|
86272
|
+
this.onVariableChanged.fire(this, { name: name, value: newValue });
|
86273
|
+
}
|
86137
86274
|
};
|
86138
86275
|
/**
|
86139
86276
|
* Returns the names of all variables in the survey.
|
@@ -86299,7 +86436,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
86299
86436
|
return;
|
86300
86437
|
if (this.checkIsCurrentPageHasErrors(false))
|
86301
86438
|
return;
|
86439
|
+
var curPage = this.currentPage;
|
86302
86440
|
var goNextPage = function () {
|
86441
|
+
if (curPage !== _this.currentPage)
|
86442
|
+
return;
|
86303
86443
|
if (!_this.isLastPage) {
|
86304
86444
|
_this.nextPage();
|
86305
86445
|
}
|
@@ -87288,32 +87428,34 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
87288
87428
|
}
|
87289
87429
|
}
|
87290
87430
|
else if (this.state === "running" && isStrCiEqual(layoutElement.id, this.progressBarComponentName)) {
|
87291
|
-
|
87292
|
-
|
87293
|
-
|
87294
|
-
|
87295
|
-
|
87296
|
-
|
87297
|
-
if (isStrCiEqual(this.showProgressBar, "belowHeader")) {
|
87298
|
-
isBelowHeader = true;
|
87299
|
-
}
|
87300
|
-
if (container === "header" && !isBelowHeader) {
|
87301
|
-
layoutElement.index = -150;
|
87302
|
-
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
87303
|
-
containerLayoutElements.push(layoutElement);
|
87431
|
+
if (this.questionsOnPageMode != "singlePage") {
|
87432
|
+
var headerLayoutElement = this.findLayoutElement("advanced-header");
|
87433
|
+
var advHeader = headerLayoutElement && headerLayoutElement.data;
|
87434
|
+
var isBelowHeader = !advHeader || advHeader.hasBackground;
|
87435
|
+
if (isStrCiEqual(this.showProgressBar, "aboveHeader")) {
|
87436
|
+
isBelowHeader = false;
|
87304
87437
|
}
|
87305
|
-
|
87306
|
-
|
87307
|
-
if (!!layoutElement.index) {
|
87308
|
-
delete layoutElement.index;
|
87438
|
+
if (isStrCiEqual(this.showProgressBar, "belowHeader")) {
|
87439
|
+
isBelowHeader = true;
|
87309
87440
|
}
|
87310
|
-
if (
|
87311
|
-
|
87441
|
+
if (container === "header" && !isBelowHeader) {
|
87442
|
+
layoutElement.index = -150;
|
87443
|
+
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
87444
|
+
containerLayoutElements.push(layoutElement);
|
87445
|
+
}
|
87312
87446
|
}
|
87313
|
-
|
87314
|
-
|
87315
|
-
|
87316
|
-
|
87447
|
+
if (container === "center" && isBelowHeader) {
|
87448
|
+
if (!!layoutElement.index) {
|
87449
|
+
delete layoutElement.index;
|
87450
|
+
}
|
87451
|
+
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
87452
|
+
containerLayoutElements.push(layoutElement);
|
87453
|
+
}
|
87454
|
+
}
|
87455
|
+
if (container === "footer") {
|
87456
|
+
if (this.isShowProgressBarOnBottom && !this.isShowStartingPage) {
|
87457
|
+
containerLayoutElements.push(layoutElement);
|
87458
|
+
}
|
87317
87459
|
}
|
87318
87460
|
}
|
87319
87461
|
}
|
@@ -89585,10 +89727,15 @@ var AnimationUtils = /** @class */ (function () {
|
|
89585
89727
|
options.onBeforeRunAnimation && options.onBeforeRunAnimation(element);
|
89586
89728
|
}
|
89587
89729
|
};
|
89730
|
+
AnimationUtils.prototype.getCssClasses = function (options) {
|
89731
|
+
return options.cssClass.replace(/\s+$/, "").split(/\s+/);
|
89732
|
+
};
|
89588
89733
|
AnimationUtils.prototype.runAnimation = function (element, options, callback) {
|
89589
89734
|
if (element && options.cssClass) {
|
89590
89735
|
this.reflow(element);
|
89591
|
-
|
89736
|
+
this.getCssClasses(options).forEach(function (cssClass) {
|
89737
|
+
element.classList.add(cssClass);
|
89738
|
+
});
|
89592
89739
|
this.onAnimationEnd(element, callback, options);
|
89593
89740
|
}
|
89594
89741
|
else {
|
@@ -89597,7 +89744,9 @@ var AnimationUtils = /** @class */ (function () {
|
|
89597
89744
|
};
|
89598
89745
|
AnimationUtils.prototype.clearHtmlElement = function (element, options) {
|
89599
89746
|
if (element && options.cssClass) {
|
89600
|
-
|
89747
|
+
this.getCssClasses(options).forEach(function (cssClass) {
|
89748
|
+
element.classList.remove(cssClass);
|
89749
|
+
});
|
89601
89750
|
}
|
89602
89751
|
};
|
89603
89752
|
AnimationUtils.prototype.onNextRender = function (callback, runEarly, isCancel) {
|