survey-react 1.11.13 → 1.12.1
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 +361 -339
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +27 -41
- package/modern.css.map +1 -1
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +169 -101
- package/survey.react.js +699 -331
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.
|
2
|
+
* surveyjs - Survey JavaScript library v1.12.1
|
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
|
*/
|
@@ -1914,6 +1914,18 @@ var helpers_Helpers = /** @class */ (function () {
|
|
1914
1914
|
}
|
1915
1915
|
return len1 === len2 ? 0 : (len1 < len2 ? -1 : 1);
|
1916
1916
|
};
|
1917
|
+
Helpers.isUrlYoutubeVideo = function (url) {
|
1918
|
+
if (!url)
|
1919
|
+
return false;
|
1920
|
+
var youtubeDomains = ["www.youtube.com", "m.youtube.com", "youtube.com", "youtu.be"];
|
1921
|
+
url = url.toLowerCase();
|
1922
|
+
url = url.replace(/^https?:\/\//, "");
|
1923
|
+
for (var i = 0; i < youtubeDomains.length; i++) {
|
1924
|
+
if (url.indexOf(youtubeDomains[i] + "/") === 0)
|
1925
|
+
return true;
|
1926
|
+
}
|
1927
|
+
return false;
|
1928
|
+
};
|
1917
1929
|
return Helpers;
|
1918
1930
|
}());
|
1919
1931
|
|
@@ -1941,6 +1953,7 @@ var englishStrings = {
|
|
1941
1953
|
refuseItemText: "Refuse to answer",
|
1942
1954
|
dontKnowItemText: "Don't know",
|
1943
1955
|
selectAllItemText: "Select All",
|
1956
|
+
deselectAllItemText: "Deselect all",
|
1944
1957
|
progressText: "Page {0} of {1}",
|
1945
1958
|
indexText: "{0} of {1}",
|
1946
1959
|
panelDynamicProgressText: "{0} of {1}",
|
@@ -3376,13 +3389,27 @@ var JsonMetadata = /** @class */ (function () {
|
|
3376
3389
|
invalidNames = [];
|
3377
3390
|
for (var i_1 = 0; i_1 < dynamicProps.length; i_1++) {
|
3378
3391
|
var dProp = dynamicProps[i_1];
|
3379
|
-
if (
|
3392
|
+
if (invalidNames.indexOf(dProp.name) < 0 && this.canAddDybamicProp(dProp, hash[dProp.name])) {
|
3380
3393
|
res.push(dProp);
|
3381
3394
|
}
|
3382
3395
|
}
|
3383
3396
|
this.dynamicPropsCache[cacheType] = res;
|
3384
3397
|
return res;
|
3385
3398
|
};
|
3399
|
+
JsonMetadata.prototype.canAddDybamicProp = function (dProp, orgProp) {
|
3400
|
+
if (!orgProp)
|
3401
|
+
return true;
|
3402
|
+
if (dProp === orgProp)
|
3403
|
+
return false;
|
3404
|
+
var classInfo = dProp.classInfo;
|
3405
|
+
while (classInfo && classInfo.parentName) {
|
3406
|
+
dProp = this.findProperty(classInfo.parentName, dProp.name);
|
3407
|
+
if (dProp && dProp === orgProp)
|
3408
|
+
return true;
|
3409
|
+
classInfo = !!dProp ? dProp.classInfo : undefined;
|
3410
|
+
}
|
3411
|
+
return false;
|
3412
|
+
};
|
3386
3413
|
JsonMetadata.prototype.hasOriginalProperty = function (obj, propName) {
|
3387
3414
|
return !!this.getOriginalProperty(obj, propName);
|
3388
3415
|
};
|
@@ -4847,16 +4874,16 @@ function dateFromFirstParameterOrToday(params) {
|
|
4847
4874
|
}
|
4848
4875
|
return date;
|
4849
4876
|
}
|
4850
|
-
function
|
4877
|
+
function functionsfactory_year(params) {
|
4851
4878
|
var date = dateFromFirstParameterOrToday(params);
|
4852
4879
|
return date.getFullYear();
|
4853
4880
|
}
|
4854
|
-
functionsfactory_FunctionFactory.Instance.register("year",
|
4855
|
-
function
|
4881
|
+
functionsfactory_FunctionFactory.Instance.register("year", functionsfactory_year);
|
4882
|
+
function functionsfactory_month(params) {
|
4856
4883
|
var date = dateFromFirstParameterOrToday(params);
|
4857
4884
|
return date.getMonth() + 1;
|
4858
4885
|
}
|
4859
|
-
functionsfactory_FunctionFactory.Instance.register("month",
|
4886
|
+
functionsfactory_FunctionFactory.Instance.register("month", functionsfactory_month);
|
4860
4887
|
function day(params) {
|
4861
4888
|
var date = dateFromFirstParameterOrToday(params);
|
4862
4889
|
return date.getDate();
|
@@ -4870,6 +4897,13 @@ functionsfactory_FunctionFactory.Instance.register("weekday", weekday);
|
|
4870
4897
|
function getQuestionValueByContext(context, name) {
|
4871
4898
|
if (!context || !name)
|
4872
4899
|
return undefined;
|
4900
|
+
var q = context.question;
|
4901
|
+
while (q && q.parent) {
|
4902
|
+
var res = q.parent.getQuestionByName(name);
|
4903
|
+
if (!!res)
|
4904
|
+
return res;
|
4905
|
+
q = q.parentQuestion;
|
4906
|
+
}
|
4873
4907
|
var keys = ["row", "panel", "survey"];
|
4874
4908
|
for (var i = 0; i < keys.length; i++) {
|
4875
4909
|
var ctx = context[keys[i]];
|
@@ -4881,15 +4915,31 @@ function getQuestionValueByContext(context, name) {
|
|
4881
4915
|
}
|
4882
4916
|
return null;
|
4883
4917
|
}
|
4918
|
+
function getDisplayValueReturnResult(q, params) {
|
4919
|
+
if (params.length > 1 && !helpers_Helpers.isValueEmpty(params[1]))
|
4920
|
+
return q.getDisplayValue(true, params[1]);
|
4921
|
+
return q.displayValue;
|
4922
|
+
}
|
4884
4923
|
function displayValue(params) {
|
4924
|
+
var _this = this;
|
4885
4925
|
var q = getQuestionValueByContext(this, params[0]);
|
4886
4926
|
if (!q)
|
4887
4927
|
return "";
|
4888
|
-
if (
|
4889
|
-
|
4890
|
-
|
4928
|
+
if (q.isReady) {
|
4929
|
+
this.returnResult(getDisplayValueReturnResult(q, params));
|
4930
|
+
}
|
4931
|
+
else {
|
4932
|
+
var displayValueOnReadyChanged_1 = function (sender, options) {
|
4933
|
+
if (sender.isReady) {
|
4934
|
+
sender.onReadyChanged.remove(displayValueOnReadyChanged_1);
|
4935
|
+
_this.returnResult(getDisplayValueReturnResult(sender, params));
|
4936
|
+
}
|
4937
|
+
};
|
4938
|
+
q.onReadyChanged.add(displayValueOnReadyChanged_1);
|
4939
|
+
}
|
4940
|
+
return undefined;
|
4891
4941
|
}
|
4892
|
-
functionsfactory_FunctionFactory.Instance.register("displayValue", displayValue);
|
4942
|
+
functionsfactory_FunctionFactory.Instance.register("displayValue", displayValue, true);
|
4893
4943
|
function propertyValue(params) {
|
4894
4944
|
if (params.length !== 2 || !params[0] || !params[1])
|
4895
4945
|
return undefined;
|
@@ -9627,6 +9677,8 @@ var base_Base = /** @class */ (function () {
|
|
9627
9677
|
name: name,
|
9628
9678
|
oldValue: oldValue,
|
9629
9679
|
newValue: newValue,
|
9680
|
+
arrayChanges: arrayChanges,
|
9681
|
+
target: target
|
9630
9682
|
});
|
9631
9683
|
this.doPropertyValueChangedCallback(name, oldValue, newValue, arrayChanges, this);
|
9632
9684
|
this.checkConditionPropertyChanged(name);
|
@@ -10142,6 +10194,8 @@ var base_Base = /** @class */ (function () {
|
|
10142
10194
|
this.onElementRenderedEventEnabled = true;
|
10143
10195
|
};
|
10144
10196
|
Base.prototype.disableOnElementRenderedEvent = function () {
|
10197
|
+
var _a;
|
10198
|
+
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, { isCancel: true });
|
10145
10199
|
this.onElementRenderedEventEnabled = false;
|
10146
10200
|
};
|
10147
10201
|
Object.defineProperty(Base.prototype, "onElementRerendered", {
|
@@ -10153,7 +10207,7 @@ var base_Base = /** @class */ (function () {
|
|
10153
10207
|
});
|
10154
10208
|
Base.prototype.afterRerender = function () {
|
10155
10209
|
var _a;
|
10156
|
-
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this,
|
10210
|
+
(_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, { isCancel: false });
|
10157
10211
|
};
|
10158
10212
|
Base.currentDependencis = undefined;
|
10159
10213
|
return Base;
|
@@ -10268,6 +10322,10 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
10268
10322
|
function ResponsivityManager(container, model, itemsSelector, dotsItemSize, delayedUpdateFunction) {
|
10269
10323
|
var _this = this;
|
10270
10324
|
if (dotsItemSize === void 0) { dotsItemSize = null; }
|
10325
|
+
if (delayedUpdateFunction === void 0) { delayedUpdateFunction = function (callback) { if (queueMicrotask)
|
10326
|
+
queueMicrotask(callback);
|
10327
|
+
else
|
10328
|
+
callback(); }; }
|
10271
10329
|
this.container = container;
|
10272
10330
|
this.model = model;
|
10273
10331
|
this.itemsSelector = itemsSelector;
|
@@ -10285,8 +10343,9 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
10285
10343
|
return DomDocumentHelper.getComputedStyle(elt);
|
10286
10344
|
};
|
10287
10345
|
this.model.updateCallback = function (isResetInitialized) {
|
10288
|
-
if (isResetInitialized)
|
10346
|
+
if (isResetInitialized) {
|
10289
10347
|
_this.isInitialized = false;
|
10348
|
+
}
|
10290
10349
|
setTimeout(function () { _this.process(); }, 1);
|
10291
10350
|
};
|
10292
10351
|
if (typeof ResizeObserver !== "undefined") {
|
@@ -10325,16 +10384,6 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
10325
10384
|
(currentAction.needSeparator ? this.separatorSize : 0)
|
10326
10385
|
: currentAction.maxDimension;
|
10327
10386
|
};
|
10328
|
-
ResponsivityManager.prototype.getRenderedVisibleActionsCount = function () {
|
10329
|
-
var _this = this;
|
10330
|
-
var count = 0;
|
10331
|
-
this.container.querySelectorAll(this.itemsSelector).forEach(function (item) {
|
10332
|
-
if (_this.calcItemSize(item) > 0) {
|
10333
|
-
count++;
|
10334
|
-
}
|
10335
|
-
});
|
10336
|
-
return count;
|
10337
|
-
};
|
10338
10387
|
ResponsivityManager.prototype.calcItemsSizes = function () {
|
10339
10388
|
var _this = this;
|
10340
10389
|
if (this.isInitialized)
|
@@ -10378,16 +10427,8 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
|
|
10378
10427
|
_this.isInitialized = true;
|
10379
10428
|
processResponsiveness_1();
|
10380
10429
|
};
|
10381
|
-
if (this.
|
10382
|
-
|
10383
|
-
this.delayedUpdateFunction(callback);
|
10384
|
-
}
|
10385
|
-
else if (queueMicrotask) {
|
10386
|
-
queueMicrotask(callback);
|
10387
|
-
}
|
10388
|
-
else {
|
10389
|
-
callback();
|
10390
|
-
}
|
10430
|
+
if (this.delayedUpdateFunction) {
|
10431
|
+
this.delayedUpdateFunction(callback);
|
10391
10432
|
}
|
10392
10433
|
else {
|
10393
10434
|
callback();
|
@@ -11192,6 +11233,9 @@ var list_ListModel = /** @class */ (function (_super) {
|
|
11192
11233
|
list_decorate([
|
11193
11234
|
jsonobject_property({ defaultValue: false })
|
11194
11235
|
], ListModel.prototype, "textWrapEnabled", void 0);
|
11236
|
+
list_decorate([
|
11237
|
+
jsonobject_property({ defaultValue: "sv-list-item-content" })
|
11238
|
+
], ListModel.prototype, "itemComponent", void 0);
|
11195
11239
|
return ListModel;
|
11196
11240
|
}(container_ActionContainer));
|
11197
11241
|
|
@@ -11824,7 +11868,7 @@ var action_Action = /** @class */ (function (_super) {
|
|
11824
11868
|
evt.stopPropagation();
|
11825
11869
|
return true;
|
11826
11870
|
};
|
11827
|
-
Action.prototype.doMouseDown = function () {
|
11871
|
+
Action.prototype.doMouseDown = function (args) {
|
11828
11872
|
this.isMouseDown = true;
|
11829
11873
|
};
|
11830
11874
|
Action.prototype.doFocus = function (args) {
|
@@ -12296,7 +12340,6 @@ var animation_AnimationUtils = /** @class */ (function () {
|
|
12296
12340
|
var animationsCount = this.getAnimationsCount(element);
|
12297
12341
|
var onEndCallback = function (isCancel) {
|
12298
12342
|
if (isCancel === void 0) { isCancel = true; }
|
12299
|
-
_this.afterAnimationRun(element, options);
|
12300
12343
|
callback(isCancel);
|
12301
12344
|
clearTimeout(cancelTimeout);
|
12302
12345
|
_this.removeCancelCallback(onEndCallback);
|
@@ -12315,7 +12358,6 @@ var animation_AnimationUtils = /** @class */ (function () {
|
|
12315
12358
|
}, this.getAnimationDuration(element) + 10);
|
12316
12359
|
}
|
12317
12360
|
else {
|
12318
|
-
this.afterAnimationRun(element, options);
|
12319
12361
|
callback(true);
|
12320
12362
|
}
|
12321
12363
|
};
|
@@ -12350,6 +12392,7 @@ var animation_AnimationUtils = /** @class */ (function () {
|
|
12350
12392
|
element.classList.remove(cssClass);
|
12351
12393
|
});
|
12352
12394
|
}
|
12395
|
+
this.afterAnimationRun(element, options);
|
12353
12396
|
};
|
12354
12397
|
AnimationUtils.prototype.onNextRender = function (callback, isCancel) {
|
12355
12398
|
var _this = this;
|
@@ -12472,7 +12515,7 @@ var animation_AnimationProperty = /** @class */ (function () {
|
|
12472
12515
|
this.update = update;
|
12473
12516
|
this.getCurrentValue = getCurrentValue;
|
12474
12517
|
this._debouncedSync = debounce(function (newValue) {
|
12475
|
-
_this.
|
12518
|
+
_this.cancelAnimations();
|
12476
12519
|
try {
|
12477
12520
|
_this._sync(newValue);
|
12478
12521
|
}
|
@@ -12505,8 +12548,13 @@ var animation_AnimationProperty = /** @class */ (function () {
|
|
12505
12548
|
rerenderEvent.remove(nextRenderCallback_1);
|
12506
12549
|
_this.cancelCallback = undefined;
|
12507
12550
|
};
|
12508
|
-
var nextRenderCallback_1 = function () {
|
12509
|
-
|
12551
|
+
var nextRenderCallback_1 = function (_, options) {
|
12552
|
+
if (options.isCancel) {
|
12553
|
+
onCancel && onCancel();
|
12554
|
+
}
|
12555
|
+
else {
|
12556
|
+
callback();
|
12557
|
+
}
|
12510
12558
|
clear_1();
|
12511
12559
|
};
|
12512
12560
|
this.cancelCallback = function () {
|
@@ -12527,6 +12575,9 @@ var animation_AnimationProperty = /** @class */ (function () {
|
|
12527
12575
|
};
|
12528
12576
|
AnimationProperty.prototype.cancel = function () {
|
12529
12577
|
this._debouncedSync.cancel();
|
12578
|
+
this.cancelAnimations();
|
12579
|
+
};
|
12580
|
+
AnimationProperty.prototype.cancelAnimations = function () {
|
12530
12581
|
this.cancelCallback && this.cancelCallback();
|
12531
12582
|
this.animation.cancel();
|
12532
12583
|
};
|
@@ -12572,7 +12623,8 @@ var animation_AnimationGroup = /** @class */ (function (_super) {
|
|
12572
12623
|
AnimationGroup.prototype._sync = function (newValue) {
|
12573
12624
|
var _this = this;
|
12574
12625
|
var _a, _b;
|
12575
|
-
|
12626
|
+
newValue = [].concat(newValue);
|
12627
|
+
var oldValue = [].concat(this.getCurrentValue());
|
12576
12628
|
var allowSyncRemovalAddition = (_a = this.animationOptions.allowSyncRemovalAddition) !== null && _a !== void 0 ? _a : true;
|
12577
12629
|
var _c = compareArrays(oldValue, newValue, (_b = this.animationOptions.getKey) !== null && _b !== void 0 ? _b : (function (item) { return item; })), addedItems = _c.addedItems, deletedItems = _c.deletedItems, reorderedItems = _c.reorderedItems, mergedItems = _c.mergedItems;
|
12578
12630
|
if (!allowSyncRemovalAddition && (reorderedItems.length > 0 || addedItems.length > 0)) {
|
@@ -12846,7 +12898,7 @@ var survey_element_SurveyElementCore = /** @class */ (function (_super) {
|
|
12846
12898
|
});
|
12847
12899
|
SurveyElementCore.prototype.getIsTitleRenderedAsString = function () { return !this.isTitleOwner; };
|
12848
12900
|
survey_element_decorate([
|
12849
|
-
jsonobject_property()
|
12901
|
+
jsonobject_property({})
|
12850
12902
|
], SurveyElementCore.prototype, "hasDescription", void 0);
|
12851
12903
|
survey_element_decorate([
|
12852
12904
|
jsonobject_property({
|
@@ -14015,17 +14067,18 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14015
14067
|
var _this = this;
|
14016
14068
|
var beforeRunAnimation = function (el) {
|
14017
14069
|
_this.isAnimatingCollapseExpand = true;
|
14018
|
-
|
14070
|
+
prepareElementForVerticalAnimation(el);
|
14019
14071
|
};
|
14020
14072
|
var afterRunAnimation = function (el) {
|
14021
14073
|
_this.isAnimatingCollapseExpand = false;
|
14074
|
+
cleanHtmlElementAfterAnimation(el);
|
14022
14075
|
};
|
14023
14076
|
return {
|
14024
14077
|
getRerenderEvent: function () { return _this.onElementRerendered; },
|
14025
14078
|
getEnterOptions: function () {
|
14026
14079
|
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
14027
14080
|
return {
|
14028
|
-
cssClass: cssClasses.
|
14081
|
+
cssClass: cssClasses.contentEnter,
|
14029
14082
|
onBeforeRunAnimation: beforeRunAnimation,
|
14030
14083
|
onAfterRunAnimation: function (el) {
|
14031
14084
|
afterRunAnimation(el);
|
@@ -14035,8 +14088,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
|
|
14035
14088
|
},
|
14036
14089
|
getLeaveOptions: function () {
|
14037
14090
|
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
14038
|
-
return {
|
14039
|
-
cssClass: cssClasses.contentFadeOut,
|
14091
|
+
return { cssClass: cssClasses.contentLeave,
|
14040
14092
|
onBeforeRunAnimation: beforeRunAnimation,
|
14041
14093
|
onAfterRunAnimation: afterRunAnimation
|
14042
14094
|
};
|
@@ -14868,10 +14920,20 @@ function navigateToUrl(url) {
|
|
14868
14920
|
function wrapUrlForBackgroundImage(url) {
|
14869
14921
|
return !!url ? ["url(", url, ")"].join("") : "";
|
14870
14922
|
}
|
14923
|
+
//new-name: old-name
|
14924
|
+
var renamedIcons = {
|
14925
|
+
"folder": "chooseFile"
|
14926
|
+
};
|
14871
14927
|
function getIconNameFromProxy(iconName) {
|
14872
14928
|
if (!iconName)
|
14873
14929
|
return iconName;
|
14874
14930
|
var proxyName = settings.customIcons[iconName];
|
14931
|
+
if (!proxyName) {
|
14932
|
+
var oldName = renamedIcons[iconName];
|
14933
|
+
if (!!oldName) {
|
14934
|
+
proxyName = settings.customIcons[oldName];
|
14935
|
+
}
|
14936
|
+
}
|
14875
14937
|
return !!proxyName ? proxyName : iconName;
|
14876
14938
|
}
|
14877
14939
|
function createSvg(size, width, height, iconName, svgElem, title) {
|
@@ -15266,6 +15328,53 @@ function compareArrays(oldValue, newValue, getKey) {
|
|
15266
15328
|
});
|
15267
15329
|
return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
|
15268
15330
|
}
|
15331
|
+
function getVerticalDimensions(el) {
|
15332
|
+
if (DomDocumentHelper.isAvailable()) {
|
15333
|
+
var _a = DomDocumentHelper.getComputedStyle(el), paddingTop = _a.paddingTop, paddingBottom = _a.paddingBottom, borderTopWidth = _a.borderTopWidth, borderBottomWidth = _a.borderBottomWidth, marginTop = _a.marginTop, marginBottom = _a.marginBottom, boxSizing = _a.boxSizing;
|
15334
|
+
var heightTo = el.offsetHeight + "px";
|
15335
|
+
if (boxSizing == "content-box") {
|
15336
|
+
var heightPx_1 = el.offsetHeight;
|
15337
|
+
[borderBottomWidth, borderTopWidth, paddingBottom, paddingTop].forEach(function (style) {
|
15338
|
+
heightPx_1 -= parseFloat(style);
|
15339
|
+
});
|
15340
|
+
heightTo = heightPx_1 + "px";
|
15341
|
+
}
|
15342
|
+
return {
|
15343
|
+
paddingTop: paddingTop,
|
15344
|
+
paddingBottom: paddingBottom,
|
15345
|
+
borderTopWidth: borderTopWidth,
|
15346
|
+
borderBottomWidth: borderBottomWidth,
|
15347
|
+
marginTop: marginTop,
|
15348
|
+
marginBottom: marginBottom,
|
15349
|
+
heightFrom: "0px",
|
15350
|
+
heightTo: heightTo
|
15351
|
+
};
|
15352
|
+
}
|
15353
|
+
else {
|
15354
|
+
return undefined;
|
15355
|
+
}
|
15356
|
+
}
|
15357
|
+
function setPropertiesOnElementForAnimation(el, styles, prefix) {
|
15358
|
+
var _a;
|
15359
|
+
if (prefix === void 0) { prefix = "--animation-"; }
|
15360
|
+
el["__sv_created_properties"] = (_a = el["__sv_created_properties"]) !== null && _a !== void 0 ? _a : [];
|
15361
|
+
Object.keys(styles).forEach(function (key) {
|
15362
|
+
var propertyName = "" + prefix + key.split(/\.?(?=[A-Z])/).join("-").toLowerCase();
|
15363
|
+
el.style.setProperty(propertyName, styles[key]);
|
15364
|
+
el["__sv_created_properties"].push(propertyName);
|
15365
|
+
});
|
15366
|
+
}
|
15367
|
+
function prepareElementForVerticalAnimation(el) {
|
15368
|
+
setPropertiesOnElementForAnimation(el, getVerticalDimensions(el));
|
15369
|
+
}
|
15370
|
+
function cleanHtmlElementAfterAnimation(el) {
|
15371
|
+
if (Array.isArray(el["__sv_created_properties"])) {
|
15372
|
+
el["__sv_created_properties"].forEach(function (propertyName) {
|
15373
|
+
el.style.removeProperty(propertyName);
|
15374
|
+
});
|
15375
|
+
delete el["__sv_created_properties"];
|
15376
|
+
}
|
15377
|
+
}
|
15269
15378
|
function roundTo2Decimals(number) {
|
15270
15379
|
return Math.round(number * 100) / 100;
|
15271
15380
|
}
|
@@ -15758,7 +15867,7 @@ var settings = {
|
|
15758
15867
|
* Nested properties:
|
15759
15868
|
*
|
15760
15869
|
* - `lifetime`: `number`\
|
15761
|
-
* Specifies a time period during which a notification is displayed; measured in milliseconds.
|
15870
|
+
* Specifies a time period during which a notification is displayed; measured in milliseconds. Default value: 2000.
|
15762
15871
|
*/
|
15763
15872
|
notifications: {
|
15764
15873
|
lifetime: 2000
|
@@ -17325,7 +17434,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
17325
17434
|
_this.registerFunctionOnPropertiesValueChanged(["no", "readOnly", "hasVisibleErrors", "containsErrors"], function () {
|
17326
17435
|
_this.updateQuestionCss();
|
17327
17436
|
});
|
17328
|
-
_this.registerPropertyChangedHandlers(["
|
17437
|
+
_this.registerPropertyChangedHandlers(["_isMobile"], function () { _this.onMobileChanged(); });
|
17329
17438
|
_this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
|
17330
17439
|
return _this;
|
17331
17440
|
}
|
@@ -17342,8 +17451,22 @@ var question_Question = /** @class */ (function (_super) {
|
|
17342
17451
|
this.setIsMobile(this.survey._isMobile);
|
17343
17452
|
};
|
17344
17453
|
Question.prototype.setIsMobile = function (val) {
|
17345
|
-
|
17454
|
+
var newVal = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
|
17455
|
+
this.isMobile = newVal;
|
17456
|
+
};
|
17457
|
+
Question.prototype.getIsMobile = function () {
|
17458
|
+
return this._isMobile;
|
17346
17459
|
};
|
17460
|
+
Object.defineProperty(Question.prototype, "isMobile", {
|
17461
|
+
get: function () {
|
17462
|
+
return this.getIsMobile();
|
17463
|
+
},
|
17464
|
+
set: function (val) {
|
17465
|
+
this._isMobile = val;
|
17466
|
+
},
|
17467
|
+
enumerable: false,
|
17468
|
+
configurable: true
|
17469
|
+
});
|
17347
17470
|
Question.prototype.themeChanged = function (theme) { };
|
17348
17471
|
Question.prototype.getDefaultTitle = function () { return this.name; };
|
17349
17472
|
Question.prototype.createLocTitleProperty = function () {
|
@@ -18539,6 +18662,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
18539
18662
|
Question.prototype.getRootCss = function () {
|
18540
18663
|
return new CssClassBuilder()
|
18541
18664
|
.append(this.cssRoot)
|
18665
|
+
.append(this.cssClasses.mobile, this.isMobile)
|
18542
18666
|
.append(this.cssClasses.readOnly, this.isReadOnlyStyle)
|
18543
18667
|
.append(this.cssClasses.disabled, this.isDisabledStyle)
|
18544
18668
|
.append(this.cssClasses.preview, this.isPreviewStyle)
|
@@ -19709,7 +19833,8 @@ var question_Question = /** @class */ (function (_super) {
|
|
19709
19833
|
Object.defineProperty(Question.prototype, "validators", {
|
19710
19834
|
/**
|
19711
19835
|
* Question validators.
|
19712
|
-
*
|
19836
|
+
*
|
19837
|
+
* [Data Validation](https://surveyjs.io/form-library/documentation/data-validation (linkStyle))
|
19713
19838
|
*/
|
19714
19839
|
get: function () {
|
19715
19840
|
return this.getPropertyValue("validators");
|
@@ -19777,7 +19902,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19777
19902
|
Question.prototype.hasErrors = function (fireCallback, rec) {
|
19778
19903
|
if (fireCallback === void 0) { fireCallback = true; }
|
19779
19904
|
if (rec === void 0) { rec = null; }
|
19780
|
-
var errors = this.checkForErrors(!!rec && rec.isOnValueChanged === true);
|
19905
|
+
var errors = this.checkForErrors(!!rec && rec.isOnValueChanged === true, fireCallback);
|
19781
19906
|
if (fireCallback) {
|
19782
19907
|
if (!!this.survey) {
|
19783
19908
|
this.survey.beforeSettingQuestionErrors(this, errors);
|
@@ -19852,18 +19977,18 @@ var question_Question = /** @class */ (function (_super) {
|
|
19852
19977
|
if (index !== -1)
|
19853
19978
|
errors.splice(index, 1);
|
19854
19979
|
};
|
19855
|
-
Question.prototype.checkForErrors = function (isOnValueChanged) {
|
19980
|
+
Question.prototype.checkForErrors = function (isOnValueChanged, fireCallback) {
|
19856
19981
|
var qErrors = new Array();
|
19857
19982
|
if (this.isVisible && this.canCollectErrors()) {
|
19858
|
-
this.collectErrors(qErrors, isOnValueChanged);
|
19983
|
+
this.collectErrors(qErrors, isOnValueChanged, fireCallback);
|
19859
19984
|
}
|
19860
19985
|
return qErrors;
|
19861
19986
|
};
|
19862
19987
|
Question.prototype.canCollectErrors = function () {
|
19863
19988
|
return !this.isReadOnly || settings.readOnly.enableValidation;
|
19864
19989
|
};
|
19865
|
-
Question.prototype.collectErrors = function (qErrors, isOnValueChanged) {
|
19866
|
-
this.onCheckForErrors(qErrors, isOnValueChanged);
|
19990
|
+
Question.prototype.collectErrors = function (qErrors, isOnValueChanged, fireCallback) {
|
19991
|
+
this.onCheckForErrors(qErrors, isOnValueChanged, fireCallback);
|
19867
19992
|
if (qErrors.length > 0 || !this.canRunValidators(isOnValueChanged))
|
19868
19993
|
return;
|
19869
19994
|
var errors = this.runValidators();
|
@@ -19889,7 +20014,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
19889
20014
|
return this.validateValueCallback();
|
19890
20015
|
return this.survey ? this.survey.validateQuestion(this) : null;
|
19891
20016
|
};
|
19892
|
-
Question.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
20017
|
+
Question.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
19893
20018
|
var _this = this;
|
19894
20019
|
if ((!isOnValueChanged || this.isOldAnswered) && this.hasRequiredError()) {
|
19895
20020
|
var err = new AnswerRequiredError(this.requiredErrorText, this);
|
@@ -20482,7 +20607,7 @@ var question_Question = /** @class */ (function (_super) {
|
|
20482
20607
|
Question.questionCounter = 100;
|
20483
20608
|
question_decorate([
|
20484
20609
|
jsonobject_property({ defaultValue: false })
|
20485
|
-
], Question.prototype, "
|
20610
|
+
], Question.prototype, "_isMobile", void 0);
|
20486
20611
|
question_decorate([
|
20487
20612
|
jsonobject_property()
|
20488
20613
|
], Question.prototype, "forceIsInputReadOnly", void 0);
|
@@ -21115,6 +21240,12 @@ var itemvalue_ItemValue = /** @class */ (function (_super) {
|
|
21115
21240
|
ItemValue.prototype.setComponent = function (val) {
|
21116
21241
|
this.componentValue = val;
|
21117
21242
|
};
|
21243
|
+
ItemValue.prototype.setRootElement = function (val) {
|
21244
|
+
this._htmlElement = val;
|
21245
|
+
};
|
21246
|
+
ItemValue.prototype.getRootElement = function () {
|
21247
|
+
return this._htmlElement;
|
21248
|
+
};
|
21118
21249
|
ItemValue.prototype.getEnabled = function () {
|
21119
21250
|
return this.isEnabled;
|
21120
21251
|
};
|
@@ -21886,52 +22017,32 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
|
|
21886
22017
|
}
|
21887
22018
|
return res;
|
21888
22019
|
};
|
22020
|
+
ChoicesRestful.prototype.getAllPropertiesNames = function () {
|
22021
|
+
var res = new Array();
|
22022
|
+
Serializer.getPropertiesByObj(this).forEach(function (prop) { return res.push(prop.name); });
|
22023
|
+
this.getCustomPropertiesNames().forEach(function (prop) { return res.push(prop); });
|
22024
|
+
return res;
|
22025
|
+
};
|
21889
22026
|
ChoicesRestful.prototype.setData = function (json) {
|
21890
|
-
this
|
21891
|
-
if (json
|
21892
|
-
|
21893
|
-
|
21894
|
-
|
21895
|
-
|
21896
|
-
this.valueName = json.valueName;
|
21897
|
-
if (json.titleName)
|
21898
|
-
this.titleName = json.titleName;
|
21899
|
-
if (json.imageLinkName)
|
21900
|
-
this.imageLinkName = json.imageLinkName;
|
21901
|
-
if (json.allowEmptyResponse !== undefined)
|
21902
|
-
this.allowEmptyResponse = json.allowEmptyResponse;
|
21903
|
-
if (json.attachOriginalItems !== undefined)
|
21904
|
-
this.attachOriginalItems = json.attachOriginalItems;
|
21905
|
-
var properties = this.getCustomPropertiesNames();
|
21906
|
-
for (var i = 0; i < properties.length; i++) {
|
21907
|
-
if (json[properties[i]])
|
21908
|
-
this[properties[i]] = json[properties[i]];
|
21909
|
-
}
|
22027
|
+
var _this = this;
|
22028
|
+
if (!json)
|
22029
|
+
json = {};
|
22030
|
+
this.getAllPropertiesNames().forEach(function (name) {
|
22031
|
+
_this[name] = json[name];
|
22032
|
+
});
|
21910
22033
|
};
|
21911
22034
|
ChoicesRestful.prototype.getData = function () {
|
21912
|
-
|
21913
|
-
return null;
|
22035
|
+
var _this = this;
|
21914
22036
|
var res = {};
|
21915
|
-
|
21916
|
-
|
21917
|
-
|
21918
|
-
|
21919
|
-
|
21920
|
-
|
21921
|
-
|
21922
|
-
|
21923
|
-
|
21924
|
-
res["imageLinkName"] = this.imageLinkName;
|
21925
|
-
if (this.allowEmptyResponse)
|
21926
|
-
res["allowEmptyResponse"] = this.allowEmptyResponse;
|
21927
|
-
if (this.attachOriginalItems)
|
21928
|
-
res["attachOriginalItems"] = this.attachOriginalItems;
|
21929
|
-
var properties = this.getCustomPropertiesNames();
|
21930
|
-
for (var i = 0; i < properties.length; i++) {
|
21931
|
-
if (this[properties[i]])
|
21932
|
-
res[properties[i]] = this[properties[i]];
|
21933
|
-
}
|
21934
|
-
return res;
|
22037
|
+
var hasValue = false;
|
22038
|
+
this.getAllPropertiesNames().forEach(function (name) {
|
22039
|
+
var val = _this[name];
|
22040
|
+
if (!_this.isValueEmpty(val) && val !== _this.getDefaultPropertyValue(name)) {
|
22041
|
+
res[name] = val;
|
22042
|
+
hasValue = true;
|
22043
|
+
}
|
22044
|
+
});
|
22045
|
+
return hasValue ? res : null;
|
21935
22046
|
};
|
21936
22047
|
Object.defineProperty(ChoicesRestful.prototype, "url", {
|
21937
22048
|
/**
|
@@ -22088,16 +22199,7 @@ var choicesRestful_ChoicesRestful = /** @class */ (function (_super) {
|
|
22088
22199
|
configurable: true
|
22089
22200
|
});
|
22090
22201
|
ChoicesRestful.prototype.clear = function () {
|
22091
|
-
this.
|
22092
|
-
this.path = undefined;
|
22093
|
-
this.valueName = undefined;
|
22094
|
-
this.titleName = undefined;
|
22095
|
-
this.imageLinkName = undefined;
|
22096
|
-
var properties = this.getCustomPropertiesNames();
|
22097
|
-
for (var i = 0; i < properties.length; i++) {
|
22098
|
-
if (this[properties[i]])
|
22099
|
-
this[properties[i]] = "";
|
22100
|
-
}
|
22202
|
+
this.setData(undefined);
|
22101
22203
|
};
|
22102
22204
|
ChoicesRestful.prototype.beforeSendRequest = function () {
|
22103
22205
|
this.isRunningValue = true;
|
@@ -22694,6 +22796,25 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
22694
22796
|
enumerable: false,
|
22695
22797
|
configurable: true
|
22696
22798
|
});
|
22799
|
+
Object.defineProperty(QuestionMatrixBaseModel.prototype, "displayMode", {
|
22800
|
+
get: function () {
|
22801
|
+
return this.getPropertyValue("displayMode");
|
22802
|
+
},
|
22803
|
+
/**
|
22804
|
+
* Specifies how to arrange matrix questions.
|
22805
|
+
*
|
22806
|
+
* Possible values:
|
22807
|
+
*
|
22808
|
+
* - `"table"` - Displays matrix questions in a table.
|
22809
|
+
* - `"list"` - Displays matrix questions one under another as a list.
|
22810
|
+
* - `"auto"` (default) - Uses the `"table"` mode if the survey has sufficient width to fit the table or the `"list"` mode otherwise.
|
22811
|
+
*/
|
22812
|
+
set: function (val) {
|
22813
|
+
this.setPropertyValue("displayMode", val);
|
22814
|
+
},
|
22815
|
+
enumerable: false,
|
22816
|
+
configurable: true
|
22817
|
+
});
|
22697
22818
|
//a11y
|
22698
22819
|
QuestionMatrixBaseModel.prototype.getCellAriaLabel = function (rowTitle, columnTitle) {
|
22699
22820
|
var row = (this.getLocalizationString("matrix_row") || "row").toLocaleLowerCase();
|
@@ -22707,6 +22828,12 @@ var martixBase_QuestionMatrixBaseModel = /** @class */ (function (_super) {
|
|
22707
22828
|
enumerable: false,
|
22708
22829
|
configurable: true
|
22709
22830
|
});
|
22831
|
+
// EO a11y
|
22832
|
+
QuestionMatrixBaseModel.prototype.getIsMobile = function () {
|
22833
|
+
if (this.displayMode == "auto")
|
22834
|
+
return _super.prototype.getIsMobile.call(this);
|
22835
|
+
return this.displayMode === "list";
|
22836
|
+
};
|
22710
22837
|
martixBase_decorate([
|
22711
22838
|
jsonobject_property()
|
22712
22839
|
], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
|
@@ -22727,7 +22854,13 @@ Serializer.addClass("matrixbase", [
|
|
22727
22854
|
choices: ["top", "middle"],
|
22728
22855
|
default: "middle",
|
22729
22856
|
},
|
22730
|
-
{ name: "alternateRows:boolean", default: false }
|
22857
|
+
{ name: "alternateRows:boolean", default: false },
|
22858
|
+
{
|
22859
|
+
name: "displayMode",
|
22860
|
+
default: "auto",
|
22861
|
+
choices: ["auto", "table", "list"],
|
22862
|
+
visible: false
|
22863
|
+
},
|
22731
22864
|
], undefined, "question");
|
22732
22865
|
|
22733
22866
|
// CONCATENATED MODULE: ./packages/survey-core/src/textPreProcessor.ts
|
@@ -23314,8 +23447,8 @@ var question_custom_QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
23314
23447
|
_super.prototype.setNewValue.call(this, newValue);
|
23315
23448
|
this.updateElementCss();
|
23316
23449
|
};
|
23317
|
-
QuestionCustomModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
23318
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
23450
|
+
QuestionCustomModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
23451
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
23319
23452
|
if (!!this.customQuestion) {
|
23320
23453
|
var text = this.customQuestion.onGetErrorText(this);
|
23321
23454
|
if (!!text) {
|
@@ -25650,7 +25783,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
25650
25783
|
this.templateQuestion.locOwner = this;
|
25651
25784
|
this.addProperties(curCellType);
|
25652
25785
|
this.templateQuestion.onPropertyChanged.add(function (sender, options) {
|
25653
|
-
_this.propertyValueChanged(options.name, options.oldValue, options.newValue);
|
25786
|
+
_this.propertyValueChanged(options.name, options.oldValue, options.newValue, options.arrayChanges, options.target);
|
25654
25787
|
});
|
25655
25788
|
this.templateQuestion.onItemValuePropertyChanged.add(function (sender, options) {
|
25656
25789
|
_this.doItemValuePropertyChanged(options.propertyName, options.obj, options.name, options.newValue, options.oldValue);
|
@@ -25693,7 +25826,7 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
25693
25826
|
delete json["choices"];
|
25694
25827
|
}
|
25695
25828
|
delete json["itemComponent"];
|
25696
|
-
if (this.jsonObj) {
|
25829
|
+
if (this.jsonObj && json.type === "rating") {
|
25697
25830
|
Object.keys(this.jsonObj).forEach(function (prop) {
|
25698
25831
|
json[prop] = _this.jsonObj[prop];
|
25699
25832
|
});
|
@@ -25720,8 +25853,8 @@ var question_matrixdropdowncolumn_MatrixDropdownColumn = /** @class */ (function
|
|
25720
25853
|
};
|
25721
25854
|
}
|
25722
25855
|
};
|
25723
|
-
MatrixDropdownColumn.prototype.propertyValueChanged = function (name, oldValue, newValue) {
|
25724
|
-
_super.prototype.propertyValueChanged.call(this, name, oldValue, newValue);
|
25856
|
+
MatrixDropdownColumn.prototype.propertyValueChanged = function (name, oldValue, newValue, arrayChanges, target) {
|
25857
|
+
_super.prototype.propertyValueChanged.call(this, name, oldValue, newValue, arrayChanges, target);
|
25725
25858
|
if (name === "isRequired") {
|
25726
25859
|
this.updateIsRenderedRequired(newValue);
|
25727
25860
|
}
|
@@ -25905,6 +26038,7 @@ var question_matrixdropdownrendered_spreadArray = (undefined && undefined.__spre
|
|
25905
26038
|
|
25906
26039
|
|
25907
26040
|
|
26041
|
+
|
25908
26042
|
var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
|
25909
26043
|
function QuestionMatrixDropdownRenderedCell() {
|
25910
26044
|
this.minWidth = "";
|
@@ -26235,9 +26369,14 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
26235
26369
|
};
|
26236
26370
|
QuestionMatrixDropdownRenderedTable.prototype.getRenderedRowsAnimationOptions = function () {
|
26237
26371
|
var _this = this;
|
26238
|
-
var
|
26372
|
+
var onBeforeRunAnimation = function (el) {
|
26373
|
+
el.querySelectorAll(":scope > td > *").forEach(function (el) {
|
26374
|
+
prepareElementForVerticalAnimation(el);
|
26375
|
+
});
|
26376
|
+
};
|
26377
|
+
var onAfterRunAnimation = function (el) {
|
26239
26378
|
el.querySelectorAll(":scope > td > *").forEach(function (el) {
|
26240
|
-
|
26379
|
+
cleanHtmlElementAfterAnimation(el);
|
26241
26380
|
});
|
26242
26381
|
};
|
26243
26382
|
return {
|
@@ -26249,10 +26388,10 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
|
|
26249
26388
|
return el.getRootElement();
|
26250
26389
|
},
|
26251
26390
|
getLeaveOptions: function () {
|
26252
|
-
return { cssClass: _this.cssClasses.
|
26391
|
+
return { cssClass: _this.cssClasses.rowLeave, onBeforeRunAnimation: onBeforeRunAnimation, onAfterRunAnimation: onAfterRunAnimation };
|
26253
26392
|
},
|
26254
|
-
getEnterOptions: function () {
|
26255
|
-
return { cssClass: _this.cssClasses.
|
26393
|
+
getEnterOptions: function (_, info) {
|
26394
|
+
return { cssClass: _this.cssClasses.rowEnter, onBeforeRunAnimation: onBeforeRunAnimation, onAfterRunAnimation: onAfterRunAnimation };
|
26256
26395
|
}
|
26257
26396
|
};
|
26258
26397
|
};
|
@@ -28031,12 +28170,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
28031
28170
|
"rowCount",
|
28032
28171
|
"hasFooter",
|
28033
28172
|
"detailPanelMode",
|
28173
|
+
"displayMode"
|
28034
28174
|
], function () {
|
28035
28175
|
_this.resetRenderedTable();
|
28036
28176
|
});
|
28037
|
-
_this.registerPropertyChangedHandlers(["isMobile"], function () {
|
28038
|
-
_this.resetRenderedTable();
|
28039
|
-
});
|
28040
28177
|
return _this;
|
28041
28178
|
}
|
28042
28179
|
Object.defineProperty(QuestionMatrixDropdownModelBase, "defaultCellType", {
|
@@ -29800,6 +29937,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
|
|
29800
29937
|
enumerable: false,
|
29801
29938
|
configurable: true
|
29802
29939
|
});
|
29940
|
+
QuestionMatrixDropdownModelBase.prototype.onMobileChanged = function () {
|
29941
|
+
_super.prototype.onMobileChanged.call(this);
|
29942
|
+
this.resetRenderedTable();
|
29943
|
+
};
|
29803
29944
|
QuestionMatrixDropdownModelBase.prototype.getRootCss = function () {
|
29804
29945
|
return new CssClassBuilder().append(_super.prototype.getRootCss.call(this)).append(this.cssClasses.rootScroll, this.horizontalScroll).toString();
|
29805
29946
|
};
|
@@ -30593,13 +30734,17 @@ var core_DragDropCore = /** @class */ (function () {
|
|
30593
30734
|
DragDropCore.prototype.afterDragOver = function (dropTargetNode) { };
|
30594
30735
|
DragDropCore.prototype.findDropTargetNodeFromPoint = function (clientX, clientY) {
|
30595
30736
|
var displayProp = this.domAdapter.draggedElementShortcut.style.display;
|
30596
|
-
//this.domAdapter.draggedElementShortcut.hidden = true;
|
30597
30737
|
this.domAdapter.draggedElementShortcut.style.display = "none";
|
30598
30738
|
if (!DomDocumentHelper.isAvailable())
|
30599
30739
|
return null;
|
30600
|
-
var
|
30601
|
-
// this.domAdapter.draggedElementShortcut.hidden = false;
|
30740
|
+
var dragOverNodes = this.domAdapter.documentOrShadowRoot.elementsFromPoint(clientX, clientY);
|
30602
30741
|
this.domAdapter.draggedElementShortcut.style.display = displayProp || "block";
|
30742
|
+
var index = 0;
|
30743
|
+
var dragOverNode = dragOverNodes[index];
|
30744
|
+
while (dragOverNode && dragOverNode.className && typeof dragOverNode.className.indexOf == "function" && dragOverNode.className.indexOf("sv-drag-target-skipped") != -1) {
|
30745
|
+
index++;
|
30746
|
+
dragOverNode = dragOverNodes[index];
|
30747
|
+
}
|
30603
30748
|
if (!dragOverNode)
|
30604
30749
|
return null;
|
30605
30750
|
return this.findDropTargetNodeByDragOverNode(dragOverNode);
|
@@ -31775,8 +31920,8 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
|
|
31775
31920
|
enumerable: false,
|
31776
31921
|
configurable: true
|
31777
31922
|
});
|
31778
|
-
QuestionMatrixDynamicModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
31779
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
31923
|
+
QuestionMatrixDynamicModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
31924
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
31780
31925
|
if (!isOnValueChanged && this.hasErrorInMinRows()) {
|
31781
31926
|
errors.push(new error_MinRowCountError(this.minRowCount, this));
|
31782
31927
|
}
|
@@ -32083,10 +32228,10 @@ var defaultV2Css = {
|
|
32083
32228
|
edit: "sd-btn sd-btn--small",
|
32084
32229
|
},
|
32085
32230
|
panel: {
|
32086
|
-
|
32087
|
-
|
32088
|
-
|
32089
|
-
|
32231
|
+
contentEnter: "sd-element__content--enter",
|
32232
|
+
contentLeave: "sd-element__content--leave",
|
32233
|
+
enter: "sd-element-wrapper--enter",
|
32234
|
+
leave: "sd-element-wrapper--leave",
|
32090
32235
|
asPage: "sd-panel--as-page",
|
32091
32236
|
number: "sd-element__num",
|
32092
32237
|
title: "sd-title sd-element__title sd-panel__title",
|
@@ -32147,8 +32292,8 @@ var defaultV2Css = {
|
|
32147
32292
|
footerButtonsContainer: "sd-paneldynamic__buttons-container",
|
32148
32293
|
panelsContainer: "sd-paneldynamic__panels-container",
|
32149
32294
|
panelWrapperInRow: "sd-paneldynamic__panel-wrapper--in-row",
|
32150
|
-
|
32151
|
-
|
32295
|
+
panelWrapperEnter: "sd-paneldynamic__panel-wrapper--enter",
|
32296
|
+
panelWrapperLeave: "sd-paneldynamic__panel-wrapper--leave",
|
32152
32297
|
panelWrapperList: "sd-paneldynamic__panel-wrapper--list",
|
32153
32298
|
progressBtnIcon: "icon-progressbuttonv2",
|
32154
32299
|
noEntriesPlaceholder: "sd-paneldynamic__placeholder sd-question__placeholder",
|
@@ -32204,15 +32349,17 @@ var defaultV2Css = {
|
|
32204
32349
|
row: "sd-row sd-clearfix",
|
32205
32350
|
rowMultiple: "sd-row--multiple",
|
32206
32351
|
rowCompact: "sd-row--compact",
|
32207
|
-
|
32208
|
-
|
32209
|
-
|
32352
|
+
rowEnter: "sd-row--enter",
|
32353
|
+
rowDelayedEnter: "sd-row--delayed-enter",
|
32354
|
+
rowLeave: "sd-row--leave",
|
32355
|
+
rowReplace: "sd-row--replace",
|
32210
32356
|
pageRow: "sd-page__row",
|
32211
32357
|
question: {
|
32212
|
-
|
32213
|
-
|
32214
|
-
|
32215
|
-
|
32358
|
+
contentEnter: "sd-element__content--enter",
|
32359
|
+
contentLeave: "sd-element__content--leave",
|
32360
|
+
enter: "sd-element-wrapper--enter",
|
32361
|
+
leave: "sd-element-wrapper--leave",
|
32362
|
+
mobile: "sd-question--mobile",
|
32216
32363
|
mainRoot: "sd-element sd-question sd-row__question",
|
32217
32364
|
flowRoot: "sd-element sd-question sd-row__question sd-row__question--flow",
|
32218
32365
|
withFrame: "sd-element--with-frame",
|
@@ -32298,6 +32445,8 @@ var defaultV2Css = {
|
|
32298
32445
|
rootRow: "sd-selectbase--row",
|
32299
32446
|
rootMultiColumn: "sd-selectbase--multi-column",
|
32300
32447
|
item: "sd-item sd-checkbox sd-selectbase__item",
|
32448
|
+
itemEnter: "sd-item--enter",
|
32449
|
+
itemLeave: "sd-item--leave",
|
32301
32450
|
itemOnError: "sd-item--error",
|
32302
32451
|
itemSelectAll: "sd-checkbox--selectall",
|
32303
32452
|
itemNone: "sd-checkbox--none",
|
@@ -32328,6 +32477,8 @@ var defaultV2Css = {
|
|
32328
32477
|
itemInline: "sd-selectbase__item--inline",
|
32329
32478
|
label: "sd-selectbase__label",
|
32330
32479
|
labelChecked: "",
|
32480
|
+
itemEnter: "sd-item--enter",
|
32481
|
+
itemLeave: "sd-item--leave",
|
32331
32482
|
itemDisabled: "sd-item--disabled sd-radio--disabled",
|
32332
32483
|
itemReadOnly: "sd-item--readonly sd-radio--readonly",
|
32333
32484
|
itemPreview: "sd-item--preview sd-radio--preview",
|
@@ -32436,6 +32587,8 @@ var defaultV2Css = {
|
|
32436
32587
|
other: "sd-input sd-comment sd-selectbase__other",
|
32437
32588
|
onError: "sd-input--error",
|
32438
32589
|
label: "sd-selectbase__label",
|
32590
|
+
itemEnter: "sd-item--enter",
|
32591
|
+
itemLeave: "sd-item--leave",
|
32439
32592
|
item: "sd-item sd-radio sd-selectbase__item",
|
32440
32593
|
itemDisabled: "sd-item--disabled sd-radio--disabled",
|
32441
32594
|
itemChecked: "sd-item--checked sd-radio--checked",
|
@@ -32539,8 +32692,9 @@ var defaultV2Css = {
|
|
32539
32692
|
errorsCellBottom: "sd-table__cell--error-bottom",
|
32540
32693
|
itemCell: "sd-table__cell--item",
|
32541
32694
|
row: "sd-table__row",
|
32542
|
-
|
32543
|
-
|
32695
|
+
rowDelayedEnter: "sd-table__row--delayed-enter",
|
32696
|
+
rowEnter: "sd-table__row--enter",
|
32697
|
+
rowLeave: "sd-table__row--leave",
|
32544
32698
|
expandedRow: "sd-table__row--expanded",
|
32545
32699
|
rowHasPanel: "sd-table__row--has-panel",
|
32546
32700
|
rowHasEndActions: "sd-table__row--has-end-actions",
|
@@ -32580,8 +32734,9 @@ var defaultV2Css = {
|
|
32580
32734
|
cell: "sd-table__cell",
|
32581
32735
|
cellResponsiveTitle: "sd-table__responsive-title",
|
32582
32736
|
row: "sd-table__row",
|
32583
|
-
|
32584
|
-
|
32737
|
+
rowDelayedEnter: "sd-table__row--delayed-enter",
|
32738
|
+
rowEnter: "sd-table__row--enter",
|
32739
|
+
rowLeave: "sd-table__row--leave",
|
32585
32740
|
rowHasPanel: "sd-table__row--has-panel",
|
32586
32741
|
rowHasEndActions: "sd-table__row--has-end-actions",
|
32587
32742
|
expandedRow: "sd-table__row--expanded",
|
@@ -32867,6 +33022,8 @@ var defaultV2Css = {
|
|
32867
33022
|
itemHover: "sd-item--allowhover sd-checkbox--allowhover",
|
32868
33023
|
itemControl: "sd-visuallyhidden sd-item__control sd-checkbox__control",
|
32869
33024
|
itemDecorator: "sd-item__svg sd-checkbox__svg",
|
33025
|
+
itemEnter: "sd-item--enter",
|
33026
|
+
itemLeave: "sd-item--leave",
|
32870
33027
|
cleanButton: "sd-tagbox_clean-button sd-dropdown_clean-button",
|
32871
33028
|
cleanButtonSvg: "sd-tagbox_clean-button-svg sd-dropdown_clean-button-svg",
|
32872
33029
|
cleanButtonIconId: "icon-clear",
|
@@ -33655,7 +33812,7 @@ var header_Cover = /** @class */ (function (_super) {
|
|
33655
33812
|
enumerable: false,
|
33656
33813
|
configurable: true
|
33657
33814
|
});
|
33658
|
-
Cover.prototype.propertyValueChanged = function (name, oldValue, newValue) {
|
33815
|
+
Cover.prototype.propertyValueChanged = function (name, oldValue, newValue, arrayChanges, target) {
|
33659
33816
|
_super.prototype.propertyValueChanged.call(this, name, oldValue, newValue);
|
33660
33817
|
if (name === "backgroundColor" || name === "backgroundImage" || name === "overlapEnabled") {
|
33661
33818
|
this.updateHeaderClasses();
|
@@ -34266,8 +34423,8 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
|
|
34266
34423
|
QuestionRowModel.prototype.getVisibleElementsAnimationOptions = function () {
|
34267
34424
|
var _this = this;
|
34268
34425
|
var beforeRunAnimation = function (el) {
|
34269
|
-
|
34270
|
-
el
|
34426
|
+
prepareElementForVerticalAnimation(el);
|
34427
|
+
setPropertiesOnElementForAnimation(el, { width: getElementWidth(el) + "px" });
|
34271
34428
|
};
|
34272
34429
|
return {
|
34273
34430
|
getRerenderEvent: function () { return _this.onElementRerendered; },
|
@@ -34278,16 +34435,18 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
|
|
34278
34435
|
var surveyElement = element;
|
34279
34436
|
var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
|
34280
34437
|
return {
|
34281
|
-
cssClass: cssClasses.
|
34282
|
-
onBeforeRunAnimation: beforeRunAnimation
|
34438
|
+
cssClass: cssClasses.leave,
|
34439
|
+
onBeforeRunAnimation: beforeRunAnimation,
|
34440
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
34283
34441
|
};
|
34284
34442
|
},
|
34285
34443
|
getEnterOptions: function (element) {
|
34286
34444
|
var surveyElement = element;
|
34287
34445
|
var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
|
34288
34446
|
return {
|
34289
|
-
cssClass: cssClasses.
|
34290
|
-
onBeforeRunAnimation: beforeRunAnimation
|
34447
|
+
cssClass: cssClasses.enter,
|
34448
|
+
onBeforeRunAnimation: beforeRunAnimation,
|
34449
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
34291
34450
|
};
|
34292
34451
|
}
|
34293
34452
|
};
|
@@ -34492,24 +34651,22 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
34492
34651
|
};
|
34493
34652
|
PanelModelBase.prototype.getRowsAnimationOptions = function () {
|
34494
34653
|
var _this = this;
|
34495
|
-
var beforeRunAnimation = function (el) {
|
34496
|
-
el.style.setProperty("--animation-height", el.offsetHeight + "px");
|
34497
|
-
};
|
34498
34654
|
return {
|
34499
34655
|
getRerenderEvent: function () { return _this.onElementRerendered; },
|
34500
34656
|
isAnimationEnabled: function () { return _this.animationAllowed; },
|
34501
34657
|
getAnimatedElement: function (row) { return row.getRootElement(); },
|
34502
|
-
getLeaveOptions: function (
|
34503
|
-
return {
|
34504
|
-
|
34505
|
-
|
34658
|
+
getLeaveOptions: function (row, info) {
|
34659
|
+
return { cssClass: _this.cssClasses.rowLeave,
|
34660
|
+
onBeforeRunAnimation: prepareElementForVerticalAnimation,
|
34661
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation,
|
34506
34662
|
};
|
34507
34663
|
},
|
34508
34664
|
getEnterOptions: function (_, animationInfo) {
|
34509
34665
|
var cssClasses = _this.cssClasses;
|
34510
34666
|
return {
|
34511
|
-
cssClass: new CssClassBuilder().append(cssClasses.
|
34512
|
-
onBeforeRunAnimation:
|
34667
|
+
cssClass: new CssClassBuilder().append(cssClasses.rowEnter).append(cssClasses.rowDelayedEnter, animationInfo.isDeletingRunning).toString(),
|
34668
|
+
onBeforeRunAnimation: prepareElementForVerticalAnimation,
|
34669
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
34513
34670
|
};
|
34514
34671
|
}
|
34515
34672
|
};
|
@@ -34787,7 +34944,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
34787
34944
|
configurable: true
|
34788
34945
|
});
|
34789
34946
|
PanelModelBase.prototype.calcCssClasses = function (css) {
|
34790
|
-
var classes = { panel: {}, error: {}, row: "",
|
34947
|
+
var classes = { panel: {}, error: {}, row: "", rowEnter: "", rowLeave: "", rowDelayedEnter: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
34791
34948
|
this.copyCssClasses(classes.panel, css.panel);
|
34792
34949
|
this.copyCssClasses(classes.error, css.error);
|
34793
34950
|
if (!!css.pageRow) {
|
@@ -34799,14 +34956,14 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
34799
34956
|
if (!!css.row) {
|
34800
34957
|
classes.row = css.row;
|
34801
34958
|
}
|
34802
|
-
if (!!css.
|
34803
|
-
classes.
|
34959
|
+
if (!!css.rowEnter) {
|
34960
|
+
classes.rowEnter = css.rowEnter;
|
34804
34961
|
}
|
34805
|
-
if (!!css.
|
34806
|
-
classes.
|
34962
|
+
if (!!css.rowLeave) {
|
34963
|
+
classes.rowLeave = css.rowLeave;
|
34807
34964
|
}
|
34808
|
-
if (!!css.
|
34809
|
-
classes.
|
34965
|
+
if (!!css.rowDelayedEnter) {
|
34966
|
+
classes.rowDelayedEnter = css.rowDelayedEnter;
|
34810
34967
|
}
|
34811
34968
|
if (!!css.rowMultiple) {
|
34812
34969
|
classes.rowMultiple = css.rowMultiple;
|
@@ -35814,6 +35971,20 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
|
|
35814
35971
|
}
|
35815
35972
|
}
|
35816
35973
|
};
|
35974
|
+
PanelModelBase.prototype.disableLazyRenderingBeforeElement = function (el) {
|
35975
|
+
var row = el ? this.findRowByElement(el) : undefined;
|
35976
|
+
var index = el ? this.rows.indexOf(row) : this.rows.length - 1;
|
35977
|
+
for (var i = index; i >= 0; i--) {
|
35978
|
+
var currentRow = this.rows[i];
|
35979
|
+
if (currentRow.isNeedRender) {
|
35980
|
+
break;
|
35981
|
+
}
|
35982
|
+
else {
|
35983
|
+
currentRow.isNeedRender = true;
|
35984
|
+
currentRow.stopLazyRendering();
|
35985
|
+
}
|
35986
|
+
}
|
35987
|
+
};
|
35817
35988
|
PanelModelBase.prototype.findRowByElement = function (el) {
|
35818
35989
|
var rows = this.rows;
|
35819
35990
|
for (var i = 0; i < rows.length; i++) {
|
@@ -36302,6 +36473,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
36302
36473
|
function PanelModel(name) {
|
36303
36474
|
if (name === void 0) { name = ""; }
|
36304
36475
|
var _this = _super.call(this, name) || this;
|
36476
|
+
_this.forcusFirstQuestionOnExpand = true;
|
36305
36477
|
_this.createNewArray("footerActions");
|
36306
36478
|
_this.registerPropertyChangedHandlers(["width"], function () {
|
36307
36479
|
if (!!_this.parent) {
|
@@ -36719,8 +36891,16 @@ var panel_PanelModel = /** @class */ (function (_super) {
|
|
36719
36891
|
enumerable: false,
|
36720
36892
|
configurable: true
|
36721
36893
|
});
|
36894
|
+
PanelModel.prototype.expand = function (focusFirstQuestion) {
|
36895
|
+
if (focusFirstQuestion === void 0) { focusFirstQuestion = true; }
|
36896
|
+
this.forcusFirstQuestionOnExpand = focusFirstQuestion;
|
36897
|
+
_super.prototype.expand.call(this);
|
36898
|
+
};
|
36722
36899
|
PanelModel.prototype.onElementExpanded = function (elementIsRendered) {
|
36723
36900
|
var _this = this;
|
36901
|
+
if (!this.forcusFirstQuestionOnExpand) {
|
36902
|
+
return;
|
36903
|
+
}
|
36724
36904
|
if (this.survey != null && !this.isLoadingFromJson) {
|
36725
36905
|
var q_1 = this.getFirstQuestionToFocus(false);
|
36726
36906
|
if (!!q_1) {
|
@@ -37225,7 +37405,7 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
37225
37405
|
configurable: true
|
37226
37406
|
});
|
37227
37407
|
PageModel.prototype.calcCssClasses = function (css) {
|
37228
|
-
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "",
|
37408
|
+
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowEnter: "", rowLeave: "", rowDelayedEnter: "", rowReplace: "" };
|
37229
37409
|
this.copyCssClasses(classes.page, css.page);
|
37230
37410
|
this.copyCssClasses(classes.error, css.error);
|
37231
37411
|
if (!!css.pageTitle) {
|
@@ -37246,14 +37426,17 @@ var page_PageModel = /** @class */ (function (_super) {
|
|
37246
37426
|
if (!!css.rowCompact) {
|
37247
37427
|
classes.rowCompact = css.rowCompact;
|
37248
37428
|
}
|
37249
|
-
if (!!css.
|
37250
|
-
classes.
|
37429
|
+
if (!!css.rowEnter) {
|
37430
|
+
classes.rowEnter = css.rowEnter;
|
37431
|
+
}
|
37432
|
+
if (!!css.rowDelayedEnter) {
|
37433
|
+
classes.rowDelayedEnter = css.rowDelayedEnter;
|
37251
37434
|
}
|
37252
|
-
if (!!css.
|
37253
|
-
classes.
|
37435
|
+
if (!!css.rowLeave) {
|
37436
|
+
classes.rowLeave = css.rowLeave;
|
37254
37437
|
}
|
37255
|
-
if (!!css.
|
37256
|
-
classes.
|
37438
|
+
if (!!css.rowReplace) {
|
37439
|
+
classes.rowReplace = css.rowReplace;
|
37257
37440
|
}
|
37258
37441
|
if (this.survey) {
|
37259
37442
|
this.survey.updatePageCssClasses(this, classes);
|
@@ -38587,6 +38770,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
38587
38770
|
_this.isNavigationButtonPressed = false;
|
38588
38771
|
_this.mouseDownPage = null;
|
38589
38772
|
_this.isCalculatingProgressText = false;
|
38773
|
+
/**
|
38774
|
+
* An event that is raised when the survey's width or height is changed.
|
38775
|
+
*/
|
38776
|
+
_this.onResize = new EventBase();
|
38590
38777
|
_this.isCurrentPageRendering = true;
|
38591
38778
|
_this.isCurrentPageRendered = undefined;
|
38592
38779
|
_this.isTriggerIsRunning = false;
|
@@ -39075,6 +39262,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
39075
39262
|
enumerable: false,
|
39076
39263
|
configurable: true
|
39077
39264
|
});
|
39265
|
+
SurveyModel.prototype.disableLazyRenderingBeforeElement = function (el) {
|
39266
|
+
if (this.isDesignMode) {
|
39267
|
+
var page = this.getPageByElement(el);
|
39268
|
+
var index = this.pages.indexOf(page);
|
39269
|
+
for (var i = index; i >= 0; i--) {
|
39270
|
+
var currentPage = this.pages[i];
|
39271
|
+
currentPage.disableLazyRenderingBeforeElement(currentPage == page ? el : undefined);
|
39272
|
+
}
|
39273
|
+
}
|
39274
|
+
};
|
39078
39275
|
SurveyModel.prototype.updateLazyRenderingRowsOnRemovingElements = function () {
|
39079
39276
|
if (!this.isLazyRendering)
|
39080
39277
|
return;
|
@@ -43256,7 +43453,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43256
43453
|
isProcessed_1 = false;
|
43257
43454
|
}
|
43258
43455
|
else {
|
43259
|
-
isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1);
|
43456
|
+
isProcessed_1 = _this.processResponsiveness(observedElement.offsetWidth, mobileWidth_1, observedElement.offsetHeight);
|
43260
43457
|
}
|
43261
43458
|
});
|
43262
43459
|
});
|
@@ -43270,13 +43467,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43270
43467
|
this.rootElement = htmlElement;
|
43271
43468
|
this.addScrollEventListener();
|
43272
43469
|
};
|
43273
|
-
SurveyModel.prototype.processResponsiveness = function (width, mobileWidth) {
|
43470
|
+
SurveyModel.prototype.processResponsiveness = function (width, mobileWidth, height) {
|
43274
43471
|
var isMobile = width < mobileWidth;
|
43275
43472
|
var isMobileChanged = this.isMobile !== isMobile;
|
43276
|
-
|
43277
|
-
this.setIsMobile(isMobile);
|
43278
|
-
}
|
43473
|
+
this.setIsMobile(isMobile);
|
43279
43474
|
this.layoutElements.forEach(function (layoutElement) { return layoutElement.processResponsiveness && layoutElement.processResponsiveness(width); });
|
43475
|
+
var options = {
|
43476
|
+
height: height,
|
43477
|
+
width: width,
|
43478
|
+
};
|
43479
|
+
this.onResize.fire(this, options);
|
43280
43480
|
return isMobileChanged;
|
43281
43481
|
};
|
43282
43482
|
SurveyModel.prototype.triggerResponsiveness = function (hard) {
|
@@ -43685,36 +43885,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
43685
43885
|
this.uploadFilesCore(name, files, callback);
|
43686
43886
|
}
|
43687
43887
|
};
|
43688
|
-
/**
|
43689
|
-
* Downloads a file from a server.
|
43690
|
-
*
|
43691
|
-
* The following code shows how to call this method:
|
43692
|
-
*
|
43693
|
-
* ```js
|
43694
|
-
* const question = survey.getQuestionByName("myFileQuestion");
|
43695
|
-
* survey.downloadFile(
|
43696
|
-
* question,
|
43697
|
-
* question.name,
|
43698
|
-
* // Download the first uploaded file
|
43699
|
-
* question.value[0],
|
43700
|
-
* (status, data) => {
|
43701
|
-
* if (status === "success") {
|
43702
|
-
* // Use `data` to retrieve the file
|
43703
|
-
* }
|
43704
|
-
* if (status === "error") {
|
43705
|
-
* // Handle error
|
43706
|
-
* }
|
43707
|
-
* }
|
43708
|
-
* );
|
43709
|
-
* ```
|
43710
|
-
*
|
43711
|
-
* @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
|
43712
|
-
* @param questionName The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
|
43713
|
-
* @param fileValue An object from File Upload's [`value`](https://surveyjs.io/form-library/documentation/api-reference/file-model#value) array. This object contains metadata about the file you want to download.
|
43714
|
-
* @param callback A callback function that allows you to get the download status (`"success"` or `"error"`) and the file identifier (URL, file name, etc.) that you can use to retrieve the file.
|
43715
|
-
* @see onDownloadFile
|
43716
|
-
* @see uploadFiles
|
43717
|
-
*/
|
43718
43888
|
SurveyModel.prototype.downloadFile = function (question, questionName, fileValue, callback) {
|
43719
43889
|
if (this.onDownloadFile.isEmpty) {
|
43720
43890
|
!!callback && callback("skipped", fileValue.content || fileValue);
|
@@ -45500,6 +45670,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
|
|
45500
45670
|
* A survey width in CSS values.
|
45501
45671
|
*
|
45502
45672
|
* Default value: `undefined` (the survey inherits the width from its container)
|
45673
|
+
* @see onResize
|
45503
45674
|
*/
|
45504
45675
|
get: function () {
|
45505
45676
|
return this.getPropertyValue("width");
|
@@ -46641,6 +46812,7 @@ var question_baseselect_decorate = (undefined && undefined.__decorate) || functi
|
|
46641
46812
|
|
46642
46813
|
|
46643
46814
|
|
46815
|
+
|
46644
46816
|
/**
|
46645
46817
|
* A base class for multiple-choice question types ([Checkboxes](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Radio Button Group](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), etc.).
|
46646
46818
|
*/
|
@@ -46654,6 +46826,11 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
46654
46826
|
_this.isRunningChoices = false;
|
46655
46827
|
_this.isFirstLoadChoicesFromUrl = true;
|
46656
46828
|
_this.isUpdatingChoicesDependedQuestions = false;
|
46829
|
+
_this._renderedChoices = [];
|
46830
|
+
_this.renderedChoicesAnimation = new animation_AnimationGroup(_this.getRenderedChoicesAnimationOptions(), function (val) {
|
46831
|
+
_this._renderedChoices = val;
|
46832
|
+
_this.renderedChoicesChangedCallback && _this.renderedChoicesChangedCallback();
|
46833
|
+
}, function () { return _this._renderedChoices; });
|
46657
46834
|
_this.headItemsCount = 0;
|
46658
46835
|
_this.footItemsCount = 0;
|
46659
46836
|
_this.prevIsOtherSelected = false;
|
@@ -46673,7 +46850,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
46673
46850
|
_this.registerPropertyChangedHandlers(["hideIfChoicesEmpty"], function () {
|
46674
46851
|
_this.onVisibleChanged();
|
46675
46852
|
});
|
46676
|
-
_this.createNewArray("visibleChoices");
|
46853
|
+
_this.createNewArray("visibleChoices", function () { return _this.updateRenderedChoices(); }, function () { return _this.updateRenderedChoices(); });
|
46677
46854
|
_this.setNewRestfulProperty();
|
46678
46855
|
var locOtherText = _this.createLocalizableString("otherText", _this.otherItemValue, true, "otherItemText");
|
46679
46856
|
_this.createLocalizableString("otherErrorText", _this, true, "otherRequiredError");
|
@@ -47291,6 +47468,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
47291
47468
|
QuestionSelectBase.prototype.clearValue = function (keepComment) {
|
47292
47469
|
_super.prototype.clearValue.call(this, keepComment);
|
47293
47470
|
this.prevOtherValue = undefined;
|
47471
|
+
this.selectedItemValues = undefined;
|
47294
47472
|
};
|
47295
47473
|
QuestionSelectBase.prototype.updateCommentFromSurvey = function (newValue) {
|
47296
47474
|
_super.prototype.updateCommentFromSurvey.call(this, newValue);
|
@@ -47479,6 +47657,10 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
47479
47657
|
var itemValue = itemvalue_ItemValue.getItemByValue(this.getFilteredChoices(), val);
|
47480
47658
|
return !!itemValue && !itemValue.isEnabled;
|
47481
47659
|
};
|
47660
|
+
QuestionSelectBase.prototype.endLoadingFromJson = function () {
|
47661
|
+
_super.prototype.endLoadingFromJson.call(this);
|
47662
|
+
this.updateVisibleChoices();
|
47663
|
+
};
|
47482
47664
|
Object.defineProperty(QuestionSelectBase.prototype, "choicesByUrl", {
|
47483
47665
|
/**
|
47484
47666
|
* Configures access to a RESTful service that returns choice items. Refer to the [`ChoicesRestful`](https://surveyjs.io/form-library/documentation/choicesrestful) class description for more information. You can also specify additional application-wide settings using the [`settings.web`](https://surveyjs.io/form-library/documentation/api-reference/settings#web) object.
|
@@ -47782,6 +47964,7 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
47782
47964
|
var oldValue = this.visibleChoices;
|
47783
47965
|
if (!this.isTwoValueEquals(oldValue, newValue) || this.choicesLazyLoadEnabled) {
|
47784
47966
|
this.setArrayPropertyDirectly("visibleChoices", newValue);
|
47967
|
+
this.updateRenderedChoices();
|
47785
47968
|
}
|
47786
47969
|
};
|
47787
47970
|
QuestionSelectBase.prototype.calcVisibleChoices = function () {
|
@@ -48163,9 +48346,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48163
48346
|
return (!this.isDesignMode ||
|
48164
48347
|
this.getPropertyByName(propName).visible);
|
48165
48348
|
};
|
48166
|
-
QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
48349
|
+
QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
48167
48350
|
var _this = this;
|
48168
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
48351
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
48169
48352
|
if (!this.hasOther || !this.isOtherSelected || this.otherValue
|
48170
48353
|
|| isOnValueChanged && !this.prevOtherErrorValue)
|
48171
48354
|
return;
|
@@ -48588,12 +48771,76 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48588
48771
|
.append(this.cssClasses.controlLabelChecked, this.isItemSelected(item))
|
48589
48772
|
.toString() || undefined;
|
48590
48773
|
};
|
48774
|
+
QuestionSelectBase.prototype.updateRenderedChoices = function () {
|
48775
|
+
this.renderedChoices = this.onGetRenderedChoicesCallback ? this.onGetRenderedChoicesCallback(this.visibleChoices) : this.visibleChoices;
|
48776
|
+
};
|
48777
|
+
QuestionSelectBase.prototype.getRenderedChoicesAnimationOptions = function () {
|
48778
|
+
var _this = this;
|
48779
|
+
return {
|
48780
|
+
isAnimationEnabled: function () {
|
48781
|
+
return _this.animationAllowed;
|
48782
|
+
},
|
48783
|
+
getRerenderEvent: function () {
|
48784
|
+
return _this.onElementRerendered;
|
48785
|
+
},
|
48786
|
+
getKey: function (item) { return item != _this.newItemValue ? item.value : _this.newItemValue; },
|
48787
|
+
getLeaveOptions: function (item) {
|
48788
|
+
var cssClass = _this.cssClasses.itemLeave;
|
48789
|
+
if (_this.hasColumns) {
|
48790
|
+
var index = _this.bodyItems.indexOf(item);
|
48791
|
+
if (index !== -1 && index !== _this.bodyItems.length - 1) {
|
48792
|
+
cssClass = "";
|
48793
|
+
}
|
48794
|
+
}
|
48795
|
+
return {
|
48796
|
+
cssClass: cssClass,
|
48797
|
+
onBeforeRunAnimation: prepareElementForVerticalAnimation,
|
48798
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
48799
|
+
};
|
48800
|
+
},
|
48801
|
+
getAnimatedElement: function (item) {
|
48802
|
+
return item.getRootElement();
|
48803
|
+
},
|
48804
|
+
getEnterOptions: function (item) {
|
48805
|
+
var cssClass = _this.cssClasses.itemEnter;
|
48806
|
+
if (_this.hasColumns) {
|
48807
|
+
var index = _this.bodyItems.indexOf(item);
|
48808
|
+
if (index !== -1 && index !== _this.bodyItems.length - 1) {
|
48809
|
+
cssClass = "";
|
48810
|
+
}
|
48811
|
+
}
|
48812
|
+
return {
|
48813
|
+
cssClass: cssClass,
|
48814
|
+
onBeforeRunAnimation: function (el) {
|
48815
|
+
if (_this.getCurrentColCount() == 0 && _this.bodyItems.indexOf(item) >= 0) {
|
48816
|
+
var leftPosition = el.parentElement.firstElementChild.offsetLeft;
|
48817
|
+
if (el.offsetLeft > leftPosition) {
|
48818
|
+
setPropertiesOnElementForAnimation(el, { moveAnimationDuration: "0s", fadeAnimationDelay: "0s" }, "--");
|
48819
|
+
}
|
48820
|
+
}
|
48821
|
+
prepareElementForVerticalAnimation(el);
|
48822
|
+
},
|
48823
|
+
onAfterRunAnimation: cleanHtmlElementAfterAnimation
|
48824
|
+
};
|
48825
|
+
}
|
48826
|
+
};
|
48827
|
+
};
|
48828
|
+
Object.defineProperty(QuestionSelectBase.prototype, "renderedChoices", {
|
48829
|
+
get: function () {
|
48830
|
+
return this._renderedChoices;
|
48831
|
+
},
|
48832
|
+
set: function (val) {
|
48833
|
+
this.renderedChoicesAnimation.sync(val);
|
48834
|
+
},
|
48835
|
+
enumerable: false,
|
48836
|
+
configurable: true
|
48837
|
+
});
|
48591
48838
|
Object.defineProperty(QuestionSelectBase.prototype, "headItems", {
|
48592
48839
|
get: function () {
|
48593
48840
|
var count = (this.separateSpecialChoices || this.isDesignMode) ? this.headItemsCount : 0;
|
48594
48841
|
var res = [];
|
48595
48842
|
for (var i = 0; i < count; i++)
|
48596
|
-
res.push(this.
|
48843
|
+
this.renderedChoices[i] && res.push(this.renderedChoices[i]);
|
48597
48844
|
return res;
|
48598
48845
|
},
|
48599
48846
|
enumerable: false,
|
@@ -48603,9 +48850,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48603
48850
|
get: function () {
|
48604
48851
|
var count = (this.separateSpecialChoices || this.isDesignMode) ? this.footItemsCount : 0;
|
48605
48852
|
var res = [];
|
48606
|
-
var items = this.
|
48853
|
+
var items = this.renderedChoices;
|
48607
48854
|
for (var i = 0; i < count; i++)
|
48608
|
-
res.push(
|
48855
|
+
this.renderedChoices[items.length - count + i] && res.push(this.renderedChoices[items.length - count + i]);
|
48609
48856
|
return res;
|
48610
48857
|
},
|
48611
48858
|
enumerable: false,
|
@@ -48614,14 +48861,14 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48614
48861
|
Object.defineProperty(QuestionSelectBase.prototype, "dataChoices", {
|
48615
48862
|
get: function () {
|
48616
48863
|
var _this = this;
|
48617
|
-
return this.
|
48864
|
+
return this.renderedChoices.filter(function (item) { return !_this.isBuiltInChoice(item); });
|
48618
48865
|
},
|
48619
48866
|
enumerable: false,
|
48620
48867
|
configurable: true
|
48621
48868
|
});
|
48622
48869
|
Object.defineProperty(QuestionSelectBase.prototype, "bodyItems", {
|
48623
48870
|
get: function () {
|
48624
|
-
return (this.hasHeadItems || this.hasFootItems) ? this.dataChoices : this.
|
48871
|
+
return (this.hasHeadItems || this.hasFootItems) ? this.dataChoices : this.renderedChoices;
|
48625
48872
|
},
|
48626
48873
|
enumerable: false,
|
48627
48874
|
configurable: true
|
@@ -48644,9 +48891,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48644
48891
|
get: function () {
|
48645
48892
|
var columns = [];
|
48646
48893
|
var colCount = this.getCurrentColCount();
|
48647
|
-
if (this.hasColumns && this.
|
48894
|
+
if (this.hasColumns && this.renderedChoices.length > 0) {
|
48648
48895
|
var choicesToBuildColumns = (!this.separateSpecialChoices && !this.isDesignMode) ?
|
48649
|
-
this.
|
48896
|
+
this.renderedChoices : this.dataChoices;
|
48650
48897
|
if (settings.showItemsInOrder == "column") {
|
48651
48898
|
var prevIndex = 0;
|
48652
48899
|
var leftElementsCount = choicesToBuildColumns.length % colCount;
|
@@ -48842,6 +49089,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
|
|
48842
49089
|
question_baseselect_decorate([
|
48843
49090
|
jsonobject_property({ localizable: true })
|
48844
49091
|
], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
|
49092
|
+
question_baseselect_decorate([
|
49093
|
+
propertyArray()
|
49094
|
+
], QuestionSelectBase.prototype, "_renderedChoices", void 0);
|
48845
49095
|
return QuestionSelectBase;
|
48846
49096
|
}(question_Question));
|
48847
49097
|
|
@@ -49305,14 +49555,14 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
|
|
49305
49555
|
this.model.onHiding();
|
49306
49556
|
};
|
49307
49557
|
PopupBaseViewModel.prototype.getLeaveOptions = function () {
|
49308
|
-
return { cssClass: "sv-popup--
|
49558
|
+
return { cssClass: "sv-popup--leave", onBeforeRunAnimation: function (el) {
|
49309
49559
|
el.setAttribute("inert", "");
|
49310
49560
|
},
|
49311
49561
|
onAfterRunAnimation: function (el) { return el.removeAttribute("inert"); }
|
49312
49562
|
};
|
49313
49563
|
};
|
49314
49564
|
PopupBaseViewModel.prototype.getEnterOptions = function () {
|
49315
|
-
return { cssClass: "sv-popup--
|
49565
|
+
return { cssClass: "sv-popup--enter" };
|
49316
49566
|
};
|
49317
49567
|
PopupBaseViewModel.prototype.getAnimatedElement = function () {
|
49318
49568
|
return this.getAnimationContainer();
|
@@ -49555,7 +49805,7 @@ var popup_view_model_PopupBaseViewModel = /** @class */ (function (_super) {
|
|
49555
49805
|
};
|
49556
49806
|
PopupBaseViewModel.prototype.updateOnHiding = function () {
|
49557
49807
|
if (this.isFocusedContent && this.prevActiveElement) {
|
49558
|
-
this.prevActiveElement.focus();
|
49808
|
+
this.prevActiveElement.focus({ preventScroll: true });
|
49559
49809
|
}
|
49560
49810
|
};
|
49561
49811
|
PopupBaseViewModel.prototype.focusContainer = function () {
|
@@ -51722,11 +51972,11 @@ var question_matrix_QuestionMatrixModel = /** @class */ (function (_super) {
|
|
51722
51972
|
QuestionMatrixModel.prototype.supportGoNextPageAutomatic = function () {
|
51723
51973
|
return this.isMouseDown === true && this.hasValuesInAllRows();
|
51724
51974
|
};
|
51725
|
-
QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
51726
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
51975
|
+
QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
51976
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
51727
51977
|
if (!isOnValueChanged || this.hasCssError()) {
|
51728
51978
|
var rowsErrors = { noValue: false, isNotUnique: false };
|
51729
|
-
this.checkErrorsAllRows(
|
51979
|
+
this.checkErrorsAllRows(fireCallback, rowsErrors);
|
51730
51980
|
if (rowsErrors.noValue) {
|
51731
51981
|
errors.push(new RequiredInAllRowsError(null, this));
|
51732
51982
|
}
|
@@ -52779,9 +53029,9 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
52779
53029
|
}
|
52780
53030
|
return _super.prototype.valueFromDataCore.call(this, val);
|
52781
53031
|
};
|
52782
|
-
QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
53032
|
+
QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
52783
53033
|
var _this = this;
|
52784
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
53034
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
52785
53035
|
if (isOnValueChanged)
|
52786
53036
|
return;
|
52787
53037
|
if (this.isValueLessMin) {
|
@@ -52822,7 +53072,8 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
52822
53072
|
return isValid;
|
52823
53073
|
};
|
52824
53074
|
QuestionTextModel.prototype.convertFuncValuetoQuestionValue = function (val) {
|
52825
|
-
|
53075
|
+
var type = this.maskTypeIsEmpty ? this.inputType : this.maskSettings.getTypeForExpressions();
|
53076
|
+
return helpers_Helpers.convertValToQuestionVal(val, type);
|
52826
53077
|
};
|
52827
53078
|
QuestionTextModel.prototype.getMinMaxErrorText = function (errorText, value) {
|
52828
53079
|
if (helpers_Helpers.isValueEmpty(value))
|
@@ -52964,8 +53215,11 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
|
|
52964
53215
|
}
|
52965
53216
|
if (this.inputType === "month") {
|
52966
53217
|
var d = new Date(newValue);
|
52967
|
-
var
|
52968
|
-
|
53218
|
+
var isUtc = d.toISOString().indexOf(newValue) == 0 && newValue.indexOf("T") == -1;
|
53219
|
+
var month = isUtc ? d.getUTCMonth() : d.getMonth();
|
53220
|
+
var year = isUtc ? d.getUTCFullYear() : d.getFullYear();
|
53221
|
+
var m = month + 1;
|
53222
|
+
return year + "-" + (m < 10 ? "0" : "") + m;
|
52969
53223
|
}
|
52970
53224
|
return newValue;
|
52971
53225
|
};
|
@@ -54865,9 +55119,9 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
54865
55119
|
_this.isChangingValueOnClearIncorrect = false;
|
54866
55120
|
_this.selectAllItemValue = new itemvalue_ItemValue("");
|
54867
55121
|
_this.selectAllItemValue.id = "selectall";
|
54868
|
-
|
55122
|
+
_this.selectAllItemText = _this.createLocalizableString("selectAllText", _this.selectAllItem, true, "selectAllItemText");
|
54869
55123
|
_this.selectAllItem.locOwner = _this;
|
54870
|
-
_this.selectAllItem.setLocText(selectAllItemText);
|
55124
|
+
_this.selectAllItem.setLocText(_this.selectAllItemText);
|
54871
55125
|
_this.registerPropertyChangedHandlers(["showSelectAllItem", "selectAllText"], function () {
|
54872
55126
|
_this.onVisibleChoicesChanged();
|
54873
55127
|
});
|
@@ -54974,28 +55228,7 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
54974
55228
|
* @see showSelectAllItem
|
54975
55229
|
*/
|
54976
55230
|
get: function () {
|
54977
|
-
|
54978
|
-
for (var i = 0; i < noneItems.length; i++) {
|
54979
|
-
if (this.isItemSelected(noneItems[i]))
|
54980
|
-
return false;
|
54981
|
-
}
|
54982
|
-
var items = this.getVisibleEnableItems();
|
54983
|
-
if (items.length === 0)
|
54984
|
-
return false;
|
54985
|
-
var val = this.value;
|
54986
|
-
if (!val || !Array.isArray(val) || val.length === 0)
|
54987
|
-
return false;
|
54988
|
-
if (val.length < items.length)
|
54989
|
-
return false;
|
54990
|
-
var rVal = [];
|
54991
|
-
for (var i = 0; i < val.length; i++) {
|
54992
|
-
rVal.push(this.getRealValue(val[i]));
|
54993
|
-
}
|
54994
|
-
for (var i = 0; i < items.length; i++) {
|
54995
|
-
if (rVal.indexOf(items[i].value) < 0)
|
54996
|
-
return false;
|
54997
|
-
}
|
54998
|
-
return true;
|
55231
|
+
return this.allElementsSelected();
|
54999
55232
|
},
|
55000
55233
|
set: function (val) {
|
55001
55234
|
if (val) {
|
@@ -55011,6 +55244,30 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
55011
55244
|
QuestionCheckboxModel.prototype.toggleSelectAll = function () {
|
55012
55245
|
this.isAllSelected = !this.isAllSelected;
|
55013
55246
|
};
|
55247
|
+
QuestionCheckboxModel.prototype.allElementsSelected = function () {
|
55248
|
+
var noneItems = this.getNoneItems();
|
55249
|
+
for (var i = 0; i < noneItems.length; i++) {
|
55250
|
+
if (this.isItemSelected(noneItems[i]))
|
55251
|
+
return false;
|
55252
|
+
}
|
55253
|
+
var items = this.getVisibleEnableItems();
|
55254
|
+
if (items.length === 0)
|
55255
|
+
return false;
|
55256
|
+
var val = this.value;
|
55257
|
+
if (!val || !Array.isArray(val) || val.length === 0)
|
55258
|
+
return false;
|
55259
|
+
if (val.length < items.length)
|
55260
|
+
return false;
|
55261
|
+
var rVal = [];
|
55262
|
+
for (var i = 0; i < val.length; i++) {
|
55263
|
+
rVal.push(this.getRealValue(val[i]));
|
55264
|
+
}
|
55265
|
+
for (var i = 0; i < items.length; i++) {
|
55266
|
+
if (rVal.indexOf(items[i].value) < 0)
|
55267
|
+
return false;
|
55268
|
+
}
|
55269
|
+
return true;
|
55270
|
+
};
|
55014
55271
|
/**
|
55015
55272
|
* Selects all choice items, except "Other" and "None".
|
55016
55273
|
*
|
@@ -55181,8 +55438,8 @@ var question_checkbox_QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
55181
55438
|
return val.map(function (item) { return _this.createItemValue(item); });
|
55182
55439
|
};
|
55183
55440
|
QuestionCheckboxModel.prototype.getAnswerCorrectIgnoreOrder = function () { return true; };
|
55184
|
-
QuestionCheckboxModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
55185
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
55441
|
+
QuestionCheckboxModel.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
55442
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
55186
55443
|
if (isOnValueChanged)
|
55187
55444
|
return;
|
55188
55445
|
if (this.minSelectedChoices > 0 && this.checkMinSelectedChoicesUnreached()) {
|
@@ -55874,6 +56131,9 @@ var dropdownMultiSelectListModel_DropdownMultiSelectListModel = /** @class */ (f
|
|
55874
56131
|
};
|
55875
56132
|
DropdownMultiSelectListModel.prototype.selectAllItems = function () {
|
55876
56133
|
this.question.toggleSelectAll();
|
56134
|
+
if (this.question.isAllSelected && this.question.hideSelectedItems) {
|
56135
|
+
this.popupModel.hide();
|
56136
|
+
}
|
55877
56137
|
this.updateListState();
|
55878
56138
|
};
|
55879
56139
|
DropdownMultiSelectListModel.prototype.selectNoneItem = function () {
|
@@ -56004,6 +56264,7 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
56004
56264
|
_this.createLocalizableString("placeholder", _this, false, true);
|
56005
56265
|
_this.createLocalizableString("clearCaption", _this, false, true);
|
56006
56266
|
_this.createLocalizableString("readOnlyText", _this, true);
|
56267
|
+
_this.deselectAllItemText = _this.createLocalizableString("deselectAllText", _this.selectAllItem, true, "deselectAllItemText");
|
56007
56268
|
_this.registerPropertyChangedHandlers(["value", "renderAs", "showOtherItem", "otherText", "placeholder", "choices", "visibleChoices"], function () {
|
56008
56269
|
_this.updateReadOnlyText();
|
56009
56270
|
});
|
@@ -56193,6 +56454,14 @@ var question_tagbox_QuestionTagboxModel = /** @class */ (function (_super) {
|
|
56193
56454
|
(_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onFocus(event);
|
56194
56455
|
_super.prototype.onFocusCore.call(this, event);
|
56195
56456
|
};
|
56457
|
+
QuestionTagboxModel.prototype.allElementsSelected = function () {
|
56458
|
+
var result = _super.prototype.allElementsSelected.call(this);
|
56459
|
+
this.updateSelectAllItemText(result);
|
56460
|
+
return result;
|
56461
|
+
};
|
56462
|
+
QuestionTagboxModel.prototype.updateSelectAllItemText = function (isAllSelected) {
|
56463
|
+
this.selectAllItem.setLocText(isAllSelected ? this.deselectAllItemText : this.selectAllItemText);
|
56464
|
+
};
|
56196
56465
|
QuestionTagboxModel.prototype.dispose = function () {
|
56197
56466
|
_super.prototype.dispose.call(this);
|
56198
56467
|
if (!!this.dropdownListModel) {
|
@@ -58090,8 +58359,8 @@ var question_file_QuestionFileModelBase = /** @class */ (function (_super) {
|
|
58090
58359
|
return;
|
58091
58360
|
this.survey.clearFiles(this, this.name, this.value, null, function () { });
|
58092
58361
|
};
|
58093
|
-
QuestionFileModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
58094
|
-
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
58362
|
+
QuestionFileModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged, fireCallback) {
|
58363
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged, fireCallback);
|
58095
58364
|
if (this.isUploading && this.waitForUpload) {
|
58096
58365
|
errors.push(new UploadingFileError(this.getLocalizationString("uploadingFile"), this));
|
58097
58366
|
}
|
@@ -59896,12 +60165,14 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
59896
60165
|
return;
|
59897
60166
|
if (QuestionRatingModel.colorsCalculated)
|
59898
60167
|
return;
|
60168
|
+
function getColorFromProperty(varName) {
|
60169
|
+
var style = getComputedStyle(DomDocumentHelper.getDocumentElement());
|
60170
|
+
return style.getPropertyValue && style.getPropertyValue(varName);
|
60171
|
+
}
|
59899
60172
|
function getRGBColor(colorName, varName) {
|
59900
60173
|
var str = !!themeVariables && themeVariables[colorName];
|
59901
|
-
if (!str)
|
59902
|
-
|
59903
|
-
str = style.getPropertyValue && style.getPropertyValue(varName);
|
59904
|
-
}
|
60174
|
+
if (!str)
|
60175
|
+
str = getColorFromProperty(varName);
|
59905
60176
|
if (!str)
|
59906
60177
|
return null;
|
59907
60178
|
var canvasElement = DomDocumentHelper.createElement("canvas");
|
@@ -59909,6 +60180,9 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
|
|
59909
60180
|
return null;
|
59910
60181
|
var ctx = canvasElement.getContext("2d");
|
59911
60182
|
ctx.fillStyle = str;
|
60183
|
+
if (ctx.fillStyle == "#000000") {
|
60184
|
+
ctx.fillStyle = getColorFromProperty(varName);
|
60185
|
+
}
|
59912
60186
|
var newStr = ctx.fillStyle;
|
59913
60187
|
if (newStr.startsWith("rgba")) {
|
59914
60188
|
return newStr.substring(5, newStr.length - 1).split(",").map(function (c) { return +(c.trim()); });
|
@@ -61795,21 +62069,10 @@ var question_image_decorate = (undefined && undefined.__decorate) || function (d
|
|
61795
62069
|
|
61796
62070
|
|
61797
62071
|
|
61798
|
-
|
62072
|
+
|
61799
62073
|
var videoSuffics = [".mp4", ".mov", ".wmv", ".flv", ".avi", ".mkv"];
|
61800
62074
|
var youtubeUrl = "https://www.youtube.com/";
|
61801
62075
|
var youtubeEmbed = "embed";
|
61802
|
-
function isUrlYoutubeVideo(url) {
|
61803
|
-
if (!url)
|
61804
|
-
return false;
|
61805
|
-
url = url.toLowerCase();
|
61806
|
-
url = url.replace(/^https?:\/\//, "");
|
61807
|
-
for (var i = 0; i < youtubeDomains.length; i++) {
|
61808
|
-
if (url.indexOf(youtubeDomains[i] + "/") === 0)
|
61809
|
-
return true;
|
61810
|
-
}
|
61811
|
-
return false;
|
61812
|
-
}
|
61813
62076
|
/**
|
61814
62077
|
* A class that describes the Image question type. Unlike other question types, Image cannot have a title or value.
|
61815
62078
|
*
|
@@ -62034,7 +62297,7 @@ var question_image_QuestionImageModel = /** @class */ (function (_super) {
|
|
62034
62297
|
}
|
62035
62298
|
};
|
62036
62299
|
QuestionImageModel.prototype.isYoutubeVideo = function () {
|
62037
|
-
return isUrlYoutubeVideo(this.imageLink);
|
62300
|
+
return helpers_Helpers.isUrlYoutubeVideo(this.imageLink);
|
62038
62301
|
};
|
62039
62302
|
QuestionImageModel.prototype.isVideo = function () {
|
62040
62303
|
var link = this.imageLink;
|
@@ -62054,9 +62317,8 @@ var question_image_QuestionImageModel = /** @class */ (function (_super) {
|
|
62054
62317
|
}(QuestionNonValue));
|
62055
62318
|
|
62056
62319
|
function getCorrectImageLink(val, isYouTube) {
|
62057
|
-
if (!val || !isUrlYoutubeVideo(val))
|
62320
|
+
if (!val || !helpers_Helpers.isUrlYoutubeVideo(val))
|
62058
62321
|
return isYouTube ? "" : val;
|
62059
|
-
//if(!val || !isUrlYoutubeVideo(val)) return val;
|
62060
62322
|
var res = val.toLocaleLowerCase();
|
62061
62323
|
if (res.indexOf(youtubeEmbed) > -1)
|
62062
62324
|
return val;
|
@@ -62792,7 +63054,7 @@ var question_signaturepad_QuestionSignaturePadModel = /** @class */ (function (_
|
|
62792
63054
|
};
|
62793
63055
|
};
|
62794
63056
|
QuestionSignaturePadModel.prototype.refreshCanvas = function () {
|
62795
|
-
if (!this.canvas)
|
63057
|
+
if (!this.signaturePad || !this.canvas)
|
62796
63058
|
return;
|
62797
63059
|
if (!this.value) {
|
62798
63060
|
this.canvas.getContext("2d").clearRect(0, 0, this.canvas.width * this.scale, this.canvas.height * this.scale);
|
@@ -63522,7 +63784,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
63522
63784
|
_this.registerPropertyChangedHandlers(["panelsState"], function () {
|
63523
63785
|
_this.setPanelsState();
|
63524
63786
|
});
|
63525
|
-
_this.registerPropertyChangedHandlers(["
|
63787
|
+
_this.registerPropertyChangedHandlers(["newPanelPosition", "displayMode", "showProgressBar"], function () {
|
63526
63788
|
_this.updateFooterActions();
|
63527
63789
|
});
|
63528
63790
|
_this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
|
@@ -63549,8 +63811,15 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
63549
63811
|
if (!!res)
|
63550
63812
|
return res;
|
63551
63813
|
}
|
63814
|
+
if (this.showAddPanelButton && (!withError || this.currentErrorCount > 0))
|
63815
|
+
return this;
|
63552
63816
|
return null;
|
63553
63817
|
};
|
63818
|
+
QuestionPanelDynamicModel.prototype.getFirstInputElementId = function () {
|
63819
|
+
if (this.showAddPanelButton)
|
63820
|
+
return this.addButtonId;
|
63821
|
+
return _super.prototype.getFirstInputElementId.call(this);
|
63822
|
+
};
|
63554
63823
|
QuestionPanelDynamicModel.prototype.setSurveyImpl = function (value, isLight) {
|
63555
63824
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
63556
63825
|
this.setTemplatePanelSurveyImpl();
|
@@ -64000,34 +64269,44 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
64000
64269
|
}
|
64001
64270
|
},
|
64002
64271
|
getEnterOptions: function () {
|
64003
|
-
var cssClass = new CssClassBuilder().append(_this.cssClasses.
|
64272
|
+
var cssClass = new CssClassBuilder().append(_this.cssClasses.panelWrapperEnter).append(getDirectionCssClass()).toString();
|
64004
64273
|
return {
|
64005
64274
|
onBeforeRunAnimation: function (el) {
|
64006
|
-
var _a;
|
64007
64275
|
if (_this.focusNewPanelCallback) {
|
64008
64276
|
var scolledElement = _this.isRenderModeList ? el : el.parentElement;
|
64009
64277
|
survey_element_SurveyElement.ScrollElementToViewCore(scolledElement, false, false, { behavior: "smooth" });
|
64010
64278
|
}
|
64011
|
-
if (!_this.isRenderModeList) {
|
64012
|
-
(
|
64279
|
+
if (!_this.isRenderModeList && el.parentElement) {
|
64280
|
+
setPropertiesOnElementForAnimation(el.parentElement, { heightTo: el.offsetHeight + "px" });
|
64013
64281
|
}
|
64014
64282
|
else {
|
64015
|
-
|
64283
|
+
prepareElementForVerticalAnimation(el);
|
64284
|
+
}
|
64285
|
+
},
|
64286
|
+
onAfterRunAnimation: function (el) {
|
64287
|
+
cleanHtmlElementAfterAnimation(el);
|
64288
|
+
if (el.parentElement) {
|
64289
|
+
cleanHtmlElementAfterAnimation(el.parentElement);
|
64016
64290
|
}
|
64017
64291
|
},
|
64018
64292
|
cssClass: cssClass
|
64019
64293
|
};
|
64020
64294
|
},
|
64021
64295
|
getLeaveOptions: function () {
|
64022
|
-
var cssClass = new CssClassBuilder().append(_this.cssClasses.
|
64296
|
+
var cssClass = new CssClassBuilder().append(_this.cssClasses.panelWrapperLeave).append(getDirectionCssClass()).toString();
|
64023
64297
|
return {
|
64024
64298
|
onBeforeRunAnimation: function (el) {
|
64025
|
-
|
64026
|
-
|
64027
|
-
(_a = el.parentElement) === null || _a === void 0 ? void 0 : _a.style.setProperty("--animation-height-from", el.offsetHeight + "px");
|
64299
|
+
if (!_this.isRenderModeList && el.parentElement) {
|
64300
|
+
setPropertiesOnElementForAnimation(el.parentElement, { heightFrom: el.offsetHeight + "px" });
|
64028
64301
|
}
|
64029
64302
|
else {
|
64030
|
-
|
64303
|
+
prepareElementForVerticalAnimation(el);
|
64304
|
+
}
|
64305
|
+
},
|
64306
|
+
onAfterRunAnimation: function (el) {
|
64307
|
+
cleanHtmlElementAfterAnimation(el);
|
64308
|
+
if (el.parentElement) {
|
64309
|
+
cleanHtmlElementAfterAnimation(el.parentElement);
|
64031
64310
|
}
|
64032
64311
|
},
|
64033
64312
|
cssClass: cssClass
|
@@ -64527,6 +64806,13 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
64527
64806
|
enumerable: false,
|
64528
64807
|
configurable: true
|
64529
64808
|
});
|
64809
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "addButtonId", {
|
64810
|
+
get: function () {
|
64811
|
+
return this.id + "addPanel";
|
64812
|
+
},
|
64813
|
+
enumerable: false,
|
64814
|
+
configurable: true
|
64815
|
+
});
|
64530
64816
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "newPanelPosition", {
|
64531
64817
|
/**
|
64532
64818
|
* Specifies the position of newly added panels.
|
@@ -64748,8 +65034,9 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
64748
65034
|
return 0;
|
64749
65035
|
var onSurveyNumbering = this.showQuestionNumbers === "onSurvey";
|
64750
65036
|
var startIndex = onSurveyNumbering ? value : 0;
|
64751
|
-
|
64752
|
-
|
65037
|
+
var panels = this.isDesignMode ? [this.template] : this.visiblePanelsCore;
|
65038
|
+
for (var i = 0; i < panels.length; i++) {
|
65039
|
+
var counter = this.setPanelVisibleIndex(panels[i], startIndex, this.showQuestionNumbers != "off");
|
64753
65040
|
if (onSurveyNumbering) {
|
64754
65041
|
startIndex += counter;
|
64755
65042
|
}
|
@@ -64917,12 +65204,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
64917
65204
|
return true;
|
64918
65205
|
};
|
64919
65206
|
/**
|
64920
|
-
*
|
64921
|
-
*
|
64922
|
-
*
|
65207
|
+
* Adds a new panel based on the [template](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#template).
|
65208
|
+
*
|
65209
|
+
* Unlike the [`addPanel()`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#addPanel) method, `addPanelUI()` performs additional actions: checks whether a new panel [can be added](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#canAddPanel), expands and focuses the new panel, and runs animated effects.
|
64923
65210
|
* @see panelCount
|
64924
65211
|
* @see panels
|
64925
|
-
* @see canAddPanel
|
64926
65212
|
*/
|
64927
65213
|
QuestionPanelDynamicModel.prototype.addPanelUI = function () {
|
64928
65214
|
if (!this.canAddPanel)
|
@@ -65006,13 +65292,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
65006
65292
|
}
|
65007
65293
|
};
|
65008
65294
|
/**
|
65009
|
-
*
|
65010
|
-
* @param value a panel or panel index
|
65011
|
-
* @see removePanel
|
65012
|
-
* @see confirmDelete
|
65013
|
-
* @see confirmDeleteText
|
65014
|
-
* @see canRemovePanel
|
65295
|
+
* Deletes a panel from the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
|
65015
65296
|
*
|
65297
|
+
* Unlike the [`removePanel()`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#removePanel) method, `removePanelUI()` performs additional actions: checks whether the panel [can be removed](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#canRemovePanel) and displays a confirmation dialog (if the [`confirmDelete`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#confirmDelete) property is enabled).
|
65298
|
+
* @param value A `PanelModel` instance or zero-based panel index.
|
65299
|
+
* @see addPanelUI
|
65016
65300
|
*/
|
65017
65301
|
QuestionPanelDynamicModel.prototype.removePanelUI = function (value) {
|
65018
65302
|
var _this = this;
|
@@ -65055,6 +65339,11 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
65055
65339
|
return;
|
65056
65340
|
this.currentIndex--;
|
65057
65341
|
};
|
65342
|
+
/**
|
65343
|
+
* Deletes a panel from the [`panels`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#panels) array.
|
65344
|
+
* @param value A `PanelModel` instance or zero-based panel index.
|
65345
|
+
* @see addPanel
|
65346
|
+
*/
|
65058
65347
|
QuestionPanelDynamicModel.prototype.removePanel = function (value) {
|
65059
65348
|
var visIndex = this.getVisualPanelIndex(value);
|
65060
65349
|
if (visIndex < 0 || visIndex >= this.visiblePanelCount)
|
@@ -65272,13 +65561,18 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
65272
65561
|
}
|
65273
65562
|
}
|
65274
65563
|
this.updateIsReady();
|
65275
|
-
if (
|
65564
|
+
if (!this.showAddPanelButton) {
|
65276
65565
|
this.updateNoEntriesTextDefaultLoc();
|
65277
65566
|
}
|
65278
65567
|
this.updateFooterActions();
|
65279
65568
|
this.isBuildingPanelsFirstTime = false;
|
65280
65569
|
this.releaseAnimations();
|
65281
65570
|
};
|
65571
|
+
Object.defineProperty(QuestionPanelDynamicModel.prototype, "showAddPanelButton", {
|
65572
|
+
get: function () { return this.allowAddPanel && !this.isReadOnly; },
|
65573
|
+
enumerable: false,
|
65574
|
+
configurable: true
|
65575
|
+
});
|
65282
65576
|
Object.defineProperty(QuestionPanelDynamicModel.prototype, "wasNotRenderedInSurvey", {
|
65283
65577
|
get: function () {
|
65284
65578
|
return !this.hasPanelBuildFirstTime && !this.wasRendered && !!this.survey;
|
@@ -65509,11 +65803,12 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
65509
65803
|
for (var i = 0; i < panels.length; i++) {
|
65510
65804
|
this.setOnCompleteAsyncInPanel(panels[i]);
|
65511
65805
|
}
|
65512
|
-
|
65513
|
-
|
65514
|
-
pnlError =
|
65515
|
-
|
65516
|
-
|
65806
|
+
var focusOnError = !!rec && rec.focusOnFirstError;
|
65807
|
+
for (var i_1 = 0; i_1 < panels.length; i_1++) {
|
65808
|
+
var pnlError = panels[i_1].hasErrors(fireCallback, focusOnError, rec);
|
65809
|
+
pnlError = this.isValueDuplicated(panels[i_1], keyValues, rec, fireCallback) || pnlError;
|
65810
|
+
if (!this.isRenderModeList && pnlError && !res && focusOnError) {
|
65811
|
+
this.currentIndex = i_1;
|
65517
65812
|
}
|
65518
65813
|
res = pnlError || res;
|
65519
65814
|
}
|
@@ -66106,6 +66401,10 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
|
|
66106
66401
|
}
|
66107
66402
|
return classes;
|
66108
66403
|
};
|
66404
|
+
QuestionPanelDynamicModel.prototype.onMobileChanged = function () {
|
66405
|
+
_super.prototype.onMobileChanged.call(this);
|
66406
|
+
this.updateFooterActions();
|
66407
|
+
};
|
66109
66408
|
QuestionPanelDynamicModel.maxCheckCount = 3;
|
66110
66409
|
question_paneldynamic_decorate([
|
66111
66410
|
propertyArray({})
|
@@ -67776,6 +68075,9 @@ var mask_base_InputMaskBase = /** @class */ (function (_super) {
|
|
67776
68075
|
InputMaskBase.prototype.getUnmaskedValue = function (src) { return src; };
|
67777
68076
|
InputMaskBase.prototype.getMaskedValue = function (src) { return src; };
|
67778
68077
|
InputMaskBase.prototype.getTextAlignment = function () { return "auto"; };
|
68078
|
+
InputMaskBase.prototype.getTypeForExpressions = function () {
|
68079
|
+
return "text";
|
68080
|
+
};
|
67779
68081
|
mask_base_decorate([
|
67780
68082
|
jsonobject_property()
|
67781
68083
|
], InputMaskBase.prototype, "saveMaskedValue", void 0);
|
@@ -68499,6 +68801,9 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
68499
68801
|
InputMaskDateTime.prototype.getType = function () {
|
68500
68802
|
return "datetimemask";
|
68501
68803
|
};
|
68804
|
+
InputMaskDateTime.prototype.getTypeForExpressions = function () {
|
68805
|
+
return this.hasTimePart ? "datetime-local" : "datetime";
|
68806
|
+
};
|
68502
68807
|
InputMaskDateTime.prototype.updateLiterals = function () {
|
68503
68808
|
this.lexems = getDateTimeLexems(this.pattern || "");
|
68504
68809
|
};
|
@@ -68515,6 +68820,9 @@ var mask_datetime_InputMaskDateTime = /** @class */ (function (_super) {
|
|
68515
68820
|
var _this = this;
|
68516
68821
|
var date = new Date(str);
|
68517
68822
|
this.initInputDateTimeData();
|
68823
|
+
if (!this.hasTimePart) {
|
68824
|
+
date = new Date(str + "T00:00:00");
|
68825
|
+
}
|
68518
68826
|
if (!this.hasDatePart) {
|
68519
68827
|
date = new Date(this.defaultDate + str);
|
68520
68828
|
}
|
@@ -69138,8 +69446,8 @@ Serializer.addClass("currencymask", [
|
|
69138
69446
|
|
69139
69447
|
var Version;
|
69140
69448
|
var ReleaseDate;
|
69141
|
-
Version = "" + "1.
|
69142
|
-
ReleaseDate = "" + "2024-
|
69449
|
+
Version = "" + "1.12.1";
|
69450
|
+
ReleaseDate = "" + "2024-09-10";
|
69143
69451
|
function checkLibraryVersion(ver, libraryName) {
|
69144
69452
|
if (Version != ver) {
|
69145
69453
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -79013,6 +79321,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
79013
79321
|
function SurveyElementBase(props) {
|
79014
79322
|
var _this = _super.call(this, props) || this;
|
79015
79323
|
_this._allowComponentUpdate = true;
|
79324
|
+
_this.prevStateElements = [];
|
79016
79325
|
return _this;
|
79017
79326
|
}
|
79018
79327
|
SurveyElementBase.renderLocString = function (locStr, style, key) {
|
@@ -79032,9 +79341,14 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
79032
79341
|
};
|
79033
79342
|
SurveyElementBase.prototype.componentWillUnmount = function () {
|
79034
79343
|
this.unMakeBaseElementsReact();
|
79344
|
+
this.disableStateElementsRerenderEvent(this.getStateElements());
|
79035
79345
|
};
|
79036
79346
|
SurveyElementBase.prototype.componentDidUpdate = function (prevProps, prevState) {
|
79347
|
+
var _a;
|
79037
79348
|
this.makeBaseElementsReact();
|
79349
|
+
var stateElements = this.getStateElements();
|
79350
|
+
this.disableStateElementsRerenderEvent(((_a = this.prevStateElements) !== null && _a !== void 0 ? _a : []).filter(function (el) { return !stateElements.includes(el); }));
|
79351
|
+
this.prevStateElements = [];
|
79038
79352
|
this.getStateElements().forEach(function (el) {
|
79039
79353
|
el.afterRerender();
|
79040
79354
|
});
|
@@ -79049,6 +79363,7 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
79049
79363
|
SurveyElementBase.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
79050
79364
|
if (this._allowComponentUpdate) {
|
79051
79365
|
this.unMakeBaseElementsReact();
|
79366
|
+
this.prevStateElements = this.getStateElements();
|
79052
79367
|
}
|
79053
79368
|
return this._allowComponentUpdate;
|
79054
79369
|
};
|
@@ -79116,10 +79431,14 @@ var reactquestion_element_SurveyElementBase = /** @class */ (function (_super) {
|
|
79116
79431
|
SurveyElementBase.prototype.unMakeBaseElementsReact = function () {
|
79117
79432
|
var els = this.getStateElements();
|
79118
79433
|
for (var i = 0; i < els.length; i++) {
|
79119
|
-
els[i].disableOnElementRenderedEvent();
|
79120
79434
|
this.unMakeBaseElementReact(els[i]);
|
79121
79435
|
}
|
79122
79436
|
};
|
79437
|
+
SurveyElementBase.prototype.disableStateElementsRerenderEvent = function (els) {
|
79438
|
+
els.forEach(function (el) {
|
79439
|
+
el.disableOnElementRenderedEvent();
|
79440
|
+
});
|
79441
|
+
};
|
79123
79442
|
SurveyElementBase.prototype.getStateElements = function () {
|
79124
79443
|
var el = this.getStateElement();
|
79125
79444
|
return !!el ? [el] : [];
|
@@ -79904,7 +80223,7 @@ var action_bar_item_SurveyActionBarItem = /** @class */ (function (_super) {
|
|
79904
80223
|
var title = this.item.tooltip || this.item.title;
|
79905
80224
|
var buttonContent = this.renderButtonContent();
|
79906
80225
|
var tabIndex = this.item.disableTabStop ? -1 : undefined;
|
79907
|
-
var button = attachKey2click(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: function () { return _this.item.doMouseDown(); }, onFocus: function (args) { return _this.item.doFocus(args); }, onClick: function (args) { return _this.item.doAction(args); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
|
80226
|
+
var button = attachKey2click(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: function (args) { return _this.item.doMouseDown(args); }, onFocus: function (args) { return _this.item.doFocus(args); }, onClick: function (args) { return _this.item.doAction(args); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
|
79908
80227
|
return button;
|
79909
80228
|
};
|
79910
80229
|
return SurveyActionBarItem;
|
@@ -82264,7 +82583,7 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
|
|
82264
82583
|
var _this = this;
|
82265
82584
|
if (this.question.hasHeadItems) {
|
82266
82585
|
return this.question.headItems.map(function (item, ii) {
|
82267
|
-
return _this.renderItem(
|
82586
|
+
return _this.renderItem(item, false, _this.question.cssClasses);
|
82268
82587
|
});
|
82269
82588
|
}
|
82270
82589
|
};
|
@@ -82272,7 +82591,7 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
|
|
82272
82591
|
var _this = this;
|
82273
82592
|
if (this.question.hasFootItems) {
|
82274
82593
|
return this.question.footItems.map(function (item, ii) {
|
82275
|
-
return _this.renderItem(
|
82594
|
+
return _this.renderItem(item, false, _this.question.cssClasses);
|
82276
82595
|
});
|
82277
82596
|
}
|
82278
82597
|
};
|
@@ -82283,7 +82602,7 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
|
|
82283
82602
|
var _this = this;
|
82284
82603
|
return this.question.columns.map(function (column, ci) {
|
82285
82604
|
var items = column.map(function (item, ii) {
|
82286
|
-
return _this.renderItem(
|
82605
|
+
return _this.renderItem(item, ci === 0 && ii === 0, cssClasses, "" + ci + ii);
|
82287
82606
|
});
|
82288
82607
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
|
82289
82608
|
});
|
@@ -82299,8 +82618,8 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
|
|
82299
82618
|
var renderedItems = [];
|
82300
82619
|
for (var i = 0; i < choices.length; i++) {
|
82301
82620
|
var item = choices[i];
|
82302
|
-
var key = "item" +
|
82303
|
-
var renderedItem = this.renderItem(
|
82621
|
+
var key = "item" + item.value;
|
82622
|
+
var renderedItem = this.renderItem(item, i == 0, cssClasses, "" + i);
|
82304
82623
|
if (!!renderedItem) {
|
82305
82624
|
renderedItems.push(renderedItem);
|
82306
82625
|
}
|
@@ -82319,9 +82638,9 @@ var reactquestion_checkbox_SurveyQuestionCheckbox = /** @class */ (function (_su
|
|
82319
82638
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.question.getCommentAreaCss(true) },
|
82320
82639
|
external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode })));
|
82321
82640
|
};
|
82322
|
-
SurveyQuestionCheckbox.prototype.renderItem = function (
|
82641
|
+
SurveyQuestionCheckbox.prototype.renderItem = function (item, isFirst, cssClasses, index) {
|
82323
82642
|
var renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
82324
|
-
key:
|
82643
|
+
key: item.value,
|
82325
82644
|
question: this.question,
|
82326
82645
|
cssClasses: cssClasses,
|
82327
82646
|
isDisplayMode: this.isDisplayMode,
|
@@ -82347,6 +82666,7 @@ var reactquestion_checkbox_SurveyQuestionCheckboxItem = /** @class */ (function
|
|
82347
82666
|
_this.handleOnChange = function (event) {
|
82348
82667
|
_this.question.clickItemHandler(_this.item, event.target.checked);
|
82349
82668
|
};
|
82669
|
+
_this.rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"]();
|
82350
82670
|
return _this;
|
82351
82671
|
}
|
82352
82672
|
SurveyQuestionCheckboxItem.prototype.getStateElement = function () {
|
@@ -82394,11 +82714,20 @@ var reactquestion_checkbox_SurveyQuestionCheckboxItem = /** @class */ (function
|
|
82394
82714
|
enumerable: false,
|
82395
82715
|
configurable: true
|
82396
82716
|
});
|
82717
|
+
SurveyQuestionCheckboxItem.prototype.componentDidUpdate = function (prevProps, prevState) {
|
82718
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
82719
|
+
if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
|
82720
|
+
if (this.props.item) {
|
82721
|
+
this.props.item.setRootElement(this.rootRef.current);
|
82722
|
+
}
|
82723
|
+
if (prevProps.item) {
|
82724
|
+
prevProps.item.setRootElement(undefined);
|
82725
|
+
}
|
82726
|
+
}
|
82727
|
+
};
|
82397
82728
|
SurveyQuestionCheckboxItem.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
82398
82729
|
if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
|
82399
82730
|
return false;
|
82400
|
-
if (!this.question)
|
82401
|
-
return false;
|
82402
82731
|
return (!this.question.customWidget ||
|
82403
82732
|
!!this.question.customWidgetData.isNeedRender ||
|
82404
82733
|
!!this.question.customWidget.widgetJson.isDefaultRender ||
|
@@ -82423,7 +82752,7 @@ var reactquestion_checkbox_SurveyQuestionCheckboxItem = /** @class */ (function
|
|
82423
82752
|
var itemClass = this.question.getItemClass(this.item);
|
82424
82753
|
var labelClass = this.question.getLabelClass(this.item);
|
82425
82754
|
var itemLabel = !this.hideCaption ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
82426
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: itemClass, role: "presentation" },
|
82755
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: itemClass, role: "presentation", ref: this.rootRef },
|
82427
82756
|
external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("label", { className: labelClass },
|
82428
82757
|
external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, required: this.question.hasRequiredError() }),
|
82429
82758
|
this.cssClasses.materialDecorator ?
|
@@ -82435,6 +82764,18 @@ var reactquestion_checkbox_SurveyQuestionCheckboxItem = /** @class */ (function
|
|
82435
82764
|
itemLabel),
|
82436
82765
|
otherItem));
|
82437
82766
|
};
|
82767
|
+
SurveyQuestionCheckboxItem.prototype.componentDidMount = function () {
|
82768
|
+
_super.prototype.componentDidMount.call(this);
|
82769
|
+
if (!this.question.isDesignMode) {
|
82770
|
+
this.item.setRootElement(this.rootRef.current);
|
82771
|
+
}
|
82772
|
+
};
|
82773
|
+
SurveyQuestionCheckboxItem.prototype.componentWillUnmount = function () {
|
82774
|
+
_super.prototype.componentWillUnmount.call(this);
|
82775
|
+
if (!this.question.isDesignMode) {
|
82776
|
+
this.item.setRootElement(undefined);
|
82777
|
+
}
|
82778
|
+
};
|
82438
82779
|
return SurveyQuestionCheckboxItem;
|
82439
82780
|
}(ReactSurveyElement));
|
82440
82781
|
|
@@ -82959,10 +83300,10 @@ var tagbox_filter_TagboxFilterString = /** @class */ (function (_super) {
|
|
82959
83300
|
this.model.inputKeyHandler(e);
|
82960
83301
|
};
|
82961
83302
|
TagboxFilterString.prototype.onBlur = function (e) {
|
82962
|
-
this.
|
83303
|
+
this.question.onBlur(e);
|
82963
83304
|
};
|
82964
83305
|
TagboxFilterString.prototype.onFocus = function (e) {
|
82965
|
-
this.
|
83306
|
+
this.question.onFocus(e);
|
82966
83307
|
};
|
82967
83308
|
TagboxFilterString.prototype.getStateElement = function () {
|
82968
83309
|
return this.model;
|
@@ -84177,7 +84518,7 @@ var reactquestion_radiogroup_SurveyQuestionRadiogroup = /** @class */ (function
|
|
84177
84518
|
var _this = this;
|
84178
84519
|
if (this.question.hasFootItems) {
|
84179
84520
|
return this.question.footItems.map(function (item, ii) {
|
84180
|
-
return _this.renderItem(
|
84521
|
+
return _this.renderItem(item, false, _this.question.cssClasses);
|
84181
84522
|
});
|
84182
84523
|
}
|
84183
84524
|
};
|
@@ -84189,7 +84530,7 @@ var reactquestion_radiogroup_SurveyQuestionRadiogroup = /** @class */ (function
|
|
84189
84530
|
var value = this.getStateValue();
|
84190
84531
|
return this.question.columns.map(function (column, ci) {
|
84191
84532
|
var items = column.map(function (item, ii) {
|
84192
|
-
return _this.renderItem(
|
84533
|
+
return _this.renderItem(item, value, cssClasses, "" + ci + ii);
|
84193
84534
|
});
|
84194
84535
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { key: "column" + ci + _this.question.getItemsColumnKey(column), className: _this.question.getColumnClass(), role: "presentation" }, items));
|
84195
84536
|
});
|
@@ -84206,7 +84547,7 @@ var reactquestion_radiogroup_SurveyQuestionRadiogroup = /** @class */ (function
|
|
84206
84547
|
var value = this.getStateValue();
|
84207
84548
|
for (var i = 0; i < choices.length; i++) {
|
84208
84549
|
var item = choices[i];
|
84209
|
-
var renderedItem = this.renderItem(
|
84550
|
+
var renderedItem = this.renderItem(item, value, cssClasses, "" + i);
|
84210
84551
|
items.push(renderedItem);
|
84211
84552
|
}
|
84212
84553
|
return items;
|
@@ -84222,9 +84563,9 @@ var reactquestion_radiogroup_SurveyQuestionRadiogroup = /** @class */ (function
|
|
84222
84563
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: this.question.getCommentAreaCss(true) },
|
84223
84564
|
external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](SurveyQuestionOtherValueItem, { question: this.question, otherCss: cssClasses.other, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode })));
|
84224
84565
|
};
|
84225
|
-
SurveyQuestionRadiogroup.prototype.renderItem = function (
|
84566
|
+
SurveyQuestionRadiogroup.prototype.renderItem = function (item, value, cssClasses, index) {
|
84226
84567
|
var renderedItem = ReactElementFactory.Instance.createElement(this.question.itemComponent, {
|
84227
|
-
key:
|
84568
|
+
key: item.value,
|
84228
84569
|
question: this.question,
|
84229
84570
|
cssClasses: cssClasses,
|
84230
84571
|
isDisplayMode: this.isDisplayMode,
|
@@ -84250,6 +84591,7 @@ var reactquestion_radiogroup_SurveyQuestionRadioItem = /** @class */ (function (
|
|
84250
84591
|
reactquestion_radiogroup_extends(SurveyQuestionRadioItem, _super);
|
84251
84592
|
function SurveyQuestionRadioItem(props) {
|
84252
84593
|
var _this = _super.call(this, props) || this;
|
84594
|
+
_this.rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"]();
|
84253
84595
|
_this.handleOnChange = _this.handleOnChange.bind(_this);
|
84254
84596
|
_this.handleOnMouseDown = _this.handleOnMouseDown.bind(_this);
|
84255
84597
|
return _this;
|
@@ -84318,12 +84660,23 @@ var reactquestion_radiogroup_SurveyQuestionRadioItem = /** @class */ (function (
|
|
84318
84660
|
SurveyQuestionRadioItem.prototype.canRender = function () {
|
84319
84661
|
return !!this.question && !!this.item;
|
84320
84662
|
};
|
84663
|
+
SurveyQuestionRadioItem.prototype.componentDidUpdate = function (prevProps, prevState) {
|
84664
|
+
_super.prototype.componentDidUpdate.call(this, prevProps, prevState);
|
84665
|
+
if (prevProps.item !== this.props.item && !this.question.isDesignMode) {
|
84666
|
+
if (this.props.item) {
|
84667
|
+
this.props.item.setRootElement(this.rootRef.current);
|
84668
|
+
}
|
84669
|
+
if (prevProps.item) {
|
84670
|
+
prevProps.item.setRootElement(undefined);
|
84671
|
+
}
|
84672
|
+
}
|
84673
|
+
};
|
84321
84674
|
SurveyQuestionRadioItem.prototype.renderElement = function () {
|
84322
84675
|
var itemClass = this.question.getItemClass(this.item);
|
84323
84676
|
var labelClass = this.question.getLabelClass(this.item);
|
84324
84677
|
var controlLabelClass = this.question.getControlLabelClass(this.item);
|
84325
84678
|
var itemLabel = !this.hideCaption ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
|
84326
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: itemClass, role: "presentation" },
|
84679
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: itemClass, role: "presentation", ref: this.rootRef },
|
84327
84680
|
external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
|
84328
84681
|
external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange }),
|
84329
84682
|
this.cssClasses.materialDecorator ?
|
@@ -84334,6 +84687,18 @@ var reactquestion_radiogroup_SurveyQuestionRadioItem = /** @class */ (function (
|
|
84334
84687
|
null,
|
84335
84688
|
itemLabel)));
|
84336
84689
|
};
|
84690
|
+
SurveyQuestionRadioItem.prototype.componentDidMount = function () {
|
84691
|
+
_super.prototype.componentDidMount.call(this);
|
84692
|
+
if (!this.question.isDesignMode) {
|
84693
|
+
this.item.setRootElement(this.rootRef.current);
|
84694
|
+
}
|
84695
|
+
};
|
84696
|
+
SurveyQuestionRadioItem.prototype.componentWillUnmount = function () {
|
84697
|
+
_super.prototype.componentWillUnmount.call(this);
|
84698
|
+
if (!this.question.isDesignMode) {
|
84699
|
+
this.item.setRootElement(undefined);
|
84700
|
+
}
|
84701
|
+
};
|
84337
84702
|
return SurveyQuestionRadioItem;
|
84338
84703
|
}(ReactSurveyElement));
|
84339
84704
|
|
@@ -84791,6 +85156,9 @@ var drag_drop_icon_SurveyQuestionMatrixDynamicDragDropIcon = /** @class */ (func
|
|
84791
85156
|
configurable: true
|
84792
85157
|
});
|
84793
85158
|
SurveyQuestionMatrixDynamicDragDropIcon.prototype.renderElement = function () {
|
85159
|
+
return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", null, this.renderIcon());
|
85160
|
+
};
|
85161
|
+
SurveyQuestionMatrixDynamicDragDropIcon.prototype.renderIcon = function () {
|
84794
85162
|
if (this.question.iconDragElement) {
|
84795
85163
|
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("svg", { className: this.question.cssClasses.dragElementDecorator },
|
84796
85164
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("use", { xlinkHref: this.question.iconDragElement })));
|
@@ -85421,7 +85789,7 @@ var paneldynamic_add_btn_SurveyQuestionPanelDynamicAddButton = /** @class */ (fu
|
|
85421
85789
|
if (!this.question.canAddPanel)
|
85422
85790
|
return null;
|
85423
85791
|
var btnText = this.renderLocString(this.question.locPanelAddText);
|
85424
|
-
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { type: "button", className: this.question.getAddButtonCss(), onClick: this.handleClick },
|
85792
|
+
return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("button", { type: "button", id: this.question.addButtonId, className: this.question.getAddButtonCss(), onClick: this.handleClick },
|
85425
85793
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
|
85426
85794
|
};
|
85427
85795
|
return SurveyQuestionPanelDynamicAddButton;
|
@@ -85993,7 +86361,7 @@ var list_item_ListItem = /** @class */ (function (_super) {
|
|
85993
86361
|
paddingInlineStart: this.model.getItemIndent(this.item)
|
85994
86362
|
};
|
85995
86363
|
var className = this.model.getItemClass(this.item);
|
85996
|
-
var itemContent = this.item.component ||
|
86364
|
+
var itemContent = this.item.component || this.model.itemComponent;
|
85997
86365
|
var newElement = ReactElementFactory.Instance.createElement(itemContent, { item: this.item, key: this.item.id, model: this.model });
|
85998
86366
|
var contentWrap = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText, onMouseOver: function (event) { _this.model.onItemHover(_this.item); }, onMouseLeave: function (event) { _this.model.onItemLeave(_this.item); } }, newElement);
|
85999
86367
|
var separator = this.item.needSeparator ? external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;
|