survey-core 1.9.120 → 1.9.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/defaultV2.css +57 -1
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +57 -1
- 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 +1 -1
- package/i18n/english.min.js +1 -1
- 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 +3 -1
- package/modern.css.map +1 -1
- package/modern.fontless.css +3 -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 +317 -148
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.i18n.js +1 -1
- package/survey.i18n.min.js +1 -1
- package/survey.min.css +1 -1
- 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/actions/adaptive-container.d.ts +1 -1
- package/ts3.4/typings/actions/container.d.ts +1 -1
- package/ts3.4/typings/base-interfaces.d.ts +1 -0
- package/ts3.4/typings/base.d.ts +4 -4
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +3 -0
- package/ts3.4/typings/header.d.ts +1 -0
- package/ts3.4/typings/panel.d.ts +2 -2
- package/ts3.4/typings/question.d.ts +1 -1
- package/ts3.4/typings/question_baseselect.d.ts +0 -1
- package/ts3.4/typings/question_checkbox.d.ts +5 -0
- package/ts3.4/typings/question_custom.d.ts +3 -0
- package/ts3.4/typings/question_file.d.ts +3 -0
- package/ts3.4/typings/question_imagepicker.d.ts +1 -3
- package/ts3.4/typings/question_multipletext.d.ts +12 -3
- package/ts3.4/typings/question_paneldynamic.d.ts +4 -4
- package/ts3.4/typings/question_rating.d.ts +18 -5
- package/ts3.4/typings/settings.d.ts +3 -0
- package/ts3.4/typings/survey-element.d.ts +1 -1
- package/ts3.4/typings/survey-events-api.d.ts +4 -2
- package/ts3.4/typings/survey.d.ts +16 -15
- package/ts3.4/typings/svgbundle.d.ts +0 -1
- package/ts3.4/typings/utils/responsivity-manager.d.ts +4 -2
- package/typings/actions/adaptive-container.d.ts +1 -1
- package/typings/actions/container.d.ts +1 -1
- package/typings/base-interfaces.d.ts +1 -0
- package/typings/base.d.ts +4 -4
- package/typings/defaultCss/defaultV2Css.d.ts +3 -0
- package/typings/header.d.ts +1 -0
- package/typings/panel.d.ts +2 -2
- package/typings/question.d.ts +1 -1
- package/typings/question_baseselect.d.ts +0 -1
- package/typings/question_checkbox.d.ts +5 -0
- package/typings/question_custom.d.ts +3 -0
- package/typings/question_file.d.ts +3 -0
- package/typings/question_imagepicker.d.ts +1 -3
- package/typings/question_multipletext.d.ts +13 -3
- package/typings/question_paneldynamic.d.ts +4 -4
- package/typings/question_rating.d.ts +18 -5
- package/typings/settings.d.ts +3 -0
- package/typings/survey-element.d.ts +1 -1
- package/typings/survey-events-api.d.ts +4 -2
- package/typings/survey.d.ts +16 -15
- package/typings/svgbundle.d.ts +0 -1
- package/typings/utils/responsivity-manager.d.ts +4 -2
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.122
|
|
3
3
|
* Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -1326,8 +1326,8 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
|
|
|
1326
1326
|
this.updateItemMode(dimension, maxSize);
|
|
1327
1327
|
}
|
|
1328
1328
|
};
|
|
1329
|
-
AdaptiveActionContainer.prototype.initResponsivityManager = function (container) {
|
|
1330
|
-
this.responsivityManager = new _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_0__["ResponsivityManager"](container, this, ":scope > .sv-action:not(.sv-dots) > .sv-action__content");
|
|
1329
|
+
AdaptiveActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
|
1330
|
+
this.responsivityManager = new _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_0__["ResponsivityManager"](container, this, ":scope > .sv-action:not(.sv-dots) > .sv-action__content", null, delayedUpdateFunction);
|
|
1331
1331
|
};
|
|
1332
1332
|
AdaptiveActionContainer.prototype.resetResponsivityManager = function () {
|
|
1333
1333
|
if (!!this.responsivityManager) {
|
|
@@ -1539,7 +1539,7 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
|
1539
1539
|
this.sortItems();
|
|
1540
1540
|
}
|
|
1541
1541
|
};
|
|
1542
|
-
ActionContainer.prototype.initResponsivityManager = function (container) {
|
|
1542
|
+
ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
|
1543
1543
|
return;
|
|
1544
1544
|
};
|
|
1545
1545
|
ActionContainer.prototype.resetResponsivityManager = function () { };
|
|
@@ -1891,7 +1891,7 @@ var Base = /** @class */ (function () {
|
|
|
1891
1891
|
* Returns `true` if a passed `value` is an empty string, array, or object or if it equals to `undefined` or `null`.
|
|
1892
1892
|
*
|
|
1893
1893
|
* @param value A value to be checked.
|
|
1894
|
-
* @param trimString (Optional) When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
|
|
1894
|
+
* @param trimString *(Optional)* When this parameter is `true`, the method ignores whitespace characters at the beginning and end of a string value. Pass `false` to disable this functionality.
|
|
1895
1895
|
*/
|
|
1896
1896
|
Base.prototype.isValueEmpty = function (value, trimString) {
|
|
1897
1897
|
if (trimString === void 0) { trimString = true; }
|
|
@@ -2098,7 +2098,7 @@ var Base = /** @class */ (function () {
|
|
|
2098
2098
|
* If the property is not found or does not have a value, this method returns either `undefined`, `defaultValue` specified in the property configuration, or a value passed as the `defaultValue` parameter.
|
|
2099
2099
|
*
|
|
2100
2100
|
* @param name A property name.
|
|
2101
|
-
* @param defaultValue (Optional) A value to return if the property is not found or does not have a value.
|
|
2101
|
+
* @param defaultValue *(Optional)* A value to return if the property is not found or does not have a value.
|
|
2102
2102
|
*/
|
|
2103
2103
|
Base.prototype.getPropertyValue = function (name, defaultValue) {
|
|
2104
2104
|
if (defaultValue === void 0) { defaultValue = null; }
|
|
@@ -2369,7 +2369,7 @@ var Base = /** @class */ (function () {
|
|
|
2369
2369
|
* Registers a function to call when a property value changes.
|
|
2370
2370
|
* @param propertyNames An array of one or multiple property names.
|
|
2371
2371
|
* @param handler A function to call when one of the listed properties change.
|
|
2372
|
-
* @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.
|
|
2372
|
+
* @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.
|
|
2373
2373
|
* @see unregisterPropertyChangedHandlers
|
|
2374
2374
|
*/
|
|
2375
2375
|
Base.prototype.registerPropertyChangedHandlers = function (propertyNames, handler, key) {
|
|
@@ -2381,7 +2381,7 @@ var Base = /** @class */ (function () {
|
|
|
2381
2381
|
/**
|
|
2382
2382
|
* Unregisters value change event handlers for the specified properties.
|
|
2383
2383
|
* @param propertyNames An array of one or multiple property names.
|
|
2384
|
-
* @param key (Optional) A key of the registration that you want to cancel.
|
|
2384
|
+
* @param key *(Optional)* A key of the registration that you want to cancel.
|
|
2385
2385
|
* @see registerPropertyChangedHandlers
|
|
2386
2386
|
*/
|
|
2387
2387
|
Base.prototype.unregisterPropertyChangedHandlers = function (propertyNames, key) {
|
|
@@ -5821,6 +5821,9 @@ var defaultV2Css = {
|
|
|
5821
5821
|
rootDropdown: "sd-scrollable-container sd-scrollable-container--compact sd-selectbase",
|
|
5822
5822
|
root: "sd-scrollable-container sd-rating",
|
|
5823
5823
|
rootWrappable: "sd-scrollable-container sd-rating sd-rating--wrappable",
|
|
5824
|
+
rootLabelsTop: "sd-rating--labels-top",
|
|
5825
|
+
rootLabelsBottom: "sd-rating--labels-bottom",
|
|
5826
|
+
rootLabelsDiagonal: "sd-rating--labels-diagonal",
|
|
5824
5827
|
item: "sd-rating__item",
|
|
5825
5828
|
itemOnError: "sd-rating__item--error",
|
|
5826
5829
|
itemHover: "sd-rating__item--allowhover",
|
|
@@ -8488,7 +8491,7 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
|
|
|
8488
8491
|
if (!_onSelectionChanged) {
|
|
8489
8492
|
_onSelectionChanged = function (item, status) {
|
|
8490
8493
|
_this.resetFilterString();
|
|
8491
|
-
if (item.
|
|
8494
|
+
if (item.id === "selectall") {
|
|
8492
8495
|
_this.selectAllItems();
|
|
8493
8496
|
}
|
|
8494
8497
|
else if (status === "added" && item.value === _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].noneItemValue) {
|
|
@@ -9312,8 +9315,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9312
9315
|
//import "../../modern.scss";
|
|
9313
9316
|
var Version;
|
|
9314
9317
|
var ReleaseDate;
|
|
9315
|
-
Version = "" + "1.9.
|
|
9316
|
-
ReleaseDate = "" + "2023-12-
|
|
9318
|
+
Version = "" + "1.9.122";
|
|
9319
|
+
ReleaseDate = "" + "2023-12-19";
|
|
9317
9320
|
function checkLibraryVersion(ver, libraryName) {
|
|
9318
9321
|
if (Version != ver) {
|
|
9319
9322
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -15370,7 +15373,7 @@ var Cover = /** @class */ (function (_super) {
|
|
|
15370
15373
|
Cover.prototype.updateHeaderClasses = function () {
|
|
15371
15374
|
this.headerClasses = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
|
|
15372
15375
|
.append("sv-header")
|
|
15373
|
-
.append("sv-header__without-background", (this.backgroundColor === "
|
|
15376
|
+
.append("sv-header__without-background", (this.backgroundColor === "transparent") && !this.backgroundImage)
|
|
15374
15377
|
.append("sv-header__overlap", this.overlapEnabled)
|
|
15375
15378
|
.toString();
|
|
15376
15379
|
};
|
|
@@ -15489,6 +15492,13 @@ var Cover = /** @class */ (function (_super) {
|
|
|
15489
15492
|
this.actualHeight = this.calculateActualHeight(logoHeight, titleHeight, descriptionHeight);
|
|
15490
15493
|
}
|
|
15491
15494
|
};
|
|
15495
|
+
Object.defineProperty(Cover.prototype, "hasBackground", {
|
|
15496
|
+
get: function () {
|
|
15497
|
+
return !!this.backgroundImage || this.backgroundColor !== "transparent";
|
|
15498
|
+
},
|
|
15499
|
+
enumerable: false,
|
|
15500
|
+
configurable: true
|
|
15501
|
+
});
|
|
15492
15502
|
__decorate([
|
|
15493
15503
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: 0 })
|
|
15494
15504
|
], Cover.prototype, "actualHeight", void 0);
|
|
@@ -22758,11 +22768,22 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
22758
22768
|
}
|
|
22759
22769
|
}
|
|
22760
22770
|
};
|
|
22761
|
-
PanelModelBase.prototype.notifyStateChanged = function () {
|
|
22762
|
-
|
|
22771
|
+
PanelModelBase.prototype.notifyStateChanged = function (prevState) {
|
|
22772
|
+
var _this = this;
|
|
22773
|
+
_super.prototype.notifyStateChanged.call(this, prevState);
|
|
22763
22774
|
if (this.isCollapsed) {
|
|
22764
22775
|
this.questions.forEach(function (q) { return q.onHidingContent(); });
|
|
22765
22776
|
}
|
|
22777
|
+
if (this.survey != null && !this.isLoadingFromJson && this.isExpanded && prevState === "collapsed") {
|
|
22778
|
+
var q_1 = this.getFirstQuestionToFocus(false);
|
|
22779
|
+
if (!!q_1) {
|
|
22780
|
+
setTimeout(function () {
|
|
22781
|
+
if (!_this.isDisposed && !!_this.survey) {
|
|
22782
|
+
_this.survey.scrollElementToTop(q_1, q_1, null, q_1.inputId, false);
|
|
22783
|
+
}
|
|
22784
|
+
}, 15);
|
|
22785
|
+
}
|
|
22786
|
+
}
|
|
22766
22787
|
};
|
|
22767
22788
|
Object.defineProperty(PanelModelBase.prototype, "isVisible", {
|
|
22768
22789
|
/**
|
|
@@ -23276,11 +23297,11 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
23276
23297
|
PanelModel.prototype.setNo = function (visibleIndex) {
|
|
23277
23298
|
this.setPropertyValue("no", _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].getNumberByIndex(this.visibleIndex, this.getStartIndex()));
|
|
23278
23299
|
};
|
|
23279
|
-
PanelModel.prototype.notifyStateChanged = function () {
|
|
23300
|
+
PanelModel.prototype.notifyStateChanged = function (prevState) {
|
|
23280
23301
|
if (!this.isLoadingFromJson) {
|
|
23281
23302
|
this.locTitle.strChanged();
|
|
23282
23303
|
}
|
|
23283
|
-
_super.prototype.notifyStateChanged.call(this);
|
|
23304
|
+
_super.prototype.notifyStateChanged.call(this, prevState);
|
|
23284
23305
|
};
|
|
23285
23306
|
PanelModel.prototype.createLocTitleProperty = function () {
|
|
23286
23307
|
var _this = this;
|
|
@@ -23659,7 +23680,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
|
23659
23680
|
};
|
|
23660
23681
|
_this.resizeWindowCallback = function () {
|
|
23661
23682
|
if (!_this.isOverlay) {
|
|
23662
|
-
_this.updatePosition(true, _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue" || _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue3");
|
|
23683
|
+
_this.updatePosition(true, _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue" || _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue3" || _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform == "react");
|
|
23663
23684
|
}
|
|
23664
23685
|
};
|
|
23665
23686
|
_this.clientY = 0;
|
|
@@ -25310,8 +25331,8 @@ var Question = /** @class */ (function (_super) {
|
|
|
25310
25331
|
this.errors = [];
|
|
25311
25332
|
}
|
|
25312
25333
|
};
|
|
25313
|
-
Question.prototype.notifyStateChanged = function () {
|
|
25314
|
-
_super.prototype.notifyStateChanged.call(this);
|
|
25334
|
+
Question.prototype.notifyStateChanged = function (prevState) {
|
|
25335
|
+
_super.prototype.notifyStateChanged.call(this, prevState);
|
|
25315
25336
|
if (this.isCollapsed) {
|
|
25316
25337
|
this.onHidingContent();
|
|
25317
25338
|
}
|
|
@@ -26811,9 +26832,9 @@ var Question = /** @class */ (function (_super) {
|
|
|
26811
26832
|
return false;
|
|
26812
26833
|
if (!!this.page && this.page.isStartPage)
|
|
26813
26834
|
return false;
|
|
26814
|
-
if (!this.survey
|
|
26835
|
+
if (!this.survey)
|
|
26815
26836
|
return true;
|
|
26816
|
-
return !this.survey.hasVisibleQuestionByValueName(this.
|
|
26837
|
+
return !this.survey.hasVisibleQuestionByValueName(this.getValueName());
|
|
26817
26838
|
};
|
|
26818
26839
|
Object.defineProperty(Question.prototype, "isParentVisible", {
|
|
26819
26840
|
/**
|
|
@@ -30437,21 +30458,6 @@ var QuestionCheckboxBase = /** @class */ (function (_super) {
|
|
|
30437
30458
|
enumerable: false,
|
|
30438
30459
|
configurable: true
|
|
30439
30460
|
});
|
|
30440
|
-
QuestionCheckboxBase.prototype.clickItemHandler = function (item, checked) {
|
|
30441
|
-
var newValue = [].concat(this.renderedValue || []);
|
|
30442
|
-
var index = newValue.indexOf(item.value);
|
|
30443
|
-
if (checked) {
|
|
30444
|
-
if (index < 0) {
|
|
30445
|
-
newValue.push(item.value);
|
|
30446
|
-
}
|
|
30447
|
-
}
|
|
30448
|
-
else {
|
|
30449
|
-
if (index > -1) {
|
|
30450
|
-
newValue.splice(index, 1);
|
|
30451
|
-
}
|
|
30452
|
-
}
|
|
30453
|
-
this.renderedValue = newValue;
|
|
30454
|
-
};
|
|
30455
30461
|
QuestionCheckboxBase.prototype.onParentChanged = function () {
|
|
30456
30462
|
_super.prototype.onParentChanged.call(this);
|
|
30457
30463
|
if (this.isFlowLayout) {
|
|
@@ -31285,9 +31291,10 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31285
31291
|
__extends(QuestionCheckboxModel, _super);
|
|
31286
31292
|
function QuestionCheckboxModel(name) {
|
|
31287
31293
|
var _this = _super.call(this, name) || this;
|
|
31288
|
-
_this.selectAllItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"]("selectall");
|
|
31289
31294
|
_this.invisibleOldValues = {};
|
|
31290
31295
|
_this.isChangingValueOnClearIncorrect = false;
|
|
31296
|
+
_this.selectAllItemValue = new _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"]("");
|
|
31297
|
+
_this.selectAllItemValue.id = "selectall";
|
|
31291
31298
|
var selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
|
|
31292
31299
|
_this.selectAllItem.locOwner = _this;
|
|
31293
31300
|
_this.selectAllItem.setLocText(selectAllItemText);
|
|
@@ -31397,23 +31404,25 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31397
31404
|
* @see showSelectAllItem
|
|
31398
31405
|
*/
|
|
31399
31406
|
get: function () {
|
|
31407
|
+
if (this.isItemSelected(this.noneItem))
|
|
31408
|
+
return false;
|
|
31409
|
+
var items = this.getVisibleEnableItems();
|
|
31410
|
+
if (items.length === 0)
|
|
31411
|
+
return false;
|
|
31400
31412
|
var val = this.value;
|
|
31401
|
-
if (!val || !Array.isArray(val))
|
|
31413
|
+
if (!val || !Array.isArray(val) || val.length === 0)
|
|
31402
31414
|
return false;
|
|
31403
|
-
if (
|
|
31415
|
+
if (val.length < items.length)
|
|
31404
31416
|
return false;
|
|
31405
|
-
var
|
|
31406
|
-
var
|
|
31407
|
-
|
|
31408
|
-
|
|
31409
|
-
|
|
31410
|
-
|
|
31411
|
-
|
|
31412
|
-
|
|
31413
|
-
|
|
31414
|
-
if (this.isOtherSelected)
|
|
31415
|
-
selectedCount--;
|
|
31416
|
-
return selectedCount === allItemCount;
|
|
31417
|
+
var rVal = [];
|
|
31418
|
+
for (var i = 0; i < val.length; i++) {
|
|
31419
|
+
rVal.push(this.getRealValue(val[i]));
|
|
31420
|
+
}
|
|
31421
|
+
for (var i = 0; i < items.length; i++) {
|
|
31422
|
+
if (rVal.indexOf(items[i].value) < 0)
|
|
31423
|
+
return false;
|
|
31424
|
+
}
|
|
31425
|
+
return true;
|
|
31417
31426
|
},
|
|
31418
31427
|
set: function (val) {
|
|
31419
31428
|
if (val) {
|
|
@@ -31437,16 +31446,37 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31437
31446
|
*/
|
|
31438
31447
|
QuestionCheckboxModel.prototype.selectAll = function () {
|
|
31439
31448
|
var val = [];
|
|
31440
|
-
|
|
31441
|
-
|
|
31442
|
-
|
|
31443
|
-
item === this.otherItem ||
|
|
31444
|
-
item === this.selectAllItem)
|
|
31445
|
-
continue;
|
|
31446
|
-
val.push(item.value);
|
|
31449
|
+
var items = this.getVisibleEnableItems();
|
|
31450
|
+
for (var i = 0; i < items.length; i++) {
|
|
31451
|
+
val.push(items[i].value);
|
|
31447
31452
|
}
|
|
31448
31453
|
this.renderedValue = val;
|
|
31449
31454
|
};
|
|
31455
|
+
QuestionCheckboxModel.prototype.clickItemHandler = function (item, checked) {
|
|
31456
|
+
if (item === this.selectAllItem) {
|
|
31457
|
+
if (checked === true || checked === false) {
|
|
31458
|
+
this.isAllSelected = checked;
|
|
31459
|
+
}
|
|
31460
|
+
else {
|
|
31461
|
+
this.toggleSelectAll();
|
|
31462
|
+
}
|
|
31463
|
+
}
|
|
31464
|
+
else {
|
|
31465
|
+
var newValue = [].concat(this.renderedValue || []);
|
|
31466
|
+
var index = newValue.indexOf(item.value);
|
|
31467
|
+
if (checked) {
|
|
31468
|
+
if (index < 0) {
|
|
31469
|
+
newValue.push(item.value);
|
|
31470
|
+
}
|
|
31471
|
+
}
|
|
31472
|
+
else {
|
|
31473
|
+
if (index > -1) {
|
|
31474
|
+
newValue.splice(index, 1);
|
|
31475
|
+
}
|
|
31476
|
+
}
|
|
31477
|
+
this.renderedValue = newValue;
|
|
31478
|
+
}
|
|
31479
|
+
};
|
|
31450
31480
|
QuestionCheckboxModel.prototype.isItemSelectedCore = function (item) {
|
|
31451
31481
|
if (item === this.selectAllItem)
|
|
31452
31482
|
return this.isAllSelected;
|
|
@@ -31572,24 +31602,51 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
31572
31602
|
errors.push(minError);
|
|
31573
31603
|
}
|
|
31574
31604
|
};
|
|
31605
|
+
QuestionCheckboxModel.prototype.onVisibleChoicesChanged = function () {
|
|
31606
|
+
_super.prototype.onVisibleChoicesChanged.call(this);
|
|
31607
|
+
this.updateSelectAllItemProps();
|
|
31608
|
+
};
|
|
31575
31609
|
QuestionCheckboxModel.prototype.onEnableItemCallBack = function (item) {
|
|
31576
31610
|
if (!this.shouldCheckMaxSelectedChoices())
|
|
31577
31611
|
return true;
|
|
31578
31612
|
return this.isItemSelected(item);
|
|
31579
31613
|
};
|
|
31580
31614
|
QuestionCheckboxModel.prototype.onAfterRunItemsEnableCondition = function () {
|
|
31615
|
+
this.updateSelectAllItemProps();
|
|
31581
31616
|
if (this.maxSelectedChoices < 1) {
|
|
31582
|
-
this.selectAllItem.setIsEnabled(true);
|
|
31583
31617
|
this.otherItem.setIsEnabled(true);
|
|
31584
31618
|
return;
|
|
31585
31619
|
}
|
|
31586
|
-
if (this.hasSelectAll) {
|
|
31587
|
-
this.selectAllItem.setIsEnabled(this.maxSelectedChoices >= this.activeChoices.length);
|
|
31588
|
-
}
|
|
31589
31620
|
if (this.hasOther) {
|
|
31590
31621
|
this.otherItem.setIsEnabled(!this.shouldCheckMaxSelectedChoices() || this.isOtherSelected);
|
|
31591
31622
|
}
|
|
31592
31623
|
};
|
|
31624
|
+
QuestionCheckboxModel.prototype.updateSelectAllItemProps = function () {
|
|
31625
|
+
if (!this.hasSelectAll)
|
|
31626
|
+
return;
|
|
31627
|
+
this.selectAllItem.setIsEnabled(this.getSelectAllEnabled());
|
|
31628
|
+
};
|
|
31629
|
+
QuestionCheckboxModel.prototype.getSelectAllEnabled = function () {
|
|
31630
|
+
if (!this.hasSelectAll)
|
|
31631
|
+
return true;
|
|
31632
|
+
var items = this.activeChoices;
|
|
31633
|
+
var visCount = this.getVisibleEnableItems().length;
|
|
31634
|
+
var max = this.maxSelectedChoices;
|
|
31635
|
+
if (max > 0 && max < visCount)
|
|
31636
|
+
return false;
|
|
31637
|
+
return visCount > 0;
|
|
31638
|
+
};
|
|
31639
|
+
QuestionCheckboxModel.prototype.getVisibleEnableItems = function () {
|
|
31640
|
+
var res = new Array();
|
|
31641
|
+
var items = this.activeChoices;
|
|
31642
|
+
for (var i = 0; i < items.length; i++) {
|
|
31643
|
+
var item = items[i];
|
|
31644
|
+
if (item.isEnabled && item.isVisible) {
|
|
31645
|
+
res.push(item);
|
|
31646
|
+
}
|
|
31647
|
+
}
|
|
31648
|
+
return res;
|
|
31649
|
+
};
|
|
31593
31650
|
QuestionCheckboxModel.prototype.shouldCheckMaxSelectedChoices = function () {
|
|
31594
31651
|
if (this.maxSelectedChoices < 1)
|
|
31595
31652
|
return false;
|
|
@@ -32414,6 +32471,22 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
|
32414
32471
|
this.getElement().locStrsChanged();
|
|
32415
32472
|
}
|
|
32416
32473
|
};
|
|
32474
|
+
QuestionCustomModelBase.prototype.localeChanged = function () {
|
|
32475
|
+
_super.prototype.locStrsChanged.call(this);
|
|
32476
|
+
if (!!this.getElement()) {
|
|
32477
|
+
this.getElement().localeChanged();
|
|
32478
|
+
}
|
|
32479
|
+
};
|
|
32480
|
+
QuestionCustomModelBase.prototype.addUsedLocales = function (locales) {
|
|
32481
|
+
_super.prototype.addUsedLocales.call(this, locales);
|
|
32482
|
+
if (!!this.getElement()) {
|
|
32483
|
+
this.getElement().addUsedLocales(locales);
|
|
32484
|
+
}
|
|
32485
|
+
};
|
|
32486
|
+
QuestionCustomModelBase.prototype.needResponsiveWidth = function () {
|
|
32487
|
+
var el = this.getElement();
|
|
32488
|
+
return !!el ? el.needResponsiveWidth() : false;
|
|
32489
|
+
};
|
|
32417
32490
|
QuestionCustomModelBase.prototype.createWrapper = function () { };
|
|
32418
32491
|
QuestionCustomModelBase.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
|
|
32419
32492
|
_super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
|
|
@@ -33498,7 +33571,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
|
|
|
33498
33571
|
};
|
|
33499
33572
|
QuestionDropdownModel.prototype.onVisibleChoicesChanged = function () {
|
|
33500
33573
|
_super.prototype.onVisibleChoicesChanged.call(this);
|
|
33501
|
-
if (this.popupModel) {
|
|
33574
|
+
if (!this.isLoadingFromJson && this.popupModel) {
|
|
33502
33575
|
this.dropdownListModel.updateItems();
|
|
33503
33576
|
}
|
|
33504
33577
|
};
|
|
@@ -34246,6 +34319,9 @@ function dataUrl2File(dataUrl, fileName, type) {
|
|
|
34246
34319
|
var buffer = new Uint8Array(str.split("").map(function (c) { return c.charCodeAt(0); })).buffer;
|
|
34247
34320
|
return new File([buffer], fileName, { type: type });
|
|
34248
34321
|
}
|
|
34322
|
+
/**
|
|
34323
|
+
* A base class for question types that support file upload: `QuestionFileModel` and `QuestionSignaturePadModel`.
|
|
34324
|
+
*/
|
|
34249
34325
|
var QuestionFileModelBase = /** @class */ (function (_super) {
|
|
34250
34326
|
__extends(QuestionFileModelBase, _super);
|
|
34251
34327
|
function QuestionFileModelBase() {
|
|
@@ -36331,10 +36407,8 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
|
|
|
36331
36407
|
*
|
|
36332
36408
|
* Possible values:
|
|
36333
36409
|
*
|
|
36334
|
-
* - `"image"` - Images in one of the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO.
|
|
36410
|
+
* - `"image"` (default) - Images in one of the following formats: JPEG, GIF, PNG, APNG, SVG, BMP, ICO.
|
|
36335
36411
|
* - `"video"` - Videos in one of the following formats: MP4, MOV, WMV, FLV, AVI, MKV.
|
|
36336
|
-
* - `"youtube"` - Links to YouTube videos.
|
|
36337
|
-
* - `"auto"` (default) - Selects one of the above based on the `imageLink` property value of each choice item.
|
|
36338
36412
|
*/
|
|
36339
36413
|
get: function () {
|
|
36340
36414
|
return this.getPropertyValue("contentMode");
|
|
@@ -43993,7 +44067,8 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
43993
44067
|
* }
|
|
43994
44068
|
* ```
|
|
43995
44069
|
*
|
|
43996
|
-
* To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
|
|
44070
|
+
* To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [`onTextMarkdown`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
|
|
44071
|
+
* @see itemTitleWidth
|
|
43997
44072
|
* @see addItem
|
|
43998
44073
|
*/
|
|
43999
44074
|
get: function () {
|
|
@@ -44007,8 +44082,8 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
44007
44082
|
});
|
|
44008
44083
|
/**
|
|
44009
44084
|
* Adds a new input item.
|
|
44010
|
-
* @param name An item name
|
|
44011
|
-
* @param title (Optional) An item title
|
|
44085
|
+
* @param name An item name.
|
|
44086
|
+
* @param title *(Optional)* An item title.
|
|
44012
44087
|
* @see items
|
|
44013
44088
|
*/
|
|
44014
44089
|
QuestionMultipleTextModel.prototype.addItem = function (name, title) {
|
|
@@ -44142,6 +44217,23 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
44142
44217
|
enumerable: false,
|
|
44143
44218
|
configurable: true
|
|
44144
44219
|
});
|
|
44220
|
+
Object.defineProperty(QuestionMultipleTextModel.prototype, "itemTitleWidth", {
|
|
44221
|
+
/**
|
|
44222
|
+
* Specifies a uniform width for all text box titles. Accepts CSS values.
|
|
44223
|
+
*
|
|
44224
|
+
* Default value: `""` (the width of each title depends on the title length)
|
|
44225
|
+
* @see items
|
|
44226
|
+
* @see itemErrorLocation
|
|
44227
|
+
*/
|
|
44228
|
+
get: function () {
|
|
44229
|
+
return this.getPropertyValue("itemTitleWidth") || "";
|
|
44230
|
+
},
|
|
44231
|
+
set: function (val) {
|
|
44232
|
+
this.setPropertyValue("itemTitleWidth", val);
|
|
44233
|
+
},
|
|
44234
|
+
enumerable: false,
|
|
44235
|
+
configurable: true
|
|
44236
|
+
});
|
|
44145
44237
|
QuestionMultipleTextModel.prototype.onRowCreated = function (row) {
|
|
44146
44238
|
return row;
|
|
44147
44239
|
};
|
|
@@ -44496,7 +44588,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletext",
|
|
|
44496
44588
|
{ name: "!items:textitems", className: "multipletextitem", isArray: true },
|
|
44497
44589
|
{ name: "itemSize:number", minValue: 0 },
|
|
44498
44590
|
{ name: "colCount:number", default: 1, choices: [1, 2, 3, 4, 5] },
|
|
44499
|
-
{ name: "itemErrorLocation", default: "default", choices: ["default", "top", "bottom"], visible: false }
|
|
44591
|
+
{ name: "itemErrorLocation", default: "default", choices: ["default", "top", "bottom"], visible: false },
|
|
44592
|
+
{ name: "itemTitleWidth", category: "layout" }
|
|
44500
44593
|
], function () {
|
|
44501
44594
|
return new QuestionMultipleTextModel("");
|
|
44502
44595
|
}, "question");
|
|
@@ -45178,7 +45271,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45178
45271
|
if (this.isRenderModeList || this.useTemplatePanel)
|
|
45179
45272
|
return;
|
|
45180
45273
|
var curPanel = this.getPropertyValue("currentPanel");
|
|
45181
|
-
|
|
45274
|
+
var index = !!val ? this.visiblePanels.indexOf(val) : -1;
|
|
45275
|
+
if (!!val && index < 0 || val === curPanel)
|
|
45182
45276
|
return;
|
|
45183
45277
|
if (curPanel) {
|
|
45184
45278
|
curPanel.onHidingContent();
|
|
@@ -45187,6 +45281,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
45187
45281
|
this.updateFooterActions();
|
|
45188
45282
|
this.updateTabToolbarItemsPressedState();
|
|
45189
45283
|
this.fireCallback(this.currentIndexChangedCallback);
|
|
45284
|
+
if (index > -1 && this.survey) {
|
|
45285
|
+
var options = {
|
|
45286
|
+
panel: val,
|
|
45287
|
+
visiblePanelIndex: index
|
|
45288
|
+
};
|
|
45289
|
+
this.survey.dynamicPanelCurrentIndexChanged(this, options);
|
|
45290
|
+
}
|
|
45190
45291
|
},
|
|
45191
45292
|
enumerable: false,
|
|
45192
45293
|
configurable: true
|
|
@@ -46018,48 +46119,59 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
46018
46119
|
return newPanel;
|
|
46019
46120
|
};
|
|
46020
46121
|
/**
|
|
46021
|
-
*
|
|
46022
|
-
* @
|
|
46122
|
+
* Adds a new panel based on the [template](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#template).
|
|
46123
|
+
* @param index *(Optional)* An index at which to insert the new panel. `undefined` adds the panel to the end or inserts it after the current panel if [`renderMode`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#renderMode) is `"tab"`. A negative index (for instance, -1) adds the panel to the end in all cases, regardless of the `renderMode` value.
|
|
46023
46124
|
* @see panelCount
|
|
46024
46125
|
* @see panels
|
|
46025
|
-
* @see renderMode
|
|
46026
46126
|
*/
|
|
46027
|
-
QuestionPanelDynamicModel.prototype.addPanel = function () {
|
|
46028
|
-
this.
|
|
46127
|
+
QuestionPanelDynamicModel.prototype.addPanel = function (index) {
|
|
46128
|
+
var curIndex = this.currentIndex;
|
|
46129
|
+
if (index === undefined) {
|
|
46130
|
+
index = curIndex < 0 ? this.panelCount : curIndex + 1;
|
|
46131
|
+
}
|
|
46132
|
+
if (index < 0 || index > this.panelCount) {
|
|
46133
|
+
index = this.panelCount;
|
|
46134
|
+
}
|
|
46135
|
+
this.updateValueOnAddingPanel(curIndex < 0 ? this.panelCount - 1 : curIndex, index);
|
|
46029
46136
|
if (!this.isRenderModeList) {
|
|
46030
|
-
this.currentIndex =
|
|
46137
|
+
this.currentIndex = index;
|
|
46031
46138
|
}
|
|
46139
|
+
if (this.survey)
|
|
46140
|
+
this.survey.dynamicPanelAdded(this);
|
|
46141
|
+
return this.panels[index];
|
|
46142
|
+
};
|
|
46143
|
+
QuestionPanelDynamicModel.prototype.updateValueOnAddingPanel = function (prevIndex, index) {
|
|
46144
|
+
this.panelCount++;
|
|
46032
46145
|
var newValue = this.value;
|
|
46146
|
+
if (!Array.isArray(newValue) || newValue.length !== this.panelCount)
|
|
46147
|
+
return;
|
|
46033
46148
|
var hasModified = false;
|
|
46149
|
+
var lastIndex = this.panelCount - 1;
|
|
46150
|
+
if (index < lastIndex) {
|
|
46151
|
+
hasModified = true;
|
|
46152
|
+
var rec = newValue[lastIndex];
|
|
46153
|
+
newValue.splice(lastIndex, 1);
|
|
46154
|
+
newValue.splice(index, 0, rec);
|
|
46155
|
+
}
|
|
46034
46156
|
if (!this.isValueEmpty(this.defaultPanelValue)) {
|
|
46035
|
-
if (!!newValue &&
|
|
46036
|
-
Array.isArray(newValue) &&
|
|
46037
|
-
newValue.length == this.panelCount) {
|
|
46038
|
-
hasModified = true;
|
|
46039
|
-
this.copyValue(newValue[newValue.length - 1], this.defaultPanelValue);
|
|
46040
|
-
}
|
|
46041
|
-
}
|
|
46042
|
-
if (this.defaultValueFromLastPanel &&
|
|
46043
|
-
!!newValue &&
|
|
46044
|
-
Array.isArray(newValue) &&
|
|
46045
|
-
newValue.length > 1 &&
|
|
46046
|
-
newValue.length == this.panelCount) {
|
|
46047
46157
|
hasModified = true;
|
|
46048
|
-
this.copyValue(newValue[
|
|
46158
|
+
this.copyValue(newValue[index], this.defaultPanelValue);
|
|
46159
|
+
}
|
|
46160
|
+
if (this.defaultValueFromLastPanel && newValue.length > 1) {
|
|
46161
|
+
var fromIndex = prevIndex > -1 && prevIndex <= lastIndex ? prevIndex : lastIndex;
|
|
46162
|
+
hasModified = true;
|
|
46163
|
+
this.copyValue(newValue[index], newValue[fromIndex]);
|
|
46049
46164
|
}
|
|
46050
46165
|
if (hasModified) {
|
|
46051
46166
|
this.value = newValue;
|
|
46052
46167
|
}
|
|
46053
|
-
if (this.survey)
|
|
46054
|
-
this.survey.dynamicPanelAdded(this);
|
|
46055
|
-
return this.panels[this.panelCount - 1];
|
|
46056
46168
|
};
|
|
46057
46169
|
QuestionPanelDynamicModel.prototype.canLeaveCurrentPanel = function () {
|
|
46058
46170
|
return !(this.renderMode !== "list" && this.currentPanel && this.currentPanel.hasErrors(true, true));
|
|
46059
46171
|
};
|
|
46060
|
-
QuestionPanelDynamicModel.prototype.copyValue = function (
|
|
46061
|
-
for (var key in
|
|
46062
|
-
|
|
46172
|
+
QuestionPanelDynamicModel.prototype.copyValue = function (dest, src) {
|
|
46173
|
+
for (var key in src) {
|
|
46174
|
+
dest[key] = src[key];
|
|
46063
46175
|
}
|
|
46064
46176
|
};
|
|
46065
46177
|
/**
|
|
@@ -48496,9 +48608,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48496
48608
|
Object.defineProperty(QuestionRatingModel.prototype, "minRateDescription", {
|
|
48497
48609
|
/**
|
|
48498
48610
|
* Specifies a description for the minimum (first) rate value.
|
|
48611
|
+
* @see rateDescriptionLocation
|
|
48612
|
+
* @see displayRateDescriptionsAsExtremeItems
|
|
48499
48613
|
* @see rateValues
|
|
48500
48614
|
* @see rateMin
|
|
48501
|
-
* @see displayRateDescriptionsAsExtremeItems
|
|
48502
48615
|
*/
|
|
48503
48616
|
get: function () {
|
|
48504
48617
|
return this.getLocalizableStringText("minRateDescription");
|
|
@@ -48520,9 +48633,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48520
48633
|
Object.defineProperty(QuestionRatingModel.prototype, "maxRateDescription", {
|
|
48521
48634
|
/**
|
|
48522
48635
|
* Specifies a description for the maximum (last) rate value.
|
|
48636
|
+
* @see rateDescriptionLocation
|
|
48637
|
+
* @see displayRateDescriptionsAsExtremeItems
|
|
48523
48638
|
* @see rateValues
|
|
48524
48639
|
* @see rateMax
|
|
48525
|
-
* @see displayRateDescriptionsAsExtremeItems
|
|
48526
48640
|
*/
|
|
48527
48641
|
get: function () {
|
|
48528
48642
|
return this.getLocalizableStringText("maxRateDescription");
|
|
@@ -48654,8 +48768,18 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48654
48768
|
get: function () {
|
|
48655
48769
|
var baseClass = ((this.displayMode == "buttons" || (!!this.survey && this.survey.isDesignMode)) && this.cssClasses.rootWrappable) ?
|
|
48656
48770
|
this.cssClasses.rootWrappable : this.cssClasses.root;
|
|
48771
|
+
var rootClassModifier = "";
|
|
48772
|
+
if (this.hasMaxLabel || this.hasMinLabel) {
|
|
48773
|
+
if (this.rateDescriptionLocation == "top")
|
|
48774
|
+
rootClassModifier = this.cssClasses.rootLabelsTop;
|
|
48775
|
+
if (this.rateDescriptionLocation == "bottom")
|
|
48776
|
+
rootClassModifier = this.cssClasses.rootLabelsBottom;
|
|
48777
|
+
if (this.rateDescriptionLocation == "topBottom")
|
|
48778
|
+
rootClassModifier = this.cssClasses.rootLabelsDiagonal;
|
|
48779
|
+
}
|
|
48657
48780
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
|
48658
48781
|
.append(baseClass)
|
|
48782
|
+
.append(rootClassModifier)
|
|
48659
48783
|
.append(this.cssClasses.itemSmall, this.itemSmallMode && this.rateType != "labels")
|
|
48660
48784
|
.toString();
|
|
48661
48785
|
},
|
|
@@ -48984,6 +49108,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
48984
49108
|
}
|
|
48985
49109
|
})
|
|
48986
49110
|
], QuestionRatingModel.prototype, "displayMode", void 0);
|
|
49111
|
+
__decorate([
|
|
49112
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
49113
|
+
], QuestionRatingModel.prototype, "rateDescriptionLocation", void 0);
|
|
48987
49114
|
__decorate([
|
|
48988
49115
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
48989
49116
|
], QuestionRatingModel.prototype, "rateType", void 0);
|
|
@@ -49113,6 +49240,12 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("rating", [
|
|
|
49113
49240
|
return obj.rateType == "labels";
|
|
49114
49241
|
}
|
|
49115
49242
|
},
|
|
49243
|
+
{
|
|
49244
|
+
name: "rateDescriptionLocation",
|
|
49245
|
+
default: "leftRight",
|
|
49246
|
+
category: "layout",
|
|
49247
|
+
choices: ["leftRight", "top", "bottom", "topBottom"],
|
|
49248
|
+
},
|
|
49116
49249
|
{
|
|
49117
49250
|
name: "displayMode",
|
|
49118
49251
|
default: "auto",
|
|
@@ -49294,6 +49427,8 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
|
|
|
49294
49427
|
};
|
|
49295
49428
|
};
|
|
49296
49429
|
QuestionSignaturePadModel.prototype.refreshCanvas = function () {
|
|
49430
|
+
if (!this.canvas)
|
|
49431
|
+
return;
|
|
49297
49432
|
if (!this.value) {
|
|
49298
49433
|
this.canvas.getContext("2d").clearRect(0, 0, this.canvas.width * this.scale, this.canvas.height * this.scale);
|
|
49299
49434
|
this.signaturePad.clear();
|
|
@@ -52657,9 +52792,15 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
52657
52792
|
if (!el || !el.scrollIntoView)
|
|
52658
52793
|
return false;
|
|
52659
52794
|
var elemTop = scrollIfVisible ? -1 : el.getBoundingClientRect().top;
|
|
52660
|
-
|
|
52795
|
+
var needScroll = elemTop < 0;
|
|
52796
|
+
if (!needScroll && !!window) {
|
|
52797
|
+
var height = window.innerHeight;
|
|
52798
|
+
needScroll = height > 0 && height < elemTop;
|
|
52799
|
+
}
|
|
52800
|
+
if (needScroll) {
|
|
52661
52801
|
el.scrollIntoView();
|
|
52662
|
-
|
|
52802
|
+
}
|
|
52803
|
+
return needScroll;
|
|
52663
52804
|
};
|
|
52664
52805
|
SurveyElement.GetFirstNonTextElement = function (elements, removeSpaces) {
|
|
52665
52806
|
if (removeSpaces === void 0) { removeSpaces = false; }
|
|
@@ -52706,6 +52847,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
52706
52847
|
_super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
|
|
52707
52848
|
if (name === "state") {
|
|
52708
52849
|
this.updateElementCss(false);
|
|
52850
|
+
this.notifyStateChanged(oldValue);
|
|
52709
52851
|
if (this.stateChangedCallback)
|
|
52710
52852
|
this.stateChangedCallback();
|
|
52711
52853
|
}
|
|
@@ -52761,12 +52903,11 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
52761
52903
|
},
|
|
52762
52904
|
set: function (val) {
|
|
52763
52905
|
this.setPropertyValue("state", val);
|
|
52764
|
-
this.notifyStateChanged();
|
|
52765
52906
|
},
|
|
52766
52907
|
enumerable: false,
|
|
52767
52908
|
configurable: true
|
|
52768
52909
|
});
|
|
52769
|
-
SurveyElement.prototype.notifyStateChanged = function () {
|
|
52910
|
+
SurveyElement.prototype.notifyStateChanged = function (prevState) {
|
|
52770
52911
|
if (this.survey) {
|
|
52771
52912
|
this.survey.elementContentVisibilityChanged(this);
|
|
52772
52913
|
}
|
|
@@ -54432,6 +54573,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
54432
54573
|
* [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
|
|
54433
54574
|
*/
|
|
54434
54575
|
_this.onGetDynamicPanelTabTitle = _this.addEvent();
|
|
54576
|
+
/**
|
|
54577
|
+
* An event that is raised after the current panel is changed in a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
|
|
54578
|
+
*/
|
|
54579
|
+
_this.onDynamicPanelCurrentIndexChanged = _this.addEvent();
|
|
54435
54580
|
/**
|
|
54436
54581
|
* An event that is raised to define whether a question answer is correct. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
|
|
54437
54582
|
*/
|
|
@@ -56865,7 +57010,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
56865
57010
|
/**
|
|
56866
57011
|
* Merges a specified data object with the object from the [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property.
|
|
56867
57012
|
*
|
|
56868
|
-
* Refer to the following help topic for more information: [
|
|
57013
|
+
* Refer to the following help topic for more information: [Populate Form Fields | Multiple Question Values](https://surveyjs.io/form-library/documentation/design-survey/pre-populate-form-fields#multiple-question-values).
|
|
56869
57014
|
*
|
|
56870
57015
|
* @param data A data object to merge. It should have the following structure: `{ questionName: questionValue, ... }`
|
|
56871
57016
|
* @see setValue
|
|
@@ -58425,6 +58570,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58425
58570
|
};
|
|
58426
58571
|
SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage) {
|
|
58427
58572
|
this.questionHashesClear();
|
|
58573
|
+
this.isCreatingPagesForPreview = true;
|
|
58428
58574
|
var startIndex = this.getPageStartIndex();
|
|
58429
58575
|
_super.prototype.startLoadingFromJson.call(this);
|
|
58430
58576
|
var newPages = this.createPagesForQuestionOnPageMode(isSinglePage, startIndex);
|
|
@@ -58439,6 +58585,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
58439
58585
|
}
|
|
58440
58586
|
this.doElementsOnLoad();
|
|
58441
58587
|
this.updateCurrentPage();
|
|
58588
|
+
this.isCreatingPagesForPreview = false;
|
|
58442
58589
|
};
|
|
58443
58590
|
SurveyModel.prototype.createPagesForQuestionOnPageMode = function (isSinglePage, startIndex) {
|
|
58444
58591
|
if (isSinglePage) {
|
|
@@ -59090,7 +59237,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59090
59237
|
SurveyModel.prototype.afterRenderPage = function (htmlElement) {
|
|
59091
59238
|
var _this = this;
|
|
59092
59239
|
if (!this.isDesignMode && !this.focusingQuestionInfo) {
|
|
59093
|
-
|
|
59240
|
+
var doScroll_1 = !this.isFirstPageRendering;
|
|
59241
|
+
setTimeout(function () { return _this.scrollToTopOnPageChange(doScroll_1); }, 1);
|
|
59094
59242
|
}
|
|
59095
59243
|
this.focusQuestionInfo();
|
|
59096
59244
|
this.isFirstPageRendering = false;
|
|
@@ -59309,6 +59457,10 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59309
59457
|
options.question = question;
|
|
59310
59458
|
this.onGetDynamicPanelTabTitle.fire(this, options);
|
|
59311
59459
|
};
|
|
59460
|
+
SurveyModel.prototype.dynamicPanelCurrentIndexChanged = function (question, options) {
|
|
59461
|
+
options.question = question;
|
|
59462
|
+
this.onDynamicPanelCurrentIndexChanged.fire(this, options);
|
|
59463
|
+
};
|
|
59312
59464
|
SurveyModel.prototype.dragAndDropAllow = function (options) {
|
|
59313
59465
|
this.onDragDropAllow.fire(this, options);
|
|
59314
59466
|
return options.allow;
|
|
@@ -59392,13 +59544,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59392
59544
|
* question,
|
|
59393
59545
|
* question.name,
|
|
59394
59546
|
* question.value,
|
|
59395
|
-
* (
|
|
59396
|
-
*
|
|
59397
|
-
* // Handle success
|
|
59398
|
-
* }
|
|
59399
|
-
* if (status === "error") {
|
|
59400
|
-
* // Handle error
|
|
59401
|
-
* }
|
|
59547
|
+
* (data, errors) => {
|
|
59548
|
+
* // ...
|
|
59402
59549
|
* }
|
|
59403
59550
|
* );
|
|
59404
59551
|
* ```
|
|
@@ -59587,7 +59734,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59587
59734
|
/**
|
|
59588
59735
|
* Returns a question with a specified [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name).
|
|
59589
59736
|
* @param name A question name
|
|
59590
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59737
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59591
59738
|
* @returns A question with a specified name.
|
|
59592
59739
|
* @see getAllQuestions
|
|
59593
59740
|
* @see getQuestionByValueName
|
|
@@ -59615,7 +59762,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59615
59762
|
*
|
|
59616
59763
|
* > Since `valueName` does not have to be unique, multiple questions can have the same `valueName` value. In this case, the `getQuestionByValueName()` method returns the first such question. If you need to get all questions with the same `valueName`, call the `getQuestionsByValueName()` method.
|
|
59617
59764
|
* @param valueName A question's `valueName` property value.
|
|
59618
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59765
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the question. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59619
59766
|
* @returns A question with a specified `valueName`.
|
|
59620
59767
|
* @see getAllQuestions
|
|
59621
59768
|
* @see getQuestionByName
|
|
@@ -59628,7 +59775,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59628
59775
|
/**
|
|
59629
59776
|
* Returns all questions with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName). If a question's `valueName` is undefined, its [`name`](https://surveyjs.io/form-library/documentation/api-reference/question#name) property is used.
|
|
59630
59777
|
* @param valueName A question's `valueName` property value.
|
|
59631
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59778
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59632
59779
|
* @returns An array of questions with a specified `valueName`.
|
|
59633
59780
|
* @see getAllQuestions
|
|
59634
59781
|
* @see getQuestionByName
|
|
@@ -59653,7 +59800,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59653
59800
|
/**
|
|
59654
59801
|
* Returns an array of questions with specified [names](https://surveyjs.io/form-library/documentation/api-reference/question#name).
|
|
59655
59802
|
* @param names An array of question names.
|
|
59656
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59803
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59657
59804
|
* @returns An array of questions with specified names
|
|
59658
59805
|
* @see getAllQuestions
|
|
59659
59806
|
*/
|
|
@@ -59771,7 +59918,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
59771
59918
|
/**
|
|
59772
59919
|
* Returns a [panel](https://surveyjs.io/form-library/documentation/api-reference/panel-model) with a specified [`name`](https://surveyjs.io/form-library/documentation/api-reference/panel-model#name).
|
|
59773
59920
|
* @param name A panel name.
|
|
59774
|
-
* @param caseInsensitive (Optional) A Boolean value that specifies case sensitivity when searching for the panel. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59921
|
+
* @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the panel. Default value: `false` (uppercase and lowercase letters are treated as distinct).
|
|
59775
59922
|
* @returns A panel with a specified name.
|
|
59776
59923
|
* @see getAllPanels
|
|
59777
59924
|
*/
|
|
@@ -60603,6 +60750,8 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60603
60750
|
SurveyModel.prototype.setValue = function (name, newQuestionValue, locNotification, allowNotifyValueChanged, questionName) {
|
|
60604
60751
|
if (locNotification === void 0) { locNotification = false; }
|
|
60605
60752
|
if (allowNotifyValueChanged === void 0) { allowNotifyValueChanged = true; }
|
|
60753
|
+
if (this.isCreatingPagesForPreview)
|
|
60754
|
+
return;
|
|
60606
60755
|
var newValue = newQuestionValue;
|
|
60607
60756
|
if (allowNotifyValueChanged) {
|
|
60608
60757
|
newValue = this.questionOnValueChanging(name, newQuestionValue);
|
|
@@ -61335,6 +61484,9 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61335
61484
|
return this.getLocalizationFormatString(strName, surveySpent, surveyLimit);
|
|
61336
61485
|
};
|
|
61337
61486
|
SurveyModel.prototype.getDisplayClockTime = function (val) {
|
|
61487
|
+
if (val < 0) {
|
|
61488
|
+
val = 0;
|
|
61489
|
+
}
|
|
61338
61490
|
var min = Math.floor(val / 60);
|
|
61339
61491
|
var sec = val % 60;
|
|
61340
61492
|
var secStr = sec.toString();
|
|
@@ -61690,7 +61842,19 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
61690
61842
|
}
|
|
61691
61843
|
}
|
|
61692
61844
|
else if (this.state === "running" && isStrCiEqual(layoutElement.id, "progress-" + this.progressBarType)) {
|
|
61693
|
-
|
|
61845
|
+
var headerLayoutElement = this.layoutElements.filter(function (a) { return a.id === "advanced-header"; })[0];
|
|
61846
|
+
var advHeader = headerLayoutElement && headerLayoutElement.data;
|
|
61847
|
+
var isBelowHeader = !advHeader || advHeader.hasBackground;
|
|
61848
|
+
if (container === "header" && !isBelowHeader) {
|
|
61849
|
+
layoutElement.index = -150;
|
|
61850
|
+
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
|
61851
|
+
containerLayoutElements.push(layoutElement);
|
|
61852
|
+
}
|
|
61853
|
+
}
|
|
61854
|
+
if (container === "center" && isBelowHeader) {
|
|
61855
|
+
if (!!layoutElement.index) {
|
|
61856
|
+
delete layoutElement.index;
|
|
61857
|
+
}
|
|
61694
61858
|
if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
|
|
61695
61859
|
containerLayoutElements.push(layoutElement);
|
|
61696
61860
|
}
|
|
@@ -62884,10 +63048,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
62884
63048
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgIconRegistry", function() { return SvgIconRegistry; });
|
|
62885
63049
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgRegistry", function() { return SvgRegistry; });
|
|
62886
63050
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgBundleViewModel", function() { return SvgBundleViewModel; });
|
|
62887
|
-
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
62888
|
-
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
62889
|
-
|
|
62890
|
-
|
|
62891
63051
|
var SvgIconData = /** @class */ (function () {
|
|
62892
63052
|
function SvgIconData() {
|
|
62893
63053
|
}
|
|
@@ -62949,16 +63109,6 @@ var SvgIconRegistry = /** @class */ (function () {
|
|
|
62949
63109
|
var _this = this;
|
|
62950
63110
|
return Object.keys(this.icons).map(function (icon) { return _this.icons[icon]; }).join("");
|
|
62951
63111
|
};
|
|
62952
|
-
SvgIconRegistry.prototype.renderIcons = function () {
|
|
62953
|
-
var containerId = "sv-icon-holder-global-container";
|
|
62954
|
-
if (!!_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment && !_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root.getElementById(containerId)) {
|
|
62955
|
-
var iconsDiv = document.createElement("div");
|
|
62956
|
-
iconsDiv.id = containerId;
|
|
62957
|
-
iconsDiv.innerHTML = "<svg>" + this.iconsRenderedHtml() + "</svg>";
|
|
62958
|
-
iconsDiv.style.display = "none";
|
|
62959
|
-
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.svgMountContainer).appendChild(iconsDiv);
|
|
62960
|
-
}
|
|
62961
|
-
};
|
|
62962
63112
|
return SvgIconRegistry;
|
|
62963
63113
|
}());
|
|
62964
63114
|
|
|
@@ -64411,13 +64561,14 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
64411
64561
|
})();
|
|
64412
64562
|
|
|
64413
64563
|
var ResponsivityManager = /** @class */ (function () {
|
|
64414
|
-
function ResponsivityManager(container, model, itemsSelector, dotsItemSize) {
|
|
64564
|
+
function ResponsivityManager(container, model, itemsSelector, dotsItemSize, delayedUpdateFunction) {
|
|
64415
64565
|
var _this = this;
|
|
64416
64566
|
if (dotsItemSize === void 0) { dotsItemSize = null; }
|
|
64417
64567
|
this.container = container;
|
|
64418
64568
|
this.model = model;
|
|
64419
64569
|
this.itemsSelector = itemsSelector;
|
|
64420
64570
|
this.dotsItemSize = dotsItemSize;
|
|
64571
|
+
this.delayedUpdateFunction = delayedUpdateFunction;
|
|
64421
64572
|
this.resizeObserver = undefined;
|
|
64422
64573
|
this.isInitialized = false;
|
|
64423
64574
|
this.minDimensionConst = 56;
|
|
@@ -64468,6 +64619,16 @@ var ResponsivityManager = /** @class */ (function () {
|
|
|
64468
64619
|
(currentAction.needSeparator ? this.separatorSize : 0)
|
|
64469
64620
|
: currentAction.maxDimension;
|
|
64470
64621
|
};
|
|
64622
|
+
ResponsivityManager.prototype.getRenderedVisibleActionsCount = function () {
|
|
64623
|
+
var _this = this;
|
|
64624
|
+
var count = 0;
|
|
64625
|
+
this.container.querySelectorAll(this.itemsSelector).forEach(function (item) {
|
|
64626
|
+
if (_this.calcItemSize(item) > 0) {
|
|
64627
|
+
count++;
|
|
64628
|
+
}
|
|
64629
|
+
});
|
|
64630
|
+
return count;
|
|
64631
|
+
};
|
|
64471
64632
|
ResponsivityManager.prototype.calcItemsSizes = function () {
|
|
64472
64633
|
var _this = this;
|
|
64473
64634
|
var actions = this.model.actions;
|
|
@@ -64493,18 +64654,8 @@ var ResponsivityManager = /** @class */ (function () {
|
|
|
64493
64654
|
if (this.isContainerVisible && !this.model.isResponsivenessDisabled) {
|
|
64494
64655
|
if (!this.isInitialized) {
|
|
64495
64656
|
this.model.setActionsMode("large");
|
|
64496
|
-
var recalcItemSizes = function () {
|
|
64497
|
-
_this.calcItemsSizes();
|
|
64498
|
-
_this.isInitialized = true;
|
|
64499
|
-
};
|
|
64500
|
-
if (queueMicrotask) {
|
|
64501
|
-
queueMicrotask(recalcItemSizes);
|
|
64502
|
-
}
|
|
64503
|
-
else {
|
|
64504
|
-
recalcItemSizes();
|
|
64505
|
-
}
|
|
64506
64657
|
}
|
|
64507
|
-
var
|
|
64658
|
+
var processResponsiveness_1 = function () {
|
|
64508
64659
|
var _a;
|
|
64509
64660
|
var dotsItemSize = _this.dotsItemSize;
|
|
64510
64661
|
if (!_this.dotsItemSize) {
|
|
@@ -64513,11 +64664,29 @@ var ResponsivityManager = /** @class */ (function () {
|
|
|
64513
64664
|
}
|
|
64514
64665
|
_this.model.fit(_this.getAvailableSpace(), dotsItemSize);
|
|
64515
64666
|
};
|
|
64516
|
-
if (
|
|
64517
|
-
|
|
64667
|
+
if (!this.isInitialized) {
|
|
64668
|
+
var callback = function () {
|
|
64669
|
+
_this.calcItemsSizes();
|
|
64670
|
+
_this.isInitialized = true;
|
|
64671
|
+
processResponsiveness_1();
|
|
64672
|
+
};
|
|
64673
|
+
if (this.getRenderedVisibleActionsCount() < this.model.visibleActions.length) {
|
|
64674
|
+
if (this.delayedUpdateFunction) {
|
|
64675
|
+
this.delayedUpdateFunction(callback);
|
|
64676
|
+
}
|
|
64677
|
+
else if (queueMicrotask) {
|
|
64678
|
+
queueMicrotask(callback);
|
|
64679
|
+
}
|
|
64680
|
+
else {
|
|
64681
|
+
callback();
|
|
64682
|
+
}
|
|
64683
|
+
}
|
|
64684
|
+
else {
|
|
64685
|
+
callback();
|
|
64686
|
+
}
|
|
64518
64687
|
}
|
|
64519
64688
|
else {
|
|
64520
|
-
|
|
64689
|
+
processResponsiveness_1();
|
|
64521
64690
|
}
|
|
64522
64691
|
}
|
|
64523
64692
|
};
|
|
@@ -64532,9 +64701,9 @@ var ResponsivityManager = /** @class */ (function () {
|
|
|
64532
64701
|
|
|
64533
64702
|
var VerticalResponsivityManager = /** @class */ (function (_super) {
|
|
64534
64703
|
__extends(VerticalResponsivityManager, _super);
|
|
64535
|
-
function VerticalResponsivityManager(container, model, itemsSelector, dotsItemSize, minDimension) {
|
|
64704
|
+
function VerticalResponsivityManager(container, model, itemsSelector, dotsItemSize, minDimension, delayedUpdateFunction) {
|
|
64536
64705
|
if (minDimension === void 0) { minDimension = 40; }
|
|
64537
|
-
var _this = _super.call(this, container, model, itemsSelector, dotsItemSize) || this;
|
|
64706
|
+
var _this = _super.call(this, container, model, itemsSelector, dotsItemSize, delayedUpdateFunction) || this;
|
|
64538
64707
|
_this.minDimensionConst = minDimension;
|
|
64539
64708
|
_this.recalcMinDimensionConst = false;
|
|
64540
64709
|
return _this;
|