survey-core 1.10.2 → 1.10.3
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 +55 -19
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +55 -19
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +3 -3
- package/i18n/english.js.map +1 -1
- package/i18n/english.min.js +2 -2
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +13 -1
- package/modern.css.map +1 -1
- package/modern.fontless.css +13 -1
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +189 -97
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +387 -1
- package/survey.css.map +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.min.css +2 -2
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/base.d.ts +6 -2
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +2 -0
- package/ts3.4/typings/dragdrop/dom-adapter.d.ts +2 -0
- package/ts3.4/typings/popup.d.ts +8 -12
- package/ts3.4/typings/question_baseselect.d.ts +1 -1
- package/ts3.4/typings/question_boolean.d.ts +5 -0
- package/ts3.4/typings/question_radiogroup.d.ts +1 -0
- package/ts3.4/typings/question_tagbox.d.ts +2 -0
- package/ts3.4/typings/rendererFactory.d.ts +3 -2
- package/ts3.4/typings/utils/animation.d.ts +1 -0
- package/typings/base.d.ts +6 -2
- package/typings/defaultCss/defaultV2Css.d.ts +2 -0
- package/typings/dragdrop/dom-adapter.d.ts +2 -0
- package/typings/popup.d.ts +8 -12
- package/typings/question_baseselect.d.ts +1 -1
- package/typings/question_boolean.d.ts +5 -0
- package/typings/question_radiogroup.d.ts +1 -0
- package/typings/question_tagbox.d.ts +2 -0
- package/typings/rendererFactory.d.ts +3 -2
- package/typings/utils/animation.d.ts +1 -0
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.10.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.10.3
|
|
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
|
*/
|
|
@@ -6036,6 +6039,8 @@ var defaultV2Css = {
|
|
|
6036
6039
|
selectWrapper: "sv-dropdown_select-wrapper",
|
|
6037
6040
|
controlValue: "sd-dropdown__value",
|
|
6038
6041
|
controlDisabled: "sd-input--disabled",
|
|
6042
|
+
controlReadOnly: "sd-input--readonly",
|
|
6043
|
+
controlPreview: "sd-input--preview",
|
|
6039
6044
|
controlEmpty: "sd-dropdown--empty",
|
|
6040
6045
|
filterStringInput: "sd-dropdown__filter-string-input",
|
|
6041
6046
|
chevronButton: "sd-dropdown_chevron-button",
|
|
@@ -7365,17 +7370,12 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
|
7365
7370
|
DragDropDOMAdapter.prototype.getShortcutRightCoordinate = function (currentX, shortcutWidth, shortcutXOffset) {
|
|
7366
7371
|
return currentX + shortcutWidth - shortcutXOffset;
|
|
7367
7372
|
};
|
|
7368
|
-
DragDropDOMAdapter.prototype.
|
|
7373
|
+
DragDropDOMAdapter.prototype.requestAnimationFrame = function (callback) {
|
|
7374
|
+
return requestAnimationFrame(callback);
|
|
7375
|
+
};
|
|
7376
|
+
DragDropDOMAdapter.prototype.scrollByDrag = function (scrollableParentNode, clientY, clientX) {
|
|
7369
7377
|
var _this = this;
|
|
7370
|
-
cancelAnimationFrame(this.scrollIntervalId);
|
|
7371
7378
|
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
7379
|
var top;
|
|
7380
7380
|
var bottom;
|
|
7381
7381
|
var left;
|
|
@@ -7393,21 +7393,36 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
|
7393
7393
|
right = scrollableParentNode.getBoundingClientRect().right;
|
|
7394
7394
|
}
|
|
7395
7395
|
var repeat = function () {
|
|
7396
|
-
|
|
7396
|
+
var isTop = clientY - top <= startScrollBoundary;
|
|
7397
|
+
var isBottom = bottom - clientY <= startScrollBoundary;
|
|
7398
|
+
var isLeft = clientX - left <= startScrollBoundary;
|
|
7399
|
+
var isRight = right - clientX <= startScrollBoundary;
|
|
7400
|
+
if (isTop && !isLeft && !isRight) {
|
|
7397
7401
|
scrollableParentNode.scrollTop -= 15;
|
|
7398
7402
|
}
|
|
7399
|
-
else if (
|
|
7403
|
+
else if (isBottom && !isLeft && !isRight) {
|
|
7400
7404
|
scrollableParentNode.scrollTop += 15;
|
|
7401
7405
|
}
|
|
7402
|
-
else if (
|
|
7406
|
+
else if (isRight && !isTop && !isBottom) {
|
|
7403
7407
|
scrollableParentNode.scrollLeft += 15;
|
|
7404
7408
|
}
|
|
7405
|
-
else if (
|
|
7409
|
+
else if (isLeft && !isTop && !isBottom) {
|
|
7406
7410
|
scrollableParentNode.scrollLeft -= 15;
|
|
7407
7411
|
}
|
|
7408
|
-
_this.scrollIntervalId = requestAnimationFrame(repeat);
|
|
7412
|
+
_this.scrollIntervalId = _this.requestAnimationFrame(repeat);
|
|
7409
7413
|
};
|
|
7410
|
-
this.scrollIntervalId = requestAnimationFrame(repeat);
|
|
7414
|
+
this.scrollIntervalId = this.requestAnimationFrame(repeat);
|
|
7415
|
+
};
|
|
7416
|
+
DragDropDOMAdapter.prototype.doScroll = function (clientY, clientX) {
|
|
7417
|
+
cancelAnimationFrame(this.scrollIntervalId);
|
|
7418
|
+
var displayProp = this.draggedElementShortcut.style.display;
|
|
7419
|
+
//this.draggedElementShortcut.hidden = true;
|
|
7420
|
+
this.draggedElementShortcut.style.display = "none";
|
|
7421
|
+
var dragOverNode = this.documentOrShadowRoot.elementFromPoint(clientX, clientY);
|
|
7422
|
+
//this.draggedElementShortcut.hidden = false;
|
|
7423
|
+
this.draggedElementShortcut.style.display = displayProp || "block";
|
|
7424
|
+
var scrollableParentNode = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["findScrollableParent"])(dragOverNode);
|
|
7425
|
+
this.scrollByDrag(scrollableParentNode, clientY, clientX);
|
|
7411
7426
|
};
|
|
7412
7427
|
DragDropDOMAdapter.prototype.doStartDrag = function (event, draggedElement, parentElement, draggedElementNode) {
|
|
7413
7428
|
if (_utils_devices__WEBPACK_IMPORTED_MODULE_1__["IsTouch"]) {
|
|
@@ -7701,7 +7716,6 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7701
7716
|
if (!draggedElementShortcut)
|
|
7702
7717
|
return;
|
|
7703
7718
|
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
7719
|
var isDeepClone = true;
|
|
7706
7720
|
var clone = draggedElementNode.cloneNode(isDeepClone);
|
|
7707
7721
|
draggedElementShortcut.appendChild(clone);
|
|
@@ -8159,7 +8173,8 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8159
8173
|
};
|
|
8160
8174
|
DropdownListModel.prototype.createPopup = function () {
|
|
8161
8175
|
var _this = this;
|
|
8162
|
-
|
|
8176
|
+
var popupOptions = { verticalPosition: "bottom", horizontalPosition: "center", showPointer: false };
|
|
8177
|
+
this._popupModel = new _popup__WEBPACK_IMPORTED_MODULE_5__["PopupModel"]("sv-list", { model: this.listModel }, popupOptions);
|
|
8163
8178
|
this._popupModel.displayMode = _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"] ? "overlay" : "popup";
|
|
8164
8179
|
this._popupModel.positionMode = "fixed";
|
|
8165
8180
|
this._popupModel.isFocusedContainer = false;
|
|
@@ -8220,7 +8235,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8220
8235
|
DropdownListModel.prototype.onHidePopup = function () {
|
|
8221
8236
|
this.resetFilterString();
|
|
8222
8237
|
this.question.suggestedItem = null;
|
|
8223
|
-
this.listModel.refresh();
|
|
8224
8238
|
};
|
|
8225
8239
|
DropdownListModel.prototype.getAvailableItems = function () {
|
|
8226
8240
|
return this.question.visibleChoices;
|
|
@@ -9695,8 +9709,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9695
9709
|
|
|
9696
9710
|
var Version;
|
|
9697
9711
|
var ReleaseDate;
|
|
9698
|
-
Version = "" + "1.10.
|
|
9699
|
-
ReleaseDate = "" + "2024-
|
|
9712
|
+
Version = "" + "1.10.3";
|
|
9713
|
+
ReleaseDate = "" + "2024-05-07";
|
|
9700
9714
|
function checkLibraryVersion(ver, libraryName) {
|
|
9701
9715
|
if (Version != ver) {
|
|
9702
9716
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -19222,10 +19236,18 @@ var JsonMetadata = /** @class */ (function () {
|
|
|
19222
19236
|
return metaClass.getAllProperties();
|
|
19223
19237
|
};
|
|
19224
19238
|
JsonMetadata.prototype.getPropertiesByObj = function (obj) {
|
|
19225
|
-
|
|
19239
|
+
var type = !!obj && !!obj.getType ? obj.getType() : undefined;
|
|
19240
|
+
if (!type)
|
|
19226
19241
|
return [];
|
|
19227
|
-
var props = this.getProperties(
|
|
19242
|
+
var props = this.getProperties(type);
|
|
19228
19243
|
var dynamicProps = this.getDynamicPropertiesByObj(obj);
|
|
19244
|
+
for (var i = dynamicProps.length - 1; i >= 0; i--) {
|
|
19245
|
+
if (this.findProperty(type, dynamicProps[i].name)) {
|
|
19246
|
+
dynamicProps.splice(i, 1);
|
|
19247
|
+
}
|
|
19248
|
+
}
|
|
19249
|
+
if (dynamicProps.length === 0)
|
|
19250
|
+
return props;
|
|
19229
19251
|
return [].concat(props).concat(dynamicProps);
|
|
19230
19252
|
};
|
|
19231
19253
|
JsonMetadata.prototype.addDynamicPropertiesIntoObj = function (dest, src, props) {
|
|
@@ -19936,7 +19958,7 @@ var JsonObject = /** @class */ (function () {
|
|
|
19936
19958
|
this.removePosFromObj(value);
|
|
19937
19959
|
};
|
|
19938
19960
|
JsonObject.prototype.removePosFromObj = function (obj) {
|
|
19939
|
-
if (!obj)
|
|
19961
|
+
if (!obj || typeof obj.getType === "function")
|
|
19940
19962
|
return;
|
|
19941
19963
|
if (Array.isArray(obj)) {
|
|
19942
19964
|
for (var i = 0; i < obj.length; i++) {
|
|
@@ -21156,7 +21178,7 @@ var englishStrings = {
|
|
|
21156
21178
|
questionsProgressText: "Answered {0}/{1} questions",
|
|
21157
21179
|
emptySurvey: "The survey doesn't contain any visible elements.",
|
|
21158
21180
|
completingSurvey: "Thank you for completing the survey",
|
|
21159
|
-
completingSurveyBefore: "
|
|
21181
|
+
completingSurveyBefore: "You have already completed this survey.",
|
|
21160
21182
|
loadingSurvey: "Loading Survey...",
|
|
21161
21183
|
placeholder: "Select...",
|
|
21162
21184
|
ratingOptionsCaption: "Select...",
|
|
@@ -21206,7 +21228,7 @@ var englishStrings = {
|
|
|
21206
21228
|
savingData: "The results are being saved on the server...",
|
|
21207
21229
|
savingDataError: "An error occurred and we could not save the results.",
|
|
21208
21230
|
savingDataSuccess: "The results were saved successfully!",
|
|
21209
|
-
savingExceedSize: "Your response exceeds 64KB. Please reduce the size of your file(s) and try again or contact
|
|
21231
|
+
savingExceedSize: "Your response exceeds 64KB. Please reduce the size of your file(s) and try again or contact the survey owner.",
|
|
21210
21232
|
saveAgainButton: "Try again",
|
|
21211
21233
|
timerMin: "min",
|
|
21212
21234
|
timerSec: "sec",
|
|
@@ -24859,7 +24881,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24859
24881
|
if (rec.result !== true)
|
|
24860
24882
|
rec.result = false;
|
|
24861
24883
|
this.hasErrorsCore(rec);
|
|
24862
|
-
if (rec.firstErrorQuestion) {
|
|
24884
|
+
if (rec.focuseOnFirstError && rec.firstErrorQuestion) {
|
|
24863
24885
|
rec.firstErrorQuestion.focus(true);
|
|
24864
24886
|
}
|
|
24865
24887
|
return !rec.result;
|
|
@@ -27180,14 +27202,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
27180
27202
|
/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./popup */ "./src/popup.ts");
|
|
27181
27203
|
/* harmony import */ var _popup_dropdown_view_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./popup-dropdown-view-model */ "./src/popup-dropdown-view-model.ts");
|
|
27182
27204
|
/* harmony import */ var _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./popup-modal-view-model */ "./src/popup-modal-view-model.ts");
|
|
27205
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
27206
|
+
__assign = Object.assign || function(t) {
|
|
27207
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
27208
|
+
s = arguments[i];
|
|
27209
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
27210
|
+
t[p] = s[p];
|
|
27211
|
+
}
|
|
27212
|
+
return t;
|
|
27213
|
+
};
|
|
27214
|
+
return __assign.apply(this, arguments);
|
|
27215
|
+
};
|
|
27183
27216
|
|
|
27184
27217
|
|
|
27185
27218
|
|
|
27186
27219
|
|
|
27187
27220
|
function createPopupModalViewModel(options, rootElement) {
|
|
27188
27221
|
var _a;
|
|
27189
|
-
var
|
|
27190
|
-
|
|
27222
|
+
var popupOptions = __assign({}, options);
|
|
27223
|
+
popupOptions.verticalPosition = "top";
|
|
27224
|
+
popupOptions.horizontalPosition = "left";
|
|
27225
|
+
popupOptions.showPointer = false;
|
|
27226
|
+
popupOptions.isModal = true;
|
|
27227
|
+
popupOptions.displayMode = options.displayMode || "popup";
|
|
27228
|
+
var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_1__["PopupModel"](options.componentName, options.data, popupOptions);
|
|
27191
27229
|
popupModel.isFocusedContent = (_a = options.isFocusedContent) !== null && _a !== void 0 ? _a : true;
|
|
27192
27230
|
var popupViewModel = new _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_3__["PopupModalViewModel"](popupModel);
|
|
27193
27231
|
if (!!rootElement && !!rootElement.appendChild) {
|
|
@@ -27691,36 +27729,29 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
27691
27729
|
|
|
27692
27730
|
var PopupModel = /** @class */ (function (_super) {
|
|
27693
27731
|
__extends(PopupModel, _super);
|
|
27694
|
-
function PopupModel(contentComponentName, contentComponentData,
|
|
27695
|
-
if (verticalPosition === void 0) { verticalPosition = "bottom"; }
|
|
27696
|
-
if (horizontalPosition === void 0) { horizontalPosition = "left"; }
|
|
27697
|
-
if (showPointer === void 0) { showPointer = true; }
|
|
27698
|
-
if (isModal === void 0) { isModal = false; }
|
|
27699
|
-
if (onCancel === void 0) { onCancel = function () { }; }
|
|
27700
|
-
if (onApply === void 0) { onApply = function () { return true; }; }
|
|
27701
|
-
if (onHide === void 0) { onHide = function () { }; }
|
|
27702
|
-
if (onShow === void 0) { onShow = function () { }; }
|
|
27703
|
-
if (cssClass === void 0) { cssClass = ""; }
|
|
27704
|
-
if (title === void 0) { title = ""; }
|
|
27705
|
-
if (onDispose === void 0) { onDispose = function () { }; }
|
|
27732
|
+
function PopupModel(contentComponentName, contentComponentData, option1, option2) {
|
|
27706
27733
|
var _this = _super.call(this) || this;
|
|
27707
|
-
_this.onDispose = onDispose;
|
|
27708
27734
|
_this.focusFirstInputSelector = "";
|
|
27735
|
+
_this.onCancel = function () { };
|
|
27736
|
+
_this.onApply = function () { return true; };
|
|
27737
|
+
_this.onHide = function () { };
|
|
27738
|
+
_this.onShow = function () { };
|
|
27739
|
+
_this.onDispose = function () { };
|
|
27709
27740
|
_this.onVisibilityChanged = _this.addEvent();
|
|
27710
27741
|
_this.onFooterActionsCreated = _this.addEvent();
|
|
27711
27742
|
_this.onRecalculatePosition = _this.addEvent();
|
|
27712
27743
|
_this.contentComponentName = contentComponentName;
|
|
27713
27744
|
_this.contentComponentData = contentComponentData;
|
|
27714
|
-
|
|
27715
|
-
|
|
27716
|
-
|
|
27717
|
-
|
|
27718
|
-
|
|
27719
|
-
|
|
27720
|
-
|
|
27721
|
-
|
|
27722
|
-
|
|
27723
|
-
|
|
27745
|
+
if (!!option1 && typeof option1 === "string") {
|
|
27746
|
+
_this.verticalPosition = option1;
|
|
27747
|
+
_this.horizontalPosition = option2;
|
|
27748
|
+
}
|
|
27749
|
+
else if (!!option1) {
|
|
27750
|
+
var popupOptions = option1;
|
|
27751
|
+
for (var key in popupOptions) {
|
|
27752
|
+
_this[key] = popupOptions[key];
|
|
27753
|
+
}
|
|
27754
|
+
}
|
|
27724
27755
|
return _this;
|
|
27725
27756
|
}
|
|
27726
27757
|
PopupModel.prototype.refreshInnerModel = function () {
|
|
@@ -27776,7 +27807,7 @@ var PopupModel = /** @class */ (function (_super) {
|
|
|
27776
27807
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "left" })
|
|
27777
27808
|
], PopupModel.prototype, "horizontalPosition", void 0);
|
|
27778
27809
|
__decorate([
|
|
27779
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue:
|
|
27810
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
|
|
27780
27811
|
], PopupModel.prototype, "showPointer", void 0);
|
|
27781
27812
|
__decorate([
|
|
27782
27813
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
|
|
@@ -27787,18 +27818,6 @@ var PopupModel = /** @class */ (function (_super) {
|
|
|
27787
27818
|
__decorate([
|
|
27788
27819
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
|
|
27789
27820
|
], PopupModel.prototype, "isFocusedContainer", void 0);
|
|
27790
|
-
__decorate([
|
|
27791
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { } })
|
|
27792
|
-
], PopupModel.prototype, "onCancel", void 0);
|
|
27793
|
-
__decorate([
|
|
27794
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { return true; } })
|
|
27795
|
-
], PopupModel.prototype, "onApply", void 0);
|
|
27796
|
-
__decorate([
|
|
27797
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { } })
|
|
27798
|
-
], PopupModel.prototype, "onHide", void 0);
|
|
27799
|
-
__decorate([
|
|
27800
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: function () { } })
|
|
27801
|
-
], PopupModel.prototype, "onShow", void 0);
|
|
27802
27821
|
__decorate([
|
|
27803
27822
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "" })
|
|
27804
27823
|
], PopupModel.prototype, "cssClass", void 0);
|
|
@@ -30957,7 +30976,6 @@ var Question = /** @class */ (function (_super) {
|
|
|
30957
30976
|
};
|
|
30958
30977
|
Question.prototype.isDefaultRendering = function () {
|
|
30959
30978
|
return (!!this.customWidget ||
|
|
30960
|
-
this.renderAs === "default" ||
|
|
30961
30979
|
this.getComponentName() === "default");
|
|
30962
30980
|
};
|
|
30963
30981
|
//ISurveyErrorOwner
|
|
@@ -31781,7 +31799,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
31781
31799
|
return "itemvalue";
|
|
31782
31800
|
};
|
|
31783
31801
|
QuestionSelectBase.prototype.createItemValue = function (value, text) {
|
|
31784
|
-
var res = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass(this.getItemValueType(), value);
|
|
31802
|
+
var res = _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].createClass(this.getItemValueType(), { value: value });
|
|
31785
31803
|
res.locOwner = this;
|
|
31786
31804
|
if (!!text)
|
|
31787
31805
|
res.text = text;
|
|
@@ -32235,7 +32253,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32235
32253
|
QuestionSelectBase.prototype.canSurveyChangeItemVisibility = function () {
|
|
32236
32254
|
return !!this.survey && this.survey.canChangeChoiceItemsVisibility();
|
|
32237
32255
|
};
|
|
32238
|
-
QuestionSelectBase.prototype.
|
|
32256
|
+
QuestionSelectBase.prototype.changeItemVisibility = function () {
|
|
32239
32257
|
var _this = this;
|
|
32240
32258
|
return this.canSurveyChangeItemVisibility() ?
|
|
32241
32259
|
function (item, val) { return _this.survey.getChoiceItemVisibility(_this, item, val); }
|
|
@@ -32243,7 +32261,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32243
32261
|
};
|
|
32244
32262
|
QuestionSelectBase.prototype.runConditionsForItems = function (values, properties) {
|
|
32245
32263
|
this.filteredChoicesValue = [];
|
|
32246
|
-
var calcVisibility = this.
|
|
32264
|
+
var calcVisibility = this.changeItemVisibility();
|
|
32247
32265
|
return _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].runConditionsForItems(this.activeChoices, this.getFilteredChoices(), this.areInvisibleElementsShowing
|
|
32248
32266
|
? null
|
|
32249
32267
|
: this.conditionChoicesVisibleIfRunner, values, properties, !this.survey || !this.survey.areInvisibleElementsShowing, function (item, val) {
|
|
@@ -32901,7 +32919,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32901
32919
|
QuestionSelectBase.prototype.canShowOptionItem = function (item, isAddAll, hasItem) {
|
|
32902
32920
|
var res = (isAddAll && (!!this.canShowOptionItemCallback ? this.canShowOptionItemCallback(item) : true)) || hasItem;
|
|
32903
32921
|
if (this.canSurveyChangeItemVisibility()) {
|
|
32904
|
-
var calc = this.
|
|
32922
|
+
var calc = this.changeItemVisibility();
|
|
32905
32923
|
return calc(item, res);
|
|
32906
32924
|
}
|
|
32907
32925
|
return res;
|
|
@@ -33449,8 +33467,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
33449
33467
|
var superVal = _super.prototype.isVisibleCore.call(this);
|
|
33450
33468
|
if (!this.hideIfChoicesEmpty || !superVal)
|
|
33451
33469
|
return superVal;
|
|
33452
|
-
var
|
|
33453
|
-
return !
|
|
33470
|
+
var choices = this.isUsingCarryForward ? this.visibleChoices : this.getFilteredChoices();
|
|
33471
|
+
return !choices || choices.length > 0;
|
|
33454
33472
|
};
|
|
33455
33473
|
QuestionSelectBase.prototype.sortVisibleChoices = function (array) {
|
|
33456
33474
|
if (this.isDesignMode)
|
|
@@ -34170,6 +34188,7 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
|
34170
34188
|
this.value = val == true ? this.getValueTrue() : this.getValueFalse();
|
|
34171
34189
|
this.booleanValueRendered = val;
|
|
34172
34190
|
}
|
|
34191
|
+
this.updateThumbMargin();
|
|
34173
34192
|
};
|
|
34174
34193
|
Object.defineProperty(QuestionBooleanModel.prototype, "defaultValue", {
|
|
34175
34194
|
get: function () {
|
|
@@ -34209,6 +34228,27 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
|
34209
34228
|
enumerable: false,
|
|
34210
34229
|
configurable: true
|
|
34211
34230
|
});
|
|
34231
|
+
QuestionBooleanModel.prototype.updateThumbMargin = function () {
|
|
34232
|
+
var _this = this;
|
|
34233
|
+
if (!this.isIndeterminate && this.leftAnswerElement) {
|
|
34234
|
+
if (!this.swapOrder && this.value === this.getValueTrue() || this.swapOrder && this.value === this.getValueFalse()) {
|
|
34235
|
+
var el_1 = this.leftAnswerElement;
|
|
34236
|
+
setTimeout(function () {
|
|
34237
|
+
_this.thumbMargin = el_1.clientWidth + (_this.swapOrder ? 4 : 2) + "px";
|
|
34238
|
+
}, 50);
|
|
34239
|
+
}
|
|
34240
|
+
}
|
|
34241
|
+
this.thumbMargin = undefined;
|
|
34242
|
+
};
|
|
34243
|
+
QuestionBooleanModel.prototype.afterRender = function (el) {
|
|
34244
|
+
_super.prototype.afterRender.call(this, el);
|
|
34245
|
+
this.leftAnswerElement = el.querySelectorAll("." + this.cssClasses.sliderGhost)[0];
|
|
34246
|
+
this.updateThumbMargin();
|
|
34247
|
+
};
|
|
34248
|
+
QuestionBooleanModel.prototype.beforeDestroyQuestionElement = function (el) {
|
|
34249
|
+
_super.prototype.beforeDestroyQuestionElement.call(this, el);
|
|
34250
|
+
this.leftAnswerElement = undefined;
|
|
34251
|
+
};
|
|
34212
34252
|
Object.defineProperty(QuestionBooleanModel.prototype, "isLabelRendered", {
|
|
34213
34253
|
get: function () {
|
|
34214
34254
|
return this.titleLocation === "hidden";
|
|
@@ -34479,6 +34519,12 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
|
34479
34519
|
__decorate([
|
|
34480
34520
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
34481
34521
|
], QuestionBooleanModel.prototype, "booleanValueRendered", void 0);
|
|
34522
|
+
__decorate([
|
|
34523
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
34524
|
+
], QuestionBooleanModel.prototype, "leftAnswerElement", void 0);
|
|
34525
|
+
__decorate([
|
|
34526
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
34527
|
+
], QuestionBooleanModel.prototype, "thumbMargin", void 0);
|
|
34482
34528
|
__decorate([
|
|
34483
34529
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
34484
34530
|
], QuestionBooleanModel.prototype, "showTitle", void 0);
|
|
@@ -35412,7 +35458,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35412
35458
|
QuestionCheckboxModel.prototype.getConditionJson = function (operator, path) {
|
|
35413
35459
|
if (operator === void 0) { operator = null; }
|
|
35414
35460
|
if (path === void 0) { path = null; }
|
|
35415
|
-
var json = _super.prototype.getConditionJson.call(this);
|
|
35461
|
+
var json = _super.prototype.getConditionJson.call(this, operator, path);
|
|
35416
35462
|
if (operator == "contains" || operator == "notcontains") {
|
|
35417
35463
|
json["type"] = "radiogroup";
|
|
35418
35464
|
}
|
|
@@ -41171,7 +41217,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
41171
41217
|
if (operator === void 0) { operator = null; }
|
|
41172
41218
|
if (path === void 0) { path = null; }
|
|
41173
41219
|
if (!path)
|
|
41174
|
-
return _super.prototype.getConditionJson.call(this);
|
|
41220
|
+
return _super.prototype.getConditionJson.call(this, operator);
|
|
41175
41221
|
var question = new _question_dropdown__WEBPACK_IMPORTED_MODULE_9__["QuestionDropdownModel"](path);
|
|
41176
41222
|
question.choices = this.columns;
|
|
41177
41223
|
var json = new _jsonobject__WEBPACK_IMPORTED_MODULE_3__["JsonObject"]().toJsonObject(question);
|
|
@@ -43008,7 +43054,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
|
43008
43054
|
if (operator === void 0) { operator = null; }
|
|
43009
43055
|
if (path === void 0) { path = null; }
|
|
43010
43056
|
if (!path)
|
|
43011
|
-
return _super.prototype.getConditionJson.call(this);
|
|
43057
|
+
return _super.prototype.getConditionJson.call(this, operator);
|
|
43012
43058
|
var columnName = "";
|
|
43013
43059
|
for (var i = path.length - 1; i >= 0; i--) {
|
|
43014
43060
|
if (path[i] == ".")
|
|
@@ -48433,7 +48479,7 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
48433
48479
|
if (operator === void 0) { operator = null; }
|
|
48434
48480
|
if (path === void 0) { path = null; }
|
|
48435
48481
|
if (!path)
|
|
48436
|
-
return _super.prototype.getConditionJson.call(this);
|
|
48482
|
+
return _super.prototype.getConditionJson.call(this, operator);
|
|
48437
48483
|
var item = this.getItemByName(path);
|
|
48438
48484
|
if (!item)
|
|
48439
48485
|
return null;
|
|
@@ -49692,14 +49738,23 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
49692
49738
|
});
|
|
49693
49739
|
QuestionPanelDynamicModel.prototype.getPanelsAnimationOptions = function () {
|
|
49694
49740
|
var _this = this;
|
|
49695
|
-
var
|
|
49741
|
+
var getDirectionCssClass = function () {
|
|
49696
49742
|
if (_this.isRenderModeList)
|
|
49697
49743
|
return "";
|
|
49744
|
+
var cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]();
|
|
49745
|
+
var isRemoving = false;
|
|
49698
49746
|
var leavingPanel = _this.renderedPanels.filter(function (el) { return el !== _this.currentPanel; })[0];
|
|
49699
49747
|
var leavingPanelIndex = _this.visiblePanels.indexOf(leavingPanel);
|
|
49700
|
-
if (leavingPanelIndex < 0)
|
|
49748
|
+
if (leavingPanelIndex < 0) {
|
|
49749
|
+
isRemoving = true;
|
|
49701
49750
|
leavingPanelIndex = _this.removedPanelIndex;
|
|
49702
|
-
|
|
49751
|
+
}
|
|
49752
|
+
return cssClass
|
|
49753
|
+
.append("sv-pd-animation-adding", !!_this.focusNewPanelCallback)
|
|
49754
|
+
.append("sv-pd-animation-removing", isRemoving)
|
|
49755
|
+
.append("sv-pd-animation-left", leavingPanelIndex <= _this.currentIndex)
|
|
49756
|
+
.append("sv-pd-animation-right", leavingPanelIndex > _this.currentIndex)
|
|
49757
|
+
.toString();
|
|
49703
49758
|
};
|
|
49704
49759
|
return {
|
|
49705
49760
|
getAnimatedElement: function (panel) {
|
|
@@ -49710,7 +49765,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
49710
49765
|
}
|
|
49711
49766
|
},
|
|
49712
49767
|
getEnterOptions: function () {
|
|
49713
|
-
var cssClass =
|
|
49768
|
+
var cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]().append(_this.cssClasses.panelWrapperFadeIn).append(getDirectionCssClass()).toString();
|
|
49714
49769
|
return {
|
|
49715
49770
|
onBeforeRunAnimation: function (el) {
|
|
49716
49771
|
var _a;
|
|
@@ -49729,7 +49784,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
49729
49784
|
};
|
|
49730
49785
|
},
|
|
49731
49786
|
getLeaveOptions: function () {
|
|
49732
|
-
var cssClass =
|
|
49787
|
+
var cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]().append(_this.cssClasses.panelWrapperFadeOut).append(getDirectionCssClass()).toString();
|
|
49733
49788
|
return {
|
|
49734
49789
|
onBeforeRunAnimation: function (el) {
|
|
49735
49790
|
var _a;
|
|
@@ -50909,7 +50964,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
50909
50964
|
if (operator === void 0) { operator = null; }
|
|
50910
50965
|
if (path === void 0) { path = null; }
|
|
50911
50966
|
if (!path)
|
|
50912
|
-
return _super.prototype.getConditionJson.call(this, operator
|
|
50967
|
+
return _super.prototype.getConditionJson.call(this, operator);
|
|
50913
50968
|
var questionName = path;
|
|
50914
50969
|
var pos = path.indexOf(".");
|
|
50915
50970
|
if (pos > -1) {
|
|
@@ -52018,6 +52073,13 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
|
|
|
52018
52073
|
QuestionRadiogroupModel.prototype.supportGoNextPageAutomatic = function () {
|
|
52019
52074
|
return this.isMouseDown === true && !this.isOtherSelected;
|
|
52020
52075
|
};
|
|
52076
|
+
QuestionRadiogroupModel.prototype.getConditionJson = function (operator, path) {
|
|
52077
|
+
if (operator === void 0) { operator = null; }
|
|
52078
|
+
if (path === void 0) { path = null; }
|
|
52079
|
+
var json = _super.prototype.getConditionJson.call(this, operator, path);
|
|
52080
|
+
delete json["showClearButton"];
|
|
52081
|
+
return json;
|
|
52082
|
+
};
|
|
52021
52083
|
QuestionRadiogroupModel.prototype.setNewComment = function (newValue) {
|
|
52022
52084
|
this.isMouseDown = true;
|
|
52023
52085
|
_super.prototype.setNewComment.call(this, newValue);
|
|
@@ -53679,7 +53741,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53679
53741
|
.append(this.cssClasses.control)
|
|
53680
53742
|
.append(this.cssClasses.controlEmpty, this.isEmpty())
|
|
53681
53743
|
.append(this.cssClasses.onError, this.hasCssError())
|
|
53682
|
-
.append(this.cssClasses.controlDisabled, this.
|
|
53744
|
+
.append(this.cssClasses.controlDisabled, this.isDisabledStyle)
|
|
53745
|
+
.append(this.cssClasses.controlReadOnly, this.isReadOnlyStyle)
|
|
53746
|
+
.append(this.cssClasses.controlPreview, this.isPreviewStyle)
|
|
53683
53747
|
.toString();
|
|
53684
53748
|
};
|
|
53685
53749
|
Object.defineProperty(QuestionRatingModel.prototype, "placeholder", {
|
|
@@ -54654,7 +54718,14 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
|
|
|
54654
54718
|
};
|
|
54655
54719
|
QuestionTagboxModel.prototype.onSurveyLoad = function () {
|
|
54656
54720
|
_super.prototype.onSurveyLoad.call(this);
|
|
54657
|
-
|
|
54721
|
+
this.createDropdownListModel();
|
|
54722
|
+
};
|
|
54723
|
+
QuestionTagboxModel.prototype.onSetData = function () {
|
|
54724
|
+
_super.prototype.onSetData.call(this);
|
|
54725
|
+
this.createDropdownListModel();
|
|
54726
|
+
};
|
|
54727
|
+
QuestionTagboxModel.prototype.createDropdownListModel = function () {
|
|
54728
|
+
if (!this.dropdownListModel && !this.isLoadingFromJson) {
|
|
54658
54729
|
this.dropdownListModel = new _dropdownMultiSelectListModel__WEBPACK_IMPORTED_MODULE_4__["DropdownMultiSelectListModel"](this);
|
|
54659
54730
|
}
|
|
54660
54731
|
};
|
|
@@ -56342,20 +56413,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
56342
56413
|
var RendererFactory = /** @class */ (function () {
|
|
56343
56414
|
function RendererFactory() {
|
|
56344
56415
|
this.renderersHash = {};
|
|
56416
|
+
this.defaultHash = {};
|
|
56345
56417
|
}
|
|
56346
56418
|
RendererFactory.prototype.unregisterRenderer = function (questionType, rendererAs) {
|
|
56347
56419
|
delete this.renderersHash[questionType][rendererAs];
|
|
56420
|
+
if (this.defaultHash[questionType] === rendererAs) {
|
|
56421
|
+
delete this.defaultHash[questionType];
|
|
56422
|
+
}
|
|
56348
56423
|
};
|
|
56349
|
-
RendererFactory.prototype.registerRenderer = function (questionType, renderAs, renderer) {
|
|
56424
|
+
RendererFactory.prototype.registerRenderer = function (questionType, renderAs, renderer, useAsDefault) {
|
|
56425
|
+
if (useAsDefault === void 0) { useAsDefault = false; }
|
|
56350
56426
|
if (!this.renderersHash[questionType]) {
|
|
56351
56427
|
this.renderersHash[questionType] = {};
|
|
56352
56428
|
}
|
|
56353
56429
|
this.renderersHash[questionType][renderAs] = renderer;
|
|
56430
|
+
if (useAsDefault) {
|
|
56431
|
+
this.defaultHash[questionType] = renderAs;
|
|
56432
|
+
}
|
|
56354
56433
|
};
|
|
56355
56434
|
RendererFactory.prototype.getRenderer = function (questionType, renderAs) {
|
|
56356
|
-
|
|
56357
|
-
|
|
56358
|
-
|
|
56435
|
+
var qHash = this.renderersHash[questionType];
|
|
56436
|
+
if (!!qHash) {
|
|
56437
|
+
if (!!renderAs && qHash[renderAs])
|
|
56438
|
+
return qHash[renderAs];
|
|
56439
|
+
var dVal = this.defaultHash[questionType];
|
|
56440
|
+
if (!!dVal && qHash[dVal])
|
|
56441
|
+
return qHash[dVal];
|
|
56442
|
+
}
|
|
56443
|
+
return "default";
|
|
56359
56444
|
};
|
|
56360
56445
|
RendererFactory.prototype.getRendererByQuestion = function (question) {
|
|
56361
56446
|
return this.getRenderer(question.getType(), question.renderAs);
|
|
@@ -69426,10 +69511,15 @@ var AnimationUtils = /** @class */ (function () {
|
|
|
69426
69511
|
options.onBeforeRunAnimation && options.onBeforeRunAnimation(element);
|
|
69427
69512
|
}
|
|
69428
69513
|
};
|
|
69514
|
+
AnimationUtils.prototype.getCssClasses = function (options) {
|
|
69515
|
+
return options.cssClass.replace(/\s+$/, "").split(/\s+/);
|
|
69516
|
+
};
|
|
69429
69517
|
AnimationUtils.prototype.runAnimation = function (element, options, callback) {
|
|
69430
69518
|
if (element && options.cssClass) {
|
|
69431
69519
|
this.reflow(element);
|
|
69432
|
-
|
|
69520
|
+
this.getCssClasses(options).forEach(function (cssClass) {
|
|
69521
|
+
element.classList.add(cssClass);
|
|
69522
|
+
});
|
|
69433
69523
|
this.onAnimationEnd(element, callback, options);
|
|
69434
69524
|
}
|
|
69435
69525
|
else {
|
|
@@ -69438,7 +69528,9 @@ var AnimationUtils = /** @class */ (function () {
|
|
|
69438
69528
|
};
|
|
69439
69529
|
AnimationUtils.prototype.clearHtmlElement = function (element, options) {
|
|
69440
69530
|
if (element && options.cssClass) {
|
|
69441
|
-
|
|
69531
|
+
this.getCssClasses(options).forEach(function (cssClass) {
|
|
69532
|
+
element.classList.remove(cssClass);
|
|
69533
|
+
});
|
|
69442
69534
|
}
|
|
69443
69535
|
};
|
|
69444
69536
|
AnimationUtils.prototype.onNextRender = function (callback, runEarly, isCancel) {
|