survey-core 1.9.136 → 1.9.137
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 +333 -9
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +333 -9
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js +1 -1
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +2 -2
- package/i18n/german.js.map +1 -1
- package/i18n/german.min.js +2 -2
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +2 -2
- package/i18n/hebrew.js.map +1 -1
- package/i18n/hebrew.min.js +2 -2
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +3 -3
- package/i18n/index.js.map +1 -1
- package/i18n/index.min.js +2 -2
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js +1 -1
- package/i18n/kazakh.js +1 -1
- package/i18n/kazakh.min.js +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js +1 -1
- package/i18n/latvian.js +1 -1
- package/i18n/latvian.min.js +1 -1
- package/i18n/lithuanian.js +1 -1
- package/i18n/lithuanian.min.js +1 -1
- package/i18n/macedonian.js +1 -1
- package/i18n/macedonian.min.js +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js +1 -1
- package/i18n/nl-BE.js +1 -1
- package/i18n/nl-BE.min.js +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js +1 -1
- package/i18n/portuguese-br.js +1 -1
- package/i18n/portuguese-br.min.js +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js +1 -1
- package/i18n/serbian.js +1 -1
- package/i18n/serbian.min.js +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js +1 -1
- package/i18n/swahili.js +1 -1
- package/i18n/swahili.min.js +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js +1 -1
- package/i18n/telugu.js +1 -1
- package/i18n/telugu.min.js +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js +1 -1
- package/i18n/ukrainian.js +1 -1
- package/i18n/ukrainian.min.js +1 -1
- package/i18n/urdu.js +1 -1
- package/i18n/urdu.min.js +1 -1
- package/i18n/vietnamese.js +1 -1
- package/i18n/vietnamese.min.js +1 -1
- package/i18n/welsh.js +1 -1
- package/i18n/welsh.min.js +1 -1
- package/modern.css +187 -1
- package/modern.css.map +1 -1
- package/modern.fontless.css +187 -1
- package/modern.fontless.css.map +1 -1
- package/modern.fontless.min.css +2 -2
- package/modern.min.css +2 -2
- package/package.json +1 -1
- package/plugins/bootstrap-integration.js +1 -1
- package/plugins/bootstrap-integration.min.js +1 -1
- package/plugins/bootstrap-material-integration.js +1 -1
- package/plugins/bootstrap-material-integration.min.js +1 -1
- package/survey.core.js +1096 -178
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +1 -1
- package/survey.css.map +1 -1
- package/survey.i18n.js +3 -3
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +2 -2
- package/survey.min.css +1 -1
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/base.d.ts +4 -4
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +14 -0
- package/ts3.4/typings/dragdrop/ranking-choices.d.ts +1 -1
- package/ts3.4/typings/dragdrop/ranking-select-to-rank.d.ts +6 -3
- package/ts3.4/typings/entries/core-wo-model.d.ts +1 -0
- package/ts3.4/typings/panel.d.ts +17 -4
- package/ts3.4/typings/popup-view-model.d.ts +14 -5
- package/ts3.4/typings/question_custom.d.ts +9 -0
- package/ts3.4/typings/question_matrixdropdowncolumn.d.ts +1 -2
- package/ts3.4/typings/question_multipletext.d.ts +67 -20
- package/ts3.4/typings/question_ranking.d.ts +12 -3
- package/ts3.4/typings/question_text.d.ts +2 -0
- package/ts3.4/typings/survey-element.d.ts +12 -1
- package/ts3.4/typings/utils/animation.d.ts +54 -0
- package/ts3.4/typings/utils/taskmanager.d.ts +28 -0
- package/typings/base.d.ts +4 -4
- package/typings/defaultCss/defaultV2Css.d.ts +14 -0
- package/typings/dragdrop/ranking-choices.d.ts +1 -1
- package/typings/dragdrop/ranking-select-to-rank.d.ts +6 -3
- package/typings/entries/core-wo-model.d.ts +1 -0
- package/typings/panel.d.ts +18 -3
- package/typings/popup-view-model.d.ts +15 -5
- package/typings/question_custom.d.ts +9 -0
- package/typings/question_matrixdropdowncolumn.d.ts +1 -2
- package/typings/question_multipletext.d.ts +70 -20
- package/typings/question_ranking.d.ts +12 -1
- package/typings/question_text.d.ts +2 -0
- package/typings/survey-element.d.ts +15 -1
- package/typings/utils/animation.d.ts +50 -0
- package/typings/utils/taskmanager.d.ts +28 -0
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.9.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.9.137
|
|
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
|
*/
|
|
@@ -2222,6 +2222,8 @@ var Base = /** @class */ (function () {
|
|
|
2222
2222
|
* @param val A new value for the property.
|
|
2223
2223
|
*/
|
|
2224
2224
|
Base.prototype.setPropertyValue = function (name, val) {
|
|
2225
|
+
if (name) {
|
|
2226
|
+
}
|
|
2225
2227
|
if (!this.isLoadingFromJson) {
|
|
2226
2228
|
var prop = this.getPropertyByName(name);
|
|
2227
2229
|
if (!!prop) {
|
|
@@ -2283,7 +2285,7 @@ var Base = /** @class */ (function () {
|
|
|
2283
2285
|
return;
|
|
2284
2286
|
for (var i = 0; i < this.onPropChangeFunctions.length; i++) {
|
|
2285
2287
|
if (this.onPropChangeFunctions[i].name == name)
|
|
2286
|
-
this.onPropChangeFunctions[i].func(newValue);
|
|
2288
|
+
this.onPropChangeFunctions[i].func(newValue, arrayChanges);
|
|
2287
2289
|
}
|
|
2288
2290
|
};
|
|
2289
2291
|
Base.prototype.onBindingChanged = function (oldValue, newValue) {
|
|
@@ -5419,9 +5421,13 @@ var defaultV2Css = {
|
|
|
5419
5421
|
next: "sd-navigation__next-btn",
|
|
5420
5422
|
start: "sd-navigation__start-btn",
|
|
5421
5423
|
preview: "sd-navigation__preview-btn",
|
|
5422
|
-
edit: "",
|
|
5424
|
+
edit: "sd-btn sd-btn--small",
|
|
5423
5425
|
},
|
|
5424
5426
|
panel: {
|
|
5427
|
+
contentFadeIn: "sd-element__content--fade-in",
|
|
5428
|
+
contentFadeOut: "sd-element__content--fade-out",
|
|
5429
|
+
fadeIn: "sd-element-wrapper--fade-in",
|
|
5430
|
+
fadeOut: "sd-element-wrapper--fade-out",
|
|
5425
5431
|
asPage: "sd-panel--as-page",
|
|
5426
5432
|
number: "sd-element__num",
|
|
5427
5433
|
title: "sd-title sd-element__title sd-panel__title",
|
|
@@ -5436,7 +5442,7 @@ var defaultV2Css = {
|
|
|
5436
5442
|
description: "sd-description sd-panel__description",
|
|
5437
5443
|
container: "sd-element sd-element--complex sd-panel sd-row__panel",
|
|
5438
5444
|
withFrame: "sd-element--with-frame",
|
|
5439
|
-
content: "sd-panel__content",
|
|
5445
|
+
content: "sd-element__content sd-panel__content",
|
|
5440
5446
|
icon: "sd-panel__icon",
|
|
5441
5447
|
iconExpanded: "sd-panel__icon--expanded",
|
|
5442
5448
|
footer: "sd-panel__footer",
|
|
@@ -5444,6 +5450,8 @@ var defaultV2Css = {
|
|
|
5444
5450
|
header: "sd-panel__header sd-element__header sd-element__header--location-top",
|
|
5445
5451
|
collapsed: "sd-element--collapsed",
|
|
5446
5452
|
expanded: "sd-element--expanded",
|
|
5453
|
+
expandable: "sd-element--expandable",
|
|
5454
|
+
expandableAnimating: "sd-elemenet--expandable--animating",
|
|
5447
5455
|
nested: "sd-element--nested sd-element--nested-with-borders",
|
|
5448
5456
|
invisible: "sd-element--invisible",
|
|
5449
5457
|
navigationButton: "",
|
|
@@ -5531,8 +5539,14 @@ var defaultV2Css = {
|
|
|
5531
5539
|
row: "sd-row sd-clearfix",
|
|
5532
5540
|
rowMultiple: "sd-row--multiple",
|
|
5533
5541
|
rowCompact: "sd-row--compact",
|
|
5542
|
+
rowFadeIn: "sd-row--fade-in",
|
|
5543
|
+
rowFadeOut: "sd-row--fade-out",
|
|
5534
5544
|
pageRow: "sd-page__row",
|
|
5535
5545
|
question: {
|
|
5546
|
+
contentFadeIn: "sd-element__content--fade-in",
|
|
5547
|
+
contentFadeOut: "sd-element__content--fade-out",
|
|
5548
|
+
fadeIn: "sd-element-wrapper--fade-in",
|
|
5549
|
+
fadeOut: "sd-element-wrapper--fade-out",
|
|
5536
5550
|
mainRoot: "sd-element sd-question sd-row__question",
|
|
5537
5551
|
flowRoot: "sd-element sd-question sd-row__question sd-row__question--flow",
|
|
5538
5552
|
withFrame: "sd-element--with-frame",
|
|
@@ -5542,7 +5556,7 @@ var defaultV2Css = {
|
|
|
5542
5556
|
headerLeft: "sd-question__header--location--left",
|
|
5543
5557
|
headerTop: "sd-question__header--location-top sd-element__header--location-top",
|
|
5544
5558
|
headerBottom: "sd-question__header--location--bottom",
|
|
5545
|
-
content: "sd-question__content",
|
|
5559
|
+
content: "sd-element__content sd-question__content",
|
|
5546
5560
|
contentSupportContainerQueries: "sd-question__content--support-container-queries",
|
|
5547
5561
|
contentLeft: "sd-question__content--left",
|
|
5548
5562
|
titleNumInline: "sd-element__title--num-inline",
|
|
@@ -5575,6 +5589,8 @@ var defaultV2Css = {
|
|
|
5575
5589
|
hasErrorTop: "sd-question--error-top",
|
|
5576
5590
|
hasErrorBottom: "sd-question--error-bottom",
|
|
5577
5591
|
collapsed: "sd-element--collapsed",
|
|
5592
|
+
expandable: "sd-element--expandable",
|
|
5593
|
+
expandableAnimating: "sd-elemenet--expandable--animating",
|
|
5578
5594
|
expanded: "sd-element--expanded",
|
|
5579
5595
|
nested: "sd-element--nested",
|
|
5580
5596
|
invisible: "sd-element--invisible",
|
|
@@ -6771,8 +6787,6 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6771
6787
|
DragDropChoices.prototype.afterDragOver = function (dropTargetNode) {
|
|
6772
6788
|
if (this.isDropTargetDoesntChanged(this.isBottom))
|
|
6773
6789
|
return;
|
|
6774
|
-
if (this.dropTarget === this.draggedElement)
|
|
6775
|
-
return;
|
|
6776
6790
|
var choices = this.getVisibleChoices();
|
|
6777
6791
|
var dropTargetIndex = choices.indexOf(this.dropTarget);
|
|
6778
6792
|
var draggedElementIndex = choices.indexOf(this.draggedElement);
|
|
@@ -6997,7 +7011,9 @@ var DragDropCore = /** @class */ (function () {
|
|
|
6997
7011
|
return;
|
|
6998
7012
|
this.isBottom = null; //TODO need for property change trigger with guarantee but it would be better not to watch on isBottom property but have some event like onValidTargetDragOver
|
|
6999
7013
|
this.isBottom = isBottom;
|
|
7000
|
-
this.
|
|
7014
|
+
if (this.draggedElement != this.dropTarget) {
|
|
7015
|
+
this.afterDragOver(dropTargetNode);
|
|
7016
|
+
}
|
|
7001
7017
|
this.prevDropTarget = this.dropTarget;
|
|
7002
7018
|
};
|
|
7003
7019
|
DragDropCore.prototype.drop = function () {
|
|
@@ -7466,8 +7482,6 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
|
|
|
7466
7482
|
var _this = this;
|
|
7467
7483
|
if (this.isDropTargetDoesntChanged(this.isBottom))
|
|
7468
7484
|
return;
|
|
7469
|
-
if (this.dropTarget === this.draggedElement)
|
|
7470
|
-
return;
|
|
7471
7485
|
var dropTargetIndex;
|
|
7472
7486
|
var draggedElementIndex;
|
|
7473
7487
|
var draggedRenderedRow;
|
|
@@ -7575,10 +7589,6 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7575
7589
|
var node = _this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item");
|
|
7576
7590
|
node.style.cursor = "not-allowed";
|
|
7577
7591
|
};
|
|
7578
|
-
_this.doDrop = function () {
|
|
7579
|
-
_this.parentElement.setValue();
|
|
7580
|
-
return _this.parentElement;
|
|
7581
|
-
};
|
|
7582
7592
|
return _this;
|
|
7583
7593
|
}
|
|
7584
7594
|
Object.defineProperty(DragDropRankingChoices.prototype, "draggedElementType", {
|
|
@@ -7681,6 +7691,10 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7681
7691
|
this.parentElement.currentDropTarget = this.draggedElement;
|
|
7682
7692
|
_super.prototype.ghostPositionChanged.call(this);
|
|
7683
7693
|
};
|
|
7694
|
+
DragDropRankingChoices.prototype.doDrop = function () {
|
|
7695
|
+
this.parentElement.setValue();
|
|
7696
|
+
return this.parentElement;
|
|
7697
|
+
};
|
|
7684
7698
|
DragDropRankingChoices.prototype.clear = function () {
|
|
7685
7699
|
if (!!this.parentElement) {
|
|
7686
7700
|
this.parentElement.dropTargetNodeMove = null;
|
|
@@ -7705,7 +7719,8 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7705
7719
|
"use strict";
|
|
7706
7720
|
__webpack_require__.r(__webpack_exports__);
|
|
7707
7721
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingSelectToRank", function() { return DragDropRankingSelectToRank; });
|
|
7708
|
-
/* harmony import */ var
|
|
7722
|
+
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../itemvalue */ "./src/itemvalue.ts");
|
|
7723
|
+
/* harmony import */ var _ranking_choices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ranking-choices */ "./src/dragdrop/ranking-choices.ts");
|
|
7709
7724
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
7710
7725
|
var extendStatics = function (d, b) {
|
|
7711
7726
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -7722,10 +7737,37 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
7722
7737
|
};
|
|
7723
7738
|
})();
|
|
7724
7739
|
|
|
7740
|
+
|
|
7725
7741
|
var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
7726
7742
|
__extends(DragDropRankingSelectToRank, _super);
|
|
7727
7743
|
function DragDropRankingSelectToRank() {
|
|
7728
|
-
|
|
7744
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
7745
|
+
_this.selectToRank = function (questionModel, fromIndex, toIndex) {
|
|
7746
|
+
var rankingChoices = [].concat(questionModel.rankingChoices);
|
|
7747
|
+
var unRankingChoices = questionModel.unRankingChoices;
|
|
7748
|
+
var item = unRankingChoices[fromIndex];
|
|
7749
|
+
rankingChoices.splice(toIndex, 0, item);
|
|
7750
|
+
_this.updateChoices(questionModel, rankingChoices);
|
|
7751
|
+
};
|
|
7752
|
+
_this.unselectFromRank = function (questionModel, fromIndex, toIndex) {
|
|
7753
|
+
var rankingChoices = [].concat(questionModel.rankingChoices);
|
|
7754
|
+
rankingChoices.splice(fromIndex, 1);
|
|
7755
|
+
_this.updateChoices(questionModel, rankingChoices);
|
|
7756
|
+
};
|
|
7757
|
+
_this.reorderRankedItem = function (questionModel, fromIndex, toIndex, dropTargetNode) {
|
|
7758
|
+
var rankingChoices = questionModel.rankingChoices;
|
|
7759
|
+
var item = rankingChoices[fromIndex];
|
|
7760
|
+
if (fromIndex == toIndex)
|
|
7761
|
+
return;
|
|
7762
|
+
questionModel.isValueSetByUser = true;
|
|
7763
|
+
rankingChoices.splice(fromIndex, 1);
|
|
7764
|
+
rankingChoices.splice(toIndex, 0, item);
|
|
7765
|
+
questionModel.setPropertyValue("rankingChoices", rankingChoices);
|
|
7766
|
+
if (dropTargetNode) {
|
|
7767
|
+
_this.doUIEffects(dropTargetNode, fromIndex, toIndex);
|
|
7768
|
+
}
|
|
7769
|
+
};
|
|
7770
|
+
return _this;
|
|
7729
7771
|
}
|
|
7730
7772
|
DragDropRankingSelectToRank.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
|
7731
7773
|
if (dragOverNode.dataset.ranking === "from-container" || dragOverNode.dataset.ranking === "to-container") {
|
|
@@ -7779,18 +7821,34 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
7779
7821
|
DragDropRankingSelectToRank.prototype.doRankBetween = function (dropTargetNode, fromChoicesArray, toChoicesArray, rankFunction) {
|
|
7780
7822
|
var questionModel = this.parentElement;
|
|
7781
7823
|
var _a = this.getIndixies(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
|
7782
|
-
rankFunction(questionModel, fromIndex, toIndex);
|
|
7783
|
-
this.doUIEffects(dropTargetNode, fromIndex, toIndex);
|
|
7824
|
+
rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
|
|
7784
7825
|
};
|
|
7785
7826
|
DragDropRankingSelectToRank.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
|
|
7786
7827
|
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
|
7787
7828
|
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
|
7788
7829
|
if (toIndex === -1) {
|
|
7789
7830
|
var length_1 = model.value.length;
|
|
7790
|
-
toIndex =
|
|
7831
|
+
toIndex = length_1;
|
|
7832
|
+
}
|
|
7833
|
+
else if (fromChoicesArray == toChoicesArray) {
|
|
7834
|
+
if (!this.isBottom && fromIndex < toIndex)
|
|
7835
|
+
toIndex--;
|
|
7836
|
+
if (this.isBottom && fromIndex > toIndex)
|
|
7837
|
+
toIndex++;
|
|
7838
|
+
}
|
|
7839
|
+
else if (fromChoicesArray != toChoicesArray) {
|
|
7840
|
+
if (this.isBottom)
|
|
7841
|
+
toIndex++;
|
|
7791
7842
|
}
|
|
7792
7843
|
return { fromIndex: fromIndex, toIndex: toIndex };
|
|
7793
7844
|
};
|
|
7845
|
+
DragDropRankingSelectToRank.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
|
|
7846
|
+
if (this.dropTarget instanceof _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"] && this.draggedElement !== this.dropTarget) {
|
|
7847
|
+
var rect = dropTargetNode.getBoundingClientRect();
|
|
7848
|
+
return clientY >= rect.y + rect.height / 2;
|
|
7849
|
+
}
|
|
7850
|
+
return _super.prototype.calculateIsBottom.call(this, clientY);
|
|
7851
|
+
};
|
|
7794
7852
|
DragDropRankingSelectToRank.prototype.doUIEffects = function (dropTargetNode, fromIndex, toIndex) {
|
|
7795
7853
|
var questionModel = this.parentElement;
|
|
7796
7854
|
var isDropToEmptyRankedContainer = this.dropTarget === "to-container" && questionModel.isEmpty();
|
|
@@ -7839,30 +7897,21 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
7839
7897
|
enumerable: false,
|
|
7840
7898
|
configurable: true
|
|
7841
7899
|
});
|
|
7842
|
-
DragDropRankingSelectToRank.prototype.
|
|
7843
|
-
var rankingChoices = questionModel.rankingChoices;
|
|
7844
|
-
var unRankingChoices = questionModel.unRankingChoices;
|
|
7845
|
-
var item = unRankingChoices[fromIndex];
|
|
7846
|
-
questionModel.isValueSetByUser = true;
|
|
7847
|
-
rankingChoices.splice(toIndex, 0, item);
|
|
7848
|
-
questionModel.setPropertyValue("rankingChoices", rankingChoices);
|
|
7849
|
-
};
|
|
7850
|
-
DragDropRankingSelectToRank.prototype.unselectFromRank = function (questionModel, fromIndex, toIndex) {
|
|
7851
|
-
var rankingChoices = questionModel.rankingChoices;
|
|
7900
|
+
DragDropRankingSelectToRank.prototype.updateChoices = function (questionModel, rankingChoices) {
|
|
7852
7901
|
questionModel.isValueSetByUser = true;
|
|
7853
|
-
rankingChoices
|
|
7854
|
-
questionModel.
|
|
7902
|
+
questionModel.rankingChoices = rankingChoices;
|
|
7903
|
+
questionModel.updateUnRankingChoices(rankingChoices);
|
|
7855
7904
|
};
|
|
7856
|
-
DragDropRankingSelectToRank.prototype.
|
|
7857
|
-
var
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7905
|
+
DragDropRankingSelectToRank.prototype.clear = function () {
|
|
7906
|
+
var questionModel = this.parentElement;
|
|
7907
|
+
if (!!questionModel) {
|
|
7908
|
+
questionModel.rankingChoicesAnimation.cancel();
|
|
7909
|
+
questionModel.unRankingChoicesAnimation.cancel();
|
|
7910
|
+
}
|
|
7911
|
+
_super.prototype.clear.call(this);
|
|
7863
7912
|
};
|
|
7864
7913
|
return DragDropRankingSelectToRank;
|
|
7865
|
-
}(
|
|
7914
|
+
}(_ranking_choices__WEBPACK_IMPORTED_MODULE_1__["DragDropRankingChoices"]));
|
|
7866
7915
|
|
|
7867
7916
|
|
|
7868
7917
|
|
|
@@ -9510,8 +9559,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9510
9559
|
|
|
9511
9560
|
var Version;
|
|
9512
9561
|
var ReleaseDate;
|
|
9513
|
-
Version = "" + "1.9.
|
|
9514
|
-
ReleaseDate = "" + "2024-
|
|
9562
|
+
Version = "" + "1.9.137";
|
|
9563
|
+
ReleaseDate = "" + "2024-04-02";
|
|
9515
9564
|
function checkLibraryVersion(ver, libraryName) {
|
|
9516
9565
|
if (Version != ver) {
|
|
9517
9566
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -9692,7 +9741,7 @@ function checkPrefix(prefix) {
|
|
|
9692
9741
|
/*!**************************************!*\
|
|
9693
9742
|
!*** ./src/entries/core-wo-model.ts ***!
|
|
9694
9743
|
\**************************************/
|
|
9695
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper */
|
|
9744
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationBoolean, AnimationGroup, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper */
|
|
9696
9745
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9697
9746
|
|
|
9698
9747
|
"use strict";
|
|
@@ -10137,16 +10186,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10137
10186
|
|
|
10138
10187
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_7__["ActionDropdownViewModel"]; });
|
|
10139
10188
|
|
|
10140
|
-
/* harmony import */ var
|
|
10141
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
10189
|
+
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/animation */ "./src/utils/animation.ts");
|
|
10190
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationUtils", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationUtils"]; });
|
|
10191
|
+
|
|
10192
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationPropertyUtils", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationPropertyUtils"]; });
|
|
10142
10193
|
|
|
10143
|
-
/* harmony
|
|
10144
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_9__["defaultActionBarCss"]; });
|
|
10194
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationGroupUtils"]; });
|
|
10145
10195
|
|
|
10146
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "
|
|
10196
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationBoolean"]; });
|
|
10147
10197
|
|
|
10148
|
-
/* harmony
|
|
10149
|
-
|
|
10198
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationGroup"]; });
|
|
10199
|
+
|
|
10200
|
+
/* harmony import */ var _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../actions/adaptive-container */ "./src/actions/adaptive-container.ts");
|
|
10201
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return _actions_adaptive_container__WEBPACK_IMPORTED_MODULE_9__["AdaptiveActionContainer"]; });
|
|
10202
|
+
|
|
10203
|
+
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../actions/container */ "./src/actions/container.ts");
|
|
10204
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_10__["defaultActionBarCss"]; });
|
|
10205
|
+
|
|
10206
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionContainer", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_10__["ActionContainer"]; });
|
|
10207
|
+
|
|
10208
|
+
/* harmony import */ var _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/dragOrClickHelper */ "./src/utils/dragOrClickHelper.ts");
|
|
10209
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragOrClickHelper", function() { return _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__["DragOrClickHelper"]; });
|
|
10150
10210
|
|
|
10151
10211
|
// model
|
|
10152
10212
|
|
|
@@ -10165,13 +10225,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10165
10225
|
|
|
10166
10226
|
|
|
10167
10227
|
|
|
10228
|
+
|
|
10168
10229
|
/***/ }),
|
|
10169
10230
|
|
|
10170
10231
|
/***/ "./src/entries/core.ts":
|
|
10171
10232
|
/*!*****************************!*\
|
|
10172
10233
|
!*** ./src/entries/core.ts ***!
|
|
10173
10234
|
\*****************************/
|
|
10174
|
-
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
10235
|
+
/*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, StylesManager, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationBoolean, AnimationGroup, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
10175
10236
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10176
10237
|
|
|
10177
10238
|
"use strict";
|
|
@@ -10609,6 +10670,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10609
10670
|
|
|
10610
10671
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ActionDropdownViewModel"]; });
|
|
10611
10672
|
|
|
10673
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationUtils", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationUtils"]; });
|
|
10674
|
+
|
|
10675
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationPropertyUtils", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationPropertyUtils"]; });
|
|
10676
|
+
|
|
10677
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationGroupUtils"]; });
|
|
10678
|
+
|
|
10679
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationBoolean"]; });
|
|
10680
|
+
|
|
10681
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AnimationGroup"]; });
|
|
10682
|
+
|
|
10612
10683
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AdaptiveActionContainer"]; });
|
|
10613
10684
|
|
|
10614
10685
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["defaultActionBarCss"]; });
|
|
@@ -21476,7 +21547,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21476
21547
|
var InputElementAdapter = /** @class */ (function () {
|
|
21477
21548
|
function InputElementAdapter(inputMaskInstance, inputElement, value) {
|
|
21478
21549
|
var _this = this;
|
|
21479
|
-
if (value === void 0) { value = ""; }
|
|
21480
21550
|
this.inputMaskInstance = inputMaskInstance;
|
|
21481
21551
|
this.inputElement = inputElement;
|
|
21482
21552
|
this.prevUnmaskedValue = undefined;
|
|
@@ -21495,8 +21565,15 @@ var InputElementAdapter = /** @class */ (function () {
|
|
|
21495
21565
|
event.preventDefault();
|
|
21496
21566
|
}
|
|
21497
21567
|
};
|
|
21498
|
-
|
|
21499
|
-
|
|
21568
|
+
var _value = value;
|
|
21569
|
+
if (_value === null || _value === undefined) {
|
|
21570
|
+
_value = "";
|
|
21571
|
+
}
|
|
21572
|
+
else if (typeof _value !== "string") {
|
|
21573
|
+
_value = _value.toString();
|
|
21574
|
+
}
|
|
21575
|
+
this.inputElement.value = inputMaskInstance.getMaskedValue(_value);
|
|
21576
|
+
this.prevUnmaskedValue = _value;
|
|
21500
21577
|
inputMaskInstance.onPropertyChanged.add(this.inputMaskInstancePropertyChangedHandler);
|
|
21501
21578
|
this.addInputEventListener();
|
|
21502
21579
|
}
|
|
@@ -23146,7 +23223,7 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
23146
23223
|
configurable: true
|
|
23147
23224
|
});
|
|
23148
23225
|
PageModel.prototype.calcCssClasses = function (css) {
|
|
23149
|
-
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
23226
|
+
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "", rowFadeOutActive: "" };
|
|
23150
23227
|
this.copyCssClasses(classes.page, css.page);
|
|
23151
23228
|
this.copyCssClasses(classes.error, css.error);
|
|
23152
23229
|
if (!!css.pageTitle) {
|
|
@@ -23167,6 +23244,15 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
23167
23244
|
if (!!css.rowCompact) {
|
|
23168
23245
|
classes.rowCompact = css.rowCompact;
|
|
23169
23246
|
}
|
|
23247
|
+
if (!!css.rowFadeIn) {
|
|
23248
|
+
classes.rowFadeIn = css.rowFadeIn;
|
|
23249
|
+
}
|
|
23250
|
+
if (!!css.rowFadeOut) {
|
|
23251
|
+
classes.rowFadeOut = css.rowFadeOut;
|
|
23252
|
+
}
|
|
23253
|
+
if (!!css.rowFadeOutActive) {
|
|
23254
|
+
classes.rowFadeOutActive = css.rowFadeOutActive;
|
|
23255
|
+
}
|
|
23170
23256
|
if (this.survey) {
|
|
23171
23257
|
this.survey.updatePageCssClasses(this, classes);
|
|
23172
23258
|
}
|
|
@@ -23392,7 +23478,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23392
23478
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
23393
23479
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
23394
23480
|
/* harmony import */ var _drag_drop_panel_helper_v1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./drag-drop-panel-helper-v1 */ "./src/drag-drop-panel-helper-v1.ts");
|
|
23395
|
-
/* harmony import */ var
|
|
23481
|
+
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
|
|
23482
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
|
|
23396
23483
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
23397
23484
|
var extendStatics = function (d, b) {
|
|
23398
23485
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -23431,6 +23518,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
|
23431
23518
|
|
|
23432
23519
|
|
|
23433
23520
|
|
|
23521
|
+
|
|
23434
23522
|
var QuestionRowModel = /** @class */ (function (_super) {
|
|
23435
23523
|
__extends(QuestionRowModel, _super);
|
|
23436
23524
|
function QuestionRowModel(panel) {
|
|
@@ -23438,6 +23526,10 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23438
23526
|
_this.panel = panel;
|
|
23439
23527
|
_this._scrollableParent = undefined;
|
|
23440
23528
|
_this._updateVisibility = undefined;
|
|
23529
|
+
_this.visibleElementsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getVisibleElementsAnimationOptions(), function (value) {
|
|
23530
|
+
_this.setPropertyValue("visibleElements", value);
|
|
23531
|
+
_this.setWidth();
|
|
23532
|
+
}, function () { return _this.visibleElements; });
|
|
23441
23533
|
_this.idValue = QuestionRowModel.getRowId();
|
|
23442
23534
|
_this.visible = panel.areInvisibleElementsShowing;
|
|
23443
23535
|
_this.createNewArray("elements");
|
|
@@ -23450,12 +23542,12 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23450
23542
|
QuestionRowModel.prototype.startLazyRendering = function (rowContainerDiv, findScrollableContainer) {
|
|
23451
23543
|
var _this = this;
|
|
23452
23544
|
if (findScrollableContainer === void 0) { findScrollableContainer = _utils_utils__WEBPACK_IMPORTED_MODULE_8__["findScrollableParent"]; }
|
|
23453
|
-
if (!
|
|
23545
|
+
if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].isAvailable())
|
|
23454
23546
|
return;
|
|
23455
23547
|
this._scrollableParent = findScrollableContainer(rowContainerDiv);
|
|
23456
23548
|
// if this._scrollableParent is html the scroll event isn't fired, so we should use window
|
|
23457
|
-
if (this._scrollableParent ===
|
|
23458
|
-
this._scrollableParent =
|
|
23549
|
+
if (this._scrollableParent === _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].getDocumentElement()) {
|
|
23550
|
+
this._scrollableParent = _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomWindowHelper"].getWindow();
|
|
23459
23551
|
}
|
|
23460
23552
|
var hasScroll = this._scrollableParent.scrollHeight > this._scrollableParent.clientHeight;
|
|
23461
23553
|
this.isNeedRender = !hasScroll;
|
|
@@ -23504,6 +23596,9 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23504
23596
|
enumerable: false,
|
|
23505
23597
|
configurable: true
|
|
23506
23598
|
});
|
|
23599
|
+
QuestionRowModel.prototype.equalsCore = function (obj) {
|
|
23600
|
+
return this == obj;
|
|
23601
|
+
};
|
|
23507
23602
|
Object.defineProperty(QuestionRowModel.prototype, "elements", {
|
|
23508
23603
|
get: function () {
|
|
23509
23604
|
return this.getPropertyValue("elements");
|
|
@@ -23511,10 +23606,48 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23511
23606
|
enumerable: false,
|
|
23512
23607
|
configurable: true
|
|
23513
23608
|
});
|
|
23609
|
+
QuestionRowModel.prototype.getVisibleElementsAnimationOptions = function () {
|
|
23610
|
+
var _this = this;
|
|
23611
|
+
var beforeRunAnimation = function (el) {
|
|
23612
|
+
el.style.setProperty("--animation-height", el.offsetHeight + "px");
|
|
23613
|
+
el.style.setProperty("--animation-width", Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["getElementWidth"])(el) + "px");
|
|
23614
|
+
};
|
|
23615
|
+
return {
|
|
23616
|
+
isAnimationEnabled: function () { var _a; return _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].animationEnabled && ((_a = _this.panel) === null || _a === void 0 ? void 0 : _a.animationAllowed) && _this.visible; },
|
|
23617
|
+
getAnimatedElement: function (element) { return element.getWrapperElement(); },
|
|
23618
|
+
getLeaveOptions: function (element) {
|
|
23619
|
+
var surveyElement = element;
|
|
23620
|
+
var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
|
|
23621
|
+
return {
|
|
23622
|
+
cssClass: cssClasses.fadeOut,
|
|
23623
|
+
onBeforeRunAnimation: beforeRunAnimation
|
|
23624
|
+
};
|
|
23625
|
+
},
|
|
23626
|
+
getEnterOptions: function (element) {
|
|
23627
|
+
var surveyElement = element;
|
|
23628
|
+
var cssClasses = element.isPanel ? surveyElement.cssClasses.panel : surveyElement.cssClasses;
|
|
23629
|
+
return {
|
|
23630
|
+
cssClass: cssClasses.fadeIn,
|
|
23631
|
+
onBeforeRunAnimation: beforeRunAnimation
|
|
23632
|
+
};
|
|
23633
|
+
}
|
|
23634
|
+
};
|
|
23635
|
+
};
|
|
23514
23636
|
Object.defineProperty(QuestionRowModel.prototype, "visibleElements", {
|
|
23515
23637
|
get: function () {
|
|
23516
23638
|
return this.getPropertyValue("visibleElements");
|
|
23517
23639
|
},
|
|
23640
|
+
set: function (val) {
|
|
23641
|
+
if (!val.length) {
|
|
23642
|
+
this.visible = false;
|
|
23643
|
+
this.visibleElementsAnimation.cancel();
|
|
23644
|
+
return;
|
|
23645
|
+
}
|
|
23646
|
+
else {
|
|
23647
|
+
this.visible = true;
|
|
23648
|
+
}
|
|
23649
|
+
this.visibleElementsAnimation.sync(val);
|
|
23650
|
+
},
|
|
23518
23651
|
enumerable: false,
|
|
23519
23652
|
configurable: true
|
|
23520
23653
|
});
|
|
@@ -23524,6 +23657,7 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23524
23657
|
},
|
|
23525
23658
|
set: function (val) {
|
|
23526
23659
|
this.setPropertyValue("visible", val);
|
|
23660
|
+
this.onVisibleChangedCallback && this.onVisibleChangedCallback();
|
|
23527
23661
|
},
|
|
23528
23662
|
enumerable: false,
|
|
23529
23663
|
configurable: true
|
|
@@ -23539,9 +23673,14 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23539
23673
|
configurable: true
|
|
23540
23674
|
});
|
|
23541
23675
|
QuestionRowModel.prototype.updateVisible = function () {
|
|
23542
|
-
var
|
|
23543
|
-
this.
|
|
23544
|
-
|
|
23676
|
+
var visElements = [];
|
|
23677
|
+
for (var i = 0; i < this.elements.length; i++) {
|
|
23678
|
+
if (this.elements[i].isVisible) {
|
|
23679
|
+
visElements.push(this.elements[i]);
|
|
23680
|
+
}
|
|
23681
|
+
}
|
|
23682
|
+
this.visibleElements = visElements;
|
|
23683
|
+
return;
|
|
23545
23684
|
};
|
|
23546
23685
|
QuestionRowModel.prototype.addElement = function (q) {
|
|
23547
23686
|
this.elements.push(q);
|
|
@@ -23615,27 +23754,6 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23615
23754
|
QuestionRowModel.prototype.getRenderedWidthFromWidth = function (width) {
|
|
23616
23755
|
return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isNumber(width) ? width + "px" : width;
|
|
23617
23756
|
};
|
|
23618
|
-
QuestionRowModel.prototype.calcVisible = function () {
|
|
23619
|
-
var visElements = [];
|
|
23620
|
-
for (var i = 0; i < this.elements.length; i++) {
|
|
23621
|
-
if (this.elements[i].isVisible) {
|
|
23622
|
-
visElements.push(this.elements[i]);
|
|
23623
|
-
}
|
|
23624
|
-
}
|
|
23625
|
-
if (this.needToUpdateVisibleElements(visElements)) {
|
|
23626
|
-
this.setPropertyValue("visibleElements", visElements);
|
|
23627
|
-
}
|
|
23628
|
-
return visElements.length > 0;
|
|
23629
|
-
};
|
|
23630
|
-
QuestionRowModel.prototype.needToUpdateVisibleElements = function (visElements) {
|
|
23631
|
-
if (visElements.length !== this.visibleElements.length)
|
|
23632
|
-
return true;
|
|
23633
|
-
for (var i = 0; i < visElements.length; i++) {
|
|
23634
|
-
if (visElements[i] !== this.visibleElements[i])
|
|
23635
|
-
return true;
|
|
23636
|
-
}
|
|
23637
|
-
return false;
|
|
23638
|
-
};
|
|
23639
23757
|
QuestionRowModel.prototype.dispose = function () {
|
|
23640
23758
|
_super.prototype.dispose.call(this);
|
|
23641
23759
|
this.stopLazyRendering();
|
|
@@ -23644,10 +23762,16 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23644
23762
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
|
23645
23763
|
.append(this.panel.cssClasses.row)
|
|
23646
23764
|
.append(this.panel.cssClasses.rowCompact, this.panel["isCompact"])
|
|
23647
|
-
.append(this.panel.cssClasses.pageRow, this.panel.isPage || (!!this.panel.originalPage
|
|
23765
|
+
.append(this.panel.cssClasses.pageRow, this.panel.isPage || (!!this.panel.originalPage))
|
|
23648
23766
|
.append(this.panel.cssClasses.rowMultiple, this.visibleElements.length > 1)
|
|
23649
23767
|
.toString();
|
|
23650
23768
|
};
|
|
23769
|
+
QuestionRowModel.prototype.setRootElement = function (element) {
|
|
23770
|
+
this.rootElement = element;
|
|
23771
|
+
};
|
|
23772
|
+
QuestionRowModel.prototype.getRootElement = function () {
|
|
23773
|
+
return this.rootElement;
|
|
23774
|
+
};
|
|
23651
23775
|
QuestionRowModel.rowCounter = 100;
|
|
23652
23776
|
__decorate([
|
|
23653
23777
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: null })
|
|
@@ -23665,9 +23789,13 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
23665
23789
|
var _this = _super.call(this, name) || this;
|
|
23666
23790
|
_this.isQuestionsReady = false;
|
|
23667
23791
|
_this.questionsValue = new Array();
|
|
23792
|
+
_this.rowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getRowsAnimationOptions(), function (value) {
|
|
23793
|
+
_this.setPropertyValue("visibleRows", value);
|
|
23794
|
+
}, function () { return _this.visibleRows; });
|
|
23668
23795
|
_this.isRandomizing = false;
|
|
23669
23796
|
_this.locCountRowUpdates = 0;
|
|
23670
|
-
_this.createNewArray("rows");
|
|
23797
|
+
_this.createNewArray("rows", function (el, index) { _this.onAddRow(el); }, function (el) { _this.onRemoveRow(el); });
|
|
23798
|
+
_this.createNewArray("visibleRows");
|
|
23671
23799
|
_this.elementsValue = _this.createNewArray("elements", _this.onAddElement.bind(_this), _this.onRemoveElement.bind(_this));
|
|
23672
23800
|
_this.id = PanelModelBase.getPanelId();
|
|
23673
23801
|
_this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
|
|
@@ -23687,16 +23815,62 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
23687
23815
|
PanelModelBase.getPanelId = function () {
|
|
23688
23816
|
return "sp_" + PanelModelBase.panelCounter++;
|
|
23689
23817
|
};
|
|
23818
|
+
PanelModelBase.prototype.onAddRow = function (row) {
|
|
23819
|
+
var _this = this;
|
|
23820
|
+
this.onRowVisibleChanged();
|
|
23821
|
+
row.onVisibleChangedCallback = function () { return _this.onRowVisibleChanged(); };
|
|
23822
|
+
};
|
|
23823
|
+
PanelModelBase.prototype.getRowsAnimationOptions = function () {
|
|
23824
|
+
var _this = this;
|
|
23825
|
+
var beforeRunAnimation = function (el) {
|
|
23826
|
+
el.style.setProperty("--animation-height", el.offsetHeight + "px");
|
|
23827
|
+
};
|
|
23828
|
+
return {
|
|
23829
|
+
isAnimationEnabled: function () { return _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].animationEnabled && _this.animationAllowed; },
|
|
23830
|
+
getAnimatedElement: function (row) { return row.getRootElement(); },
|
|
23831
|
+
getLeaveOptions: function (_) {
|
|
23832
|
+
return { cssClass: _this.cssClasses.rowFadeOut,
|
|
23833
|
+
onBeforeRunAnimation: beforeRunAnimation
|
|
23834
|
+
};
|
|
23835
|
+
},
|
|
23836
|
+
getEnterOptions: function (_) {
|
|
23837
|
+
return {
|
|
23838
|
+
cssClass: _this.cssClasses.rowFadeIn,
|
|
23839
|
+
onBeforeRunAnimation: beforeRunAnimation
|
|
23840
|
+
};
|
|
23841
|
+
}
|
|
23842
|
+
};
|
|
23843
|
+
};
|
|
23844
|
+
Object.defineProperty(PanelModelBase.prototype, "visibleRows", {
|
|
23845
|
+
get: function () {
|
|
23846
|
+
return this.getPropertyValue("visibleRows");
|
|
23847
|
+
},
|
|
23848
|
+
set: function (val) {
|
|
23849
|
+
this.rowsAnimation.sync(val);
|
|
23850
|
+
},
|
|
23851
|
+
enumerable: false,
|
|
23852
|
+
configurable: true
|
|
23853
|
+
});
|
|
23854
|
+
PanelModelBase.prototype.onRemoveRow = function (row) {
|
|
23855
|
+
row.visibleElementsAnimation.cancel();
|
|
23856
|
+
this.visibleRows = this.rows.filter(function (row) { return row.visible; });
|
|
23857
|
+
row.onVisibleChangedCallback = undefined;
|
|
23858
|
+
};
|
|
23859
|
+
PanelModelBase.prototype.onRowVisibleChanged = function () {
|
|
23860
|
+
this.visibleRows = this.rows.filter(function (row) { return row.visible; });
|
|
23861
|
+
};
|
|
23690
23862
|
PanelModelBase.prototype.getType = function () {
|
|
23691
23863
|
return "panelbase";
|
|
23692
23864
|
};
|
|
23693
23865
|
PanelModelBase.prototype.setSurveyImpl = function (value, isLight) {
|
|
23866
|
+
this.animationAllowed = false;
|
|
23694
23867
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
|
23695
23868
|
if (this.isDesignMode)
|
|
23696
23869
|
this.onVisibleChanged();
|
|
23697
23870
|
for (var i = 0; i < this.elements.length; i++) {
|
|
23698
23871
|
this.elements[i].setSurveyImpl(value, isLight);
|
|
23699
23872
|
}
|
|
23873
|
+
this.animationAllowed = true;
|
|
23700
23874
|
};
|
|
23701
23875
|
PanelModelBase.prototype.endLoadingFromJson = function () {
|
|
23702
23876
|
_super.prototype.endLoadingFromJson.call(this);
|
|
@@ -23912,7 +24086,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
23912
24086
|
configurable: true
|
|
23913
24087
|
});
|
|
23914
24088
|
PanelModelBase.prototype.calcCssClasses = function (css) {
|
|
23915
|
-
var classes = { panel: {}, error: {}, row: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
24089
|
+
var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "", rowFadeOutActive: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
23916
24090
|
this.copyCssClasses(classes.panel, css.panel);
|
|
23917
24091
|
this.copyCssClasses(classes.error, css.error);
|
|
23918
24092
|
if (!!css.pageRow) {
|
|
@@ -23924,6 +24098,15 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
23924
24098
|
if (!!css.row) {
|
|
23925
24099
|
classes.row = css.row;
|
|
23926
24100
|
}
|
|
24101
|
+
if (!!css.rowFadeIn) {
|
|
24102
|
+
classes.rowFadeIn = css.rowFadeIn;
|
|
24103
|
+
}
|
|
24104
|
+
if (!!css.rowFadeOut) {
|
|
24105
|
+
classes.rowFadeOut = css.rowFadeOut;
|
|
24106
|
+
}
|
|
24107
|
+
if (!!css.rowFadeOutActive) {
|
|
24108
|
+
classes.rowFadeOutActive = css.rowFadeOutActive;
|
|
24109
|
+
}
|
|
23927
24110
|
if (!!css.rowMultiple) {
|
|
23928
24111
|
classes.rowMultiple = css.rowMultiple;
|
|
23929
24112
|
}
|
|
@@ -24502,10 +24685,13 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24502
24685
|
return new QuestionRowModel(this);
|
|
24503
24686
|
};
|
|
24504
24687
|
PanelModelBase.prototype.onSurveyLoad = function () {
|
|
24688
|
+
this.animationAllowed = false;
|
|
24689
|
+
_super.prototype.onSurveyLoad.call(this);
|
|
24505
24690
|
for (var i = 0; i < this.elements.length; i++) {
|
|
24506
24691
|
this.elements[i].onSurveyLoad();
|
|
24507
24692
|
}
|
|
24508
24693
|
this.onElementVisibilityChanged(this);
|
|
24694
|
+
this.animationAllowed = true;
|
|
24509
24695
|
};
|
|
24510
24696
|
PanelModelBase.prototype.onFirstRendering = function () {
|
|
24511
24697
|
_super.prototype.onFirstRendering.call(this);
|
|
@@ -24539,7 +24725,9 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24539
24725
|
PanelModelBase.prototype.onRowsChanged = function () {
|
|
24540
24726
|
if (this.isLoadingFromJson)
|
|
24541
24727
|
return;
|
|
24728
|
+
this.animationAllowed = false;
|
|
24542
24729
|
this.setArrayPropertyDirectly("rows", this.buildRows());
|
|
24730
|
+
this.animationAllowed = true;
|
|
24543
24731
|
};
|
|
24544
24732
|
PanelModelBase.prototype.blockRowsUpdates = function () {
|
|
24545
24733
|
this.locCountRowUpdates++;
|
|
@@ -24859,9 +25047,9 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24859
25047
|
enumerable: false,
|
|
24860
25048
|
configurable: true
|
|
24861
25049
|
});
|
|
24862
|
-
PanelModelBase.prototype.
|
|
24863
|
-
if (
|
|
24864
|
-
return
|
|
25050
|
+
PanelModelBase.prototype.getIsContentVisible = function (exceptionQuestion) {
|
|
25051
|
+
if (this.areInvisibleElementsShowing)
|
|
25052
|
+
return true;
|
|
24865
25053
|
for (var i = 0; i < this.elements.length; i++) {
|
|
24866
25054
|
if (this.elements[i] == exceptionQuestion)
|
|
24867
25055
|
continue;
|
|
@@ -24870,6 +25058,9 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24870
25058
|
}
|
|
24871
25059
|
return false;
|
|
24872
25060
|
};
|
|
25061
|
+
PanelModelBase.prototype.getIsPageVisible = function (exceptionQuestion) {
|
|
25062
|
+
return this.visible && this.getIsContentVisible(exceptionQuestion);
|
|
25063
|
+
};
|
|
24873
25064
|
PanelModelBase.prototype.setVisibleIndex = function (index) {
|
|
24874
25065
|
if (!this.isVisible || index < 0) {
|
|
24875
25066
|
this.resetVisibleIndexes();
|
|
@@ -25537,6 +25728,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
25537
25728
|
id: "cancel-preview",
|
|
25538
25729
|
locTitle: this.survey.locEditText,
|
|
25539
25730
|
innerCss: this.survey.cssNavigationEdit,
|
|
25731
|
+
component: "sv-nav-btn",
|
|
25540
25732
|
action: function () { _this.cancelPreview(); }
|
|
25541
25733
|
});
|
|
25542
25734
|
}
|
|
@@ -25617,7 +25809,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
25617
25809
|
};
|
|
25618
25810
|
Object.defineProperty(PanelModel.prototype, "showPanelAsPage", {
|
|
25619
25811
|
get: function () {
|
|
25620
|
-
return !!this.originalPage
|
|
25812
|
+
return !!this.originalPage;
|
|
25621
25813
|
},
|
|
25622
25814
|
enumerable: false,
|
|
25623
25815
|
configurable: true
|
|
@@ -25881,7 +26073,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
|
25881
26073
|
.append("sv-popup--dropdown-overlay", this.isOverlay && this.model.overlayDisplayMode !== "overlay")
|
|
25882
26074
|
.append("sv-popup--tablet", this.isTablet && this.isOverlay)
|
|
25883
26075
|
.append("sv-popup--show-pointer", !this.isOverlay && this.showHeader)
|
|
25884
|
-
.append("sv-popup--" + this.popupDirection, !this.isOverlay && this.showHeader);
|
|
26076
|
+
.append("sv-popup--" + this.popupDirection, !this.isOverlay && (this.showHeader || this.popupDirection == "top" || this.popupDirection == "bottom"));
|
|
25885
26077
|
};
|
|
25886
26078
|
PopupDropdownViewModel.prototype.getShowHeader = function () {
|
|
25887
26079
|
return this.model.showPointer && !this.isOverlay;
|
|
@@ -26563,12 +26755,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26563
26755
|
|
|
26564
26756
|
function createPopupModalViewModel(options, rootElement) {
|
|
26565
26757
|
var _a;
|
|
26566
|
-
var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_1__["PopupModel"](options.componentName, options.data, "top", "left", false, true, options.onCancel, options.onApply,
|
|
26567
|
-
options.onHide();
|
|
26568
|
-
if (!!container) {
|
|
26569
|
-
popupViewModel.resetComponentElement();
|
|
26570
|
-
}
|
|
26571
|
-
}, options.onShow, options.cssClass, options.title);
|
|
26758
|
+
var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_1__["PopupModel"](options.componentName, options.data, "top", "left", false, true, options.onCancel, options.onApply, options.onHide, options.onShow, options.cssClass, options.title);
|
|
26572
26759
|
popupModel.displayMode = options.displayMode || "popup";
|
|
26573
26760
|
popupModel.isFocusedContent = (_a = options.isFocusedContent) !== null && _a !== void 0 ? _a : true;
|
|
26574
26761
|
var popupViewModel = new _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_3__["PopupModalViewModel"](popupModel);
|
|
@@ -26580,6 +26767,15 @@ function createPopupModalViewModel(options, rootElement) {
|
|
|
26580
26767
|
if (!popupViewModel.container) {
|
|
26581
26768
|
popupViewModel.initializePopupContainer();
|
|
26582
26769
|
}
|
|
26770
|
+
var onVisibilityChangedCallback = function (sender, options) {
|
|
26771
|
+
if (!options.isVisible) {
|
|
26772
|
+
if (!!container) {
|
|
26773
|
+
popupViewModel.resetComponentElement();
|
|
26774
|
+
}
|
|
26775
|
+
}
|
|
26776
|
+
popupViewModel.onVisibilityChanged.remove(onVisibilityChangedCallback);
|
|
26777
|
+
};
|
|
26778
|
+
popupViewModel.onVisibilityChanged.add(onVisibilityChangedCallback);
|
|
26583
26779
|
return popupViewModel;
|
|
26584
26780
|
}
|
|
26585
26781
|
function createPopupViewModel(model, targetElement) {
|
|
@@ -26611,7 +26807,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26611
26807
|
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
|
|
26612
26808
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
26613
26809
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
26614
|
-
/* harmony import */ var
|
|
26810
|
+
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
|
|
26811
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
|
|
26615
26812
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
26616
26813
|
var extendStatics = function (d, b) {
|
|
26617
26814
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -26640,19 +26837,64 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
26640
26837
|
|
|
26641
26838
|
|
|
26642
26839
|
|
|
26840
|
+
|
|
26643
26841
|
var FOCUS_INPUT_SELECTOR = "input:not(:disabled):not([readonly]):not([type=hidden]),select:not(:disabled):not([readonly]),textarea:not(:disabled):not([readonly]), button:not(:disabled):not([readonly]), [tabindex]:not([tabindex^=\"-\"])";
|
|
26644
26842
|
var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
26645
26843
|
__extends(PopupBaseViewModel, _super);
|
|
26646
26844
|
function PopupBaseViewModel(model) {
|
|
26647
26845
|
var _this = _super.call(this) || this;
|
|
26648
|
-
_this.subscriptionId = PopupBaseViewModel.SubscriptionId++;
|
|
26649
26846
|
_this.popupSelector = ".sv-popup";
|
|
26650
26847
|
_this.fixedPopupContainer = ".sv-popup";
|
|
26651
26848
|
_this.containerSelector = ".sv-popup__container";
|
|
26652
26849
|
_this.scrollingContentSelector = ".sv-popup__scrolling-content";
|
|
26850
|
+
_this.visibilityAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_6__["AnimationBoolean"](_this, function (val) {
|
|
26851
|
+
if (_this._isVisible !== val) {
|
|
26852
|
+
if (!val) {
|
|
26853
|
+
_this.updateOnHiding();
|
|
26854
|
+
_this.updateIsVisible(val);
|
|
26855
|
+
}
|
|
26856
|
+
else {
|
|
26857
|
+
_this.updateIsVisible(val);
|
|
26858
|
+
}
|
|
26859
|
+
}
|
|
26860
|
+
}, function () { return _this._isVisible; });
|
|
26861
|
+
_this.onVisibilityChanged = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
|
|
26862
|
+
_this.onModelIsVisibleChangedCallback = function () {
|
|
26863
|
+
_this.isVisible = _this.model.isVisible;
|
|
26864
|
+
};
|
|
26653
26865
|
_this.model = model;
|
|
26654
26866
|
return _this;
|
|
26655
26867
|
}
|
|
26868
|
+
PopupBaseViewModel.prototype.updateIsVisible = function (val) {
|
|
26869
|
+
this._isVisible = val;
|
|
26870
|
+
this.onVisibilityChanged.fire(this, { isVisible: val });
|
|
26871
|
+
};
|
|
26872
|
+
PopupBaseViewModel.prototype.getLeaveOptions = function () {
|
|
26873
|
+
return { cssClass: "sv-popup--animate-leave" };
|
|
26874
|
+
};
|
|
26875
|
+
PopupBaseViewModel.prototype.getEnterOptions = function () {
|
|
26876
|
+
return { cssClass: "sv-popup--animate-enter" };
|
|
26877
|
+
};
|
|
26878
|
+
PopupBaseViewModel.prototype.getAnimatedElement = function () {
|
|
26879
|
+
return this.getAnimationContainer();
|
|
26880
|
+
};
|
|
26881
|
+
PopupBaseViewModel.prototype.isAnimationEnabled = function () {
|
|
26882
|
+
return this.model.displayMode !== "overlay" && _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].animationEnabled;
|
|
26883
|
+
};
|
|
26884
|
+
PopupBaseViewModel.prototype.getAnimationContainer = function () {
|
|
26885
|
+
var _a;
|
|
26886
|
+
return (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.fixedPopupContainer);
|
|
26887
|
+
};
|
|
26888
|
+
Object.defineProperty(PopupBaseViewModel.prototype, "isVisible", {
|
|
26889
|
+
get: function () {
|
|
26890
|
+
return this._isVisible;
|
|
26891
|
+
},
|
|
26892
|
+
set: function (val) {
|
|
26893
|
+
this.visibilityAnimation.sync(val);
|
|
26894
|
+
},
|
|
26895
|
+
enumerable: false,
|
|
26896
|
+
configurable: true
|
|
26897
|
+
});
|
|
26656
26898
|
Object.defineProperty(PopupBaseViewModel.prototype, "container", {
|
|
26657
26899
|
get: function () {
|
|
26658
26900
|
return this.containerElement || this.createdContainer;
|
|
@@ -26711,20 +26953,13 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26711
26953
|
PopupBaseViewModel.prototype.onModelChanging = function (newModel) {
|
|
26712
26954
|
};
|
|
26713
26955
|
PopupBaseViewModel.prototype.setupModel = function (model) {
|
|
26714
|
-
var _this = this;
|
|
26715
26956
|
if (!!this.model) {
|
|
26716
|
-
this.model.
|
|
26957
|
+
this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback);
|
|
26717
26958
|
}
|
|
26718
26959
|
this.onModelChanging(model);
|
|
26719
26960
|
this._model = model;
|
|
26720
|
-
|
|
26721
|
-
|
|
26722
|
-
_this.updateOnHiding();
|
|
26723
|
-
}
|
|
26724
|
-
_this.isVisible = model.isVisible;
|
|
26725
|
-
};
|
|
26726
|
-
model.registerPropertyChangedHandlers(["isVisible"], onIsVisibleChangedHandler, "PopupBaseViewModel" + this.subscriptionId);
|
|
26727
|
-
onIsVisibleChangedHandler();
|
|
26961
|
+
model.onVisibilityChanged.add(this.onModelIsVisibleChangedCallback);
|
|
26962
|
+
this.onModelIsVisibleChangedCallback();
|
|
26728
26963
|
};
|
|
26729
26964
|
Object.defineProperty(PopupBaseViewModel.prototype, "model", {
|
|
26730
26965
|
get: function () {
|
|
@@ -26904,7 +27139,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26904
27139
|
PopupBaseViewModel.prototype.dispose = function () {
|
|
26905
27140
|
_super.prototype.dispose.call(this);
|
|
26906
27141
|
if (this.model) {
|
|
26907
|
-
this.model.
|
|
27142
|
+
this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback);
|
|
26908
27143
|
}
|
|
26909
27144
|
if (!!this.createdContainer) {
|
|
26910
27145
|
this.createdContainer.remove();
|
|
@@ -26917,7 +27152,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26917
27152
|
};
|
|
26918
27153
|
PopupBaseViewModel.prototype.initializePopupContainer = function () {
|
|
26919
27154
|
if (!this.container) {
|
|
26920
|
-
var container =
|
|
27155
|
+
var container = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].createElement("div");
|
|
26921
27156
|
this.createdContainer = container;
|
|
26922
27157
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.popupMountContainer).appendChild(container);
|
|
26923
27158
|
}
|
|
@@ -26934,7 +27169,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26934
27169
|
PopupBaseViewModel.prototype.preventScrollOuside = function (event, deltaY) {
|
|
26935
27170
|
var currentElement = event.target;
|
|
26936
27171
|
while (currentElement !== this.container) {
|
|
26937
|
-
if (
|
|
27172
|
+
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].getComputedStyle(currentElement).overflowY === "auto" && currentElement.scrollHeight !== currentElement.offsetHeight) {
|
|
26938
27173
|
var scrollHeight = currentElement.scrollHeight, scrollTop = currentElement.scrollTop, clientHeight = currentElement.clientHeight;
|
|
26939
27174
|
if (!(deltaY > 0 && Math.abs(scrollHeight - clientHeight - scrollTop) < 1) && !(deltaY < 0 && scrollTop <= 0)) {
|
|
26940
27175
|
return;
|
|
@@ -26946,7 +27181,6 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26946
27181
|
event.preventDefault();
|
|
26947
27182
|
}
|
|
26948
27183
|
};
|
|
26949
|
-
PopupBaseViewModel.SubscriptionId = 0;
|
|
26950
27184
|
__decorate([
|
|
26951
27185
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "0px" })
|
|
26952
27186
|
], PopupBaseViewModel.prototype, "top", void 0);
|
|
@@ -26964,7 +27198,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26964
27198
|
], PopupBaseViewModel.prototype, "minWidth", void 0);
|
|
26965
27199
|
__decorate([
|
|
26966
27200
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
|
|
26967
|
-
], PopupBaseViewModel.prototype, "
|
|
27201
|
+
], PopupBaseViewModel.prototype, "_isVisible", void 0);
|
|
26968
27202
|
__decorate([
|
|
26969
27203
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
26970
27204
|
], PopupBaseViewModel.prototype, "locale", void 0);
|
|
@@ -35099,6 +35333,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35099
35333
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
|
35100
35334
|
/* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./textPreProcessor */ "./src/textPreProcessor.ts");
|
|
35101
35335
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
35336
|
+
/* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error */ "./src/error.ts");
|
|
35102
35337
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
35103
35338
|
var extendStatics = function (d, b) {
|
|
35104
35339
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -35120,6 +35355,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
35120
35355
|
|
|
35121
35356
|
|
|
35122
35357
|
|
|
35358
|
+
|
|
35123
35359
|
var ComponentQuestionJSON = /** @class */ (function () {
|
|
35124
35360
|
function ComponentQuestionJSON(name, json) {
|
|
35125
35361
|
this.name = name;
|
|
@@ -35175,6 +35411,11 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
|
35175
35411
|
return newValue;
|
|
35176
35412
|
return this.json.onValueChanging(question, name, newValue);
|
|
35177
35413
|
};
|
|
35414
|
+
ComponentQuestionJSON.prototype.onGetErrorText = function (question) {
|
|
35415
|
+
if (!this.json.getErrorText)
|
|
35416
|
+
return undefined;
|
|
35417
|
+
return this.json.getErrorText(question);
|
|
35418
|
+
};
|
|
35178
35419
|
ComponentQuestionJSON.prototype.onItemValuePropertyChanged = function (question, item, propertyName, name, newValue) {
|
|
35179
35420
|
if (!this.json.onItemValuePropertyChanged)
|
|
35180
35421
|
return;
|
|
@@ -35455,6 +35696,15 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
|
35455
35696
|
_super.prototype.setNewValue.call(this, newValue);
|
|
35456
35697
|
this.updateElementCss();
|
|
35457
35698
|
};
|
|
35699
|
+
QuestionCustomModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
35700
|
+
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
35701
|
+
if (!!this.customQuestion) {
|
|
35702
|
+
var text = this.customQuestion.onGetErrorText(this);
|
|
35703
|
+
if (!!text) {
|
|
35704
|
+
errors.push(new _error__WEBPACK_IMPORTED_MODULE_6__["CustomError"](text, this));
|
|
35705
|
+
}
|
|
35706
|
+
}
|
|
35707
|
+
};
|
|
35458
35708
|
//ISurveyImpl
|
|
35459
35709
|
QuestionCustomModelBase.prototype.getSurveyData = function () {
|
|
35460
35710
|
return this;
|
|
@@ -43748,10 +43998,9 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
|
43748
43998
|
});
|
|
43749
43999
|
Object.defineProperty(MatrixDropdownColumn.prototype, "isRequired", {
|
|
43750
44000
|
/**
|
|
43751
|
-
* Marks the column as required. If a respondent skips any cell in a required column, the matrix displays a validation error.
|
|
44001
|
+
* Marks the column as required. If a respondent skips any cell in a required column, the matrix displays a [validation error](#requiredErrorText).
|
|
43752
44002
|
*
|
|
43753
44003
|
* If you want to mark the column as required based on a condition, specify the [`requiredIf`](#requiredIf) property.
|
|
43754
|
-
* @see requiredErrorText
|
|
43755
44004
|
* @see visible
|
|
43756
44005
|
* @see readOnly
|
|
43757
44006
|
*/
|
|
@@ -46923,9 +47172,9 @@ var MultipleTextEditorModel = /** @class */ (function (_super) {
|
|
|
46923
47172
|
}(_question_text__WEBPACK_IMPORTED_MODULE_3__["QuestionTextModel"]));
|
|
46924
47173
|
|
|
46925
47174
|
/**
|
|
46926
|
-
* A class that describes an item
|
|
47175
|
+
* A class that describes an [item](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model#items) in a Multiple Textboxes question.
|
|
46927
47176
|
*
|
|
46928
|
-
* [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/)
|
|
47177
|
+
* [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/ (linkStyle))
|
|
46929
47178
|
*/
|
|
46930
47179
|
var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
46931
47180
|
__extends(MultipleTextItemModel, _super);
|
|
@@ -46937,6 +47186,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
46937
47186
|
_this.editor.focusIn();
|
|
46938
47187
|
};
|
|
46939
47188
|
_this.editorValue = _this.createEditor(name);
|
|
47189
|
+
_this.maskSettings = _this.editorValue.maskSettings;
|
|
46940
47190
|
_this.editor.questionTitleTemplateCallback = function () {
|
|
46941
47191
|
return "";
|
|
46942
47192
|
};
|
|
@@ -46961,7 +47211,10 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
46961
47211
|
};
|
|
46962
47212
|
Object.defineProperty(MultipleTextItemModel.prototype, "name", {
|
|
46963
47213
|
/**
|
|
46964
|
-
*
|
|
47214
|
+
* An item ID that is not visible to respondents.
|
|
47215
|
+
*
|
|
47216
|
+
* > Item IDs must be unique.
|
|
47217
|
+
* @see title
|
|
46965
47218
|
*/
|
|
46966
47219
|
get: function () {
|
|
46967
47220
|
return this.editor.name;
|
|
@@ -47012,7 +47265,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47012
47265
|
};
|
|
47013
47266
|
Object.defineProperty(MultipleTextItemModel.prototype, "isRequired", {
|
|
47014
47267
|
/**
|
|
47015
|
-
*
|
|
47268
|
+
* Marks the item as required. If a respondent leaves this item empty, the question displays a [validation error](#requiredErrorText).
|
|
47016
47269
|
*/
|
|
47017
47270
|
get: function () {
|
|
47018
47271
|
return this.editor.isRequired;
|
|
@@ -47025,7 +47278,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47025
47278
|
});
|
|
47026
47279
|
Object.defineProperty(MultipleTextItemModel.prototype, "inputType", {
|
|
47027
47280
|
/**
|
|
47028
|
-
*
|
|
47281
|
+
* A value passed on to the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types) attribute of the underlying `<input>` element.
|
|
47282
|
+
*
|
|
47283
|
+
* Default value: `"text"`
|
|
47029
47284
|
*/
|
|
47030
47285
|
get: function () {
|
|
47031
47286
|
return this.editor.inputType;
|
|
@@ -47038,8 +47293,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47038
47293
|
});
|
|
47039
47294
|
Object.defineProperty(MultipleTextItemModel.prototype, "title", {
|
|
47040
47295
|
/**
|
|
47041
|
-
*
|
|
47042
|
-
* @see name
|
|
47296
|
+
* A user-friendly item label to display. If `title` is undefined, [`name`](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel#name) is displayed instead.
|
|
47043
47297
|
*/
|
|
47044
47298
|
get: function () {
|
|
47045
47299
|
return this.editor.title;
|
|
@@ -47066,9 +47320,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47066
47320
|
});
|
|
47067
47321
|
Object.defineProperty(MultipleTextItemModel.prototype, "maxLength", {
|
|
47068
47322
|
/**
|
|
47069
|
-
* The maximum text length
|
|
47070
|
-
*
|
|
47071
|
-
*
|
|
47323
|
+
* The maximum text length measured in characters. Assign 0 if the length should be unlimited.
|
|
47324
|
+
*
|
|
47325
|
+
* Default value: -1 (inherits the actual value from the `SurveyModel`'s [`maxTextLength`](https://surveyjs.io/form-library/documentation/surveymodel#maxTextLength) property).
|
|
47072
47326
|
*/
|
|
47073
47327
|
get: function () {
|
|
47074
47328
|
return this.editor.maxLength;
|
|
@@ -47085,7 +47339,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47085
47339
|
};
|
|
47086
47340
|
Object.defineProperty(MultipleTextItemModel.prototype, "placeholder", {
|
|
47087
47341
|
/**
|
|
47088
|
-
*
|
|
47342
|
+
* A placeholder for the input field.
|
|
47089
47343
|
*/
|
|
47090
47344
|
get: function () {
|
|
47091
47345
|
return this.editor.placeholder;
|
|
@@ -47122,7 +47376,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47122
47376
|
});
|
|
47123
47377
|
Object.defineProperty(MultipleTextItemModel.prototype, "requiredErrorText", {
|
|
47124
47378
|
/**
|
|
47125
|
-
*
|
|
47379
|
+
* Specifies a custom error message for a [required item](#isRequired).
|
|
47126
47380
|
*/
|
|
47127
47381
|
get: function () {
|
|
47128
47382
|
return this.editor.requiredErrorText;
|
|
@@ -47142,7 +47396,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47142
47396
|
});
|
|
47143
47397
|
Object.defineProperty(MultipleTextItemModel.prototype, "size", {
|
|
47144
47398
|
/**
|
|
47145
|
-
*
|
|
47399
|
+
* A value passed on to the [`size`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/size) attribute of the underlying `<input>` element.
|
|
47400
|
+
*
|
|
47401
|
+
* If you want to set a uniform `size` for all text box items, use the [`itemSize`](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model#itemSize) within the Multiple Textboxes configuration.
|
|
47146
47402
|
*/
|
|
47147
47403
|
get: function () {
|
|
47148
47404
|
return this.editor.size;
|
|
@@ -47155,7 +47411,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47155
47411
|
});
|
|
47156
47412
|
Object.defineProperty(MultipleTextItemModel.prototype, "defaultValueExpression", {
|
|
47157
47413
|
/**
|
|
47158
|
-
* An expression
|
|
47414
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the default item value.
|
|
47415
|
+
* @see minValueExpression
|
|
47416
|
+
* @see maxValueExpression
|
|
47159
47417
|
*/
|
|
47160
47418
|
get: function () {
|
|
47161
47419
|
return this.editor.defaultValueExpression;
|
|
@@ -47168,7 +47426,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47168
47426
|
});
|
|
47169
47427
|
Object.defineProperty(MultipleTextItemModel.prototype, "minValueExpression", {
|
|
47170
47428
|
/**
|
|
47171
|
-
*
|
|
47429
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the minimum item value.
|
|
47430
|
+
* @see maxValueExpression
|
|
47431
|
+
* @see defaultValueExpression
|
|
47172
47432
|
*/
|
|
47173
47433
|
get: function () {
|
|
47174
47434
|
return this.editor.minValueExpression;
|
|
@@ -47181,7 +47441,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47181
47441
|
});
|
|
47182
47442
|
Object.defineProperty(MultipleTextItemModel.prototype, "maxValueExpression", {
|
|
47183
47443
|
/**
|
|
47184
|
-
*
|
|
47444
|
+
* An [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) used to calculate the maximum item value.
|
|
47445
|
+
* @see minValueExpression
|
|
47446
|
+
* @see defaultValueExpression
|
|
47185
47447
|
*/
|
|
47186
47448
|
get: function () {
|
|
47187
47449
|
return this.editor.maxValueExpression;
|
|
@@ -47194,7 +47456,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47194
47456
|
});
|
|
47195
47457
|
Object.defineProperty(MultipleTextItemModel.prototype, "validators", {
|
|
47196
47458
|
/**
|
|
47197
|
-
*
|
|
47459
|
+
* Item validators.
|
|
47460
|
+
*
|
|
47461
|
+
* [Data Validation](https://surveyjs.io/form-library/documentation/data-validation (linkStyle))
|
|
47198
47462
|
*/
|
|
47199
47463
|
get: function () {
|
|
47200
47464
|
return this.editor.validators;
|
|
@@ -47208,9 +47472,71 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47208
47472
|
MultipleTextItemModel.prototype.getValidators = function () {
|
|
47209
47473
|
return this.validators;
|
|
47210
47474
|
};
|
|
47475
|
+
Object.defineProperty(MultipleTextItemModel.prototype, "maskType", {
|
|
47476
|
+
/**
|
|
47477
|
+
* Specifies the type of a mask applied to the input.
|
|
47478
|
+
*
|
|
47479
|
+
* Possible values:
|
|
47480
|
+
*
|
|
47481
|
+
* - `"none"` (default)
|
|
47482
|
+
* - `"numeric"`
|
|
47483
|
+
* - `"currency"`
|
|
47484
|
+
* - `"datetime"`
|
|
47485
|
+
* - `"pattern"`
|
|
47486
|
+
*
|
|
47487
|
+
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
|
|
47488
|
+
* @see maskSettings
|
|
47489
|
+
*/
|
|
47490
|
+
get: function () {
|
|
47491
|
+
return this.editor.maskType;
|
|
47492
|
+
},
|
|
47493
|
+
set: function (val) {
|
|
47494
|
+
this.editor.maskType = val;
|
|
47495
|
+
this.maskSettings = this.editor.maskSettings;
|
|
47496
|
+
},
|
|
47497
|
+
enumerable: false,
|
|
47498
|
+
configurable: true
|
|
47499
|
+
});
|
|
47500
|
+
Object.defineProperty(MultipleTextItemModel.prototype, "maskSettings", {
|
|
47501
|
+
/**
|
|
47502
|
+
* An object with properties that configure the mask applied to the input.
|
|
47503
|
+
*
|
|
47504
|
+
* Available properties depend on the specified [`maskType`](#maskType) and belong to corresponding classes. Refer to the class APIs for a full list of properties:
|
|
47505
|
+
*
|
|
47506
|
+
* | `maskType` | Class |
|
|
47507
|
+
* | ---------- | ----- |
|
|
47508
|
+
* | `"numeric"` | [`InputMaskNumeric`](https://surveyjs.io/form-library/documentation/api-reference/inputmasknumeric) |
|
|
47509
|
+
* | `"currency"` | [`InputMaskCurrency`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskcurrency) |
|
|
47510
|
+
* | `"datetime"` | [`InputMaskDateTime`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskdatetime) |
|
|
47511
|
+
* | `"pattern"` | [`InputMaskPattern`](https://surveyjs.io/form-library/documentation/api-reference/inputmaskpattern) |
|
|
47512
|
+
*
|
|
47513
|
+
* [View Demo](https://surveyjs.io/form-library/examples/masked-input-fields/ (linkStyle))
|
|
47514
|
+
*/
|
|
47515
|
+
get: function () {
|
|
47516
|
+
return this.getPropertyValue("maskSettings");
|
|
47517
|
+
},
|
|
47518
|
+
set: function (val) {
|
|
47519
|
+
this.setPropertyValue("maskSettings", val);
|
|
47520
|
+
if (this.editor.maskSettings !== val) {
|
|
47521
|
+
this.editor.maskSettings = val;
|
|
47522
|
+
}
|
|
47523
|
+
},
|
|
47524
|
+
enumerable: false,
|
|
47525
|
+
configurable: true
|
|
47526
|
+
});
|
|
47527
|
+
Object.defineProperty(MultipleTextItemModel.prototype, "inputTextAlignment", {
|
|
47528
|
+
get: function () {
|
|
47529
|
+
return this.editor.inputTextAlignment;
|
|
47530
|
+
},
|
|
47531
|
+
set: function (val) {
|
|
47532
|
+
this.editor.inputTextAlignment = val;
|
|
47533
|
+
},
|
|
47534
|
+
enumerable: false,
|
|
47535
|
+
configurable: true
|
|
47536
|
+
});
|
|
47211
47537
|
Object.defineProperty(MultipleTextItemModel.prototype, "value", {
|
|
47212
47538
|
/**
|
|
47213
|
-
*
|
|
47539
|
+
* An item value.
|
|
47214
47540
|
*/
|
|
47215
47541
|
get: function () {
|
|
47216
47542
|
return this.data ? this.data.getMultipleTextValue(this.name) : null;
|
|
@@ -47400,9 +47726,9 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
47400
47726
|
};
|
|
47401
47727
|
Object.defineProperty(QuestionMultipleTextModel.prototype, "items", {
|
|
47402
47728
|
/**
|
|
47403
|
-
* Gets or sets an array of `MultipleTextItemModel` objects that represent input items.
|
|
47729
|
+
* Gets or sets an array of [`MultipleTextItemModel`](https://surveyjs.io/form-library/documentation/api-reference/multipletextitemmodel) objects that represent input items.
|
|
47404
47730
|
*
|
|
47405
|
-
*
|
|
47731
|
+
* Each object in this array should have at least the following properties:
|
|
47406
47732
|
*
|
|
47407
47733
|
* ```js
|
|
47408
47734
|
* {
|
|
@@ -47443,6 +47769,12 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
47443
47769
|
}
|
|
47444
47770
|
return null;
|
|
47445
47771
|
};
|
|
47772
|
+
QuestionMultipleTextModel.prototype.getElementsInDesign = function (includeHidden) {
|
|
47773
|
+
if (includeHidden === void 0) { includeHidden = false; }
|
|
47774
|
+
var elements;
|
|
47775
|
+
elements = _super.prototype.getElementsInDesign.call(this, includeHidden);
|
|
47776
|
+
return elements.concat(this.items);
|
|
47777
|
+
};
|
|
47446
47778
|
QuestionMultipleTextModel.prototype.addConditionObjectsByContext = function (objects, context) {
|
|
47447
47779
|
for (var i = 0; i < this.items.length; i++) {
|
|
47448
47780
|
var item = this.items[i];
|
|
@@ -47896,6 +48228,31 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
|
|
|
47896
48228
|
default: "text",
|
|
47897
48229
|
choices: _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].questions.inputTypes,
|
|
47898
48230
|
},
|
|
48231
|
+
{
|
|
48232
|
+
name: "maskType:masktype",
|
|
48233
|
+
default: "none",
|
|
48234
|
+
visibleIndex: 0,
|
|
48235
|
+
dependsOn: "inputType",
|
|
48236
|
+
visibleIf: function (obj) {
|
|
48237
|
+
return obj.inputType === "text";
|
|
48238
|
+
}
|
|
48239
|
+
},
|
|
48240
|
+
{
|
|
48241
|
+
name: "maskSettings:masksettings",
|
|
48242
|
+
className: "masksettings",
|
|
48243
|
+
visibleIndex: 1,
|
|
48244
|
+
dependsOn: "inputType",
|
|
48245
|
+
visibleIf: function (obj) {
|
|
48246
|
+
return obj.inputType === "text";
|
|
48247
|
+
},
|
|
48248
|
+
onGetValue: function (obj) {
|
|
48249
|
+
return obj.maskSettings.getData();
|
|
48250
|
+
},
|
|
48251
|
+
onSetValue: function (obj, value) {
|
|
48252
|
+
obj.maskSettings.setData(value);
|
|
48253
|
+
},
|
|
48254
|
+
},
|
|
48255
|
+
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"], visible: false },
|
|
47899
48256
|
{ name: "title", serializationProperty: "locTitle" },
|
|
47900
48257
|
{ name: "maxLength:number", default: -1 },
|
|
47901
48258
|
{ name: "size:number", minValue: 0 },
|
|
@@ -50944,6 +51301,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50944
51301
|
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
|
|
50945
51302
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
|
50946
51303
|
/* harmony import */ var _src_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../src/settings */ "./src/settings.ts");
|
|
51304
|
+
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
|
|
50947
51305
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
50948
51306
|
var extendStatics = function (d, b) {
|
|
50949
51307
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -50975,6 +51333,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
50975
51333
|
|
|
50976
51334
|
|
|
50977
51335
|
|
|
51336
|
+
|
|
50978
51337
|
/**
|
|
50979
51338
|
* A class that describes the Ranking question type.
|
|
50980
51339
|
*
|
|
@@ -50994,27 +51353,33 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
50994
51353
|
if (_this.visibleChoices.length === 1 && !_this.selectToRankEnabled) {
|
|
50995
51354
|
_this.value = [];
|
|
50996
51355
|
_this.value.push(_this.visibleChoices[0].value);
|
|
50997
|
-
_this.
|
|
51356
|
+
_this.updateRankingChoicesSync();
|
|
50998
51357
|
return;
|
|
50999
51358
|
}
|
|
51000
51359
|
if (_this.isEmpty()) {
|
|
51001
|
-
_this.
|
|
51360
|
+
_this.updateRankingChoicesSync();
|
|
51002
51361
|
return;
|
|
51003
51362
|
}
|
|
51004
51363
|
if (_this.selectToRankEnabled) {
|
|
51005
|
-
_this.
|
|
51364
|
+
_this.updateRankingChoicesSync();
|
|
51006
51365
|
return;
|
|
51007
51366
|
}
|
|
51008
51367
|
if (_this.visibleChoices.length > _this.value.length)
|
|
51009
51368
|
_this.addToValueByVisibleChoices();
|
|
51010
51369
|
if (_this.visibleChoices.length < _this.value.length)
|
|
51011
51370
|
_this.removeFromValueByVisibleChoices();
|
|
51012
|
-
_this.
|
|
51371
|
+
_this.updateRankingChoicesSync();
|
|
51013
51372
|
};
|
|
51014
51373
|
_this.localeChanged = function () {
|
|
51015
51374
|
_super.prototype.localeChanged.call(_this);
|
|
51016
|
-
_this.
|
|
51375
|
+
_this.updateRankingChoicesSync();
|
|
51017
51376
|
};
|
|
51377
|
+
_this._rankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimation(true), function (val) {
|
|
51378
|
+
_this.setPropertyValue("rankingChoices", val);
|
|
51379
|
+
}, function () { return _this.rankingChoices; });
|
|
51380
|
+
_this._unRankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimation(false), function (val) {
|
|
51381
|
+
_this.setPropertyValue("unRankingChoices", val);
|
|
51382
|
+
}, function () { return _this.unRankingChoices; });
|
|
51018
51383
|
_this.handlePointerDown = function (event, choice, node) {
|
|
51019
51384
|
var target = event.target;
|
|
51020
51385
|
if (!_this.isDragStartNodeValid(target))
|
|
@@ -51067,6 +51432,8 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51067
51432
|
_this.isValueSetByUser = false;
|
|
51068
51433
|
_this.setValue = function () {
|
|
51069
51434
|
var value = [];
|
|
51435
|
+
_this.rankingChoicesAnimation.cancel();
|
|
51436
|
+
_this.unRankingChoicesAnimation.cancel();
|
|
51070
51437
|
_this.rankingChoices.forEach(function (choice) {
|
|
51071
51438
|
value.push(choice.value);
|
|
51072
51439
|
});
|
|
@@ -51074,10 +51441,11 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51074
51441
|
_this.isValueSetByUser = true;
|
|
51075
51442
|
};
|
|
51076
51443
|
_this.createNewArray("rankingChoices");
|
|
51444
|
+
_this.createNewArray("unRankingChoices");
|
|
51077
51445
|
_this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
|
|
51078
51446
|
_this.clearValue();
|
|
51079
51447
|
_this.setDragDropRankingChoices();
|
|
51080
|
-
_this.
|
|
51448
|
+
_this.updateRankingChoicesSync();
|
|
51081
51449
|
});
|
|
51082
51450
|
return _this;
|
|
51083
51451
|
}
|
|
@@ -51114,10 +51482,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51114
51482
|
});
|
|
51115
51483
|
QuestionRankingModel.prototype.getItemClassCore = function (item, options) {
|
|
51116
51484
|
var itemIndex = this.rankingChoices.indexOf(item);
|
|
51485
|
+
var unrankedItemIndex = this.unRankingChoices.indexOf(item);
|
|
51117
51486
|
var dropTargetIndex = this.rankingChoices.indexOf(this.currentDropTarget);
|
|
51487
|
+
var isDrop = (this.selectToRankEnabled && itemIndex > -1 && unrankedItemIndex > -1) || this.currentDropTarget === item;
|
|
51118
51488
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
|
51119
51489
|
.append(_super.prototype.getItemClassCore.call(this, item, options))
|
|
51120
|
-
.append(this.cssClasses.itemGhostMod,
|
|
51490
|
+
.append(this.cssClasses.itemGhostMod, isDrop)
|
|
51121
51491
|
.append("sv-dragdrop-movedown", itemIndex === dropTargetIndex + 1 && this.dropTargetNodeMove === "down")
|
|
51122
51492
|
.append("sv-dragdrop-moveup", itemIndex === dropTargetIndex - 1 && this.dropTargetNodeMove === "up")
|
|
51123
51493
|
.toString();
|
|
@@ -51169,10 +51539,15 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51169
51539
|
QuestionRankingModel.prototype.getNumberByIndex = function (index) {
|
|
51170
51540
|
return this.isEmpty() ? "" : index + 1 + "";
|
|
51171
51541
|
};
|
|
51542
|
+
QuestionRankingModel.prototype.updateRankingChoicesSync = function () {
|
|
51543
|
+
this.animationAllowed = false;
|
|
51544
|
+
this.updateRankingChoices();
|
|
51545
|
+
this.animationAllowed = true;
|
|
51546
|
+
};
|
|
51172
51547
|
QuestionRankingModel.prototype.setSurveyImpl = function (value, isLight) {
|
|
51173
51548
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
|
51174
51549
|
this.setDragDropRankingChoices();
|
|
51175
|
-
this.
|
|
51550
|
+
this.updateRankingChoicesSync();
|
|
51176
51551
|
};
|
|
51177
51552
|
QuestionRankingModel.prototype.isAnswerCorrect = function () {
|
|
51178
51553
|
return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].isArraysEqual(this.value, this.correctAnswer, false);
|
|
@@ -51186,7 +51561,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51186
51561
|
_super.prototype.onSurveyValueChanged.call(this, newValue);
|
|
51187
51562
|
if (this.isLoadingFromJson)
|
|
51188
51563
|
return;
|
|
51189
|
-
this.
|
|
51564
|
+
this.updateRankingChoicesSync();
|
|
51190
51565
|
};
|
|
51191
51566
|
QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
|
|
51192
51567
|
var newValue = this.value.slice();
|
|
@@ -51207,27 +51582,61 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51207
51582
|
}
|
|
51208
51583
|
this.value = newValue;
|
|
51209
51584
|
};
|
|
51585
|
+
QuestionRankingModel.prototype.getChoicesAnimation = function (isRankingChoices) {
|
|
51586
|
+
var _this = this;
|
|
51587
|
+
return {
|
|
51588
|
+
isAnimationEnabled: function () { return _src_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].animationEnabled && _this.animationAllowed; },
|
|
51589
|
+
getLeaveOptions: function (item) {
|
|
51590
|
+
var choices = isRankingChoices ? _this.rankingChoices : _this.unRankingChoices;
|
|
51591
|
+
if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
|
|
51592
|
+
return { cssClass: "sv-ranking-item--animate-item-removing-empty" };
|
|
51593
|
+
}
|
|
51594
|
+
return { cssClass: "sv-ranking-item--animate-item-removing" };
|
|
51595
|
+
},
|
|
51596
|
+
getEnterOptions: function (item) {
|
|
51597
|
+
var choices = isRankingChoices ? _this.rankingChoices : _this.unRankingChoices;
|
|
51598
|
+
if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
|
|
51599
|
+
return { cssClass: "sv-ranking-item--animate-item-adding-empty" };
|
|
51600
|
+
}
|
|
51601
|
+
return { cssClass: "sv-ranking-item--animate-item-adding" };
|
|
51602
|
+
},
|
|
51603
|
+
getAnimatedElement: function (item) {
|
|
51604
|
+
var _a;
|
|
51605
|
+
var containerSelector = isRankingChoices ? ".sv-ranking__container--to" : ".sv-ranking__container--from";
|
|
51606
|
+
return (_a = _this.getWrapperElement()) === null || _a === void 0 ? void 0 : _a.querySelector(containerSelector + " .sv-ranking-item--ghost");
|
|
51607
|
+
}
|
|
51608
|
+
};
|
|
51609
|
+
};
|
|
51610
|
+
Object.defineProperty(QuestionRankingModel.prototype, "rankingChoicesAnimation", {
|
|
51611
|
+
get: function () {
|
|
51612
|
+
return this._rankingChoicesAnimation;
|
|
51613
|
+
},
|
|
51614
|
+
enumerable: false,
|
|
51615
|
+
configurable: true
|
|
51616
|
+
});
|
|
51617
|
+
Object.defineProperty(QuestionRankingModel.prototype, "unRankingChoicesAnimation", {
|
|
51618
|
+
get: function () {
|
|
51619
|
+
return this._unRankingChoicesAnimation;
|
|
51620
|
+
},
|
|
51621
|
+
enumerable: false,
|
|
51622
|
+
configurable: true
|
|
51623
|
+
});
|
|
51210
51624
|
Object.defineProperty(QuestionRankingModel.prototype, "rankingChoices", {
|
|
51211
51625
|
get: function () {
|
|
51212
51626
|
return this.getPropertyValue("rankingChoices", []);
|
|
51213
51627
|
},
|
|
51628
|
+
set: function (val) {
|
|
51629
|
+
this._rankingChoicesAnimation.sync(val);
|
|
51630
|
+
},
|
|
51214
51631
|
enumerable: false,
|
|
51215
51632
|
configurable: true
|
|
51216
51633
|
});
|
|
51217
51634
|
Object.defineProperty(QuestionRankingModel.prototype, "unRankingChoices", {
|
|
51218
51635
|
get: function () {
|
|
51219
|
-
|
|
51220
|
-
|
|
51221
|
-
|
|
51222
|
-
|
|
51223
|
-
});
|
|
51224
|
-
rankingChoices.forEach(function (rankingChoice) {
|
|
51225
|
-
unRankingChoices.forEach(function (choice, index) {
|
|
51226
|
-
if (choice.value === rankingChoice.value)
|
|
51227
|
-
unRankingChoices.splice(index, 1);
|
|
51228
|
-
});
|
|
51229
|
-
});
|
|
51230
|
-
return unRankingChoices;
|
|
51636
|
+
return this.getPropertyValue("unRankingChoices", []);
|
|
51637
|
+
},
|
|
51638
|
+
set: function (val) {
|
|
51639
|
+
this._unRankingChoicesAnimation.sync(val);
|
|
51231
51640
|
},
|
|
51232
51641
|
enumerable: false,
|
|
51233
51642
|
configurable: true
|
|
@@ -51259,20 +51668,32 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51259
51668
|
});
|
|
51260
51669
|
this.setPropertyValue("rankingChoices", newRankingChoices);
|
|
51261
51670
|
};
|
|
51671
|
+
QuestionRankingModel.prototype.updateUnRankingChoices = function (newRankingChoices) {
|
|
51672
|
+
var unRankingChoices = [];
|
|
51673
|
+
this.visibleChoices.forEach(function (choice) {
|
|
51674
|
+
unRankingChoices.push(choice);
|
|
51675
|
+
});
|
|
51676
|
+
newRankingChoices.forEach(function (rankingChoice) {
|
|
51677
|
+
unRankingChoices.forEach(function (choice, index) {
|
|
51678
|
+
if (choice.value === rankingChoice.value)
|
|
51679
|
+
unRankingChoices.splice(index, 1);
|
|
51680
|
+
});
|
|
51681
|
+
});
|
|
51682
|
+
this.unRankingChoices = unRankingChoices;
|
|
51683
|
+
};
|
|
51262
51684
|
QuestionRankingModel.prototype.updateRankingChoicesSelectToRankMode = function (forceUpdate) {
|
|
51263
51685
|
var _this = this;
|
|
51264
|
-
if (this.isEmpty()) {
|
|
51265
|
-
this.setPropertyValue("rankingChoices", []);
|
|
51266
|
-
return;
|
|
51267
|
-
}
|
|
51268
51686
|
var newRankingChoices = [];
|
|
51269
|
-
this.
|
|
51270
|
-
|
|
51271
|
-
|
|
51272
|
-
|
|
51687
|
+
if (!this.isEmpty()) {
|
|
51688
|
+
this.value.forEach(function (valueItem) {
|
|
51689
|
+
_this.visibleChoices.forEach(function (choice) {
|
|
51690
|
+
if (choice.value === valueItem)
|
|
51691
|
+
newRankingChoices.push(choice);
|
|
51692
|
+
});
|
|
51273
51693
|
});
|
|
51274
|
-
}
|
|
51275
|
-
this.
|
|
51694
|
+
}
|
|
51695
|
+
this.updateUnRankingChoices(newRankingChoices);
|
|
51696
|
+
this.rankingChoices = newRankingChoices;
|
|
51276
51697
|
};
|
|
51277
51698
|
QuestionRankingModel.prototype.endLoadingFromJson = function () {
|
|
51278
51699
|
_super.prototype.endLoadingFromJson.call(this);
|
|
@@ -52058,7 +52479,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
52058
52479
|
return this.inputId + "_" + index;
|
|
52059
52480
|
};
|
|
52060
52481
|
QuestionRatingModel.prototype.supportGoNextPageAutomatic = function () {
|
|
52061
|
-
return this.isMouseDown === true;
|
|
52482
|
+
return this.isMouseDown === true || this.renderAs === "dropdown";
|
|
52062
52483
|
};
|
|
52063
52484
|
QuestionRatingModel.prototype.supportOther = function () {
|
|
52064
52485
|
return false;
|
|
@@ -53808,6 +54229,8 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
53808
54229
|
Object.defineProperty(QuestionTextModel.prototype, "inputType", {
|
|
53809
54230
|
/**
|
|
53810
54231
|
* A value passed on to the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types) attribute of the underlying `<input>` element.
|
|
54232
|
+
*
|
|
54233
|
+
* Default value: `"text"`
|
|
53811
54234
|
*/
|
|
53812
54235
|
get: function () {
|
|
53813
54236
|
return this.getPropertyValue("inputType");
|
|
@@ -56204,7 +56627,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
56204
56627
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
56205
56628
|
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
|
|
56206
56629
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
56207
|
-
/* harmony import */ var
|
|
56630
|
+
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
|
|
56631
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
56632
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
|
|
56208
56633
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
56209
56634
|
var extendStatics = function (d, b) {
|
|
56210
56635
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -56234,6 +56659,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
56234
56659
|
|
|
56235
56660
|
|
|
56236
56661
|
|
|
56662
|
+
|
|
56663
|
+
|
|
56237
56664
|
/**
|
|
56238
56665
|
* A base class for the [`SurveyElement`](https://surveyjs.io/form-library/documentation/surveyelement) and [`SurveyModel`](https://surveyjs.io/form-library/documentation/surveymodel) classes.
|
|
56239
56666
|
*/
|
|
@@ -56418,6 +56845,20 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
56418
56845
|
_this.isEditableTemplateElement = false;
|
|
56419
56846
|
_this.isInteractiveDesignElement = true;
|
|
56420
56847
|
_this.isSingleInRow = true;
|
|
56848
|
+
_this._renderedIsExpanded = true;
|
|
56849
|
+
_this._isAnimatingCollapseExpand = false;
|
|
56850
|
+
_this.animationCollapsed = new _utils_animation__WEBPACK_IMPORTED_MODULE_7__["AnimationBoolean"](_this.getExpandCollapseAnimationOptions(), function (val) {
|
|
56851
|
+
_this._renderedIsExpanded = val;
|
|
56852
|
+
if (_this.animationAllowed) {
|
|
56853
|
+
if (val) {
|
|
56854
|
+
_this.isAnimatingCollapseExpand = true;
|
|
56855
|
+
}
|
|
56856
|
+
else {
|
|
56857
|
+
_this.updateElementCss(false);
|
|
56858
|
+
}
|
|
56859
|
+
}
|
|
56860
|
+
}, function () { return _this.renderedIsExpanded; });
|
|
56861
|
+
_this.animationAllowedValue = true;
|
|
56421
56862
|
_this.name = name;
|
|
56422
56863
|
_this.createNewArray("errors");
|
|
56423
56864
|
_this.createNewArray("titleActions");
|
|
@@ -56463,11 +56904,11 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
56463
56904
|
elLeft = el.getBoundingClientRect().left;
|
|
56464
56905
|
needScroll = elLeft < 0;
|
|
56465
56906
|
}
|
|
56466
|
-
if (!needScroll &&
|
|
56467
|
-
var height =
|
|
56907
|
+
if (!needScroll && _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].isAvailable()) {
|
|
56908
|
+
var height = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].getInnerHeight();
|
|
56468
56909
|
needScroll = height > 0 && height < elTop;
|
|
56469
56910
|
if (!needScroll && checkLeft) {
|
|
56470
|
-
var width =
|
|
56911
|
+
var width = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].getInnerWidth();
|
|
56471
56912
|
needScroll = width > 0 && width < elLeft;
|
|
56472
56913
|
}
|
|
56473
56914
|
}
|
|
@@ -56495,7 +56936,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
56495
56936
|
return null;
|
|
56496
56937
|
};
|
|
56497
56938
|
SurveyElement.FocusElement = function (elementId) {
|
|
56498
|
-
if (!elementId || !
|
|
56939
|
+
if (!elementId || !_global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].isAvailable())
|
|
56499
56940
|
return false;
|
|
56500
56941
|
var res = SurveyElement.focusElementCore(elementId);
|
|
56501
56942
|
if (!res) {
|
|
@@ -56578,6 +57019,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
56578
57019
|
},
|
|
56579
57020
|
set: function (val) {
|
|
56580
57021
|
this.setPropertyValue("state", val);
|
|
57022
|
+
this.renderedIsExpanded = !(this.state === "collapsed" && !this.isDesignMode);
|
|
56581
57023
|
},
|
|
56582
57024
|
enumerable: false,
|
|
56583
57025
|
configurable: true
|
|
@@ -57232,7 +57674,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57232
57674
|
});
|
|
57233
57675
|
Object.defineProperty(SurveyElement.prototype, "hasParent", {
|
|
57234
57676
|
get: function () {
|
|
57235
|
-
return (this.parent && !this.parent.isPage && (!this.parent.originalPage
|
|
57677
|
+
return (this.parent && !this.parent.isPage && (!this.parent.originalPage)) || (this.parent === undefined);
|
|
57236
57678
|
},
|
|
57237
57679
|
enumerable: false,
|
|
57238
57680
|
configurable: true
|
|
@@ -57254,11 +57696,14 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57254
57696
|
return this.shouldAddRunnerStyles() && (this.hasParent);
|
|
57255
57697
|
};
|
|
57256
57698
|
SurveyElement.prototype.getCssRoot = function (cssClasses) {
|
|
57699
|
+
var isExpanadable = !!this.isCollapsed || !!this.isExpanded;
|
|
57257
57700
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
|
57258
57701
|
.append(cssClasses.withFrame, this.getHasFrameV2() && !this.isCompact)
|
|
57259
57702
|
.append(cssClasses.compact, this.isCompact && this.getHasFrameV2())
|
|
57260
57703
|
.append(cssClasses.collapsed, !!this.isCollapsed)
|
|
57261
|
-
.append(cssClasses.
|
|
57704
|
+
.append(cssClasses.expandableAnimating, isExpanadable && this.isAnimatingCollapseExpand)
|
|
57705
|
+
.append(cssClasses.expanded, !!this.isExpanded && this.renderedIsExpanded)
|
|
57706
|
+
.append(cssClasses.expandable, isExpanadable)
|
|
57262
57707
|
.append(cssClasses.nested, this.getIsNested())
|
|
57263
57708
|
.toString();
|
|
57264
57709
|
};
|
|
@@ -57410,12 +57855,12 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57410
57855
|
});
|
|
57411
57856
|
SurveyElement.prototype.isContainsSelection = function (el) {
|
|
57412
57857
|
var elementWithSelection = undefined;
|
|
57413
|
-
var _document =
|
|
57414
|
-
if (
|
|
57858
|
+
var _document = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].getDocument();
|
|
57859
|
+
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].isAvailable() && !!_document && _document["selection"]) {
|
|
57415
57860
|
elementWithSelection = _document["selection"].createRange().parentElement();
|
|
57416
57861
|
}
|
|
57417
57862
|
else {
|
|
57418
|
-
var selection =
|
|
57863
|
+
var selection = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].getSelection();
|
|
57419
57864
|
if (!!selection && selection.rangeCount > 0) {
|
|
57420
57865
|
var range = selection.getRangeAt(0);
|
|
57421
57866
|
if (range.startOffset !== range.endOffset) {
|
|
@@ -57480,6 +57925,84 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57480
57925
|
});
|
|
57481
57926
|
}
|
|
57482
57927
|
};
|
|
57928
|
+
SurveyElement.prototype.setWrapperElement = function (element) {
|
|
57929
|
+
this.wrapperElement = element;
|
|
57930
|
+
};
|
|
57931
|
+
SurveyElement.prototype.getWrapperElement = function () {
|
|
57932
|
+
return this.wrapperElement;
|
|
57933
|
+
};
|
|
57934
|
+
Object.defineProperty(SurveyElement.prototype, "isAnimatingCollapseExpand", {
|
|
57935
|
+
get: function () {
|
|
57936
|
+
return this._isAnimatingCollapseExpand || this._renderedIsExpanded != this.isExpanded;
|
|
57937
|
+
},
|
|
57938
|
+
set: function (val) {
|
|
57939
|
+
if (val !== this._isAnimatingCollapseExpand) {
|
|
57940
|
+
this._isAnimatingCollapseExpand = val;
|
|
57941
|
+
this.updateElementCss(false);
|
|
57942
|
+
}
|
|
57943
|
+
},
|
|
57944
|
+
enumerable: false,
|
|
57945
|
+
configurable: true
|
|
57946
|
+
});
|
|
57947
|
+
SurveyElement.prototype.getExpandCollapseAnimationOptions = function () {
|
|
57948
|
+
var _this = this;
|
|
57949
|
+
var beforeRunAnimation = function (el) {
|
|
57950
|
+
_this.isAnimatingCollapseExpand = true;
|
|
57951
|
+
el.style.setProperty("--animation-height", el.offsetHeight + "px");
|
|
57952
|
+
};
|
|
57953
|
+
var afterRunAnimation = function (el) {
|
|
57954
|
+
_this.isAnimatingCollapseExpand = false;
|
|
57955
|
+
};
|
|
57956
|
+
return {
|
|
57957
|
+
getEnterOptions: function () {
|
|
57958
|
+
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
|
57959
|
+
return {
|
|
57960
|
+
cssClass: cssClasses.contentFadeIn,
|
|
57961
|
+
onBeforeRunAnimation: beforeRunAnimation,
|
|
57962
|
+
onAfterRunAnimation: afterRunAnimation,
|
|
57963
|
+
};
|
|
57964
|
+
},
|
|
57965
|
+
getLeaveOptions: function () {
|
|
57966
|
+
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
|
57967
|
+
return { cssClass: cssClasses.contentFadeOut,
|
|
57968
|
+
onBeforeRunAnimation: beforeRunAnimation,
|
|
57969
|
+
onAfterRunAnimation: afterRunAnimation
|
|
57970
|
+
};
|
|
57971
|
+
},
|
|
57972
|
+
getAnimatedElement: function () {
|
|
57973
|
+
var _a;
|
|
57974
|
+
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
|
57975
|
+
if (cssClasses.content) {
|
|
57976
|
+
var selector = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["classesToSelector"])(cssClasses.content);
|
|
57977
|
+
if (selector) {
|
|
57978
|
+
return (_a = _this.getWrapperElement()) === null || _a === void 0 ? void 0 : _a.querySelector(selector);
|
|
57979
|
+
}
|
|
57980
|
+
}
|
|
57981
|
+
return undefined;
|
|
57982
|
+
},
|
|
57983
|
+
isAnimationEnabled: function () { return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].animationEnabled && _this.animationAllowed && !_this.isDesignMode; }
|
|
57984
|
+
};
|
|
57985
|
+
};
|
|
57986
|
+
Object.defineProperty(SurveyElement.prototype, "renderedIsExpanded", {
|
|
57987
|
+
get: function () {
|
|
57988
|
+
return !!this._renderedIsExpanded;
|
|
57989
|
+
},
|
|
57990
|
+
set: function (val) {
|
|
57991
|
+
this.animationCollapsed.sync(val);
|
|
57992
|
+
},
|
|
57993
|
+
enumerable: false,
|
|
57994
|
+
configurable: true
|
|
57995
|
+
});
|
|
57996
|
+
Object.defineProperty(SurveyElement.prototype, "animationAllowed", {
|
|
57997
|
+
get: function () {
|
|
57998
|
+
return !this.isLoadingFromJson && !this.isDisposed && !!this.survey && this.animationAllowedValue;
|
|
57999
|
+
},
|
|
58000
|
+
set: function (val) {
|
|
58001
|
+
this.animationAllowedValue = val;
|
|
58002
|
+
},
|
|
58003
|
+
enumerable: false,
|
|
58004
|
+
configurable: true
|
|
58005
|
+
});
|
|
57483
58006
|
SurveyElement.prototype.dispose = function () {
|
|
57484
58007
|
_super.prototype.dispose.call(this);
|
|
57485
58008
|
if (this.titleToolbarValue) {
|
|
@@ -57502,6 +58025,9 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57502
58025
|
__decorate([
|
|
57503
58026
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
|
|
57504
58027
|
], SurveyElement.prototype, "allowRootStyle", void 0);
|
|
58028
|
+
__decorate([
|
|
58029
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
58030
|
+
], SurveyElement.prototype, "_renderedIsExpanded", void 0);
|
|
57505
58031
|
return SurveyElement;
|
|
57506
58032
|
}(SurveyElementCore));
|
|
57507
58033
|
|
|
@@ -65738,7 +66264,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
65738
66264
|
}
|
|
65739
66265
|
}
|
|
65740
66266
|
else if (isStrCiEqual(layoutElement.id, "advanced-header")) {
|
|
65741
|
-
if (this.state === "running" && layoutElement.container === container) {
|
|
66267
|
+
if ((this.state === "running" || this.state === "starting") && layoutElement.container === container) {
|
|
65742
66268
|
containerLayoutElements.push(layoutElement);
|
|
65743
66269
|
}
|
|
65744
66270
|
}
|
|
@@ -67873,6 +68399,287 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("runexpressiontr
|
|
|
67873
68399
|
}, "surveytrigger");
|
|
67874
68400
|
|
|
67875
68401
|
|
|
68402
|
+
/***/ }),
|
|
68403
|
+
|
|
68404
|
+
/***/ "./src/utils/animation.ts":
|
|
68405
|
+
/*!********************************!*\
|
|
68406
|
+
!*** ./src/utils/animation.ts ***!
|
|
68407
|
+
\********************************/
|
|
68408
|
+
/*! exports provided: AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationBoolean, AnimationGroup */
|
|
68409
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
68410
|
+
|
|
68411
|
+
"use strict";
|
|
68412
|
+
__webpack_require__.r(__webpack_exports__);
|
|
68413
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationUtils", function() { return AnimationUtils; });
|
|
68414
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationPropertyUtils", function() { return AnimationPropertyUtils; });
|
|
68415
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return AnimationGroupUtils; });
|
|
68416
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return AnimationBoolean; });
|
|
68417
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return AnimationGroup; });
|
|
68418
|
+
/* harmony import */ var _taskmanager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./taskmanager */ "./src/utils/taskmanager.ts");
|
|
68419
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
68420
|
+
var extendStatics = function (d, b) {
|
|
68421
|
+
extendStatics = Object.setPrototypeOf ||
|
|
68422
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
68423
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
68424
|
+
return extendStatics(d, b);
|
|
68425
|
+
};
|
|
68426
|
+
return function (d, b) {
|
|
68427
|
+
if (typeof b !== "function" && b !== null)
|
|
68428
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
68429
|
+
extendStatics(d, b);
|
|
68430
|
+
function __() { this.constructor = d; }
|
|
68431
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
68432
|
+
};
|
|
68433
|
+
})();
|
|
68434
|
+
|
|
68435
|
+
var AnimationUtils = /** @class */ (function () {
|
|
68436
|
+
function AnimationUtils() {
|
|
68437
|
+
this.cancelQueue = [];
|
|
68438
|
+
}
|
|
68439
|
+
AnimationUtils.prototype.getMsFromRule = function (value) {
|
|
68440
|
+
if (value === "auto")
|
|
68441
|
+
return 0;
|
|
68442
|
+
return Number(value.slice(0, -1).replace(",", ".")) * 1000;
|
|
68443
|
+
};
|
|
68444
|
+
AnimationUtils.prototype.getAnimationsCount = function (element) {
|
|
68445
|
+
var animationName = "";
|
|
68446
|
+
if (getComputedStyle) {
|
|
68447
|
+
animationName = getComputedStyle(element).animationName;
|
|
68448
|
+
}
|
|
68449
|
+
return (animationName && animationName != "none" ? animationName.split(", ").length : 0);
|
|
68450
|
+
};
|
|
68451
|
+
AnimationUtils.prototype.getAnimationDuration = function (element) {
|
|
68452
|
+
var style = getComputedStyle(element);
|
|
68453
|
+
var delays = style["animationDelay"].split(", ");
|
|
68454
|
+
var durations = style["animationDuration"].split(", ");
|
|
68455
|
+
var duration = 0;
|
|
68456
|
+
for (var i = 0; i < Math.max(durations.length, delays.length); i++) {
|
|
68457
|
+
duration = Math.max(duration, this.getMsFromRule(durations[i % durations.length]) + this.getMsFromRule(delays[i % delays.length]));
|
|
68458
|
+
}
|
|
68459
|
+
return duration;
|
|
68460
|
+
};
|
|
68461
|
+
AnimationUtils.prototype.onAnimationEnd = function (element, callback, options) {
|
|
68462
|
+
var _this = this;
|
|
68463
|
+
var cancelTimeout;
|
|
68464
|
+
var animationsCount = this.getAnimationsCount(element);
|
|
68465
|
+
var onEndCallback = function (isCancel) {
|
|
68466
|
+
if (isCancel === void 0) { isCancel = true; }
|
|
68467
|
+
options.onAfterRunAnimation && options.onAfterRunAnimation(element);
|
|
68468
|
+
callback(isCancel);
|
|
68469
|
+
clearTimeout(cancelTimeout);
|
|
68470
|
+
_this.cancelQueue.splice(_this.cancelQueue.indexOf(onEndCallback), 1);
|
|
68471
|
+
element.removeEventListener("animationend", onAnimationEndCallback);
|
|
68472
|
+
};
|
|
68473
|
+
var onAnimationEndCallback = function (event) {
|
|
68474
|
+
if (event.target == event.currentTarget && --animationsCount <= 0) {
|
|
68475
|
+
onEndCallback(false);
|
|
68476
|
+
}
|
|
68477
|
+
};
|
|
68478
|
+
if (animationsCount > 0) {
|
|
68479
|
+
element.addEventListener("animationend", onAnimationEndCallback);
|
|
68480
|
+
this.cancelQueue.push(onEndCallback);
|
|
68481
|
+
cancelTimeout = setTimeout(function () {
|
|
68482
|
+
onEndCallback(false);
|
|
68483
|
+
}, this.getAnimationDuration(element) + 10);
|
|
68484
|
+
}
|
|
68485
|
+
else {
|
|
68486
|
+
callback(true);
|
|
68487
|
+
}
|
|
68488
|
+
};
|
|
68489
|
+
AnimationUtils.prototype.beforeAnimationRun = function (element, options) {
|
|
68490
|
+
if (element) {
|
|
68491
|
+
options.onBeforeRunAnimation && options.onBeforeRunAnimation(element);
|
|
68492
|
+
}
|
|
68493
|
+
};
|
|
68494
|
+
AnimationUtils.prototype.runLeaveAnimation = function (element, options, callback) {
|
|
68495
|
+
if (element && options.cssClass) {
|
|
68496
|
+
element.classList.add(options.cssClass);
|
|
68497
|
+
var onAnimationEndCallback = function (isCancel) {
|
|
68498
|
+
callback();
|
|
68499
|
+
if (isCancel) {
|
|
68500
|
+
element.classList.remove(options.cssClass);
|
|
68501
|
+
}
|
|
68502
|
+
else {
|
|
68503
|
+
requestAnimationFrame(function () {
|
|
68504
|
+
requestAnimationFrame(function () {
|
|
68505
|
+
element.classList.remove(options.cssClass);
|
|
68506
|
+
});
|
|
68507
|
+
});
|
|
68508
|
+
}
|
|
68509
|
+
};
|
|
68510
|
+
this.onAnimationEnd(element, onAnimationEndCallback, options);
|
|
68511
|
+
}
|
|
68512
|
+
else {
|
|
68513
|
+
callback();
|
|
68514
|
+
}
|
|
68515
|
+
};
|
|
68516
|
+
AnimationUtils.prototype.runEnterAnimation = function (element, options) {
|
|
68517
|
+
if (element && options.cssClass) {
|
|
68518
|
+
element.classList.add(options.cssClass);
|
|
68519
|
+
this.onAnimationEnd(element, function () {
|
|
68520
|
+
element.classList.remove(options.cssClass);
|
|
68521
|
+
}, options);
|
|
68522
|
+
}
|
|
68523
|
+
};
|
|
68524
|
+
AnimationUtils.prototype.cancel = function () {
|
|
68525
|
+
this.cancelQueue.forEach(function (func) { return func(); });
|
|
68526
|
+
this.cancelQueue = [];
|
|
68527
|
+
};
|
|
68528
|
+
return AnimationUtils;
|
|
68529
|
+
}());
|
|
68530
|
+
|
|
68531
|
+
var AnimationPropertyUtils = /** @class */ (function (_super) {
|
|
68532
|
+
__extends(AnimationPropertyUtils, _super);
|
|
68533
|
+
function AnimationPropertyUtils() {
|
|
68534
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
68535
|
+
}
|
|
68536
|
+
AnimationPropertyUtils.prototype.onEnter = function (getElement, options) {
|
|
68537
|
+
var _this = this;
|
|
68538
|
+
var callback = function () {
|
|
68539
|
+
var element = getElement();
|
|
68540
|
+
_this.beforeAnimationRun(element, options);
|
|
68541
|
+
_this.runEnterAnimation(element, options);
|
|
68542
|
+
};
|
|
68543
|
+
requestAnimationFrame(function () {
|
|
68544
|
+
if (getElement()) {
|
|
68545
|
+
callback();
|
|
68546
|
+
}
|
|
68547
|
+
else {
|
|
68548
|
+
requestAnimationFrame(callback);
|
|
68549
|
+
}
|
|
68550
|
+
});
|
|
68551
|
+
};
|
|
68552
|
+
AnimationPropertyUtils.prototype.onLeave = function (getElement, callback, options) {
|
|
68553
|
+
var element = getElement();
|
|
68554
|
+
this.beforeAnimationRun(element, options);
|
|
68555
|
+
this.runLeaveAnimation(element, options, callback);
|
|
68556
|
+
};
|
|
68557
|
+
return AnimationPropertyUtils;
|
|
68558
|
+
}(AnimationUtils));
|
|
68559
|
+
|
|
68560
|
+
var AnimationGroupUtils = /** @class */ (function (_super) {
|
|
68561
|
+
__extends(AnimationGroupUtils, _super);
|
|
68562
|
+
function AnimationGroupUtils() {
|
|
68563
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
68564
|
+
}
|
|
68565
|
+
AnimationGroupUtils.prototype.onEnter = function (getElement, getOptions, elements) {
|
|
68566
|
+
var _this = this;
|
|
68567
|
+
if (elements.length == 0)
|
|
68568
|
+
return;
|
|
68569
|
+
requestAnimationFrame(function () {
|
|
68570
|
+
var callback = function () {
|
|
68571
|
+
elements.forEach(function (el) {
|
|
68572
|
+
_this.beforeAnimationRun(getElement(el), getOptions(el));
|
|
68573
|
+
});
|
|
68574
|
+
elements.forEach(function (el) {
|
|
68575
|
+
_this.runEnterAnimation(getElement(el), getOptions(el));
|
|
68576
|
+
});
|
|
68577
|
+
};
|
|
68578
|
+
if (!getElement(elements[0])) {
|
|
68579
|
+
requestAnimationFrame(callback);
|
|
68580
|
+
}
|
|
68581
|
+
else {
|
|
68582
|
+
callback();
|
|
68583
|
+
}
|
|
68584
|
+
});
|
|
68585
|
+
};
|
|
68586
|
+
AnimationGroupUtils.prototype.onLeave = function (getElement, callback, getOptions, elements) {
|
|
68587
|
+
var _this = this;
|
|
68588
|
+
elements.forEach(function (el) {
|
|
68589
|
+
_this.beforeAnimationRun(getElement(el), getOptions(el));
|
|
68590
|
+
});
|
|
68591
|
+
var counter = elements.length;
|
|
68592
|
+
var onEndCallback = function () {
|
|
68593
|
+
if (--counter <= 0) {
|
|
68594
|
+
callback();
|
|
68595
|
+
}
|
|
68596
|
+
};
|
|
68597
|
+
elements.forEach(function (el) {
|
|
68598
|
+
_this.runLeaveAnimation(getElement(el), getOptions(el), onEndCallback);
|
|
68599
|
+
});
|
|
68600
|
+
};
|
|
68601
|
+
return AnimationGroupUtils;
|
|
68602
|
+
}(AnimationUtils));
|
|
68603
|
+
|
|
68604
|
+
var AnimationProperty = /** @class */ (function () {
|
|
68605
|
+
function AnimationProperty(animationOptions, update, getCurrentValue) {
|
|
68606
|
+
var _this = this;
|
|
68607
|
+
this.animationOptions = animationOptions;
|
|
68608
|
+
this.update = update;
|
|
68609
|
+
this.getCurrentValue = getCurrentValue;
|
|
68610
|
+
this._debouncedSync = Object(_taskmanager__WEBPACK_IMPORTED_MODULE_0__["debounce"])(function (newValue) {
|
|
68611
|
+
_this.animation.cancel();
|
|
68612
|
+
_this._sync(newValue);
|
|
68613
|
+
});
|
|
68614
|
+
}
|
|
68615
|
+
AnimationProperty.prototype.sync = function (newValue) {
|
|
68616
|
+
if (this.animationOptions.isAnimationEnabled()) {
|
|
68617
|
+
this._debouncedSync.run(newValue);
|
|
68618
|
+
}
|
|
68619
|
+
else {
|
|
68620
|
+
this.update(newValue);
|
|
68621
|
+
}
|
|
68622
|
+
};
|
|
68623
|
+
AnimationProperty.prototype.cancel = function () {
|
|
68624
|
+
this.animation.cancel();
|
|
68625
|
+
this._debouncedSync.cancel();
|
|
68626
|
+
};
|
|
68627
|
+
return AnimationProperty;
|
|
68628
|
+
}());
|
|
68629
|
+
var AnimationBoolean = /** @class */ (function (_super) {
|
|
68630
|
+
__extends(AnimationBoolean, _super);
|
|
68631
|
+
function AnimationBoolean() {
|
|
68632
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
68633
|
+
_this.animation = new AnimationPropertyUtils();
|
|
68634
|
+
return _this;
|
|
68635
|
+
}
|
|
68636
|
+
AnimationBoolean.prototype._sync = function (newValue) {
|
|
68637
|
+
var _this = this;
|
|
68638
|
+
if (newValue !== this.getCurrentValue()) {
|
|
68639
|
+
if (newValue) {
|
|
68640
|
+
this.update(newValue);
|
|
68641
|
+
this.animation.onEnter(function () { return _this.animationOptions.getAnimatedElement(); }, this.animationOptions.getEnterOptions());
|
|
68642
|
+
}
|
|
68643
|
+
else {
|
|
68644
|
+
this.animation.onLeave(function () { return _this.animationOptions.getAnimatedElement(); }, function () {
|
|
68645
|
+
_this.update(newValue);
|
|
68646
|
+
}, this.animationOptions.getLeaveOptions());
|
|
68647
|
+
}
|
|
68648
|
+
}
|
|
68649
|
+
else {
|
|
68650
|
+
this.update(newValue);
|
|
68651
|
+
}
|
|
68652
|
+
};
|
|
68653
|
+
return AnimationBoolean;
|
|
68654
|
+
}(AnimationProperty));
|
|
68655
|
+
|
|
68656
|
+
var AnimationGroup = /** @class */ (function (_super) {
|
|
68657
|
+
__extends(AnimationGroup, _super);
|
|
68658
|
+
function AnimationGroup() {
|
|
68659
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
68660
|
+
_this.animation = new AnimationGroupUtils();
|
|
68661
|
+
return _this;
|
|
68662
|
+
}
|
|
68663
|
+
AnimationGroup.prototype._sync = function (newValue) {
|
|
68664
|
+
var _this = this;
|
|
68665
|
+
var oldValue = this.getCurrentValue();
|
|
68666
|
+
var itemsToAdd = newValue.filter(function (el) { return oldValue.indexOf(el) < 0; });
|
|
68667
|
+
var deletedItems = oldValue.filter(function (el) { return newValue.indexOf(el) < 0; });
|
|
68668
|
+
this.animation.onEnter(function (el) { return _this.animationOptions.getAnimatedElement(el); }, function (el) { return _this.animationOptions.getEnterOptions(el); }, itemsToAdd);
|
|
68669
|
+
if (itemsToAdd.length == 0 && (deletedItems === null || deletedItems === void 0 ? void 0 : deletedItems.length) > 0) {
|
|
68670
|
+
this.animation.onLeave(function (el) { return _this.animationOptions.getAnimatedElement(el); }, function () {
|
|
68671
|
+
_this.update(newValue);
|
|
68672
|
+
}, function (el) { return _this.animationOptions.getLeaveOptions(el); }, deletedItems);
|
|
68673
|
+
}
|
|
68674
|
+
else {
|
|
68675
|
+
this.update(newValue);
|
|
68676
|
+
}
|
|
68677
|
+
};
|
|
68678
|
+
return AnimationGroup;
|
|
68679
|
+
}(AnimationProperty));
|
|
68680
|
+
|
|
68681
|
+
|
|
68682
|
+
|
|
67876
68683
|
/***/ }),
|
|
67877
68684
|
|
|
67878
68685
|
/***/ "./src/utils/camera.ts":
|
|
@@ -68612,6 +69419,117 @@ var VerticalResponsivityManager = /** @class */ (function (_super) {
|
|
|
68612
69419
|
|
|
68613
69420
|
|
|
68614
69421
|
|
|
69422
|
+
/***/ }),
|
|
69423
|
+
|
|
69424
|
+
/***/ "./src/utils/taskmanager.ts":
|
|
69425
|
+
/*!**********************************!*\
|
|
69426
|
+
!*** ./src/utils/taskmanager.ts ***!
|
|
69427
|
+
\**********************************/
|
|
69428
|
+
/*! exports provided: Task, TaskManger, debounce */
|
|
69429
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
69430
|
+
|
|
69431
|
+
"use strict";
|
|
69432
|
+
__webpack_require__.r(__webpack_exports__);
|
|
69433
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Task", function() { return Task; });
|
|
69434
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TaskManger", function() { return TaskManger; });
|
|
69435
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
|
|
69436
|
+
var Task = /** @class */ (function () {
|
|
69437
|
+
function Task(func, isMultiple) {
|
|
69438
|
+
var _this = this;
|
|
69439
|
+
if (isMultiple === void 0) { isMultiple = false; }
|
|
69440
|
+
this.func = func;
|
|
69441
|
+
this.isMultiple = isMultiple;
|
|
69442
|
+
this._isCompleted = false;
|
|
69443
|
+
this.execute = function () {
|
|
69444
|
+
if (!_this._isCompleted) {
|
|
69445
|
+
_this.func();
|
|
69446
|
+
_this._isCompleted = !_this.isMultiple;
|
|
69447
|
+
}
|
|
69448
|
+
};
|
|
69449
|
+
}
|
|
69450
|
+
Task.prototype.discard = function () {
|
|
69451
|
+
this._isCompleted = true;
|
|
69452
|
+
};
|
|
69453
|
+
Object.defineProperty(Task.prototype, "isCompleted", {
|
|
69454
|
+
get: function () {
|
|
69455
|
+
return this._isCompleted;
|
|
69456
|
+
},
|
|
69457
|
+
enumerable: false,
|
|
69458
|
+
configurable: true
|
|
69459
|
+
});
|
|
69460
|
+
return Task;
|
|
69461
|
+
}());
|
|
69462
|
+
|
|
69463
|
+
var TaskManger = /** @class */ (function () {
|
|
69464
|
+
function TaskManger(interval) {
|
|
69465
|
+
if (interval === void 0) { interval = 100; }
|
|
69466
|
+
this.interval = interval;
|
|
69467
|
+
setTimeout(TaskManger.Instance().tick, interval);
|
|
69468
|
+
}
|
|
69469
|
+
// dispose
|
|
69470
|
+
TaskManger.Instance = function () {
|
|
69471
|
+
if (!TaskManger.instance) {
|
|
69472
|
+
TaskManger.instance = new TaskManger();
|
|
69473
|
+
}
|
|
69474
|
+
return TaskManger.instance;
|
|
69475
|
+
};
|
|
69476
|
+
TaskManger.prototype.tick = function () {
|
|
69477
|
+
try {
|
|
69478
|
+
var newTasks = [];
|
|
69479
|
+
for (var i = 0; i < TaskManger.tasks.length; i++) {
|
|
69480
|
+
var task = TaskManger.tasks[i];
|
|
69481
|
+
task.execute();
|
|
69482
|
+
if (!task.isCompleted) {
|
|
69483
|
+
newTasks.push(task);
|
|
69484
|
+
}
|
|
69485
|
+
else {
|
|
69486
|
+
if (typeof task.dispose === "function") {
|
|
69487
|
+
task.dispose();
|
|
69488
|
+
}
|
|
69489
|
+
}
|
|
69490
|
+
}
|
|
69491
|
+
TaskManger.tasks = newTasks;
|
|
69492
|
+
}
|
|
69493
|
+
finally {
|
|
69494
|
+
setTimeout(TaskManger.Instance().tick, this.interval);
|
|
69495
|
+
}
|
|
69496
|
+
};
|
|
69497
|
+
TaskManger.schedule = function (task) {
|
|
69498
|
+
TaskManger.tasks.push(task);
|
|
69499
|
+
};
|
|
69500
|
+
TaskManger.instance = undefined;
|
|
69501
|
+
TaskManger.tasks = [];
|
|
69502
|
+
return TaskManger;
|
|
69503
|
+
}());
|
|
69504
|
+
|
|
69505
|
+
function debounce(func) {
|
|
69506
|
+
var _this = this;
|
|
69507
|
+
var isSheduled = false;
|
|
69508
|
+
var isCanceled = false;
|
|
69509
|
+
var funcArgs;
|
|
69510
|
+
return { run: (function () {
|
|
69511
|
+
var args = [];
|
|
69512
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
69513
|
+
args[_i] = arguments[_i];
|
|
69514
|
+
}
|
|
69515
|
+
isCanceled = false;
|
|
69516
|
+
funcArgs = args;
|
|
69517
|
+
if (!isSheduled) {
|
|
69518
|
+
isSheduled = true;
|
|
69519
|
+
queueMicrotask(function () {
|
|
69520
|
+
if (!isCanceled) {
|
|
69521
|
+
func.apply(_this, funcArgs);
|
|
69522
|
+
}
|
|
69523
|
+
isCanceled = false;
|
|
69524
|
+
isSheduled = false;
|
|
69525
|
+
});
|
|
69526
|
+
}
|
|
69527
|
+
}), cancel: function () {
|
|
69528
|
+
isCanceled = true;
|
|
69529
|
+
} };
|
|
69530
|
+
}
|
|
69531
|
+
|
|
69532
|
+
|
|
68615
69533
|
/***/ }),
|
|
68616
69534
|
|
|
68617
69535
|
/***/ "./src/utils/utils.ts":
|