survey-core 1.9.135 → 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 +385 -19
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +385 -19
- package/defaultV2.fontless.css.map +1 -1
- package/defaultV2.fontless.min.css +2 -2
- package/defaultV2.min.css +2 -2
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js +1 -1
- package/i18n/basque.js +1 -1
- package/i18n/basque.min.js +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js +1 -1
- package/i18n/catalan.js +1 -1
- package/i18n/catalan.min.js +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js +1 -1
- package/i18n/english.js +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 +1140 -196
- 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 +17 -0
- package/ts3.4/typings/dragdrop/dom-adapter.d.ts +2 -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_checkbox.d.ts +1 -0
- package/ts3.4/typings/question_custom.d.ts +9 -0
- package/ts3.4/typings/question_matrixdropdowncolumn.d.ts +2 -3
- package/ts3.4/typings/question_multipletext.d.ts +67 -20
- package/ts3.4/typings/question_paneldynamic.d.ts +1 -1
- package/ts3.4/typings/question_ranking.d.ts +12 -3
- package/ts3.4/typings/question_text.d.ts +4 -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 +17 -0
- package/typings/dragdrop/dom-adapter.d.ts +2 -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_checkbox.d.ts +1 -0
- package/typings/question_custom.d.ts +9 -0
- package/typings/question_matrixdropdowncolumn.d.ts +3 -4
- package/typings/question_multipletext.d.ts +70 -20
- package/typings/question_paneldynamic.d.ts +1 -1
- package/typings/question_ranking.d.ts +12 -1
- package/typings/question_text.d.ts +4 -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: "",
|
|
@@ -5503,6 +5511,9 @@ var defaultV2Css = {
|
|
|
5503
5511
|
progressButtonsContainerCenter: "sd-progress-buttons__container-center",
|
|
5504
5512
|
progressButtonsContainer: "sd-progress-buttons__container",
|
|
5505
5513
|
progressButtonsConnector: "sd-progress-buttons__connector",
|
|
5514
|
+
progressButtonsButton: "sd-progress-buttons__button",
|
|
5515
|
+
progressButtonsButtonBackground: "sd-progress-buttons__button-background",
|
|
5516
|
+
progressButtonsButtonContent: "sd-progress-buttons__button-content",
|
|
5506
5517
|
progressButtonsHeader: "sd-progress-buttons__header",
|
|
5507
5518
|
progressButtonsFooter: "sd-progress-buttons__footer",
|
|
5508
5519
|
progressButtonsImageButtonLeft: "sd-progress-buttons__image-button-left",
|
|
@@ -5528,8 +5539,14 @@ var defaultV2Css = {
|
|
|
5528
5539
|
row: "sd-row sd-clearfix",
|
|
5529
5540
|
rowMultiple: "sd-row--multiple",
|
|
5530
5541
|
rowCompact: "sd-row--compact",
|
|
5542
|
+
rowFadeIn: "sd-row--fade-in",
|
|
5543
|
+
rowFadeOut: "sd-row--fade-out",
|
|
5531
5544
|
pageRow: "sd-page__row",
|
|
5532
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",
|
|
5533
5550
|
mainRoot: "sd-element sd-question sd-row__question",
|
|
5534
5551
|
flowRoot: "sd-element sd-question sd-row__question sd-row__question--flow",
|
|
5535
5552
|
withFrame: "sd-element--with-frame",
|
|
@@ -5539,7 +5556,7 @@ var defaultV2Css = {
|
|
|
5539
5556
|
headerLeft: "sd-question__header--location--left",
|
|
5540
5557
|
headerTop: "sd-question__header--location-top sd-element__header--location-top",
|
|
5541
5558
|
headerBottom: "sd-question__header--location--bottom",
|
|
5542
|
-
content: "sd-question__content",
|
|
5559
|
+
content: "sd-element__content sd-question__content",
|
|
5543
5560
|
contentSupportContainerQueries: "sd-question__content--support-container-queries",
|
|
5544
5561
|
contentLeft: "sd-question__content--left",
|
|
5545
5562
|
titleNumInline: "sd-element__title--num-inline",
|
|
@@ -5572,6 +5589,8 @@ var defaultV2Css = {
|
|
|
5572
5589
|
hasErrorTop: "sd-question--error-top",
|
|
5573
5590
|
hasErrorBottom: "sd-question--error-bottom",
|
|
5574
5591
|
collapsed: "sd-element--collapsed",
|
|
5592
|
+
expandable: "sd-element--expandable",
|
|
5593
|
+
expandableAnimating: "sd-elemenet--expandable--animating",
|
|
5575
5594
|
expanded: "sd-element--expanded",
|
|
5576
5595
|
nested: "sd-element--nested",
|
|
5577
5596
|
invisible: "sd-element--invisible",
|
|
@@ -6768,8 +6787,6 @@ var DragDropChoices = /** @class */ (function (_super) {
|
|
|
6768
6787
|
DragDropChoices.prototype.afterDragOver = function (dropTargetNode) {
|
|
6769
6788
|
if (this.isDropTargetDoesntChanged(this.isBottom))
|
|
6770
6789
|
return;
|
|
6771
|
-
if (this.dropTarget === this.draggedElement)
|
|
6772
|
-
return;
|
|
6773
6790
|
var choices = this.getVisibleChoices();
|
|
6774
6791
|
var dropTargetIndex = choices.indexOf(this.dropTarget);
|
|
6775
6792
|
var draggedElementIndex = choices.indexOf(this.draggedElement);
|
|
@@ -6937,7 +6954,7 @@ var DragDropCore = /** @class */ (function () {
|
|
|
6937
6954
|
this.domAdapter.draggedElementShortcut.style.display = "none";
|
|
6938
6955
|
if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomDocumentHelper"].isAvailable())
|
|
6939
6956
|
return null;
|
|
6940
|
-
var dragOverNode =
|
|
6957
|
+
var dragOverNode = this.domAdapter.documentOrShadowRoot.elementFromPoint(clientX, clientY);
|
|
6941
6958
|
// this.domAdapter.draggedElementShortcut.hidden = false;
|
|
6942
6959
|
this.domAdapter.draggedElementShortcut.style.display = displayProp || "block";
|
|
6943
6960
|
if (!dragOverNode)
|
|
@@ -6994,7 +7011,9 @@ var DragDropCore = /** @class */ (function () {
|
|
|
6994
7011
|
return;
|
|
6995
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
|
|
6996
7013
|
this.isBottom = isBottom;
|
|
6997
|
-
this.
|
|
7014
|
+
if (this.draggedElement != this.dropTarget) {
|
|
7015
|
+
this.afterDragOver(dropTargetNode);
|
|
7016
|
+
}
|
|
6998
7017
|
this.prevDropTarget = this.dropTarget;
|
|
6999
7018
|
};
|
|
7000
7019
|
DragDropCore.prototype.drop = function () {
|
|
@@ -7124,10 +7143,17 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
|
7124
7143
|
};
|
|
7125
7144
|
this.draggedElementShortcut = null;
|
|
7126
7145
|
}
|
|
7146
|
+
Object.defineProperty(DragDropDOMAdapter.prototype, "documentOrShadowRoot", {
|
|
7147
|
+
get: function () {
|
|
7148
|
+
return _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].environment.root;
|
|
7149
|
+
},
|
|
7150
|
+
enumerable: false,
|
|
7151
|
+
configurable: true
|
|
7152
|
+
});
|
|
7127
7153
|
Object.defineProperty(DragDropDOMAdapter.prototype, "rootElement", {
|
|
7128
7154
|
get: function () {
|
|
7129
7155
|
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["isShadowDOM"])(_settings__WEBPACK_IMPORTED_MODULE_2__["settings"].environment.root)) {
|
|
7130
|
-
return _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].environment.root.host;
|
|
7156
|
+
return this.rootContainer || _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].environment.root.host;
|
|
7131
7157
|
}
|
|
7132
7158
|
else {
|
|
7133
7159
|
return this.rootContainer || _settings__WEBPACK_IMPORTED_MODULE_2__["settings"].environment.root.documentElement || document.body;
|
|
@@ -7252,7 +7278,7 @@ var DragDropDOMAdapter = /** @class */ (function () {
|
|
|
7252
7278
|
var displayProp = this.draggedElementShortcut.style.display;
|
|
7253
7279
|
//this.draggedElementShortcut.hidden = true;
|
|
7254
7280
|
this.draggedElementShortcut.style.display = "none";
|
|
7255
|
-
var dragOverNode =
|
|
7281
|
+
var dragOverNode = this.documentOrShadowRoot.elementFromPoint(clientX, clientY);
|
|
7256
7282
|
//this.draggedElementShortcut.hidden = false;
|
|
7257
7283
|
this.draggedElementShortcut.style.display = displayProp || "block";
|
|
7258
7284
|
var scrollableParentNode = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["findScrollableParent"])(dragOverNode);
|
|
@@ -7456,8 +7482,6 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
|
|
|
7456
7482
|
var _this = this;
|
|
7457
7483
|
if (this.isDropTargetDoesntChanged(this.isBottom))
|
|
7458
7484
|
return;
|
|
7459
|
-
if (this.dropTarget === this.draggedElement)
|
|
7460
|
-
return;
|
|
7461
7485
|
var dropTargetIndex;
|
|
7462
7486
|
var draggedElementIndex;
|
|
7463
7487
|
var draggedRenderedRow;
|
|
@@ -7565,10 +7589,6 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7565
7589
|
var node = _this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item");
|
|
7566
7590
|
node.style.cursor = "not-allowed";
|
|
7567
7591
|
};
|
|
7568
|
-
_this.doDrop = function () {
|
|
7569
|
-
_this.parentElement.setValue();
|
|
7570
|
-
return _this.parentElement;
|
|
7571
|
-
};
|
|
7572
7592
|
return _this;
|
|
7573
7593
|
}
|
|
7574
7594
|
Object.defineProperty(DragDropRankingChoices.prototype, "draggedElementType", {
|
|
@@ -7671,6 +7691,10 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7671
7691
|
this.parentElement.currentDropTarget = this.draggedElement;
|
|
7672
7692
|
_super.prototype.ghostPositionChanged.call(this);
|
|
7673
7693
|
};
|
|
7694
|
+
DragDropRankingChoices.prototype.doDrop = function () {
|
|
7695
|
+
this.parentElement.setValue();
|
|
7696
|
+
return this.parentElement;
|
|
7697
|
+
};
|
|
7674
7698
|
DragDropRankingChoices.prototype.clear = function () {
|
|
7675
7699
|
if (!!this.parentElement) {
|
|
7676
7700
|
this.parentElement.dropTargetNodeMove = null;
|
|
@@ -7695,7 +7719,8 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7695
7719
|
"use strict";
|
|
7696
7720
|
__webpack_require__.r(__webpack_exports__);
|
|
7697
7721
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingSelectToRank", function() { return DragDropRankingSelectToRank; });
|
|
7698
|
-
/* 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");
|
|
7699
7724
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
7700
7725
|
var extendStatics = function (d, b) {
|
|
7701
7726
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -7712,10 +7737,37 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
7712
7737
|
};
|
|
7713
7738
|
})();
|
|
7714
7739
|
|
|
7740
|
+
|
|
7715
7741
|
var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
7716
7742
|
__extends(DragDropRankingSelectToRank, _super);
|
|
7717
7743
|
function DragDropRankingSelectToRank() {
|
|
7718
|
-
|
|
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;
|
|
7719
7771
|
}
|
|
7720
7772
|
DragDropRankingSelectToRank.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
|
7721
7773
|
if (dragOverNode.dataset.ranking === "from-container" || dragOverNode.dataset.ranking === "to-container") {
|
|
@@ -7769,18 +7821,34 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
7769
7821
|
DragDropRankingSelectToRank.prototype.doRankBetween = function (dropTargetNode, fromChoicesArray, toChoicesArray, rankFunction) {
|
|
7770
7822
|
var questionModel = this.parentElement;
|
|
7771
7823
|
var _a = this.getIndixies(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
|
7772
|
-
rankFunction(questionModel, fromIndex, toIndex);
|
|
7773
|
-
this.doUIEffects(dropTargetNode, fromIndex, toIndex);
|
|
7824
|
+
rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
|
|
7774
7825
|
};
|
|
7775
7826
|
DragDropRankingSelectToRank.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
|
|
7776
7827
|
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
|
7777
7828
|
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
|
7778
7829
|
if (toIndex === -1) {
|
|
7779
7830
|
var length_1 = model.value.length;
|
|
7780
|
-
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++;
|
|
7781
7842
|
}
|
|
7782
7843
|
return { fromIndex: fromIndex, toIndex: toIndex };
|
|
7783
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
|
+
};
|
|
7784
7852
|
DragDropRankingSelectToRank.prototype.doUIEffects = function (dropTargetNode, fromIndex, toIndex) {
|
|
7785
7853
|
var questionModel = this.parentElement;
|
|
7786
7854
|
var isDropToEmptyRankedContainer = this.dropTarget === "to-container" && questionModel.isEmpty();
|
|
@@ -7829,30 +7897,21 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
7829
7897
|
enumerable: false,
|
|
7830
7898
|
configurable: true
|
|
7831
7899
|
});
|
|
7832
|
-
DragDropRankingSelectToRank.prototype.
|
|
7833
|
-
var rankingChoices = questionModel.rankingChoices;
|
|
7834
|
-
var unRankingChoices = questionModel.unRankingChoices;
|
|
7835
|
-
var item = unRankingChoices[fromIndex];
|
|
7900
|
+
DragDropRankingSelectToRank.prototype.updateChoices = function (questionModel, rankingChoices) {
|
|
7836
7901
|
questionModel.isValueSetByUser = true;
|
|
7837
|
-
rankingChoices
|
|
7838
|
-
questionModel.
|
|
7902
|
+
questionModel.rankingChoices = rankingChoices;
|
|
7903
|
+
questionModel.updateUnRankingChoices(rankingChoices);
|
|
7839
7904
|
};
|
|
7840
|
-
DragDropRankingSelectToRank.prototype.
|
|
7841
|
-
var
|
|
7842
|
-
questionModel
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
var rankingChoices = questionModel.rankingChoices;
|
|
7848
|
-
var item = rankingChoices[fromIndex];
|
|
7849
|
-
questionModel.isValueSetByUser = true;
|
|
7850
|
-
rankingChoices.splice(fromIndex, 1);
|
|
7851
|
-
rankingChoices.splice(toIndex, 0, item);
|
|
7852
|
-
questionModel.setPropertyValue("rankingChoices", rankingChoices);
|
|
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);
|
|
7853
7912
|
};
|
|
7854
7913
|
return DragDropRankingSelectToRank;
|
|
7855
|
-
}(
|
|
7914
|
+
}(_ranking_choices__WEBPACK_IMPORTED_MODULE_1__["DragDropRankingChoices"]));
|
|
7856
7915
|
|
|
7857
7916
|
|
|
7858
7917
|
|
|
@@ -9500,8 +9559,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9500
9559
|
|
|
9501
9560
|
var Version;
|
|
9502
9561
|
var ReleaseDate;
|
|
9503
|
-
Version = "" + "1.9.
|
|
9504
|
-
ReleaseDate = "" + "2024-
|
|
9562
|
+
Version = "" + "1.9.137";
|
|
9563
|
+
ReleaseDate = "" + "2024-04-02";
|
|
9505
9564
|
function checkLibraryVersion(ver, libraryName) {
|
|
9506
9565
|
if (Version != ver) {
|
|
9507
9566
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -9682,7 +9741,7 @@ function checkPrefix(prefix) {
|
|
|
9682
9741
|
/*!**************************************!*\
|
|
9683
9742
|
!*** ./src/entries/core-wo-model.ts ***!
|
|
9684
9743
|
\**************************************/
|
|
9685
|
-
/*! 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 */
|
|
9686
9745
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9687
9746
|
|
|
9688
9747
|
"use strict";
|
|
@@ -10127,16 +10186,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10127
10186
|
|
|
10128
10187
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_7__["ActionDropdownViewModel"]; });
|
|
10129
10188
|
|
|
10130
|
-
/* harmony import */ var
|
|
10131
|
-
/* 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"]; });
|
|
10193
|
+
|
|
10194
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationGroupUtils"]; });
|
|
10195
|
+
|
|
10196
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationBoolean"]; });
|
|
10197
|
+
|
|
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"]; });
|
|
10132
10202
|
|
|
10133
|
-
/* harmony import */ var
|
|
10134
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return
|
|
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"]; });
|
|
10135
10205
|
|
|
10136
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionContainer", function() { return
|
|
10206
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionContainer", function() { return _actions_container__WEBPACK_IMPORTED_MODULE_10__["ActionContainer"]; });
|
|
10137
10207
|
|
|
10138
|
-
/* harmony import */ var
|
|
10139
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DragOrClickHelper", function() { return
|
|
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"]; });
|
|
10140
10210
|
|
|
10141
10211
|
// model
|
|
10142
10212
|
|
|
@@ -10155,13 +10225,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10155
10225
|
|
|
10156
10226
|
|
|
10157
10227
|
|
|
10228
|
+
|
|
10158
10229
|
/***/ }),
|
|
10159
10230
|
|
|
10160
10231
|
/***/ "./src/entries/core.ts":
|
|
10161
10232
|
/*!*****************************!*\
|
|
10162
10233
|
!*** ./src/entries/core.ts ***!
|
|
10163
10234
|
\*****************************/
|
|
10164
|
-
/*! 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 */
|
|
10165
10236
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10166
10237
|
|
|
10167
10238
|
"use strict";
|
|
@@ -10599,6 +10670,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10599
10670
|
|
|
10600
10671
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActionDropdownViewModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["ActionDropdownViewModel"]; });
|
|
10601
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
|
+
|
|
10602
10683
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AdaptiveActionContainer", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["AdaptiveActionContainer"]; });
|
|
10603
10684
|
|
|
10604
10685
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultActionBarCss", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["defaultActionBarCss"]; });
|
|
@@ -21466,7 +21547,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21466
21547
|
var InputElementAdapter = /** @class */ (function () {
|
|
21467
21548
|
function InputElementAdapter(inputMaskInstance, inputElement, value) {
|
|
21468
21549
|
var _this = this;
|
|
21469
|
-
if (value === void 0) { value = ""; }
|
|
21470
21550
|
this.inputMaskInstance = inputMaskInstance;
|
|
21471
21551
|
this.inputElement = inputElement;
|
|
21472
21552
|
this.prevUnmaskedValue = undefined;
|
|
@@ -21485,8 +21565,15 @@ var InputElementAdapter = /** @class */ (function () {
|
|
|
21485
21565
|
event.preventDefault();
|
|
21486
21566
|
}
|
|
21487
21567
|
};
|
|
21488
|
-
|
|
21489
|
-
|
|
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;
|
|
21490
21577
|
inputMaskInstance.onPropertyChanged.add(this.inputMaskInstancePropertyChangedHandler);
|
|
21491
21578
|
this.addInputEventListener();
|
|
21492
21579
|
}
|
|
@@ -23136,7 +23223,7 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
23136
23223
|
configurable: true
|
|
23137
23224
|
});
|
|
23138
23225
|
PageModel.prototype.calcCssClasses = function (css) {
|
|
23139
|
-
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
23226
|
+
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "", rowFadeOutActive: "" };
|
|
23140
23227
|
this.copyCssClasses(classes.page, css.page);
|
|
23141
23228
|
this.copyCssClasses(classes.error, css.error);
|
|
23142
23229
|
if (!!css.pageTitle) {
|
|
@@ -23157,6 +23244,15 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
23157
23244
|
if (!!css.rowCompact) {
|
|
23158
23245
|
classes.rowCompact = css.rowCompact;
|
|
23159
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
|
+
}
|
|
23160
23256
|
if (this.survey) {
|
|
23161
23257
|
this.survey.updatePageCssClasses(this, classes);
|
|
23162
23258
|
}
|
|
@@ -23382,7 +23478,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23382
23478
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
23383
23479
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
23384
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");
|
|
23385
|
-
/* 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");
|
|
23386
23483
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
23387
23484
|
var extendStatics = function (d, b) {
|
|
23388
23485
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -23421,6 +23518,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
|
23421
23518
|
|
|
23422
23519
|
|
|
23423
23520
|
|
|
23521
|
+
|
|
23424
23522
|
var QuestionRowModel = /** @class */ (function (_super) {
|
|
23425
23523
|
__extends(QuestionRowModel, _super);
|
|
23426
23524
|
function QuestionRowModel(panel) {
|
|
@@ -23428,6 +23526,10 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23428
23526
|
_this.panel = panel;
|
|
23429
23527
|
_this._scrollableParent = undefined;
|
|
23430
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; });
|
|
23431
23533
|
_this.idValue = QuestionRowModel.getRowId();
|
|
23432
23534
|
_this.visible = panel.areInvisibleElementsShowing;
|
|
23433
23535
|
_this.createNewArray("elements");
|
|
@@ -23440,12 +23542,12 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23440
23542
|
QuestionRowModel.prototype.startLazyRendering = function (rowContainerDiv, findScrollableContainer) {
|
|
23441
23543
|
var _this = this;
|
|
23442
23544
|
if (findScrollableContainer === void 0) { findScrollableContainer = _utils_utils__WEBPACK_IMPORTED_MODULE_8__["findScrollableParent"]; }
|
|
23443
|
-
if (!
|
|
23545
|
+
if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].isAvailable())
|
|
23444
23546
|
return;
|
|
23445
23547
|
this._scrollableParent = findScrollableContainer(rowContainerDiv);
|
|
23446
23548
|
// if this._scrollableParent is html the scroll event isn't fired, so we should use window
|
|
23447
|
-
if (this._scrollableParent ===
|
|
23448
|
-
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();
|
|
23449
23551
|
}
|
|
23450
23552
|
var hasScroll = this._scrollableParent.scrollHeight > this._scrollableParent.clientHeight;
|
|
23451
23553
|
this.isNeedRender = !hasScroll;
|
|
@@ -23494,6 +23596,9 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23494
23596
|
enumerable: false,
|
|
23495
23597
|
configurable: true
|
|
23496
23598
|
});
|
|
23599
|
+
QuestionRowModel.prototype.equalsCore = function (obj) {
|
|
23600
|
+
return this == obj;
|
|
23601
|
+
};
|
|
23497
23602
|
Object.defineProperty(QuestionRowModel.prototype, "elements", {
|
|
23498
23603
|
get: function () {
|
|
23499
23604
|
return this.getPropertyValue("elements");
|
|
@@ -23501,10 +23606,48 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23501
23606
|
enumerable: false,
|
|
23502
23607
|
configurable: true
|
|
23503
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
|
+
};
|
|
23504
23636
|
Object.defineProperty(QuestionRowModel.prototype, "visibleElements", {
|
|
23505
23637
|
get: function () {
|
|
23506
23638
|
return this.getPropertyValue("visibleElements");
|
|
23507
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
|
+
},
|
|
23508
23651
|
enumerable: false,
|
|
23509
23652
|
configurable: true
|
|
23510
23653
|
});
|
|
@@ -23514,6 +23657,7 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23514
23657
|
},
|
|
23515
23658
|
set: function (val) {
|
|
23516
23659
|
this.setPropertyValue("visible", val);
|
|
23660
|
+
this.onVisibleChangedCallback && this.onVisibleChangedCallback();
|
|
23517
23661
|
},
|
|
23518
23662
|
enumerable: false,
|
|
23519
23663
|
configurable: true
|
|
@@ -23529,9 +23673,14 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23529
23673
|
configurable: true
|
|
23530
23674
|
});
|
|
23531
23675
|
QuestionRowModel.prototype.updateVisible = function () {
|
|
23532
|
-
var
|
|
23533
|
-
this.
|
|
23534
|
-
|
|
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;
|
|
23535
23684
|
};
|
|
23536
23685
|
QuestionRowModel.prototype.addElement = function (q) {
|
|
23537
23686
|
this.elements.push(q);
|
|
@@ -23605,27 +23754,6 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23605
23754
|
QuestionRowModel.prototype.getRenderedWidthFromWidth = function (width) {
|
|
23606
23755
|
return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isNumber(width) ? width + "px" : width;
|
|
23607
23756
|
};
|
|
23608
|
-
QuestionRowModel.prototype.calcVisible = function () {
|
|
23609
|
-
var visElements = [];
|
|
23610
|
-
for (var i = 0; i < this.elements.length; i++) {
|
|
23611
|
-
if (this.elements[i].isVisible) {
|
|
23612
|
-
visElements.push(this.elements[i]);
|
|
23613
|
-
}
|
|
23614
|
-
}
|
|
23615
|
-
if (this.needToUpdateVisibleElements(visElements)) {
|
|
23616
|
-
this.setPropertyValue("visibleElements", visElements);
|
|
23617
|
-
}
|
|
23618
|
-
return visElements.length > 0;
|
|
23619
|
-
};
|
|
23620
|
-
QuestionRowModel.prototype.needToUpdateVisibleElements = function (visElements) {
|
|
23621
|
-
if (visElements.length !== this.visibleElements.length)
|
|
23622
|
-
return true;
|
|
23623
|
-
for (var i = 0; i < visElements.length; i++) {
|
|
23624
|
-
if (visElements[i] !== this.visibleElements[i])
|
|
23625
|
-
return true;
|
|
23626
|
-
}
|
|
23627
|
-
return false;
|
|
23628
|
-
};
|
|
23629
23757
|
QuestionRowModel.prototype.dispose = function () {
|
|
23630
23758
|
_super.prototype.dispose.call(this);
|
|
23631
23759
|
this.stopLazyRendering();
|
|
@@ -23634,10 +23762,16 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23634
23762
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
|
23635
23763
|
.append(this.panel.cssClasses.row)
|
|
23636
23764
|
.append(this.panel.cssClasses.rowCompact, this.panel["isCompact"])
|
|
23637
|
-
.append(this.panel.cssClasses.pageRow, this.panel.isPage || (!!this.panel.originalPage
|
|
23765
|
+
.append(this.panel.cssClasses.pageRow, this.panel.isPage || (!!this.panel.originalPage))
|
|
23638
23766
|
.append(this.panel.cssClasses.rowMultiple, this.visibleElements.length > 1)
|
|
23639
23767
|
.toString();
|
|
23640
23768
|
};
|
|
23769
|
+
QuestionRowModel.prototype.setRootElement = function (element) {
|
|
23770
|
+
this.rootElement = element;
|
|
23771
|
+
};
|
|
23772
|
+
QuestionRowModel.prototype.getRootElement = function () {
|
|
23773
|
+
return this.rootElement;
|
|
23774
|
+
};
|
|
23641
23775
|
QuestionRowModel.rowCounter = 100;
|
|
23642
23776
|
__decorate([
|
|
23643
23777
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: null })
|
|
@@ -23655,9 +23789,13 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
23655
23789
|
var _this = _super.call(this, name) || this;
|
|
23656
23790
|
_this.isQuestionsReady = false;
|
|
23657
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; });
|
|
23658
23795
|
_this.isRandomizing = false;
|
|
23659
23796
|
_this.locCountRowUpdates = 0;
|
|
23660
|
-
_this.createNewArray("rows");
|
|
23797
|
+
_this.createNewArray("rows", function (el, index) { _this.onAddRow(el); }, function (el) { _this.onRemoveRow(el); });
|
|
23798
|
+
_this.createNewArray("visibleRows");
|
|
23661
23799
|
_this.elementsValue = _this.createNewArray("elements", _this.onAddElement.bind(_this), _this.onRemoveElement.bind(_this));
|
|
23662
23800
|
_this.id = PanelModelBase.getPanelId();
|
|
23663
23801
|
_this.addExpressionProperty("visibleIf", function (obj, res) { _this.visible = res === true; }, function (obj) { return !_this.areInvisibleElementsShowing; });
|
|
@@ -23677,16 +23815,62 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
23677
23815
|
PanelModelBase.getPanelId = function () {
|
|
23678
23816
|
return "sp_" + PanelModelBase.panelCounter++;
|
|
23679
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
|
+
};
|
|
23680
23862
|
PanelModelBase.prototype.getType = function () {
|
|
23681
23863
|
return "panelbase";
|
|
23682
23864
|
};
|
|
23683
23865
|
PanelModelBase.prototype.setSurveyImpl = function (value, isLight) {
|
|
23866
|
+
this.animationAllowed = false;
|
|
23684
23867
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
|
23685
23868
|
if (this.isDesignMode)
|
|
23686
23869
|
this.onVisibleChanged();
|
|
23687
23870
|
for (var i = 0; i < this.elements.length; i++) {
|
|
23688
23871
|
this.elements[i].setSurveyImpl(value, isLight);
|
|
23689
23872
|
}
|
|
23873
|
+
this.animationAllowed = true;
|
|
23690
23874
|
};
|
|
23691
23875
|
PanelModelBase.prototype.endLoadingFromJson = function () {
|
|
23692
23876
|
_super.prototype.endLoadingFromJson.call(this);
|
|
@@ -23902,7 +24086,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
23902
24086
|
configurable: true
|
|
23903
24087
|
});
|
|
23904
24088
|
PanelModelBase.prototype.calcCssClasses = function (css) {
|
|
23905
|
-
var classes = { panel: {}, error: {}, row: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
24089
|
+
var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "", rowFadeOutActive: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
23906
24090
|
this.copyCssClasses(classes.panel, css.panel);
|
|
23907
24091
|
this.copyCssClasses(classes.error, css.error);
|
|
23908
24092
|
if (!!css.pageRow) {
|
|
@@ -23914,6 +24098,15 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
23914
24098
|
if (!!css.row) {
|
|
23915
24099
|
classes.row = css.row;
|
|
23916
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
|
+
}
|
|
23917
24110
|
if (!!css.rowMultiple) {
|
|
23918
24111
|
classes.rowMultiple = css.rowMultiple;
|
|
23919
24112
|
}
|
|
@@ -24492,10 +24685,13 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24492
24685
|
return new QuestionRowModel(this);
|
|
24493
24686
|
};
|
|
24494
24687
|
PanelModelBase.prototype.onSurveyLoad = function () {
|
|
24688
|
+
this.animationAllowed = false;
|
|
24689
|
+
_super.prototype.onSurveyLoad.call(this);
|
|
24495
24690
|
for (var i = 0; i < this.elements.length; i++) {
|
|
24496
24691
|
this.elements[i].onSurveyLoad();
|
|
24497
24692
|
}
|
|
24498
24693
|
this.onElementVisibilityChanged(this);
|
|
24694
|
+
this.animationAllowed = true;
|
|
24499
24695
|
};
|
|
24500
24696
|
PanelModelBase.prototype.onFirstRendering = function () {
|
|
24501
24697
|
_super.prototype.onFirstRendering.call(this);
|
|
@@ -24529,7 +24725,9 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24529
24725
|
PanelModelBase.prototype.onRowsChanged = function () {
|
|
24530
24726
|
if (this.isLoadingFromJson)
|
|
24531
24727
|
return;
|
|
24728
|
+
this.animationAllowed = false;
|
|
24532
24729
|
this.setArrayPropertyDirectly("rows", this.buildRows());
|
|
24730
|
+
this.animationAllowed = true;
|
|
24533
24731
|
};
|
|
24534
24732
|
PanelModelBase.prototype.blockRowsUpdates = function () {
|
|
24535
24733
|
this.locCountRowUpdates++;
|
|
@@ -24849,9 +25047,9 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24849
25047
|
enumerable: false,
|
|
24850
25048
|
configurable: true
|
|
24851
25049
|
});
|
|
24852
|
-
PanelModelBase.prototype.
|
|
24853
|
-
if (
|
|
24854
|
-
return
|
|
25050
|
+
PanelModelBase.prototype.getIsContentVisible = function (exceptionQuestion) {
|
|
25051
|
+
if (this.areInvisibleElementsShowing)
|
|
25052
|
+
return true;
|
|
24855
25053
|
for (var i = 0; i < this.elements.length; i++) {
|
|
24856
25054
|
if (this.elements[i] == exceptionQuestion)
|
|
24857
25055
|
continue;
|
|
@@ -24860,6 +25058,9 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24860
25058
|
}
|
|
24861
25059
|
return false;
|
|
24862
25060
|
};
|
|
25061
|
+
PanelModelBase.prototype.getIsPageVisible = function (exceptionQuestion) {
|
|
25062
|
+
return this.visible && this.getIsContentVisible(exceptionQuestion);
|
|
25063
|
+
};
|
|
24863
25064
|
PanelModelBase.prototype.setVisibleIndex = function (index) {
|
|
24864
25065
|
if (!this.isVisible || index < 0) {
|
|
24865
25066
|
this.resetVisibleIndexes();
|
|
@@ -25527,6 +25728,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
25527
25728
|
id: "cancel-preview",
|
|
25528
25729
|
locTitle: this.survey.locEditText,
|
|
25529
25730
|
innerCss: this.survey.cssNavigationEdit,
|
|
25731
|
+
component: "sv-nav-btn",
|
|
25530
25732
|
action: function () { _this.cancelPreview(); }
|
|
25531
25733
|
});
|
|
25532
25734
|
}
|
|
@@ -25607,7 +25809,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
25607
25809
|
};
|
|
25608
25810
|
Object.defineProperty(PanelModel.prototype, "showPanelAsPage", {
|
|
25609
25811
|
get: function () {
|
|
25610
|
-
return !!this.originalPage
|
|
25812
|
+
return !!this.originalPage;
|
|
25611
25813
|
},
|
|
25612
25814
|
enumerable: false,
|
|
25613
25815
|
configurable: true
|
|
@@ -25871,7 +26073,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
|
25871
26073
|
.append("sv-popup--dropdown-overlay", this.isOverlay && this.model.overlayDisplayMode !== "overlay")
|
|
25872
26074
|
.append("sv-popup--tablet", this.isTablet && this.isOverlay)
|
|
25873
26075
|
.append("sv-popup--show-pointer", !this.isOverlay && this.showHeader)
|
|
25874
|
-
.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"));
|
|
25875
26077
|
};
|
|
25876
26078
|
PopupDropdownViewModel.prototype.getShowHeader = function () {
|
|
25877
26079
|
return this.model.showPointer && !this.isOverlay;
|
|
@@ -26553,12 +26755,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26553
26755
|
|
|
26554
26756
|
function createPopupModalViewModel(options, rootElement) {
|
|
26555
26757
|
var _a;
|
|
26556
|
-
var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_1__["PopupModel"](options.componentName, options.data, "top", "left", false, true, options.onCancel, options.onApply,
|
|
26557
|
-
options.onHide();
|
|
26558
|
-
if (!!container) {
|
|
26559
|
-
popupViewModel.resetComponentElement();
|
|
26560
|
-
}
|
|
26561
|
-
}, 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);
|
|
26562
26759
|
popupModel.displayMode = options.displayMode || "popup";
|
|
26563
26760
|
popupModel.isFocusedContent = (_a = options.isFocusedContent) !== null && _a !== void 0 ? _a : true;
|
|
26564
26761
|
var popupViewModel = new _popup_modal_view_model__WEBPACK_IMPORTED_MODULE_3__["PopupModalViewModel"](popupModel);
|
|
@@ -26570,6 +26767,15 @@ function createPopupModalViewModel(options, rootElement) {
|
|
|
26570
26767
|
if (!popupViewModel.container) {
|
|
26571
26768
|
popupViewModel.initializePopupContainer();
|
|
26572
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);
|
|
26573
26779
|
return popupViewModel;
|
|
26574
26780
|
}
|
|
26575
26781
|
function createPopupViewModel(model, targetElement) {
|
|
@@ -26601,7 +26807,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26601
26807
|
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
|
|
26602
26808
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
26603
26809
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
26604
|
-
/* 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");
|
|
26605
26812
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
26606
26813
|
var extendStatics = function (d, b) {
|
|
26607
26814
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -26630,19 +26837,64 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
26630
26837
|
|
|
26631
26838
|
|
|
26632
26839
|
|
|
26840
|
+
|
|
26633
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^=\"-\"])";
|
|
26634
26842
|
var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
26635
26843
|
__extends(PopupBaseViewModel, _super);
|
|
26636
26844
|
function PopupBaseViewModel(model) {
|
|
26637
26845
|
var _this = _super.call(this) || this;
|
|
26638
|
-
_this.subscriptionId = PopupBaseViewModel.SubscriptionId++;
|
|
26639
26846
|
_this.popupSelector = ".sv-popup";
|
|
26640
26847
|
_this.fixedPopupContainer = ".sv-popup";
|
|
26641
26848
|
_this.containerSelector = ".sv-popup__container";
|
|
26642
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
|
+
};
|
|
26643
26865
|
_this.model = model;
|
|
26644
26866
|
return _this;
|
|
26645
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
|
+
});
|
|
26646
26898
|
Object.defineProperty(PopupBaseViewModel.prototype, "container", {
|
|
26647
26899
|
get: function () {
|
|
26648
26900
|
return this.containerElement || this.createdContainer;
|
|
@@ -26701,20 +26953,13 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26701
26953
|
PopupBaseViewModel.prototype.onModelChanging = function (newModel) {
|
|
26702
26954
|
};
|
|
26703
26955
|
PopupBaseViewModel.prototype.setupModel = function (model) {
|
|
26704
|
-
var _this = this;
|
|
26705
26956
|
if (!!this.model) {
|
|
26706
|
-
this.model.
|
|
26957
|
+
this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback);
|
|
26707
26958
|
}
|
|
26708
26959
|
this.onModelChanging(model);
|
|
26709
26960
|
this._model = model;
|
|
26710
|
-
|
|
26711
|
-
|
|
26712
|
-
_this.updateOnHiding();
|
|
26713
|
-
}
|
|
26714
|
-
_this.isVisible = model.isVisible;
|
|
26715
|
-
};
|
|
26716
|
-
model.registerPropertyChangedHandlers(["isVisible"], onIsVisibleChangedHandler, "PopupBaseViewModel" + this.subscriptionId);
|
|
26717
|
-
onIsVisibleChangedHandler();
|
|
26961
|
+
model.onVisibilityChanged.add(this.onModelIsVisibleChangedCallback);
|
|
26962
|
+
this.onModelIsVisibleChangedCallback();
|
|
26718
26963
|
};
|
|
26719
26964
|
Object.defineProperty(PopupBaseViewModel.prototype, "model", {
|
|
26720
26965
|
get: function () {
|
|
@@ -26894,7 +27139,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26894
27139
|
PopupBaseViewModel.prototype.dispose = function () {
|
|
26895
27140
|
_super.prototype.dispose.call(this);
|
|
26896
27141
|
if (this.model) {
|
|
26897
|
-
this.model.
|
|
27142
|
+
this.model.onVisibilityChanged.remove(this.onModelIsVisibleChangedCallback);
|
|
26898
27143
|
}
|
|
26899
27144
|
if (!!this.createdContainer) {
|
|
26900
27145
|
this.createdContainer.remove();
|
|
@@ -26907,7 +27152,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26907
27152
|
};
|
|
26908
27153
|
PopupBaseViewModel.prototype.initializePopupContainer = function () {
|
|
26909
27154
|
if (!this.container) {
|
|
26910
|
-
var container =
|
|
27155
|
+
var container = _global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].createElement("div");
|
|
26911
27156
|
this.createdContainer = container;
|
|
26912
27157
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.popupMountContainer).appendChild(container);
|
|
26913
27158
|
}
|
|
@@ -26924,7 +27169,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26924
27169
|
PopupBaseViewModel.prototype.preventScrollOuside = function (event, deltaY) {
|
|
26925
27170
|
var currentElement = event.target;
|
|
26926
27171
|
while (currentElement !== this.container) {
|
|
26927
|
-
if (
|
|
27172
|
+
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_7__["DomDocumentHelper"].getComputedStyle(currentElement).overflowY === "auto" && currentElement.scrollHeight !== currentElement.offsetHeight) {
|
|
26928
27173
|
var scrollHeight = currentElement.scrollHeight, scrollTop = currentElement.scrollTop, clientHeight = currentElement.clientHeight;
|
|
26929
27174
|
if (!(deltaY > 0 && Math.abs(scrollHeight - clientHeight - scrollTop) < 1) && !(deltaY < 0 && scrollTop <= 0)) {
|
|
26930
27175
|
return;
|
|
@@ -26936,7 +27181,6 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26936
27181
|
event.preventDefault();
|
|
26937
27182
|
}
|
|
26938
27183
|
};
|
|
26939
|
-
PopupBaseViewModel.SubscriptionId = 0;
|
|
26940
27184
|
__decorate([
|
|
26941
27185
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "0px" })
|
|
26942
27186
|
], PopupBaseViewModel.prototype, "top", void 0);
|
|
@@ -26954,7 +27198,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
26954
27198
|
], PopupBaseViewModel.prototype, "minWidth", void 0);
|
|
26955
27199
|
__decorate([
|
|
26956
27200
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
|
|
26957
|
-
], PopupBaseViewModel.prototype, "
|
|
27201
|
+
], PopupBaseViewModel.prototype, "_isVisible", void 0);
|
|
26958
27202
|
__decorate([
|
|
26959
27203
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
26960
27204
|
], PopupBaseViewModel.prototype, "locale", void 0);
|
|
@@ -27272,7 +27516,7 @@ var ProgressButtons = /** @class */ (function (_super) {
|
|
|
27272
27516
|
if (!listContainerElement)
|
|
27273
27517
|
return;
|
|
27274
27518
|
var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
|
|
27275
|
-
var circleWidth = this.showItemNumbers ? 17 :
|
|
27519
|
+
var circleWidth = this.showItemNumbers ? 17 : 5;
|
|
27276
27520
|
var connectorWidth = listContainerElement.clientWidth / (listContainerElement.children.length - 1) - circleWidth;
|
|
27277
27521
|
for (var i = 0; i < listContainerElements.length; i++) {
|
|
27278
27522
|
listContainerElements[i].style.width = connectorWidth + "px";
|
|
@@ -34588,6 +34832,10 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
34588
34832
|
return this.hasSelectAll;
|
|
34589
34833
|
return _super.prototype.isItemInList.call(this, item);
|
|
34590
34834
|
};
|
|
34835
|
+
QuestionCheckboxModel.prototype.getDisplayValueEmpty = function () {
|
|
34836
|
+
var _this = this;
|
|
34837
|
+
return _itemvalue__WEBPACK_IMPORTED_MODULE_4__["ItemValue"].getTextOrHtmlByValue(this.visibleChoices.filter(function (choice) { return choice != _this.selectAllItemValue; }), undefined);
|
|
34838
|
+
};
|
|
34591
34839
|
QuestionCheckboxModel.prototype.getDisplayValueCore = function (keysAsText, value) {
|
|
34592
34840
|
if (!Array.isArray(value))
|
|
34593
34841
|
return _super.prototype.getDisplayValueCore.call(this, keysAsText, value);
|
|
@@ -35085,6 +35333,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35085
35333
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
|
35086
35334
|
/* harmony import */ var _textPreProcessor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./textPreProcessor */ "./src/textPreProcessor.ts");
|
|
35087
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");
|
|
35088
35337
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
35089
35338
|
var extendStatics = function (d, b) {
|
|
35090
35339
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -35106,6 +35355,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
35106
35355
|
|
|
35107
35356
|
|
|
35108
35357
|
|
|
35358
|
+
|
|
35109
35359
|
var ComponentQuestionJSON = /** @class */ (function () {
|
|
35110
35360
|
function ComponentQuestionJSON(name, json) {
|
|
35111
35361
|
this.name = name;
|
|
@@ -35161,6 +35411,11 @@ var ComponentQuestionJSON = /** @class */ (function () {
|
|
|
35161
35411
|
return newValue;
|
|
35162
35412
|
return this.json.onValueChanging(question, name, newValue);
|
|
35163
35413
|
};
|
|
35414
|
+
ComponentQuestionJSON.prototype.onGetErrorText = function (question) {
|
|
35415
|
+
if (!this.json.getErrorText)
|
|
35416
|
+
return undefined;
|
|
35417
|
+
return this.json.getErrorText(question);
|
|
35418
|
+
};
|
|
35164
35419
|
ComponentQuestionJSON.prototype.onItemValuePropertyChanged = function (question, item, propertyName, name, newValue) {
|
|
35165
35420
|
if (!this.json.onItemValuePropertyChanged)
|
|
35166
35421
|
return;
|
|
@@ -35441,6 +35696,15 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
|
|
|
35441
35696
|
_super.prototype.setNewValue.call(this, newValue);
|
|
35442
35697
|
this.updateElementCss();
|
|
35443
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
|
+
};
|
|
35444
35708
|
//ISurveyImpl
|
|
35445
35709
|
QuestionCustomModelBase.prototype.getSurveyData = function () {
|
|
35446
35710
|
return this;
|
|
@@ -35712,9 +35976,10 @@ var QuestionCustomModel = /** @class */ (function (_super) {
|
|
|
35712
35976
|
}
|
|
35713
35977
|
};
|
|
35714
35978
|
QuestionCustomModel.prototype.convertDataName = function (name) {
|
|
35715
|
-
|
|
35979
|
+
var q = this.contentQuestion;
|
|
35980
|
+
if (!q || name === this.getValueName())
|
|
35716
35981
|
return _super.prototype.convertDataName.call(this, name);
|
|
35717
|
-
var newName = name.replace(
|
|
35982
|
+
var newName = name.replace(q.getValueName(), this.getValueName());
|
|
35718
35983
|
return newName.indexOf(this.getValueName()) == 0
|
|
35719
35984
|
? newName
|
|
35720
35985
|
: _super.prototype.convertDataName.call(this, name);
|
|
@@ -40054,7 +40319,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
|
|
|
40054
40319
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]()
|
|
40055
40320
|
.append(css.cell, hasCellText)
|
|
40056
40321
|
.append(hasCellText ? css.cellText : css.label)
|
|
40057
|
-
.append(css.itemOnError, !hasCellText && this.hasCssError())
|
|
40322
|
+
.append(css.itemOnError, !hasCellText && (this.isAllRowRequired ? this.hasErrorInRow(row) : this.hasCssError()))
|
|
40058
40323
|
.append(hasCellText ? css.cellTextSelected : css.itemChecked, isChecked)
|
|
40059
40324
|
.append(hasCellText ? css.cellTextDisabled : css.itemDisabled, isDisabled)
|
|
40060
40325
|
.append(css.itemHover, allowHover && !hasCellText)
|
|
@@ -43733,10 +43998,9 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
|
43733
43998
|
});
|
|
43734
43999
|
Object.defineProperty(MatrixDropdownColumn.prototype, "isRequired", {
|
|
43735
44000
|
/**
|
|
43736
|
-
* 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).
|
|
43737
44002
|
*
|
|
43738
44003
|
* If you want to mark the column as required based on a condition, specify the [`requiredIf`](#requiredIf) property.
|
|
43739
|
-
* @see requiredErrorText
|
|
43740
44004
|
* @see visible
|
|
43741
44005
|
* @see readOnly
|
|
43742
44006
|
*/
|
|
@@ -43913,7 +44177,7 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
|
43913
44177
|
enumerable: false,
|
|
43914
44178
|
configurable: true
|
|
43915
44179
|
});
|
|
43916
|
-
Object.defineProperty(MatrixDropdownColumn.prototype, "
|
|
44180
|
+
Object.defineProperty(MatrixDropdownColumn.prototype, "setValueExpression", {
|
|
43917
44181
|
/**
|
|
43918
44182
|
* An expression used to calculate a value for all column cells.
|
|
43919
44183
|
*
|
|
@@ -43924,10 +44188,10 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
|
43924
44188
|
* @see resetValueIf
|
|
43925
44189
|
*/
|
|
43926
44190
|
get: function () {
|
|
43927
|
-
return this.templateQuestion.
|
|
44191
|
+
return this.templateQuestion.setValueExpression;
|
|
43928
44192
|
},
|
|
43929
44193
|
set: function (val) {
|
|
43930
|
-
this.templateQuestion.
|
|
44194
|
+
this.templateQuestion.setValueExpression = val;
|
|
43931
44195
|
},
|
|
43932
44196
|
enumerable: false,
|
|
43933
44197
|
configurable: true
|
|
@@ -46908,9 +47172,9 @@ var MultipleTextEditorModel = /** @class */ (function (_super) {
|
|
|
46908
47172
|
}(_question_text__WEBPACK_IMPORTED_MODULE_3__["QuestionTextModel"]));
|
|
46909
47173
|
|
|
46910
47174
|
/**
|
|
46911
|
-
* 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.
|
|
46912
47176
|
*
|
|
46913
|
-
* [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))
|
|
46914
47178
|
*/
|
|
46915
47179
|
var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
46916
47180
|
__extends(MultipleTextItemModel, _super);
|
|
@@ -46922,6 +47186,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
46922
47186
|
_this.editor.focusIn();
|
|
46923
47187
|
};
|
|
46924
47188
|
_this.editorValue = _this.createEditor(name);
|
|
47189
|
+
_this.maskSettings = _this.editorValue.maskSettings;
|
|
46925
47190
|
_this.editor.questionTitleTemplateCallback = function () {
|
|
46926
47191
|
return "";
|
|
46927
47192
|
};
|
|
@@ -46946,7 +47211,10 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
46946
47211
|
};
|
|
46947
47212
|
Object.defineProperty(MultipleTextItemModel.prototype, "name", {
|
|
46948
47213
|
/**
|
|
46949
|
-
*
|
|
47214
|
+
* An item ID that is not visible to respondents.
|
|
47215
|
+
*
|
|
47216
|
+
* > Item IDs must be unique.
|
|
47217
|
+
* @see title
|
|
46950
47218
|
*/
|
|
46951
47219
|
get: function () {
|
|
46952
47220
|
return this.editor.name;
|
|
@@ -46997,7 +47265,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
46997
47265
|
};
|
|
46998
47266
|
Object.defineProperty(MultipleTextItemModel.prototype, "isRequired", {
|
|
46999
47267
|
/**
|
|
47000
|
-
*
|
|
47268
|
+
* Marks the item as required. If a respondent leaves this item empty, the question displays a [validation error](#requiredErrorText).
|
|
47001
47269
|
*/
|
|
47002
47270
|
get: function () {
|
|
47003
47271
|
return this.editor.isRequired;
|
|
@@ -47010,7 +47278,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47010
47278
|
});
|
|
47011
47279
|
Object.defineProperty(MultipleTextItemModel.prototype, "inputType", {
|
|
47012
47280
|
/**
|
|
47013
|
-
*
|
|
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"`
|
|
47014
47284
|
*/
|
|
47015
47285
|
get: function () {
|
|
47016
47286
|
return this.editor.inputType;
|
|
@@ -47023,8 +47293,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47023
47293
|
});
|
|
47024
47294
|
Object.defineProperty(MultipleTextItemModel.prototype, "title", {
|
|
47025
47295
|
/**
|
|
47026
|
-
*
|
|
47027
|
-
* @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.
|
|
47028
47297
|
*/
|
|
47029
47298
|
get: function () {
|
|
47030
47299
|
return this.editor.title;
|
|
@@ -47051,9 +47320,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47051
47320
|
});
|
|
47052
47321
|
Object.defineProperty(MultipleTextItemModel.prototype, "maxLength", {
|
|
47053
47322
|
/**
|
|
47054
|
-
* The maximum text length
|
|
47055
|
-
*
|
|
47056
|
-
*
|
|
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).
|
|
47057
47326
|
*/
|
|
47058
47327
|
get: function () {
|
|
47059
47328
|
return this.editor.maxLength;
|
|
@@ -47070,7 +47339,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47070
47339
|
};
|
|
47071
47340
|
Object.defineProperty(MultipleTextItemModel.prototype, "placeholder", {
|
|
47072
47341
|
/**
|
|
47073
|
-
*
|
|
47342
|
+
* A placeholder for the input field.
|
|
47074
47343
|
*/
|
|
47075
47344
|
get: function () {
|
|
47076
47345
|
return this.editor.placeholder;
|
|
@@ -47107,7 +47376,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47107
47376
|
});
|
|
47108
47377
|
Object.defineProperty(MultipleTextItemModel.prototype, "requiredErrorText", {
|
|
47109
47378
|
/**
|
|
47110
|
-
*
|
|
47379
|
+
* Specifies a custom error message for a [required item](#isRequired).
|
|
47111
47380
|
*/
|
|
47112
47381
|
get: function () {
|
|
47113
47382
|
return this.editor.requiredErrorText;
|
|
@@ -47127,7 +47396,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47127
47396
|
});
|
|
47128
47397
|
Object.defineProperty(MultipleTextItemModel.prototype, "size", {
|
|
47129
47398
|
/**
|
|
47130
|
-
*
|
|
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.
|
|
47131
47402
|
*/
|
|
47132
47403
|
get: function () {
|
|
47133
47404
|
return this.editor.size;
|
|
@@ -47140,7 +47411,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47140
47411
|
});
|
|
47141
47412
|
Object.defineProperty(MultipleTextItemModel.prototype, "defaultValueExpression", {
|
|
47142
47413
|
/**
|
|
47143
|
-
* 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
|
|
47144
47417
|
*/
|
|
47145
47418
|
get: function () {
|
|
47146
47419
|
return this.editor.defaultValueExpression;
|
|
@@ -47153,7 +47426,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47153
47426
|
});
|
|
47154
47427
|
Object.defineProperty(MultipleTextItemModel.prototype, "minValueExpression", {
|
|
47155
47428
|
/**
|
|
47156
|
-
*
|
|
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
|
|
47157
47432
|
*/
|
|
47158
47433
|
get: function () {
|
|
47159
47434
|
return this.editor.minValueExpression;
|
|
@@ -47166,7 +47441,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47166
47441
|
});
|
|
47167
47442
|
Object.defineProperty(MultipleTextItemModel.prototype, "maxValueExpression", {
|
|
47168
47443
|
/**
|
|
47169
|
-
*
|
|
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
|
|
47170
47447
|
*/
|
|
47171
47448
|
get: function () {
|
|
47172
47449
|
return this.editor.maxValueExpression;
|
|
@@ -47179,7 +47456,9 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47179
47456
|
});
|
|
47180
47457
|
Object.defineProperty(MultipleTextItemModel.prototype, "validators", {
|
|
47181
47458
|
/**
|
|
47182
|
-
*
|
|
47459
|
+
* Item validators.
|
|
47460
|
+
*
|
|
47461
|
+
* [Data Validation](https://surveyjs.io/form-library/documentation/data-validation (linkStyle))
|
|
47183
47462
|
*/
|
|
47184
47463
|
get: function () {
|
|
47185
47464
|
return this.editor.validators;
|
|
@@ -47193,9 +47472,71 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
|
|
|
47193
47472
|
MultipleTextItemModel.prototype.getValidators = function () {
|
|
47194
47473
|
return this.validators;
|
|
47195
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
|
+
});
|
|
47196
47537
|
Object.defineProperty(MultipleTextItemModel.prototype, "value", {
|
|
47197
47538
|
/**
|
|
47198
|
-
*
|
|
47539
|
+
* An item value.
|
|
47199
47540
|
*/
|
|
47200
47541
|
get: function () {
|
|
47201
47542
|
return this.data ? this.data.getMultipleTextValue(this.name) : null;
|
|
@@ -47385,9 +47726,9 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
47385
47726
|
};
|
|
47386
47727
|
Object.defineProperty(QuestionMultipleTextModel.prototype, "items", {
|
|
47387
47728
|
/**
|
|
47388
|
-
* 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.
|
|
47389
47730
|
*
|
|
47390
|
-
*
|
|
47731
|
+
* Each object in this array should have at least the following properties:
|
|
47391
47732
|
*
|
|
47392
47733
|
* ```js
|
|
47393
47734
|
* {
|
|
@@ -47428,6 +47769,12 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
|
|
|
47428
47769
|
}
|
|
47429
47770
|
return null;
|
|
47430
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
|
+
};
|
|
47431
47778
|
QuestionMultipleTextModel.prototype.addConditionObjectsByContext = function (objects, context) {
|
|
47432
47779
|
for (var i = 0; i < this.items.length; i++) {
|
|
47433
47780
|
var item = this.items[i];
|
|
@@ -47881,6 +48228,31 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletextite
|
|
|
47881
48228
|
default: "text",
|
|
47882
48229
|
choices: _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].questions.inputTypes,
|
|
47883
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 },
|
|
47884
48256
|
{ name: "title", serializationProperty: "locTitle" },
|
|
47885
48257
|
{ name: "maxLength:number", default: -1 },
|
|
47886
48258
|
{ name: "size:number", minValue: 0 },
|
|
@@ -50370,9 +50742,9 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
50370
50742
|
enumerable: false,
|
|
50371
50743
|
configurable: true
|
|
50372
50744
|
});
|
|
50373
|
-
QuestionPanelDynamicModel.prototype.getPanelWrapperCss = function () {
|
|
50745
|
+
QuestionPanelDynamicModel.prototype.getPanelWrapperCss = function (panel) {
|
|
50374
50746
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
|
|
50375
|
-
.append(this.cssClasses.panelWrapper)
|
|
50747
|
+
.append(this.cssClasses.panelWrapper, !panel || panel.visible)
|
|
50376
50748
|
.append(this.cssClasses.panelWrapperInRow, this.panelRemoveButtonLocation === "right")
|
|
50377
50749
|
.toString();
|
|
50378
50750
|
};
|
|
@@ -50929,6 +51301,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50929
51301
|
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
|
|
50930
51302
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
|
|
50931
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");
|
|
50932
51305
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
50933
51306
|
var extendStatics = function (d, b) {
|
|
50934
51307
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -50960,6 +51333,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
50960
51333
|
|
|
50961
51334
|
|
|
50962
51335
|
|
|
51336
|
+
|
|
50963
51337
|
/**
|
|
50964
51338
|
* A class that describes the Ranking question type.
|
|
50965
51339
|
*
|
|
@@ -50979,27 +51353,33 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
50979
51353
|
if (_this.visibleChoices.length === 1 && !_this.selectToRankEnabled) {
|
|
50980
51354
|
_this.value = [];
|
|
50981
51355
|
_this.value.push(_this.visibleChoices[0].value);
|
|
50982
|
-
_this.
|
|
51356
|
+
_this.updateRankingChoicesSync();
|
|
50983
51357
|
return;
|
|
50984
51358
|
}
|
|
50985
51359
|
if (_this.isEmpty()) {
|
|
50986
|
-
_this.
|
|
51360
|
+
_this.updateRankingChoicesSync();
|
|
50987
51361
|
return;
|
|
50988
51362
|
}
|
|
50989
51363
|
if (_this.selectToRankEnabled) {
|
|
50990
|
-
_this.
|
|
51364
|
+
_this.updateRankingChoicesSync();
|
|
50991
51365
|
return;
|
|
50992
51366
|
}
|
|
50993
51367
|
if (_this.visibleChoices.length > _this.value.length)
|
|
50994
51368
|
_this.addToValueByVisibleChoices();
|
|
50995
51369
|
if (_this.visibleChoices.length < _this.value.length)
|
|
50996
51370
|
_this.removeFromValueByVisibleChoices();
|
|
50997
|
-
_this.
|
|
51371
|
+
_this.updateRankingChoicesSync();
|
|
50998
51372
|
};
|
|
50999
51373
|
_this.localeChanged = function () {
|
|
51000
51374
|
_super.prototype.localeChanged.call(_this);
|
|
51001
|
-
_this.
|
|
51375
|
+
_this.updateRankingChoicesSync();
|
|
51002
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; });
|
|
51003
51383
|
_this.handlePointerDown = function (event, choice, node) {
|
|
51004
51384
|
var target = event.target;
|
|
51005
51385
|
if (!_this.isDragStartNodeValid(target))
|
|
@@ -51052,6 +51432,8 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51052
51432
|
_this.isValueSetByUser = false;
|
|
51053
51433
|
_this.setValue = function () {
|
|
51054
51434
|
var value = [];
|
|
51435
|
+
_this.rankingChoicesAnimation.cancel();
|
|
51436
|
+
_this.unRankingChoicesAnimation.cancel();
|
|
51055
51437
|
_this.rankingChoices.forEach(function (choice) {
|
|
51056
51438
|
value.push(choice.value);
|
|
51057
51439
|
});
|
|
@@ -51059,10 +51441,11 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51059
51441
|
_this.isValueSetByUser = true;
|
|
51060
51442
|
};
|
|
51061
51443
|
_this.createNewArray("rankingChoices");
|
|
51444
|
+
_this.createNewArray("unRankingChoices");
|
|
51062
51445
|
_this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
|
|
51063
51446
|
_this.clearValue();
|
|
51064
51447
|
_this.setDragDropRankingChoices();
|
|
51065
|
-
_this.
|
|
51448
|
+
_this.updateRankingChoicesSync();
|
|
51066
51449
|
});
|
|
51067
51450
|
return _this;
|
|
51068
51451
|
}
|
|
@@ -51099,10 +51482,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51099
51482
|
});
|
|
51100
51483
|
QuestionRankingModel.prototype.getItemClassCore = function (item, options) {
|
|
51101
51484
|
var itemIndex = this.rankingChoices.indexOf(item);
|
|
51485
|
+
var unrankedItemIndex = this.unRankingChoices.indexOf(item);
|
|
51102
51486
|
var dropTargetIndex = this.rankingChoices.indexOf(this.currentDropTarget);
|
|
51487
|
+
var isDrop = (this.selectToRankEnabled && itemIndex > -1 && unrankedItemIndex > -1) || this.currentDropTarget === item;
|
|
51103
51488
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
|
51104
51489
|
.append(_super.prototype.getItemClassCore.call(this, item, options))
|
|
51105
|
-
.append(this.cssClasses.itemGhostMod,
|
|
51490
|
+
.append(this.cssClasses.itemGhostMod, isDrop)
|
|
51106
51491
|
.append("sv-dragdrop-movedown", itemIndex === dropTargetIndex + 1 && this.dropTargetNodeMove === "down")
|
|
51107
51492
|
.append("sv-dragdrop-moveup", itemIndex === dropTargetIndex - 1 && this.dropTargetNodeMove === "up")
|
|
51108
51493
|
.toString();
|
|
@@ -51154,10 +51539,15 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51154
51539
|
QuestionRankingModel.prototype.getNumberByIndex = function (index) {
|
|
51155
51540
|
return this.isEmpty() ? "" : index + 1 + "";
|
|
51156
51541
|
};
|
|
51542
|
+
QuestionRankingModel.prototype.updateRankingChoicesSync = function () {
|
|
51543
|
+
this.animationAllowed = false;
|
|
51544
|
+
this.updateRankingChoices();
|
|
51545
|
+
this.animationAllowed = true;
|
|
51546
|
+
};
|
|
51157
51547
|
QuestionRankingModel.prototype.setSurveyImpl = function (value, isLight) {
|
|
51158
51548
|
_super.prototype.setSurveyImpl.call(this, value, isLight);
|
|
51159
51549
|
this.setDragDropRankingChoices();
|
|
51160
|
-
this.
|
|
51550
|
+
this.updateRankingChoicesSync();
|
|
51161
51551
|
};
|
|
51162
51552
|
QuestionRankingModel.prototype.isAnswerCorrect = function () {
|
|
51163
51553
|
return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].isArraysEqual(this.value, this.correctAnswer, false);
|
|
@@ -51171,7 +51561,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51171
51561
|
_super.prototype.onSurveyValueChanged.call(this, newValue);
|
|
51172
51562
|
if (this.isLoadingFromJson)
|
|
51173
51563
|
return;
|
|
51174
|
-
this.
|
|
51564
|
+
this.updateRankingChoicesSync();
|
|
51175
51565
|
};
|
|
51176
51566
|
QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
|
|
51177
51567
|
var newValue = this.value.slice();
|
|
@@ -51192,27 +51582,61 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51192
51582
|
}
|
|
51193
51583
|
this.value = newValue;
|
|
51194
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
|
+
});
|
|
51195
51624
|
Object.defineProperty(QuestionRankingModel.prototype, "rankingChoices", {
|
|
51196
51625
|
get: function () {
|
|
51197
51626
|
return this.getPropertyValue("rankingChoices", []);
|
|
51198
51627
|
},
|
|
51628
|
+
set: function (val) {
|
|
51629
|
+
this._rankingChoicesAnimation.sync(val);
|
|
51630
|
+
},
|
|
51199
51631
|
enumerable: false,
|
|
51200
51632
|
configurable: true
|
|
51201
51633
|
});
|
|
51202
51634
|
Object.defineProperty(QuestionRankingModel.prototype, "unRankingChoices", {
|
|
51203
51635
|
get: function () {
|
|
51204
|
-
|
|
51205
|
-
|
|
51206
|
-
|
|
51207
|
-
|
|
51208
|
-
});
|
|
51209
|
-
rankingChoices.forEach(function (rankingChoice) {
|
|
51210
|
-
unRankingChoices.forEach(function (choice, index) {
|
|
51211
|
-
if (choice.value === rankingChoice.value)
|
|
51212
|
-
unRankingChoices.splice(index, 1);
|
|
51213
|
-
});
|
|
51214
|
-
});
|
|
51215
|
-
return unRankingChoices;
|
|
51636
|
+
return this.getPropertyValue("unRankingChoices", []);
|
|
51637
|
+
},
|
|
51638
|
+
set: function (val) {
|
|
51639
|
+
this._unRankingChoicesAnimation.sync(val);
|
|
51216
51640
|
},
|
|
51217
51641
|
enumerable: false,
|
|
51218
51642
|
configurable: true
|
|
@@ -51244,20 +51668,32 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
51244
51668
|
});
|
|
51245
51669
|
this.setPropertyValue("rankingChoices", newRankingChoices);
|
|
51246
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
|
+
};
|
|
51247
51684
|
QuestionRankingModel.prototype.updateRankingChoicesSelectToRankMode = function (forceUpdate) {
|
|
51248
51685
|
var _this = this;
|
|
51249
|
-
if (this.isEmpty()) {
|
|
51250
|
-
this.setPropertyValue("rankingChoices", []);
|
|
51251
|
-
return;
|
|
51252
|
-
}
|
|
51253
51686
|
var newRankingChoices = [];
|
|
51254
|
-
this.
|
|
51255
|
-
|
|
51256
|
-
|
|
51257
|
-
|
|
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
|
+
});
|
|
51258
51693
|
});
|
|
51259
|
-
}
|
|
51260
|
-
this.
|
|
51694
|
+
}
|
|
51695
|
+
this.updateUnRankingChoices(newRankingChoices);
|
|
51696
|
+
this.rankingChoices = newRankingChoices;
|
|
51261
51697
|
};
|
|
51262
51698
|
QuestionRankingModel.prototype.endLoadingFromJson = function () {
|
|
51263
51699
|
_super.prototype.endLoadingFromJson.call(this);
|
|
@@ -52043,7 +52479,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
52043
52479
|
return this.inputId + "_" + index;
|
|
52044
52480
|
};
|
|
52045
52481
|
QuestionRatingModel.prototype.supportGoNextPageAutomatic = function () {
|
|
52046
|
-
return this.isMouseDown === true;
|
|
52482
|
+
return this.isMouseDown === true || this.renderAs === "dropdown";
|
|
52047
52483
|
};
|
|
52048
52484
|
QuestionRatingModel.prototype.supportOther = function () {
|
|
52049
52485
|
return false;
|
|
@@ -53793,6 +54229,8 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
53793
54229
|
Object.defineProperty(QuestionTextModel.prototype, "inputType", {
|
|
53794
54230
|
/**
|
|
53795
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"`
|
|
53796
54234
|
*/
|
|
53797
54235
|
get: function () {
|
|
53798
54236
|
return this.getPropertyValue("inputType");
|
|
@@ -54256,11 +54694,20 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
54256
54694
|
get: function () {
|
|
54257
54695
|
var style = {};
|
|
54258
54696
|
style.width = this.inputWidth;
|
|
54697
|
+
this.updateTextAlign(style);
|
|
54259
54698
|
return style;
|
|
54260
54699
|
},
|
|
54261
54700
|
enumerable: false,
|
|
54262
54701
|
configurable: true
|
|
54263
54702
|
});
|
|
54703
|
+
QuestionTextModel.prototype.updateTextAlign = function (style) {
|
|
54704
|
+
if (this.inputTextAlignment !== "auto") {
|
|
54705
|
+
style.textAlign = this.inputTextAlignment;
|
|
54706
|
+
}
|
|
54707
|
+
else if (this.maskType === "numeric" || this.maskType === "currency") {
|
|
54708
|
+
style.textAlign = "right";
|
|
54709
|
+
}
|
|
54710
|
+
};
|
|
54264
54711
|
QuestionTextModel.prototype.updateValueOnEvent = function (event) {
|
|
54265
54712
|
var newValue = event.target.value;
|
|
54266
54713
|
if (!this.isTwoValueEquals(this.value, newValue)) {
|
|
@@ -54282,6 +54729,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
54282
54729
|
onSet: function (newValue, target) { target.onSetMaskType(newValue); }
|
|
54283
54730
|
})
|
|
54284
54731
|
], QuestionTextModel.prototype, "maskType", void 0);
|
|
54732
|
+
__decorate([
|
|
54733
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
54734
|
+
], QuestionTextModel.prototype, "inputTextAlignment", void 0);
|
|
54285
54735
|
__decorate([
|
|
54286
54736
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
|
|
54287
54737
|
], QuestionTextModel.prototype, "_inputValue", void 0);
|
|
@@ -54448,6 +54898,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
|
|
|
54448
54898
|
return isMinMaxType(obj);
|
|
54449
54899
|
},
|
|
54450
54900
|
},
|
|
54901
|
+
{ name: "inputTextAlignment", default: "auto", choices: ["left", "right", "auto"], visible: false },
|
|
54451
54902
|
{
|
|
54452
54903
|
name: "maskType:masktype",
|
|
54453
54904
|
default: "none",
|
|
@@ -56176,7 +56627,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
56176
56627
|
/* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
|
|
56177
56628
|
/* harmony import */ var _actions_container__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./actions/container */ "./src/actions/container.ts");
|
|
56178
56629
|
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
56179
|
-
/* 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");
|
|
56180
56633
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
56181
56634
|
var extendStatics = function (d, b) {
|
|
56182
56635
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -56206,6 +56659,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
56206
56659
|
|
|
56207
56660
|
|
|
56208
56661
|
|
|
56662
|
+
|
|
56663
|
+
|
|
56209
56664
|
/**
|
|
56210
56665
|
* A base class for the [`SurveyElement`](https://surveyjs.io/form-library/documentation/surveyelement) and [`SurveyModel`](https://surveyjs.io/form-library/documentation/surveymodel) classes.
|
|
56211
56666
|
*/
|
|
@@ -56390,6 +56845,20 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
56390
56845
|
_this.isEditableTemplateElement = false;
|
|
56391
56846
|
_this.isInteractiveDesignElement = true;
|
|
56392
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;
|
|
56393
56862
|
_this.name = name;
|
|
56394
56863
|
_this.createNewArray("errors");
|
|
56395
56864
|
_this.createNewArray("titleActions");
|
|
@@ -56435,11 +56904,11 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
56435
56904
|
elLeft = el.getBoundingClientRect().left;
|
|
56436
56905
|
needScroll = elLeft < 0;
|
|
56437
56906
|
}
|
|
56438
|
-
if (!needScroll &&
|
|
56439
|
-
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();
|
|
56440
56909
|
needScroll = height > 0 && height < elTop;
|
|
56441
56910
|
if (!needScroll && checkLeft) {
|
|
56442
|
-
var width =
|
|
56911
|
+
var width = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].getInnerWidth();
|
|
56443
56912
|
needScroll = width > 0 && width < elLeft;
|
|
56444
56913
|
}
|
|
56445
56914
|
}
|
|
@@ -56467,7 +56936,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
56467
56936
|
return null;
|
|
56468
56937
|
};
|
|
56469
56938
|
SurveyElement.FocusElement = function (elementId) {
|
|
56470
|
-
if (!elementId || !
|
|
56939
|
+
if (!elementId || !_global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].isAvailable())
|
|
56471
56940
|
return false;
|
|
56472
56941
|
var res = SurveyElement.focusElementCore(elementId);
|
|
56473
56942
|
if (!res) {
|
|
@@ -56550,6 +57019,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
56550
57019
|
},
|
|
56551
57020
|
set: function (val) {
|
|
56552
57021
|
this.setPropertyValue("state", val);
|
|
57022
|
+
this.renderedIsExpanded = !(this.state === "collapsed" && !this.isDesignMode);
|
|
56553
57023
|
},
|
|
56554
57024
|
enumerable: false,
|
|
56555
57025
|
configurable: true
|
|
@@ -57204,7 +57674,7 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57204
57674
|
});
|
|
57205
57675
|
Object.defineProperty(SurveyElement.prototype, "hasParent", {
|
|
57206
57676
|
get: function () {
|
|
57207
|
-
return (this.parent && !this.parent.isPage && (!this.parent.originalPage
|
|
57677
|
+
return (this.parent && !this.parent.isPage && (!this.parent.originalPage)) || (this.parent === undefined);
|
|
57208
57678
|
},
|
|
57209
57679
|
enumerable: false,
|
|
57210
57680
|
configurable: true
|
|
@@ -57226,11 +57696,14 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57226
57696
|
return this.shouldAddRunnerStyles() && (this.hasParent);
|
|
57227
57697
|
};
|
|
57228
57698
|
SurveyElement.prototype.getCssRoot = function (cssClasses) {
|
|
57699
|
+
var isExpanadable = !!this.isCollapsed || !!this.isExpanded;
|
|
57229
57700
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
|
57230
57701
|
.append(cssClasses.withFrame, this.getHasFrameV2() && !this.isCompact)
|
|
57231
57702
|
.append(cssClasses.compact, this.isCompact && this.getHasFrameV2())
|
|
57232
57703
|
.append(cssClasses.collapsed, !!this.isCollapsed)
|
|
57233
|
-
.append(cssClasses.
|
|
57704
|
+
.append(cssClasses.expandableAnimating, isExpanadable && this.isAnimatingCollapseExpand)
|
|
57705
|
+
.append(cssClasses.expanded, !!this.isExpanded && this.renderedIsExpanded)
|
|
57706
|
+
.append(cssClasses.expandable, isExpanadable)
|
|
57234
57707
|
.append(cssClasses.nested, this.getIsNested())
|
|
57235
57708
|
.toString();
|
|
57236
57709
|
};
|
|
@@ -57382,12 +57855,12 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57382
57855
|
});
|
|
57383
57856
|
SurveyElement.prototype.isContainsSelection = function (el) {
|
|
57384
57857
|
var elementWithSelection = undefined;
|
|
57385
|
-
var _document =
|
|
57386
|
-
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"]) {
|
|
57387
57860
|
elementWithSelection = _document["selection"].createRange().parentElement();
|
|
57388
57861
|
}
|
|
57389
57862
|
else {
|
|
57390
|
-
var selection =
|
|
57863
|
+
var selection = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomWindowHelper"].getSelection();
|
|
57391
57864
|
if (!!selection && selection.rangeCount > 0) {
|
|
57392
57865
|
var range = selection.getRangeAt(0);
|
|
57393
57866
|
if (range.startOffset !== range.endOffset) {
|
|
@@ -57452,6 +57925,84 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57452
57925
|
});
|
|
57453
57926
|
}
|
|
57454
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
|
+
});
|
|
57455
58006
|
SurveyElement.prototype.dispose = function () {
|
|
57456
58007
|
_super.prototype.dispose.call(this);
|
|
57457
58008
|
if (this.titleToolbarValue) {
|
|
@@ -57474,6 +58025,9 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57474
58025
|
__decorate([
|
|
57475
58026
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
|
|
57476
58027
|
], SurveyElement.prototype, "allowRootStyle", void 0);
|
|
58028
|
+
__decorate([
|
|
58029
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
|
|
58030
|
+
], SurveyElement.prototype, "_renderedIsExpanded", void 0);
|
|
57477
58031
|
return SurveyElement;
|
|
57478
58032
|
}(SurveyElementCore));
|
|
57479
58033
|
|
|
@@ -62960,14 +63514,12 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
62960
63514
|
};
|
|
62961
63515
|
SurveyModel.prototype.processResponsiveness = function (width, mobileWidth) {
|
|
62962
63516
|
var isMobile = width < mobileWidth;
|
|
62963
|
-
|
|
62964
|
-
if (
|
|
62965
|
-
return false;
|
|
62966
|
-
}
|
|
62967
|
-
else {
|
|
63517
|
+
var isMobileChanged = this.isMobile !== isMobile;
|
|
63518
|
+
if (isMobileChanged) {
|
|
62968
63519
|
this.setIsMobile(isMobile);
|
|
62969
|
-
return true;
|
|
62970
63520
|
}
|
|
63521
|
+
this.layoutElements.forEach(function (layoutElement) { return layoutElement.processResponsiveness && layoutElement.processResponsiveness(width); });
|
|
63522
|
+
return isMobileChanged;
|
|
62971
63523
|
};
|
|
62972
63524
|
SurveyModel.prototype.triggerResponsiveness = function (hard) {
|
|
62973
63525
|
this.getAllQuestions().forEach(function (question) {
|
|
@@ -65712,7 +66264,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
65712
66264
|
}
|
|
65713
66265
|
}
|
|
65714
66266
|
else if (isStrCiEqual(layoutElement.id, "advanced-header")) {
|
|
65715
|
-
if (this.state === "running" && layoutElement.container === container) {
|
|
66267
|
+
if ((this.state === "running" || this.state === "starting") && layoutElement.container === container) {
|
|
65716
66268
|
containerLayoutElements.push(layoutElement);
|
|
65717
66269
|
}
|
|
65718
66270
|
}
|
|
@@ -67847,6 +68399,287 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("runexpressiontr
|
|
|
67847
68399
|
}, "surveytrigger");
|
|
67848
68400
|
|
|
67849
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
|
+
|
|
67850
68683
|
/***/ }),
|
|
67851
68684
|
|
|
67852
68685
|
/***/ "./src/utils/camera.ts":
|
|
@@ -68586,6 +69419,117 @@ var VerticalResponsivityManager = /** @class */ (function (_super) {
|
|
|
68586
69419
|
|
|
68587
69420
|
|
|
68588
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
|
+
|
|
68589
69533
|
/***/ }),
|
|
68590
69534
|
|
|
68591
69535
|
/***/ "./src/utils/utils.ts":
|