survey-core 1.12.9 → 1.12.10
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 +1 -1
- package/defaultV2.fontless.css +1 -1
- package/defaultV2.fontless.min.css +1 -1
- package/defaultV2.min.css +1 -1
- 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/philippines.js +1 -1
- package/i18n/philippines.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 +1 -1
- package/modern.fontless.css +1 -1
- package/modern.fontless.min.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/plugins/bootstrap-integration/index.js +1 -1
- package/plugins/bootstrap-integration/index.min.js +1 -1
- package/plugins/bootstrap-material-integration/index.js +1 -1
- package/plugins/bootstrap-material-integration/index.min.js +1 -1
- package/survey.core.js +231 -83
- 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/packages/survey-core/src/actions/action.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
- package/ts3.4/typings/packages/survey-core/src/page.d.ts +5 -0
- package/ts3.4/typings/packages/survey-core/src/question.d.ts +2 -0
- package/ts3.4/typings/packages/survey-core/src/question_buttongroup.d.ts +1 -1
- package/ts3.4/typings/packages/survey-core/src/survey-events-api.d.ts +4 -0
- package/ts3.4/typings/packages/survey-core/src/survey.d.ts +14 -1
- package/ts3.4/typings/packages/survey-core/src/utils/animation.d.ts +10 -0
- package/ts3.4/typings/packages/survey-core/src/utils/responsivity-manager.d.ts +3 -1
- package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +2 -1
- package/typings/packages/survey-core/src/actions/action.d.ts +1 -1
- package/typings/packages/survey-core/src/base-interfaces.d.ts +2 -0
- package/typings/packages/survey-core/src/page.d.ts +6 -0
- package/typings/packages/survey-core/src/question.d.ts +2 -0
- package/typings/packages/survey-core/src/question_buttongroup.d.ts +1 -1
- package/typings/packages/survey-core/src/survey-events-api.d.ts +4 -0
- package/typings/packages/survey-core/src/survey.d.ts +14 -1
- package/typings/packages/survey-core/src/utils/animation.d.ts +10 -0
- package/typings/packages/survey-core/src/utils/responsivity-manager.d.ts +3 -1
- package/typings/packages/survey-core/src/utils/utils.d.ts +2 -1
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.12.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.10
|
|
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
|
*/
|
|
@@ -4615,7 +4615,7 @@ var jsonobject_JsonObject = /** @class */ (function () {
|
|
|
4615
4615
|
parentProps[key] = true;
|
|
4616
4616
|
dProps.forEach(function (propKey) {
|
|
4617
4617
|
if (!parentProps[propKey]) {
|
|
4618
|
-
_this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType,
|
|
4618
|
+
_this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType, false, options);
|
|
4619
4619
|
}
|
|
4620
4620
|
});
|
|
4621
4621
|
}
|
|
@@ -9905,6 +9905,7 @@ var ComputedUpdater = /** @class */ (function () {
|
|
|
9905
9905
|
};
|
|
9906
9906
|
ComputedUpdater.prototype.dispose = function () {
|
|
9907
9907
|
this.clearDependencies();
|
|
9908
|
+
this._updater = undefined;
|
|
9908
9909
|
};
|
|
9909
9910
|
ComputedUpdater.ComputedUpdaterType = "__dependency_computed";
|
|
9910
9911
|
return ComputedUpdater;
|
|
@@ -10047,6 +10048,13 @@ var base_Base = /** @class */ (function () {
|
|
|
10047
10048
|
this.onPropertyValueChangedCallback = undefined;
|
|
10048
10049
|
this.isDisposedValue = true;
|
|
10049
10050
|
Object.keys(this.dependencies).forEach(function (key) { return _this.dependencies[key].dispose(); });
|
|
10051
|
+
// this.dependencies = {};
|
|
10052
|
+
Object.keys(this.propertyHash).forEach(function (key) {
|
|
10053
|
+
var propVal = _this.getPropertyValueCore(_this.propertyHash, key);
|
|
10054
|
+
if (!!propVal && propVal.type == ComputedUpdater.ComputedUpdaterType) {
|
|
10055
|
+
propVal.dispose();
|
|
10056
|
+
}
|
|
10057
|
+
});
|
|
10050
10058
|
};
|
|
10051
10059
|
Object.defineProperty(Base.prototype, "isDisposed", {
|
|
10052
10060
|
get: function () {
|
|
@@ -11052,6 +11060,8 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11052
11060
|
this.separatorAddConst = 1;
|
|
11053
11061
|
this.paddingSizeConst = 8;
|
|
11054
11062
|
this.dotsSizeConst = 48;
|
|
11063
|
+
this.dotsIconClass = ".sv-dots";
|
|
11064
|
+
this.iconClass = ".sv-svg-icon";
|
|
11055
11065
|
this.recalcMinDimensionConst = true;
|
|
11056
11066
|
this.getComputedStyle = function (elt) {
|
|
11057
11067
|
return DomDocumentHelper.getComputedStyle(elt);
|
|
@@ -11086,13 +11096,18 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11086
11096
|
return space;
|
|
11087
11097
|
};
|
|
11088
11098
|
ResponsivityManager.prototype.calcItemSize = function (item) {
|
|
11089
|
-
return item.offsetWidth;
|
|
11099
|
+
return item.offsetWidth || item.getBoundingClientRect().width;
|
|
11090
11100
|
};
|
|
11091
|
-
ResponsivityManager.prototype.calcMinDimension = function (currentAction) {
|
|
11092
|
-
var
|
|
11093
|
-
if (currentAction.iconSize
|
|
11094
|
-
|
|
11101
|
+
ResponsivityManager.prototype.calcMinDimension = function (currentAction, item) {
|
|
11102
|
+
var iconSize;
|
|
11103
|
+
if (!!item && (!currentAction.iconSize || currentAction.iconSize === "auto")) {
|
|
11104
|
+
var iconElement = item.querySelector(this.iconClass);
|
|
11105
|
+
iconSize = iconElement && this.calcItemSize(iconElement);
|
|
11095
11106
|
}
|
|
11107
|
+
else if (currentAction.iconSize && typeof (currentAction.iconSize) === "number" && this.recalcMinDimensionConst) {
|
|
11108
|
+
iconSize = currentAction.iconSize;
|
|
11109
|
+
}
|
|
11110
|
+
var minDimensionConst = !!iconSize ? (iconSize + 2 * this.paddingSizeConst) : this.minDimensionConst;
|
|
11096
11111
|
return currentAction.canShrink
|
|
11097
11112
|
? minDimensionConst +
|
|
11098
11113
|
(currentAction.needSeparator ? this.separatorSize : 0)
|
|
@@ -11100,7 +11115,7 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11100
11115
|
};
|
|
11101
11116
|
ResponsivityManager.prototype.calcItemsSizes = function () {
|
|
11102
11117
|
var _this = this;
|
|
11103
|
-
if (this.isInitialized)
|
|
11118
|
+
if (!this.container || this.isInitialized)
|
|
11104
11119
|
return;
|
|
11105
11120
|
var actions = this.model.actions;
|
|
11106
11121
|
var _items = this.container.querySelectorAll(this.itemsSelector);
|
|
@@ -11113,11 +11128,11 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11113
11128
|
};
|
|
11114
11129
|
ResponsivityManager.prototype.calcActionDimensions = function (currentAction, item) {
|
|
11115
11130
|
currentAction.maxDimension = this.calcItemSize(item);
|
|
11116
|
-
currentAction.minDimension = this.calcMinDimension(currentAction);
|
|
11131
|
+
currentAction.minDimension = this.calcMinDimension(currentAction, item);
|
|
11117
11132
|
};
|
|
11118
11133
|
Object.defineProperty(ResponsivityManager.prototype, "isContainerVisible", {
|
|
11119
11134
|
get: function () {
|
|
11120
|
-
return isContainerVisible(this.container);
|
|
11135
|
+
return !!this.container && isContainerVisible(this.container);
|
|
11121
11136
|
},
|
|
11122
11137
|
enumerable: false,
|
|
11123
11138
|
configurable: true
|
|
@@ -11132,13 +11147,16 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11132
11147
|
var _a;
|
|
11133
11148
|
var dotsItemSize = _this.dotsItemSize;
|
|
11134
11149
|
if (!_this.dotsItemSize) {
|
|
11135
|
-
var dotsItemElement = (_a = _this.container) === null || _a === void 0 ? void 0 : _a.querySelector(
|
|
11150
|
+
var dotsItemElement = (_a = _this.container) === null || _a === void 0 ? void 0 : _a.querySelector(_this.dotsIconClass);
|
|
11136
11151
|
dotsItemSize = dotsItemElement && _this.calcItemSize(dotsItemElement) || _this.dotsSizeConst;
|
|
11137
11152
|
}
|
|
11138
11153
|
_this.model.fit(_this.getAvailableSpace(), dotsItemSize);
|
|
11139
11154
|
};
|
|
11140
11155
|
if (!this.isInitialized) {
|
|
11141
11156
|
var callback = function () {
|
|
11157
|
+
if (!_this.container) {
|
|
11158
|
+
return;
|
|
11159
|
+
}
|
|
11142
11160
|
_this.calcItemsSizes();
|
|
11143
11161
|
_this.isInitialized = true;
|
|
11144
11162
|
processResponsiveness_1();
|
|
@@ -11160,6 +11178,8 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
|
11160
11178
|
if (!!this.resizeObserver) {
|
|
11161
11179
|
this.resizeObserver.disconnect();
|
|
11162
11180
|
}
|
|
11181
|
+
this.resizeObserver = undefined;
|
|
11182
|
+
this.container = undefined;
|
|
11163
11183
|
};
|
|
11164
11184
|
return ResponsivityManager;
|
|
11165
11185
|
}());
|
|
@@ -11416,6 +11436,7 @@ var container_ActionContainer = /** @class */ (function (_super) {
|
|
|
11416
11436
|
};
|
|
11417
11437
|
ActionContainer.prototype.dispose = function () {
|
|
11418
11438
|
_super.prototype.dispose.call(this);
|
|
11439
|
+
this.resetResponsivityManager();
|
|
11419
11440
|
this.actions.forEach(function (action) { return action.dispose(); });
|
|
11420
11441
|
this.actions.length = 0;
|
|
11421
11442
|
};
|
|
@@ -12640,15 +12661,15 @@ var action_Action = /** @class */ (function (_super) {
|
|
|
12640
12661
|
};
|
|
12641
12662
|
Action.prototype.dispose = function () {
|
|
12642
12663
|
this.updateCallback = undefined;
|
|
12664
|
+
if (!!this.locTitleValue) {
|
|
12665
|
+
this.locTitleValue.onStringChanged.remove(this.locTitleChanged);
|
|
12666
|
+
}
|
|
12667
|
+
this.locTitleChanged = undefined;
|
|
12643
12668
|
this.action = undefined;
|
|
12644
12669
|
_super.prototype.dispose.call(this);
|
|
12645
12670
|
if (this.popupModel) {
|
|
12646
12671
|
this.popupModel.dispose();
|
|
12647
12672
|
}
|
|
12648
|
-
if (!!this.locTitleValue) {
|
|
12649
|
-
this.locTitleValue.onStringChanged.remove(this.locTitleChanged);
|
|
12650
|
-
this.locTitleChanged = undefined;
|
|
12651
|
-
}
|
|
12652
12673
|
};
|
|
12653
12674
|
action_decorate([
|
|
12654
12675
|
jsonobject_property()
|
|
@@ -12871,6 +12892,12 @@ var adaptive_container_AdaptiveActionContainer = /** @class */ (function (_super
|
|
|
12871
12892
|
}
|
|
12872
12893
|
};
|
|
12873
12894
|
AdaptiveActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
|
12895
|
+
if (!!this.responsivityManager) {
|
|
12896
|
+
if (this.responsivityManager.container == container) {
|
|
12897
|
+
return;
|
|
12898
|
+
}
|
|
12899
|
+
this.responsivityManager.dispose();
|
|
12900
|
+
}
|
|
12874
12901
|
this.responsivityManager = new responsivity_manager_ResponsivityManager(container, this, ":scope > .sv-action:not(.sv-dots) > .sv-action__content", null, delayedUpdateFunction);
|
|
12875
12902
|
};
|
|
12876
12903
|
AdaptiveActionContainer.prototype.resetResponsivityManager = function () {
|
|
@@ -13342,11 +13369,15 @@ var animation_AnimationGroup = /** @class */ (function (_super) {
|
|
|
13342
13369
|
newValue = [].concat(newValue);
|
|
13343
13370
|
var oldValue = [].concat(this.getCurrentValue());
|
|
13344
13371
|
var allowSyncRemovalAddition = (_a = this.animationOptions.allowSyncRemovalAddition) !== null && _a !== void 0 ? _a : true;
|
|
13345
|
-
var
|
|
13346
|
-
if (!allowSyncRemovalAddition && (reorderedItems.length > 0 || addedItems.length > 0)) {
|
|
13347
|
-
deletedItems = [];
|
|
13348
|
-
mergedItems = newValue;
|
|
13372
|
+
var compareResult = compareArrays(oldValue, newValue, (_b = this.animationOptions.getKey) !== null && _b !== void 0 ? _b : (function (item) { return item; }));
|
|
13373
|
+
if (!allowSyncRemovalAddition && (compareResult.reorderedItems.length > 0 || compareResult.addedItems.length > 0)) {
|
|
13374
|
+
compareResult.deletedItems = [];
|
|
13375
|
+
compareResult.mergedItems = newValue;
|
|
13376
|
+
}
|
|
13377
|
+
if (!!this.animationOptions.onCompareArrays) {
|
|
13378
|
+
this.animationOptions.onCompareArrays(compareResult);
|
|
13349
13379
|
}
|
|
13380
|
+
var addedItems = compareResult.addedItems, reorderedItems = compareResult.reorderedItems, deletedItems = compareResult.deletedItems, mergedItems = compareResult.mergedItems;
|
|
13350
13381
|
var runAnimationCallback = function () {
|
|
13351
13382
|
_this.animation.runGroupAnimation(_this.animationOptions, addedItems, deletedItems, reorderedItems, function () {
|
|
13352
13383
|
if (deletedItems.length > 0) {
|
|
@@ -15785,6 +15816,12 @@ function navigateToUrl(url) {
|
|
|
15785
15816
|
function wrapUrlForBackgroundImage(url) {
|
|
15786
15817
|
return !!url ? ["url(", url, ")"].join("") : "";
|
|
15787
15818
|
}
|
|
15819
|
+
function isBase64URL(url) {
|
|
15820
|
+
if (typeof url == "string") {
|
|
15821
|
+
return /^data:((?:\w+\/(?:(?!;).)+)?)((?:;[^;]+?)*),(.+)$/.test(url);
|
|
15822
|
+
}
|
|
15823
|
+
return null;
|
|
15824
|
+
}
|
|
15788
15825
|
// old-name: new-name
|
|
15789
15826
|
var renamedIcons = {
|
|
15790
15827
|
"changecamera": "flip-24x24",
|
|
@@ -15803,6 +15840,7 @@ var renamedIcons = {
|
|
|
15803
15840
|
"takepicture": "camera-32x32",
|
|
15804
15841
|
"takepicture_24x24": "camera-24x24",
|
|
15805
15842
|
"v2check": "check-16x16",
|
|
15843
|
+
"checked": "check-16x16",
|
|
15806
15844
|
"v2check_24x24": "check-24x24",
|
|
15807
15845
|
"back-to-panel_16x16": "restoredown-16x16",
|
|
15808
15846
|
"clear_16x16": "clear-16x16",
|
|
@@ -18666,8 +18704,10 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
18666
18704
|
_this.createLocalizableString("commentText", _this, true, "otherItemText");
|
|
18667
18705
|
_this.createLocalizableString("requiredErrorText", _this);
|
|
18668
18706
|
_this.addTriggerInfo("resetValueIf", function () { return !_this.isEmpty(); }, function () {
|
|
18707
|
+
_this.startSetValueOnExpression();
|
|
18669
18708
|
_this.clearValue();
|
|
18670
18709
|
_this.updateValueWithDefaults();
|
|
18710
|
+
_this.finishSetValueOnExpression();
|
|
18671
18711
|
});
|
|
18672
18712
|
var setValueIfInfo = _this.addTriggerInfo("setValueIf", function () { return true; }, function () { return _this.runSetValueExpression(); });
|
|
18673
18713
|
setValueIfInfo.runSecondCheck = function (keys) { return _this.checkExpressionIf(keys); };
|
|
@@ -20418,12 +20458,13 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
20418
20458
|
_super.prototype.onSetData.call(this);
|
|
20419
20459
|
if (!this.survey)
|
|
20420
20460
|
return;
|
|
20421
|
-
this.initDataFromSurvey();
|
|
20422
|
-
this.onSurveyValueChanged(this.value);
|
|
20423
|
-
this.updateValueWithDefaults();
|
|
20424
20461
|
this.onIndentChanged();
|
|
20425
|
-
this.
|
|
20426
|
-
|
|
20462
|
+
if (!this.isDesignMode) {
|
|
20463
|
+
this.initDataFromSurvey();
|
|
20464
|
+
this.onSurveyValueChanged(this.value);
|
|
20465
|
+
this.updateValueWithDefaults();
|
|
20466
|
+
this.updateIsAnswered();
|
|
20467
|
+
}
|
|
20427
20468
|
};
|
|
20428
20469
|
Question.prototype.initDataFromSurvey = function () {
|
|
20429
20470
|
if (!!this.data) {
|
|
@@ -21033,10 +21074,20 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
21033
21074
|
var _this = this;
|
|
21034
21075
|
this.runExpressionSetValueCore(val, function (val) {
|
|
21035
21076
|
if (!_this.isTwoValueEquals(_this.value, val)) {
|
|
21077
|
+
_this.startSetValueOnExpression();
|
|
21036
21078
|
_this.value = val;
|
|
21079
|
+
_this.finishSetValueOnExpression();
|
|
21037
21080
|
}
|
|
21038
21081
|
});
|
|
21039
21082
|
};
|
|
21083
|
+
Question.prototype.startSetValueOnExpression = function () {
|
|
21084
|
+
var _a;
|
|
21085
|
+
(_a = this.survey) === null || _a === void 0 ? void 0 : _a.startSetValueOnExpression();
|
|
21086
|
+
};
|
|
21087
|
+
Question.prototype.finishSetValueOnExpression = function () {
|
|
21088
|
+
var _a;
|
|
21089
|
+
(_a = this.survey) === null || _a === void 0 ? void 0 : _a.finishSetValueOnExpression();
|
|
21090
|
+
};
|
|
21040
21091
|
Question.prototype.runDefaultValueExpression = function (runner, values, properties, setFunc) {
|
|
21041
21092
|
var _this = this;
|
|
21042
21093
|
if (values === void 0) { values = null; }
|
|
@@ -21113,7 +21164,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
|
21113
21164
|
};
|
|
21114
21165
|
Object.defineProperty(Question.prototype, "isAnswered", {
|
|
21115
21166
|
get: function () {
|
|
21116
|
-
return this.getPropertyValue("isAnswered");
|
|
21167
|
+
return this.getPropertyValue("isAnswered") || false;
|
|
21117
21168
|
},
|
|
21118
21169
|
set: function (val) {
|
|
21119
21170
|
this.setPropertyValue("isAnswered", val);
|
|
@@ -38327,7 +38378,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
|
38327
38378
|
return this.showQuestionNumbers !== "off" && this.showQuestionNumbers !== "onpanel";
|
|
38328
38379
|
};
|
|
38329
38380
|
PanelModel.prototype.notifySurveyOnVisibilityChanged = function () {
|
|
38330
|
-
if (this.survey != null && !this.isLoadingFromJson) {
|
|
38381
|
+
if (this.survey != null && !this.isLoadingFromJson && !!this.page) {
|
|
38331
38382
|
this.survey.panelVisibilityChanged(this, this.isVisible);
|
|
38332
38383
|
}
|
|
38333
38384
|
};
|
|
@@ -38912,6 +38963,7 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
38912
38963
|
* @see timeLimit
|
|
38913
38964
|
*/
|
|
38914
38965
|
_this.timeSpent = 0;
|
|
38966
|
+
_this._isReadyForClean = true;
|
|
38915
38967
|
_this.createLocalizableString("navigationDescription", _this, true);
|
|
38916
38968
|
_this.dragDropPageHelper = new drag_drop_page_helper_v1_DragDropPageHelperV1(_this);
|
|
38917
38969
|
return _this;
|
|
@@ -39284,6 +39336,28 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
|
39284
39336
|
_super.prototype.ensureRowsVisibility.call(this);
|
|
39285
39337
|
this.getPanels().forEach(function (panel) { return panel.ensureRowsVisibility(); });
|
|
39286
39338
|
};
|
|
39339
|
+
Object.defineProperty(PageModel.prototype, "isReadyForClean", {
|
|
39340
|
+
get: function () {
|
|
39341
|
+
return this._isReadyForClean;
|
|
39342
|
+
},
|
|
39343
|
+
set: function (val) {
|
|
39344
|
+
var oldValue = this._isReadyForClean;
|
|
39345
|
+
this._isReadyForClean = val;
|
|
39346
|
+
if (this._isReadyForClean !== oldValue) {
|
|
39347
|
+
this.isReadyForCleanChangedCallback && this.isReadyForCleanChangedCallback();
|
|
39348
|
+
}
|
|
39349
|
+
},
|
|
39350
|
+
enumerable: false,
|
|
39351
|
+
configurable: true
|
|
39352
|
+
});
|
|
39353
|
+
PageModel.prototype.enableOnElementRerenderedEvent = function () {
|
|
39354
|
+
_super.prototype.enableOnElementRerenderedEvent.call(this);
|
|
39355
|
+
this.isReadyForClean = false;
|
|
39356
|
+
};
|
|
39357
|
+
PageModel.prototype.disableOnElementRerenderedEvent = function () {
|
|
39358
|
+
_super.prototype.disableOnElementRerenderedEvent.call(this);
|
|
39359
|
+
this.isReadyForClean = true;
|
|
39360
|
+
};
|
|
39287
39361
|
page_decorate([
|
|
39288
39362
|
jsonobject_property({ defaultValue: -1, onSet: function (val, target) { return target.onNumChanged(val); } })
|
|
39289
39363
|
], PageModel.prototype, "num", void 0);
|
|
@@ -40480,7 +40554,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
40480
40554
|
*/
|
|
40481
40555
|
_this.onGetPageTitleActions = _this.addEvent();
|
|
40482
40556
|
/**
|
|
40483
|
-
* An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel).
|
|
40557
|
+
* An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel). This panel may belong to a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model) or be a standalone survey element.
|
|
40484
40558
|
* @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
|
|
40485
40559
|
*/
|
|
40486
40560
|
_this.onGetPanelFooterActions = _this.addEvent();
|
|
@@ -40546,6 +40620,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
40546
40620
|
_this.cssVariables = {};
|
|
40547
40621
|
_this._isMobile = false;
|
|
40548
40622
|
_this._isCompact = false;
|
|
40623
|
+
_this.setValueOnExpressionCounter = 0;
|
|
40549
40624
|
_this._isDesignMode = false;
|
|
40550
40625
|
/**
|
|
40551
40626
|
* Specifies whether respondents can switch the current page even if it contains validation errors.
|
|
@@ -40587,6 +40662,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
40587
40662
|
valueNames: {},
|
|
40588
40663
|
valueNamesInsensitive: {},
|
|
40589
40664
|
};
|
|
40665
|
+
_this.setValueFromTriggerCounter = 0;
|
|
40590
40666
|
_this.needRenderIcons = true;
|
|
40591
40667
|
_this.skippedPages = [];
|
|
40592
40668
|
_this.skeletonComponentName = "sv-skeleton";
|
|
@@ -40614,9 +40690,20 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
40614
40690
|
_this.doTimer(page);
|
|
40615
40691
|
};
|
|
40616
40692
|
_this.createNewArray("pages", function (value) {
|
|
40693
|
+
if (value.isReadyForCleanChangedCallback) {
|
|
40694
|
+
value.isReadyForCleanChangedCallback();
|
|
40695
|
+
}
|
|
40617
40696
|
_this.doOnPageAdded(value);
|
|
40618
40697
|
}, function (value) {
|
|
40619
|
-
|
|
40698
|
+
if (!value.isReadyForClean) {
|
|
40699
|
+
value.isReadyForCleanChangedCallback = function () {
|
|
40700
|
+
_this.doOnPageRemoved(value);
|
|
40701
|
+
value.isReadyForCleanChangedCallback = undefined;
|
|
40702
|
+
};
|
|
40703
|
+
}
|
|
40704
|
+
else {
|
|
40705
|
+
_this.doOnPageRemoved(value);
|
|
40706
|
+
}
|
|
40620
40707
|
});
|
|
40621
40708
|
_this.createNewArray("triggers", function (value) {
|
|
40622
40709
|
value.setOwner(_this);
|
|
@@ -42328,6 +42415,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
42328
42415
|
};
|
|
42329
42416
|
return exp.run(values, properties) || onCompleteRes;
|
|
42330
42417
|
};
|
|
42418
|
+
Object.defineProperty(SurveyModel.prototype, "isSettingValueOnExpression", {
|
|
42419
|
+
get: function () { return this.setValueOnExpressionCounter > 0; },
|
|
42420
|
+
enumerable: false,
|
|
42421
|
+
configurable: true
|
|
42422
|
+
});
|
|
42423
|
+
SurveyModel.prototype.startSetValueOnExpression = function () {
|
|
42424
|
+
this.setValueOnExpressionCounter++;
|
|
42425
|
+
};
|
|
42426
|
+
SurveyModel.prototype.finishSetValueOnExpression = function () {
|
|
42427
|
+
this.setValueOnExpressionCounter--;
|
|
42428
|
+
};
|
|
42331
42429
|
/**
|
|
42332
42430
|
* Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns `true` or `false`.
|
|
42333
42431
|
* @param expression An expression to calculate.
|
|
@@ -43263,16 +43361,18 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
43263
43361
|
for (var key in this.variablesHash)
|
|
43264
43362
|
values[key] = this.variablesHash[key];
|
|
43265
43363
|
this.addCalculatedValuesIntoFilteredValues(values);
|
|
43266
|
-
|
|
43267
|
-
|
|
43268
|
-
var
|
|
43269
|
-
|
|
43270
|
-
|
|
43271
|
-
this.getAllQuestions().forEach(function (q) {
|
|
43272
|
-
if (q.hasFilteredValue) {
|
|
43273
|
-
values[q.getFilteredName()] = q.getFilteredValue();
|
|
43364
|
+
if (!this.isDesignMode) {
|
|
43365
|
+
var keys = this.getValuesKeys();
|
|
43366
|
+
for (var i = 0; i < keys.length; i++) {
|
|
43367
|
+
var key = keys[i];
|
|
43368
|
+
values[key] = this.getDataValueCore(this.valuesHash, key);
|
|
43274
43369
|
}
|
|
43275
|
-
|
|
43370
|
+
this.getAllQuestions().forEach(function (q) {
|
|
43371
|
+
if (q.hasFilteredValue) {
|
|
43372
|
+
values[q.getFilteredName()] = q.getFilteredValue();
|
|
43373
|
+
}
|
|
43374
|
+
});
|
|
43375
|
+
}
|
|
43276
43376
|
return values;
|
|
43277
43377
|
};
|
|
43278
43378
|
SurveyModel.prototype.addCalculatedValuesIntoFilteredValues = function (values) {
|
|
@@ -45516,8 +45616,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45516
45616
|
return options.error ? new CustomError(options.error, this) : null;
|
|
45517
45617
|
};
|
|
45518
45618
|
SurveyModel.prototype.dynamicPanelAdded = function (question, panelIndex, panel) {
|
|
45519
|
-
if (!this.isLoadingFromJson) {
|
|
45520
|
-
this.updateVisibleIndexes();
|
|
45619
|
+
if (!this.isLoadingFromJson && this.hasQuestionVisibleIndeces(question, true)) {
|
|
45620
|
+
this.updateVisibleIndexes(question.page);
|
|
45521
45621
|
}
|
|
45522
45622
|
if (this.onDynamicPanelAdded.isEmpty)
|
|
45523
45623
|
return;
|
|
@@ -45533,13 +45633,26 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
45533
45633
|
for (var i = 0; i < questions.length; i++) {
|
|
45534
45634
|
questions[i].clearOnDeletingContainer();
|
|
45535
45635
|
}
|
|
45536
|
-
this.
|
|
45636
|
+
if (this.hasQuestionVisibleIndeces(question, false)) {
|
|
45637
|
+
this.updateVisibleIndexes(question.page);
|
|
45638
|
+
}
|
|
45537
45639
|
this.onDynamicPanelRemoved.fire(this, {
|
|
45538
45640
|
question: question,
|
|
45539
45641
|
panelIndex: panelIndex,
|
|
45540
45642
|
panel: panel,
|
|
45541
45643
|
});
|
|
45542
45644
|
};
|
|
45645
|
+
SurveyModel.prototype.hasQuestionVisibleIndeces = function (question, checkIndex) {
|
|
45646
|
+
if (checkIndex) {
|
|
45647
|
+
question.setVisibleIndex(this.getStartVisibleIndex());
|
|
45648
|
+
}
|
|
45649
|
+
var qList = question.getNestedQuestions(true);
|
|
45650
|
+
for (var i = 0; i < qList.length; i++) {
|
|
45651
|
+
if (qList[i].visibleIndex > -1)
|
|
45652
|
+
return true;
|
|
45653
|
+
}
|
|
45654
|
+
return false;
|
|
45655
|
+
};
|
|
45543
45656
|
SurveyModel.prototype.dynamicPanelRemoving = function (question, panelIndex, panel) {
|
|
45544
45657
|
var options = {
|
|
45545
45658
|
question: question,
|
|
@@ -46081,6 +46194,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46081
46194
|
page.name = name;
|
|
46082
46195
|
return page;
|
|
46083
46196
|
};
|
|
46197
|
+
SurveyModel.prototype.getValueChangeReason = function () {
|
|
46198
|
+
if (this.isSettingValueOnExpression)
|
|
46199
|
+
return "expression";
|
|
46200
|
+
return this.isSettingValueFromTrigger ? "trigger" : undefined;
|
|
46201
|
+
};
|
|
46084
46202
|
SurveyModel.prototype.questionOnValueChanging = function (valueName, newValue, questionValueName) {
|
|
46085
46203
|
if (!!this.editingObj) {
|
|
46086
46204
|
var prop = Serializer.findProperty(this.editingObj.getType(), valueName);
|
|
@@ -46094,6 +46212,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46094
46212
|
question: this.getQuestionByValueName(questionValueName || valueName),
|
|
46095
46213
|
value: this.getUnbindValue(newValue),
|
|
46096
46214
|
oldValue: this.getValue(valueName),
|
|
46215
|
+
reason: this.getValueChangeReason()
|
|
46097
46216
|
};
|
|
46098
46217
|
this.onValueChanging.fire(this, options);
|
|
46099
46218
|
return options.value;
|
|
@@ -46148,6 +46267,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46148
46267
|
}
|
|
46149
46268
|
return res;
|
|
46150
46269
|
};
|
|
46270
|
+
SurveyModel.prototype.fireOnValueChanged = function (name, value, question) {
|
|
46271
|
+
this.onValueChanged.fire(this, {
|
|
46272
|
+
name: name,
|
|
46273
|
+
question: question,
|
|
46274
|
+
value: value,
|
|
46275
|
+
reason: this.getValueChangeReason()
|
|
46276
|
+
});
|
|
46277
|
+
};
|
|
46151
46278
|
SurveyModel.prototype.notifyQuestionOnValueChanged = function (valueName, newValue, questionName) {
|
|
46152
46279
|
if (this.isLoadingFromJson)
|
|
46153
46280
|
return;
|
|
@@ -46157,19 +46284,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46157
46284
|
var question = questions[i];
|
|
46158
46285
|
this.checkQuestionErrorOnValueChanged(question);
|
|
46159
46286
|
question.onSurveyValueChanged(newValue);
|
|
46160
|
-
this.
|
|
46161
|
-
name: valueName,
|
|
46162
|
-
question: question,
|
|
46163
|
-
value: newValue,
|
|
46164
|
-
});
|
|
46287
|
+
this.fireOnValueChanged(valueName, newValue, question);
|
|
46165
46288
|
}
|
|
46166
46289
|
}
|
|
46167
46290
|
else {
|
|
46168
|
-
this.
|
|
46169
|
-
name: valueName,
|
|
46170
|
-
question: null,
|
|
46171
|
-
value: newValue,
|
|
46172
|
-
});
|
|
46291
|
+
this.fireOnValueChanged(valueName, newValue, null);
|
|
46173
46292
|
}
|
|
46174
46293
|
if (this.isDisposed)
|
|
46175
46294
|
return;
|
|
@@ -46494,7 +46613,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46494
46613
|
}
|
|
46495
46614
|
this.updateVisibleIndexes();
|
|
46496
46615
|
};
|
|
46497
|
-
SurveyModel.prototype.updateVisibleIndexes = function () {
|
|
46616
|
+
SurveyModel.prototype.updateVisibleIndexes = function (page) {
|
|
46498
46617
|
if (this.isLoadingFromJson || !!this.isEndLoadingFromJson || this.isLockingUpdateOnPageModes)
|
|
46499
46618
|
return;
|
|
46500
46619
|
if (this.isRunningConditions &&
|
|
@@ -46508,22 +46627,28 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46508
46627
|
this.updateVisibleIndexAfterBindings = true;
|
|
46509
46628
|
return;
|
|
46510
46629
|
}
|
|
46511
|
-
this.updatePageVisibleIndexes(
|
|
46630
|
+
this.updatePageVisibleIndexes();
|
|
46631
|
+
this.updatePageElementsVisibleIndexes(page);
|
|
46632
|
+
this.updateProgressText(true);
|
|
46633
|
+
};
|
|
46634
|
+
SurveyModel.prototype.updatePageElementsVisibleIndexes = function (page) {
|
|
46512
46635
|
if (this.showQuestionNumbers == "onPage") {
|
|
46513
|
-
var visPages = this.visiblePages;
|
|
46636
|
+
var visPages = !!page ? [page] : this.visiblePages;
|
|
46514
46637
|
for (var i = 0; i < visPages.length; i++) {
|
|
46515
46638
|
visPages[i].setVisibleIndex(0);
|
|
46516
46639
|
}
|
|
46517
46640
|
}
|
|
46518
46641
|
else {
|
|
46519
|
-
var index = this.
|
|
46520
|
-
for (var
|
|
46521
|
-
index += this.pages[
|
|
46642
|
+
var index = this.getStartVisibleIndex();
|
|
46643
|
+
for (var i_3 = 0; i_3 < this.pages.length; i_3++) {
|
|
46644
|
+
index += this.pages[i_3].setVisibleIndex(index);
|
|
46522
46645
|
}
|
|
46523
46646
|
}
|
|
46524
|
-
this.updateProgressText(true);
|
|
46525
46647
|
};
|
|
46526
|
-
SurveyModel.prototype.
|
|
46648
|
+
SurveyModel.prototype.getStartVisibleIndex = function () {
|
|
46649
|
+
return this.showQuestionNumbers == "on" ? 0 : -1;
|
|
46650
|
+
};
|
|
46651
|
+
SurveyModel.prototype.updatePageVisibleIndexes = function () {
|
|
46527
46652
|
this.updateButtonsVisibility();
|
|
46528
46653
|
var index = 0;
|
|
46529
46654
|
for (var i = 0; i < this.pages.length; i++) {
|
|
@@ -46929,8 +47054,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
46929
47054
|
return;
|
|
46930
47055
|
questionName = questionName || name;
|
|
46931
47056
|
this.checkTriggersAndRunConditions(name, newValue, oldValue);
|
|
46932
|
-
if (allowNotifyValueChanged)
|
|
47057
|
+
if (allowNotifyValueChanged) {
|
|
46933
47058
|
this.notifyQuestionOnValueChanged(name, newValue, questionName);
|
|
47059
|
+
}
|
|
46934
47060
|
if (locNotification !== "text") {
|
|
46935
47061
|
this.tryGoNextPageAutomatic(name);
|
|
46936
47062
|
}
|
|
@@ -47068,11 +47194,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47068
47194
|
}
|
|
47069
47195
|
var question = this.getQuestionByValueName(name);
|
|
47070
47196
|
if (question) {
|
|
47071
|
-
this.
|
|
47072
|
-
name: commentName,
|
|
47073
|
-
question: question,
|
|
47074
|
-
value: newValue,
|
|
47075
|
-
});
|
|
47197
|
+
this.fireOnValueChanged(commentName, newValue, question);
|
|
47076
47198
|
question.comment = newValue;
|
|
47077
47199
|
if (question.comment != newValue) {
|
|
47078
47200
|
question.comment = newValue;
|
|
@@ -47113,7 +47235,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47113
47235
|
};
|
|
47114
47236
|
SurveyModel.prototype.questionVisibilityChanged = function (question, newValue, resetIndexes) {
|
|
47115
47237
|
if (resetIndexes) {
|
|
47116
|
-
this.updateVisibleIndexes();
|
|
47238
|
+
this.updateVisibleIndexes(question.page);
|
|
47117
47239
|
}
|
|
47118
47240
|
this.onQuestionVisibleChanged.fire(this, {
|
|
47119
47241
|
question: question,
|
|
@@ -47134,7 +47256,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47134
47256
|
});
|
|
47135
47257
|
};
|
|
47136
47258
|
SurveyModel.prototype.panelVisibilityChanged = function (panel, newValue) {
|
|
47137
|
-
this.updateVisibleIndexes();
|
|
47259
|
+
this.updateVisibleIndexes(panel.page);
|
|
47138
47260
|
this.onPanelVisibleChanged.fire(this, {
|
|
47139
47261
|
panel: panel,
|
|
47140
47262
|
visible: newValue,
|
|
@@ -47154,7 +47276,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47154
47276
|
if (!this.currentPage) {
|
|
47155
47277
|
this.updateCurrentPage();
|
|
47156
47278
|
}
|
|
47157
|
-
this.updateVisibleIndexes();
|
|
47279
|
+
this.updateVisibleIndexes(question.page);
|
|
47158
47280
|
this.setCalculatedWidthModeUpdater();
|
|
47159
47281
|
}
|
|
47160
47282
|
if (this.canFireAddElement()) {
|
|
@@ -47174,7 +47296,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47174
47296
|
};
|
|
47175
47297
|
SurveyModel.prototype.questionRemoved = function (question) {
|
|
47176
47298
|
this.questionHashesRemoved(question, question.name, question.getValueName());
|
|
47177
|
-
this.updateVisibleIndexes();
|
|
47299
|
+
this.updateVisibleIndexes(question.page);
|
|
47178
47300
|
this.onQuestionRemoved.fire(this, {
|
|
47179
47301
|
question: question,
|
|
47180
47302
|
name: question.name,
|
|
@@ -47244,7 +47366,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47244
47366
|
panel.name = this.generateNewName(this.getAllPanels(false, true), "panel");
|
|
47245
47367
|
}
|
|
47246
47368
|
this.questionHashesPanelAdded(panel);
|
|
47247
|
-
this.updateVisibleIndexes();
|
|
47369
|
+
this.updateVisibleIndexes(panel.page);
|
|
47248
47370
|
if (this.canFireAddElement()) {
|
|
47249
47371
|
this.onPanelAdded.fire(this, {
|
|
47250
47372
|
panel: panel,
|
|
@@ -47258,7 +47380,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47258
47380
|
}
|
|
47259
47381
|
};
|
|
47260
47382
|
SurveyModel.prototype.panelRemoved = function (panel) {
|
|
47261
|
-
this.updateVisibleIndexes();
|
|
47383
|
+
this.updateVisibleIndexes(panel.page);
|
|
47262
47384
|
this.onPanelRemoved.fire(this, { panel: panel, name: panel.name });
|
|
47263
47385
|
this.updateLazyRenderingRowsOnRemovingElements();
|
|
47264
47386
|
};
|
|
@@ -47885,6 +48007,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47885
48007
|
}
|
|
47886
48008
|
else {
|
|
47887
48009
|
var question = this.getQuestionByName(name);
|
|
48010
|
+
this.startSetValueFromTrigger();
|
|
47888
48011
|
if (!!question) {
|
|
47889
48012
|
question.value = value;
|
|
47890
48013
|
}
|
|
@@ -47902,6 +48025,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47902
48025
|
this.setValue(firstName, data[firstName]);
|
|
47903
48026
|
}
|
|
47904
48027
|
}
|
|
48028
|
+
this.finishSetValueFromTrigger();
|
|
47905
48029
|
}
|
|
47906
48030
|
};
|
|
47907
48031
|
SurveyModel.prototype.copyTriggerValue = function (name, fromName, copyDisplayValue) {
|
|
@@ -47920,6 +48044,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
|
47920
48044
|
SurveyModel.prototype.triggerExecuted = function (trigger) {
|
|
47921
48045
|
this.onTriggerExecuted.fire(this, { trigger: trigger });
|
|
47922
48046
|
};
|
|
48047
|
+
Object.defineProperty(SurveyModel.prototype, "isSettingValueFromTrigger", {
|
|
48048
|
+
get: function () { return this.setValueFromTriggerCounter > 0; },
|
|
48049
|
+
enumerable: false,
|
|
48050
|
+
configurable: true
|
|
48051
|
+
});
|
|
48052
|
+
SurveyModel.prototype.startSetValueFromTrigger = function () {
|
|
48053
|
+
this.setValueFromTriggerCounter++;
|
|
48054
|
+
};
|
|
48055
|
+
SurveyModel.prototype.finishSetValueFromTrigger = function () {
|
|
48056
|
+
this.setValueFromTriggerCounter--;
|
|
48057
|
+
};
|
|
47923
48058
|
SurveyModel.prototype.startMovingQuestion = function () {
|
|
47924
48059
|
this.isMovingQuestion = true;
|
|
47925
48060
|
};
|
|
@@ -52041,6 +52176,7 @@ var popup_dropdown_view_model_PopupDropdownViewModel = /** @class */ (function (
|
|
|
52041
52176
|
PopupDropdownViewModel.prototype.resetComponentElement = function () {
|
|
52042
52177
|
_super.prototype.resetComponentElement.call(this);
|
|
52043
52178
|
this.targetElement = undefined;
|
|
52179
|
+
this.areaElement = undefined;
|
|
52044
52180
|
};
|
|
52045
52181
|
PopupDropdownViewModel.prototype.updateOnShowing = function () {
|
|
52046
52182
|
var root = settings.environment.root;
|
|
@@ -65178,6 +65314,7 @@ var question_signaturepad_decorate = (undefined && undefined.__decorate) || func
|
|
|
65178
65314
|
|
|
65179
65315
|
|
|
65180
65316
|
|
|
65317
|
+
|
|
65181
65318
|
var defaultWidth = 300;
|
|
65182
65319
|
var defaultHeight = 200;
|
|
65183
65320
|
/**
|
|
@@ -65273,16 +65410,27 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
65273
65410
|
QuestionSignaturePadModel.prototype.fromUrl = function (url) {
|
|
65274
65411
|
var _this = this;
|
|
65275
65412
|
this.isFileLoading = true;
|
|
65276
|
-
|
|
65277
|
-
|
|
65278
|
-
|
|
65279
|
-
|
|
65280
|
-
|
|
65281
|
-
|
|
65282
|
-
|
|
65283
|
-
|
|
65284
|
-
|
|
65285
|
-
|
|
65413
|
+
if (isBase64URL(url)) {
|
|
65414
|
+
this.fromDataUrl(url);
|
|
65415
|
+
this.isFileLoading = false;
|
|
65416
|
+
}
|
|
65417
|
+
else {
|
|
65418
|
+
var img_1 = new Image();
|
|
65419
|
+
img_1.crossOrigin = "anonymous";
|
|
65420
|
+
img_1.src = url;
|
|
65421
|
+
img_1.onload = function () {
|
|
65422
|
+
if (!!_this.canvas) {
|
|
65423
|
+
var ctx = _this.canvas.getContext("2d");
|
|
65424
|
+
ctx.drawImage(img_1, 0, 0);
|
|
65425
|
+
var dataURL = _this.canvas.toDataURL(_this.getFormat());
|
|
65426
|
+
_this.fromDataUrl(dataURL);
|
|
65427
|
+
}
|
|
65428
|
+
_this.isFileLoading = false;
|
|
65429
|
+
};
|
|
65430
|
+
img_1.onerror = function () {
|
|
65431
|
+
_this.isFileLoading = false;
|
|
65432
|
+
};
|
|
65433
|
+
}
|
|
65286
65434
|
};
|
|
65287
65435
|
QuestionSignaturePadModel.prototype.fromDataUrl = function (data) {
|
|
65288
65436
|
this._loadedData = data;
|
|
@@ -65323,11 +65471,11 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
|
65323
65471
|
this._previewLoader = new FileLoader(this, function (status, loaded) {
|
|
65324
65472
|
if (status === "success" && loaded && loaded.length > 0 && loaded[0].content) {
|
|
65325
65473
|
_this.fromDataUrl(loaded[0].content);
|
|
65474
|
+
_this.isFileLoading = false;
|
|
65326
65475
|
}
|
|
65327
65476
|
else if (status === "skipped") {
|
|
65328
65477
|
_this.fromUrl(newValue);
|
|
65329
65478
|
}
|
|
65330
|
-
_this.isFileLoading = false;
|
|
65331
65479
|
_this._previewLoader.dispose();
|
|
65332
65480
|
_this._previewLoader = undefined;
|
|
65333
65481
|
});
|
|
@@ -71730,8 +71878,8 @@ Serializer.addClass("currencymask", [
|
|
|
71730
71878
|
|
|
71731
71879
|
var Version;
|
|
71732
71880
|
var ReleaseDate;
|
|
71733
|
-
Version = "" + "1.12.
|
|
71734
|
-
ReleaseDate = "" + "2024-11-
|
|
71881
|
+
Version = "" + "1.12.10";
|
|
71882
|
+
ReleaseDate = "" + "2024-11-13";
|
|
71735
71883
|
function checkLibraryVersion(ver, libraryName) {
|
|
71736
71884
|
if (Version != ver) {
|
|
71737
71885
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|