survey-core 1.10.5 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defaultV2.css +152 -18
- package/defaultV2.css.map +1 -1
- package/defaultV2.fontless.css +152 -18
- 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 +2 -2
- package/i18n/estonian.js +1 -1
- package/i18n/estonian.min.js +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js +1 -1
- package/i18n/georgian.js +1 -1
- package/i18n/georgian.min.js +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js +1 -1
- package/i18n/greek.js +1 -1
- package/i18n/greek.min.js +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js +1 -1
- package/i18n/hindi.js +1 -1
- package/i18n/hindi.min.js +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js +1 -1
- package/i18n/icelandic.js +1 -1
- package/i18n/icelandic.min.js +1 -1
- package/i18n/index.js +132 -1
- 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/philippines.js +246 -0
- package/i18n/philippines.js.map +1 -0
- package/i18n/philippines.min.js +6 -0
- 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 +2 -2
- 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 +77 -9
- package/modern.css.map +1 -1
- package/modern.fontless.css +77 -9
- 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 +1228 -502
- package/survey.core.js.map +1 -1
- package/survey.core.min.js +3 -3
- package/survey.css +17 -1
- package/survey.css.map +1 -1
- package/survey.i18n.js +132 -1
- package/survey.i18n.js.map +1 -1
- package/survey.i18n.min.js +2 -2
- package/survey.min.css +2 -2
- package/themes/borderless-dark-panelless.js +1 -1
- package/themes/borderless-dark-panelless.min.js +1 -1
- package/themes/borderless-dark.js +1 -1
- package/themes/borderless-dark.min.js +1 -1
- package/themes/borderless-light-panelless..js +1 -1
- package/themes/borderless-light-panelless..min.js +1 -1
- package/themes/borderless-light.js +1 -1
- package/themes/borderless-light.min.js +1 -1
- package/themes/contrast-dark-panelless.js +1 -1
- package/themes/contrast-dark-panelless.min.js +1 -1
- package/themes/contrast-dark.js +1 -1
- package/themes/contrast-dark.min.js +1 -1
- package/themes/contrast-light-panelless.js +1 -1
- package/themes/contrast-light-panelless.min.js +1 -1
- package/themes/contrast-light.js +1 -1
- package/themes/contrast-light.min.js +1 -1
- package/themes/default-dark-panelless.js +1 -1
- package/themes/default-dark-panelless.min.js +1 -1
- package/themes/default-dark.js +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-light-panelless.js +1 -1
- package/themes/default-light-panelless.min.js +1 -1
- package/themes/default-light.js +1 -1
- package/themes/default-light.min.js +1 -1
- package/themes/doubleborder-dark-panelless.js +1 -1
- package/themes/doubleborder-dark-panelless.min.js +1 -1
- package/themes/doubleborder-dark.js +1 -1
- package/themes/doubleborder-dark.min.js +1 -1
- package/themes/doubleborder-light-panelles.js +1 -1
- package/themes/doubleborder-light-panelles.min.js +1 -1
- package/themes/doubleborder-light.js +1 -1
- package/themes/doubleborder-light.min.js +1 -1
- package/themes/flat-dark-panelless.js +1 -1
- package/themes/flat-dark-panelless.min.js +1 -1
- package/themes/flat-dark.js +1 -1
- package/themes/flat-dark.min.js +1 -1
- package/themes/flat-light-panelless.js +1 -1
- package/themes/flat-light-panelless.min.js +1 -1
- package/themes/flat-light.js +1 -1
- package/themes/flat-light.min.js +1 -1
- package/themes/index.js +1 -1
- package/themes/index.min.js +1 -1
- package/themes/layered-dark-panelless.js +1 -1
- package/themes/layered-dark-panelless.min.js +1 -1
- package/themes/layered-dark.js +1 -1
- package/themes/layered-dark.min.js +1 -1
- package/themes/layered-light-panelless.js +1 -1
- package/themes/layered-light-panelless.min.js +1 -1
- package/themes/layered-light.js +1 -1
- package/themes/layered-light.min.js +1 -1
- package/themes/plain-dark-panelless.js +1 -1
- package/themes/plain-dark-panelless.min.js +1 -1
- package/themes/plain-dark.js +1 -1
- package/themes/plain-dark.min.js +1 -1
- package/themes/plain-light-panelless.js +1 -1
- package/themes/plain-light-panelless.min.js +1 -1
- package/themes/plain-light.js +1 -1
- package/themes/plain-light.min.js +1 -1
- package/themes/sharp-dark-panelless.js +1 -1
- package/themes/sharp-dark-panelless.min.js +1 -1
- package/themes/sharp-dark.js +1 -1
- package/themes/sharp-dark.min.js +1 -1
- package/themes/sharp-light-panelless.js +1 -1
- package/themes/sharp-light-panelless.min.js +1 -1
- package/themes/sharp-light.js +1 -1
- package/themes/sharp-light.min.js +1 -1
- package/themes/solid-dark-panelless.js +1 -1
- package/themes/solid-dark-panelless.min.js +1 -1
- package/themes/solid-dark.js +1 -1
- package/themes/solid-dark.min.js +1 -1
- package/themes/solid-light-panelless.js +1 -1
- package/themes/solid-light-panelless.min.js +1 -1
- package/themes/solid-light.js +1 -1
- package/themes/solid-light.min.js +1 -1
- package/themes/three-dimensional-dark-panelless.js +1 -1
- package/themes/three-dimensional-dark-panelless.min.js +1 -1
- package/themes/three-dimensional-dark.js +1 -1
- package/themes/three-dimensional-dark.min.js +1 -1
- package/themes/three-dimensional-light-panelless.js +1 -1
- package/themes/three-dimensional-light-panelless.min.js +1 -1
- package/themes/three-dimensional-light.js +1 -1
- package/themes/three-dimensional-light.min.js +1 -1
- package/ts3.4/typings/actions/action.d.ts +21 -2
- package/ts3.4/typings/actions/adaptive-container.d.ts +0 -1
- package/ts3.4/typings/actions/container.d.ts +4 -0
- package/ts3.4/typings/base-interfaces.d.ts +1 -1
- package/ts3.4/typings/base.d.ts +7 -0
- package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +3 -0
- package/ts3.4/typings/dragdrop/ranking-choices.d.ts +7 -1
- package/ts3.4/typings/dragdrop/ranking-select-to-rank.d.ts +0 -9
- package/ts3.4/typings/functionsfactory.d.ts +3 -3
- package/ts3.4/typings/list.d.ts +19 -7
- package/ts3.4/typings/multiSelectListModel.d.ts +5 -2
- package/ts3.4/typings/panel.d.ts +1 -1
- package/ts3.4/typings/popup-dropdown-view-model.d.ts +6 -3
- package/ts3.4/typings/popup-view-model.d.ts +4 -1
- package/ts3.4/typings/popup.d.ts +5 -0
- package/ts3.4/typings/question.d.ts +6 -2
- package/ts3.4/typings/question_baseselect.d.ts +2 -0
- package/ts3.4/typings/question_boolean.d.ts +2 -0
- package/ts3.4/typings/question_file.d.ts +2 -1
- package/ts3.4/typings/question_matrix.d.ts +4 -0
- package/ts3.4/typings/question_matrixdropdown.d.ts +3 -0
- package/ts3.4/typings/question_matrixdropdownbase.d.ts +2 -0
- package/ts3.4/typings/question_matrixdropdownrendered.d.ts +0 -1
- package/ts3.4/typings/question_matrixdynamic.d.ts +4 -5
- package/ts3.4/typings/question_paneldynamic.d.ts +2 -4
- package/ts3.4/typings/question_ranking.d.ts +13 -5
- package/ts3.4/typings/question_text.d.ts +1 -0
- package/ts3.4/typings/question_textbase.d.ts +1 -1
- package/ts3.4/typings/survey-element.d.ts +3 -1
- package/ts3.4/typings/survey.d.ts +3 -2
- package/ts3.4/typings/surveyToc.d.ts +4 -0
- package/ts3.4/typings/utils/animation.d.ts +33 -19
- package/ts3.4/typings/utils/popup.d.ts +16 -4
- package/ts3.4/typings/utils/utils.d.ts +9 -0
- package/typings/actions/action.d.ts +21 -2
- package/typings/actions/adaptive-container.d.ts +0 -1
- package/typings/actions/container.d.ts +4 -0
- package/typings/base-interfaces.d.ts +1 -1
- package/typings/base.d.ts +7 -0
- package/typings/defaultCss/defaultV2Css.d.ts +3 -0
- package/typings/dragdrop/ranking-choices.d.ts +7 -1
- package/typings/dragdrop/ranking-select-to-rank.d.ts +0 -9
- package/typings/functionsfactory.d.ts +3 -3
- package/typings/list.d.ts +19 -7
- package/typings/multiSelectListModel.d.ts +5 -2
- package/typings/panel.d.ts +1 -1
- package/typings/popup-dropdown-view-model.d.ts +6 -3
- package/typings/popup-view-model.d.ts +5 -2
- package/typings/popup.d.ts +5 -0
- package/typings/question.d.ts +6 -2
- package/typings/question_baseselect.d.ts +2 -0
- package/typings/question_boolean.d.ts +2 -0
- package/typings/question_file.d.ts +2 -1
- package/typings/question_matrix.d.ts +4 -0
- package/typings/question_matrixdropdown.d.ts +3 -0
- package/typings/question_matrixdropdownbase.d.ts +2 -0
- package/typings/question_matrixdropdownrendered.d.ts +0 -1
- package/typings/question_matrixdynamic.d.ts +4 -5
- package/typings/question_paneldynamic.d.ts +2 -2
- package/typings/question_ranking.d.ts +18 -9
- package/typings/question_text.d.ts +1 -0
- package/typings/question_textbase.d.ts +1 -1
- package/typings/survey-element.d.ts +3 -1
- package/typings/survey.d.ts +3 -2
- package/typings/surveyToc.d.ts +4 -0
- package/typings/utils/animation.d.ts +31 -10
- package/typings/utils/popup.d.ts +16 -4
- package/typings/utils/utils.d.ts +9 -0
package/survey.core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* surveyjs - Survey JavaScript library v1.
|
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.1
|
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
|
5
5
|
*/
|
|
@@ -686,13 +686,14 @@ class SignaturePad extends SignatureEventTarget {
|
|
|
686
686
|
/*!*******************************!*\
|
|
687
687
|
!*** ./src/actions/action.ts ***!
|
|
688
688
|
\*******************************/
|
|
689
|
-
/*! exports provided: createDropdownActionModel, createDropdownActionModelAdvanced, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel */
|
|
689
|
+
/*! exports provided: createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel */
|
|
690
690
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
691
691
|
|
|
692
692
|
"use strict";
|
|
693
693
|
__webpack_require__.r(__webpack_exports__);
|
|
694
694
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModel", function() { return createDropdownActionModel; });
|
|
695
695
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return createDropdownActionModelAdvanced; });
|
|
696
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPopupModelWithListModel", function() { return createPopupModelWithListModel; });
|
|
696
697
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActionDropdownButtonTarget", function() { return getActionDropdownButtonTarget; });
|
|
697
698
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseAction", function() { return BaseAction; });
|
|
698
699
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
|
|
@@ -725,6 +726,11 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
725
726
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
726
727
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
727
728
|
};
|
|
729
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
|
|
730
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
731
|
+
to[j] = from[i];
|
|
732
|
+
return to;
|
|
733
|
+
};
|
|
728
734
|
|
|
729
735
|
|
|
730
736
|
|
|
@@ -733,36 +739,57 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
733
739
|
|
|
734
740
|
|
|
735
741
|
function createDropdownActionModel(actionOptions, dropdownOptions, locOwner) {
|
|
736
|
-
|
|
742
|
+
dropdownOptions.locOwner = locOwner;
|
|
743
|
+
return createDropdownActionModelAdvanced(actionOptions, dropdownOptions, dropdownOptions);
|
|
737
744
|
}
|
|
738
|
-
function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOptions
|
|
739
|
-
var
|
|
745
|
+
function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOptions) {
|
|
746
|
+
var _a;
|
|
747
|
+
var originalSelectionChanged = listOptions.onSelectionChanged;
|
|
748
|
+
listOptions.onSelectionChanged = function (item) {
|
|
749
|
+
var params = [];
|
|
750
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
751
|
+
params[_i - 1] = arguments[_i];
|
|
752
|
+
}
|
|
740
753
|
if (newAction.hasTitle) {
|
|
741
754
|
newAction.title = item.title;
|
|
742
755
|
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
var options = popupOptions || {};
|
|
749
|
-
options.onDispose = function () { listModel.dispose(); };
|
|
750
|
-
var innerPopupModel = new _popup__WEBPACK_IMPORTED_MODULE_4__["PopupModel"]("sv-list", { model: listModel }, options);
|
|
751
|
-
innerPopupModel.displayMode = popupOptions === null || popupOptions === void 0 ? void 0 : popupOptions.displayMode;
|
|
756
|
+
if (originalSelectionChanged) {
|
|
757
|
+
originalSelectionChanged(item, params);
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
var popupModel = createPopupModelWithListModel(listOptions, popupOptions);
|
|
752
761
|
var newActionOptions = Object.assign({}, actionOptions, {
|
|
753
762
|
component: "sv-action-bar-item-dropdown",
|
|
754
|
-
popupModel:
|
|
763
|
+
popupModel: popupModel,
|
|
755
764
|
action: function (action, isUserAction) {
|
|
756
765
|
!!(actionOptions.action) && actionOptions.action();
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
listModel.scrollToSelectedItem();
|
|
766
|
+
popupModel.isFocusedContent = popupModel.isFocusedContent || !isUserAction;
|
|
767
|
+
popupModel.show();
|
|
760
768
|
},
|
|
761
769
|
});
|
|
762
770
|
var newAction = new Action(newActionOptions);
|
|
763
|
-
newAction.data =
|
|
771
|
+
newAction.data = (_a = popupModel.contentComponentData) === null || _a === void 0 ? void 0 : _a.model;
|
|
764
772
|
return newAction;
|
|
765
773
|
}
|
|
774
|
+
function createPopupModelWithListModel(listOptions, popupOptions) {
|
|
775
|
+
var listModel = new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](listOptions);
|
|
776
|
+
listModel.onSelectionChanged = function (item) {
|
|
777
|
+
if (listOptions.onSelectionChanged) {
|
|
778
|
+
listOptions.onSelectionChanged(item);
|
|
779
|
+
}
|
|
780
|
+
popupModel.hide();
|
|
781
|
+
};
|
|
782
|
+
var _popupOptions = popupOptions || {};
|
|
783
|
+
_popupOptions.onDispose = function () { listModel.dispose(); };
|
|
784
|
+
var popupModel = new _popup__WEBPACK_IMPORTED_MODULE_4__["PopupModel"]("sv-list", { model: listModel }, _popupOptions);
|
|
785
|
+
popupModel.isFocusedContent = listModel.showFilter;
|
|
786
|
+
popupModel.onShow = function () {
|
|
787
|
+
if (!!_popupOptions.onShow)
|
|
788
|
+
_popupOptions.onShow();
|
|
789
|
+
listModel.scrollToSelectedItem();
|
|
790
|
+
};
|
|
791
|
+
return popupModel;
|
|
792
|
+
}
|
|
766
793
|
function getActionDropdownButtonTarget(container) {
|
|
767
794
|
return container === null || container === void 0 ? void 0 : container.previousElementSibling;
|
|
768
795
|
}
|
|
@@ -771,6 +798,7 @@ var BaseAction = /** @class */ (function (_super) {
|
|
|
771
798
|
function BaseAction() {
|
|
772
799
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
773
800
|
_this.rendredIdValue = BaseAction.getNextRendredId();
|
|
801
|
+
_this.markerIconSize = 16;
|
|
774
802
|
return _this;
|
|
775
803
|
}
|
|
776
804
|
BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
|
|
@@ -914,6 +942,46 @@ var BaseAction = /** @class */ (function (_super) {
|
|
|
914
942
|
}
|
|
915
943
|
return args.isTrusted;
|
|
916
944
|
};
|
|
945
|
+
BaseAction.prototype.showPopup = function () {
|
|
946
|
+
if (!!this.popupModel) {
|
|
947
|
+
this.popupModel.show();
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
BaseAction.prototype.hidePopup = function () {
|
|
951
|
+
if (!!this.popupModel) {
|
|
952
|
+
this.popupModel.hide();
|
|
953
|
+
}
|
|
954
|
+
};
|
|
955
|
+
BaseAction.prototype.clearPopupTimeouts = function () {
|
|
956
|
+
if (this.showPopupTimeout)
|
|
957
|
+
clearTimeout(this.showPopupTimeout);
|
|
958
|
+
if (this.hidePopupTimeout)
|
|
959
|
+
clearTimeout(this.hidePopupTimeout);
|
|
960
|
+
};
|
|
961
|
+
BaseAction.prototype.showPopupDelayed = function (delay) {
|
|
962
|
+
var _this = this;
|
|
963
|
+
this.clearPopupTimeouts();
|
|
964
|
+
this.showPopupTimeout = setTimeout(function () {
|
|
965
|
+
_this.clearPopupTimeouts();
|
|
966
|
+
_this.showPopup();
|
|
967
|
+
}, delay);
|
|
968
|
+
};
|
|
969
|
+
BaseAction.prototype.hidePopupDelayed = function (delay) {
|
|
970
|
+
var _this = this;
|
|
971
|
+
var _a;
|
|
972
|
+
if ((_a = this.popupModel) === null || _a === void 0 ? void 0 : _a.isVisible) {
|
|
973
|
+
this.clearPopupTimeouts();
|
|
974
|
+
this.hidePopupTimeout = setTimeout(function () {
|
|
975
|
+
_this.clearPopupTimeouts();
|
|
976
|
+
_this.hidePopup();
|
|
977
|
+
_this.isHovered = false;
|
|
978
|
+
}, delay);
|
|
979
|
+
}
|
|
980
|
+
else {
|
|
981
|
+
this.clearPopupTimeouts();
|
|
982
|
+
this.isHovered = false;
|
|
983
|
+
}
|
|
984
|
+
};
|
|
917
985
|
BaseAction.renderedId = 1;
|
|
918
986
|
__decorate([
|
|
919
987
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
@@ -975,9 +1043,21 @@ var BaseAction = /** @class */ (function (_super) {
|
|
|
975
1043
|
__decorate([
|
|
976
1044
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: 24 })
|
|
977
1045
|
], BaseAction.prototype, "iconSize", void 0);
|
|
1046
|
+
__decorate([
|
|
1047
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
1048
|
+
], BaseAction.prototype, "markerIconName", void 0);
|
|
1049
|
+
__decorate([
|
|
1050
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
1051
|
+
], BaseAction.prototype, "markerIconSize", void 0);
|
|
978
1052
|
__decorate([
|
|
979
1053
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
|
980
1054
|
], BaseAction.prototype, "css", void 0);
|
|
1055
|
+
__decorate([
|
|
1056
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
|
|
1057
|
+
], BaseAction.prototype, "isPressed", void 0);
|
|
1058
|
+
__decorate([
|
|
1059
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
|
|
1060
|
+
], BaseAction.prototype, "isHovered", void 0);
|
|
981
1061
|
return BaseAction;
|
|
982
1062
|
}(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));
|
|
983
1063
|
|
|
@@ -1015,6 +1095,14 @@ var Action = /** @class */ (function (_super) {
|
|
|
1015
1095
|
Action.prototype.createLocTitle = function () {
|
|
1016
1096
|
return this.createLocalizableString("title", this, true);
|
|
1017
1097
|
};
|
|
1098
|
+
Action.prototype.setItems = function (items, onSelectionChanged) {
|
|
1099
|
+
this.markerIconName = "icon-next_16x16";
|
|
1100
|
+
this.component = "sv-list-item-group";
|
|
1101
|
+
this.items = __spreadArray([], items);
|
|
1102
|
+
var popupModel = createPopupModelWithListModel({ items: items, onSelectionChanged: onSelectionChanged, searchEnabled: false }, { horizontalPosition: "right", showPointer: false, canShrink: false });
|
|
1103
|
+
popupModel.cssClass = "sv-popup-inner";
|
|
1104
|
+
this.popupModel = popupModel;
|
|
1105
|
+
};
|
|
1018
1106
|
Action.prototype.getLocTitle = function () {
|
|
1019
1107
|
return this.locTitleValue;
|
|
1020
1108
|
};
|
|
@@ -1231,9 +1319,6 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
|
|
|
1231
1319
|
tooltip: _surveyStrings__WEBPACK_IMPORTED_MODULE_3__["surveyLocalization"].getString("more"),
|
|
1232
1320
|
}, {
|
|
1233
1321
|
items: [],
|
|
1234
|
-
onSelectionChanged: function (item) {
|
|
1235
|
-
_this.hiddenItemSelected(item);
|
|
1236
|
-
},
|
|
1237
1322
|
allowSelection: false
|
|
1238
1323
|
});
|
|
1239
1324
|
return _this;
|
|
@@ -1299,11 +1384,6 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
|
|
|
1299
1384
|
enumerable: false,
|
|
1300
1385
|
configurable: true
|
|
1301
1386
|
});
|
|
1302
|
-
AdaptiveActionContainer.prototype.hiddenItemSelected = function (item) {
|
|
1303
|
-
if (!!item && typeof item.action === "function") {
|
|
1304
|
-
item.action();
|
|
1305
|
-
}
|
|
1306
|
-
};
|
|
1307
1387
|
AdaptiveActionContainer.prototype.onSet = function () {
|
|
1308
1388
|
var _this = this;
|
|
1309
1389
|
this.actions.forEach(function (action) { return action.updateCallback = function (isResetInitialized) { return _this.raiseUpdate(isResetInitialized); }; });
|
|
@@ -1560,6 +1640,21 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
|
1560
1640
|
this.sortItems();
|
|
1561
1641
|
}
|
|
1562
1642
|
};
|
|
1643
|
+
ActionContainer.prototype.popupAfterShowCallback = function (itemValue) {
|
|
1644
|
+
};
|
|
1645
|
+
ActionContainer.prototype.mouseOverHandler = function (itemValue) {
|
|
1646
|
+
var _this = this;
|
|
1647
|
+
itemValue.isHovered = true;
|
|
1648
|
+
this.actions.forEach(function (action) {
|
|
1649
|
+
if (action === itemValue && !!itemValue.popupModel) {
|
|
1650
|
+
itemValue.showPopupDelayed(_this.subItemsShowDelay);
|
|
1651
|
+
_this.popupAfterShowCallback(itemValue);
|
|
1652
|
+
}
|
|
1653
|
+
else if (!!action.popupModel && action.popupModel.isVisible) {
|
|
1654
|
+
action.hidePopupDelayed(_this.subItemsHideDelay);
|
|
1655
|
+
}
|
|
1656
|
+
});
|
|
1657
|
+
};
|
|
1563
1658
|
ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
|
|
1564
1659
|
return;
|
|
1565
1660
|
};
|
|
@@ -1595,6 +1690,12 @@ var ActionContainer = /** @class */ (function (_super) {
|
|
|
1595
1690
|
__decorate([
|
|
1596
1691
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
|
|
1597
1692
|
], ActionContainer.prototype, "isEmpty", void 0);
|
|
1693
|
+
__decorate([
|
|
1694
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 300 })
|
|
1695
|
+
], ActionContainer.prototype, "subItemsShowDelay", void 0);
|
|
1696
|
+
__decorate([
|
|
1697
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 300 })
|
|
1698
|
+
], ActionContainer.prototype, "subItemsHideDelay", void 0);
|
|
1598
1699
|
return ActionContainer;
|
|
1599
1700
|
}(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
|
|
1600
1701
|
|
|
@@ -1870,6 +1971,10 @@ var Base = /** @class */ (function () {
|
|
|
1870
1971
|
this.onItemValuePropertyChanged = this.addEvent();
|
|
1871
1972
|
this.isCreating = true;
|
|
1872
1973
|
this.animationAllowedLock = 0;
|
|
1974
|
+
//remove when knockout obsolete
|
|
1975
|
+
this.supportOnElementRenderedEvent = true;
|
|
1976
|
+
this.onElementRenderedEventEnabled = false;
|
|
1977
|
+
this._onElementRerendered = new EventBase();
|
|
1873
1978
|
this.bindingsValue = new Bindings(this);
|
|
1874
1979
|
_jsonobject__WEBPACK_IMPORTED_MODULE_2__["CustomPropertiesCollection"].createProperties(this);
|
|
1875
1980
|
this.onBaseCreating();
|
|
@@ -2798,7 +2903,7 @@ var Base = /** @class */ (function () {
|
|
|
2798
2903
|
configurable: true
|
|
2799
2904
|
});
|
|
2800
2905
|
Base.prototype.getIsAnimationAllowed = function () {
|
|
2801
|
-
return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].animationEnabled && this.animationAllowedLock >= 0 && !this.isLoadingFromJson && !this.isDisposed;
|
|
2906
|
+
return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].animationEnabled && this.animationAllowedLock >= 0 && !this.isLoadingFromJson && !this.isDisposed && (!!this.onElementRerendered || !this.supportOnElementRenderedEvent);
|
|
2802
2907
|
};
|
|
2803
2908
|
Base.prototype.blockAnimations = function () {
|
|
2804
2909
|
this.animationAllowedLock--;
|
|
@@ -2806,6 +2911,22 @@ var Base = /** @class */ (function () {
|
|
|
2806
2911
|
Base.prototype.releaseAnimations = function () {
|
|
2807
2912
|
this.animationAllowedLock++;
|
|
2808
2913
|
};
|
|
2914
|
+
Base.prototype.enableOnElementRenderedEvent = function () {
|
|
2915
|
+
this.onElementRenderedEventEnabled = true;
|
|
2916
|
+
};
|
|
2917
|
+
Base.prototype.disableOnElementRenderedEvent = function () {
|
|
2918
|
+
this.onElementRenderedEventEnabled = false;
|
|
2919
|
+
};
|
|
2920
|
+
Object.defineProperty(Base.prototype, "onElementRerendered", {
|
|
2921
|
+
get: function () {
|
|
2922
|
+
return this.supportOnElementRenderedEvent && this.onElementRenderedEventEnabled ? this._onElementRerendered : undefined;
|
|
2923
|
+
},
|
|
2924
|
+
enumerable: false,
|
|
2925
|
+
configurable: true
|
|
2926
|
+
});
|
|
2927
|
+
Base.prototype.afterRerender = function () {
|
|
2928
|
+
this.onElementRerendered.fire(this, undefined);
|
|
2929
|
+
};
|
|
2809
2930
|
Base.currentDependencis = undefined;
|
|
2810
2931
|
return Base;
|
|
2811
2932
|
}());
|
|
@@ -2849,8 +2970,9 @@ var Event = /** @class */ (function () {
|
|
|
2849
2970
|
Event.prototype.fire = function (sender, options) {
|
|
2850
2971
|
if (!this.callbacks)
|
|
2851
2972
|
return;
|
|
2852
|
-
|
|
2853
|
-
|
|
2973
|
+
var callbacks = [].concat(this.callbacks);
|
|
2974
|
+
for (var i = 0; i < callbacks.length; i++) {
|
|
2975
|
+
callbacks[i](sender, options);
|
|
2854
2976
|
if (!this.callbacks)
|
|
2855
2977
|
return;
|
|
2856
2978
|
}
|
|
@@ -5588,6 +5710,7 @@ var defaultV2Css = {
|
|
|
5588
5710
|
rowMultiple: "sd-row--multiple",
|
|
5589
5711
|
rowCompact: "sd-row--compact",
|
|
5590
5712
|
rowFadeIn: "sd-row--fade-in",
|
|
5713
|
+
rowDelayedFadeIn: "sd-row--delayed-fade-in",
|
|
5591
5714
|
rowFadeOut: "sd-row--fade-out",
|
|
5592
5715
|
pageRow: "sd-page__row",
|
|
5593
5716
|
question: {
|
|
@@ -5647,6 +5770,7 @@ var defaultV2Css = {
|
|
|
5647
5770
|
disabled: "sd-question--disabled",
|
|
5648
5771
|
readOnly: "sd-question--readonly",
|
|
5649
5772
|
preview: "sd-question--preview",
|
|
5773
|
+
noPointerEventsMode: "sd-question--no-pointer-events",
|
|
5650
5774
|
errorsContainer: "sd-element__erbox sd-question__erbox",
|
|
5651
5775
|
errorsContainerTop: "sd-element__erbox--above-element sd-question__erbox--above-question",
|
|
5652
5776
|
errorsContainerBottom: "sd-question__erbox--below-question"
|
|
@@ -5990,6 +6114,7 @@ var defaultV2Css = {
|
|
|
5990
6114
|
dragElementDecorator: "sd-drag-element__svg",
|
|
5991
6115
|
iconDragElement: "#icon-v2dragelement_16x16",
|
|
5992
6116
|
footer: "sd-matrixdynamic__footer",
|
|
6117
|
+
footerTotalCell: "sd-table__cell sd-table__cell--footer-total",
|
|
5993
6118
|
emptyRowsSection: "sd-matrixdynamic__placeholder sd-question__placeholder",
|
|
5994
6119
|
iconDrag: "sv-matrixdynamic__drag-icon",
|
|
5995
6120
|
ghostRow: "sv-matrix-row--drag-drop-ghost-mod",
|
|
@@ -6100,13 +6225,13 @@ var defaultV2Css = {
|
|
|
6100
6225
|
removeButtonIconId: "icon-clear",
|
|
6101
6226
|
removeFile: "sd-hidden",
|
|
6102
6227
|
removeFileSvg: "",
|
|
6103
|
-
removeFileSvgIconId: "icon-
|
|
6228
|
+
removeFileSvgIconId: "icon-close_16x16",
|
|
6104
6229
|
wrapper: "sd-file__wrapper",
|
|
6105
6230
|
defaultImage: "sd-file__default-image",
|
|
6106
6231
|
defaultImageIconId: "icon-defaultfile",
|
|
6107
6232
|
leftIconId: "icon-arrowleft",
|
|
6108
6233
|
rightIconId: "icon-arrowright",
|
|
6109
|
-
removeFileButton: "sd-context-btn--negative sd-file__remove-file-button",
|
|
6234
|
+
removeFileButton: "sd-context-btn--small sd-context-btn--with-border sd-context-btn--colorful sd-context-btn--negative sd-file__remove-file-button",
|
|
6110
6235
|
dragAreaPlaceholder: "sd-file__drag-area-placeholder",
|
|
6111
6236
|
imageWrapper: "sd-file__image-wrapper",
|
|
6112
6237
|
imageWrapperDefaultImage: "sd-file__image-wrapper--default-image",
|
|
@@ -7667,10 +7792,11 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
|
|
|
7667
7792
|
"use strict";
|
|
7668
7793
|
__webpack_require__.r(__webpack_exports__);
|
|
7669
7794
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingChoices", function() { return DragDropRankingChoices; });
|
|
7670
|
-
/* harmony import */ var
|
|
7671
|
-
/* harmony import */ var
|
|
7672
|
-
/* harmony import */ var
|
|
7673
|
-
/* harmony import */ var
|
|
7795
|
+
/* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../itemvalue */ "./src/itemvalue.ts");
|
|
7796
|
+
/* harmony import */ var _choices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./choices */ "./src/dragdrop/choices.ts");
|
|
7797
|
+
/* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
|
|
7798
|
+
/* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/devices */ "./src/utils/devices.ts");
|
|
7799
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
|
|
7674
7800
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
7675
7801
|
var extendStatics = function (d, b) {
|
|
7676
7802
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -7690,6 +7816,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
7690
7816
|
|
|
7691
7817
|
|
|
7692
7818
|
|
|
7819
|
+
|
|
7693
7820
|
var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
7694
7821
|
__extends(DragDropRankingChoices, _super);
|
|
7695
7822
|
function DragDropRankingChoices() {
|
|
@@ -7699,6 +7826,16 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7699
7826
|
var node = _this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item");
|
|
7700
7827
|
node.style.cursor = "grabbing";
|
|
7701
7828
|
};
|
|
7829
|
+
_this.reorderRankedItem = function (questionModel, fromIndex, toIndex) {
|
|
7830
|
+
if (fromIndex == toIndex)
|
|
7831
|
+
return;
|
|
7832
|
+
var rankingChoices = questionModel.rankingChoices;
|
|
7833
|
+
var item = rankingChoices[fromIndex];
|
|
7834
|
+
questionModel.isValueSetByUser = true;
|
|
7835
|
+
rankingChoices.splice(fromIndex, 1);
|
|
7836
|
+
rankingChoices.splice(toIndex, 0, item);
|
|
7837
|
+
_this.updateDraggedElementShortcut(toIndex + 1);
|
|
7838
|
+
};
|
|
7702
7839
|
_this.doBanDropHere = function () {
|
|
7703
7840
|
if (_this.isDragOverRootNode) {
|
|
7704
7841
|
_this.allowDropHere = true;
|
|
@@ -7717,7 +7854,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7717
7854
|
configurable: true
|
|
7718
7855
|
});
|
|
7719
7856
|
DragDropRankingChoices.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
|
|
7720
|
-
var draggedElementShortcut =
|
|
7857
|
+
var draggedElementShortcut = _global_variables_utils__WEBPACK_IMPORTED_MODULE_4__["DomDocumentHelper"].createElement("div");
|
|
7721
7858
|
if (!draggedElementShortcut)
|
|
7722
7859
|
return;
|
|
7723
7860
|
draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
|
|
@@ -7735,9 +7872,9 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7735
7872
|
};
|
|
7736
7873
|
Object.defineProperty(DragDropRankingChoices.prototype, "shortcutClass", {
|
|
7737
7874
|
get: function () {
|
|
7738
|
-
return new
|
|
7875
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
|
|
7739
7876
|
.append(this.parentElement.cssClasses.root)
|
|
7740
|
-
.append(this.parentElement.cssClasses.rootMobileMod,
|
|
7877
|
+
.append(this.parentElement.cssClasses.rootMobileMod, _utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsMobile"])
|
|
7741
7878
|
.toString();
|
|
7742
7879
|
},
|
|
7743
7880
|
enumerable: false,
|
|
@@ -7757,52 +7894,49 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7757
7894
|
};
|
|
7758
7895
|
DragDropRankingChoices.prototype.isDropTargetValid = function (dropTarget, dropTargetNode) {
|
|
7759
7896
|
var choices = this.parentElement.rankingChoices;
|
|
7760
|
-
var dropTargetIndex = choices.indexOf(this.dropTarget);
|
|
7761
|
-
var draggedElementIndex = choices.indexOf(this.draggedElement);
|
|
7762
|
-
if (draggedElementIndex > dropTargetIndex && dropTargetNode.classList.contains("sv-dragdrop-moveup")) {
|
|
7763
|
-
this.parentElement.dropTargetNodeMove = null;
|
|
7764
|
-
return false;
|
|
7765
|
-
}
|
|
7766
|
-
if (draggedElementIndex < dropTargetIndex && dropTargetNode.classList.contains("sv-dragdrop-movedown")) {
|
|
7767
|
-
this.parentElement.dropTargetNodeMove = null;
|
|
7768
|
-
return false;
|
|
7769
|
-
}
|
|
7770
7897
|
if (choices.indexOf(dropTarget) === -1)
|
|
7771
7898
|
// shouldn't allow to drop on "adorners" (selectall, none, other)
|
|
7772
7899
|
return false;
|
|
7773
7900
|
return true;
|
|
7774
7901
|
};
|
|
7775
|
-
DragDropRankingChoices.prototype.calculateIsBottom = function (clientY) {
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7902
|
+
DragDropRankingChoices.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
|
|
7903
|
+
if (this.dropTarget instanceof _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"] && this.draggedElement !== this.dropTarget) {
|
|
7904
|
+
var rect = dropTargetNode.getBoundingClientRect();
|
|
7905
|
+
return clientY >= rect.y + rect.height / 2;
|
|
7906
|
+
}
|
|
7907
|
+
return _super.prototype.calculateIsBottom.call(this, clientY);
|
|
7779
7908
|
};
|
|
7780
|
-
DragDropRankingChoices.prototype.
|
|
7781
|
-
var
|
|
7782
|
-
var
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
this.parentElement.setPropertyValue("rankingChoices", choices);
|
|
7787
|
-
//return;
|
|
7788
|
-
this.updateDraggedElementShortcut(dropTargetIndex + 1);
|
|
7789
|
-
if (draggedElementIndex !== dropTargetIndex) {
|
|
7790
|
-
dropTargetNode.classList.remove("sv-dragdrop-moveup");
|
|
7791
|
-
dropTargetNode.classList.remove("sv-dragdrop-movedown");
|
|
7792
|
-
this.parentElement.dropTargetNodeMove = null;
|
|
7909
|
+
DragDropRankingChoices.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
|
|
7910
|
+
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
|
7911
|
+
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
|
7912
|
+
if (toIndex === -1) {
|
|
7913
|
+
var length_1 = model.value.length;
|
|
7914
|
+
toIndex = length_1;
|
|
7793
7915
|
}
|
|
7794
|
-
if (
|
|
7795
|
-
this.
|
|
7916
|
+
else if (fromChoicesArray == toChoicesArray) {
|
|
7917
|
+
if (!this.isBottom && fromIndex < toIndex)
|
|
7918
|
+
toIndex--;
|
|
7919
|
+
if (this.isBottom && fromIndex > toIndex)
|
|
7920
|
+
toIndex++;
|
|
7796
7921
|
}
|
|
7797
|
-
if (
|
|
7798
|
-
this.
|
|
7922
|
+
else if (fromChoicesArray != toChoicesArray) {
|
|
7923
|
+
if (this.isBottom)
|
|
7924
|
+
toIndex++;
|
|
7799
7925
|
}
|
|
7926
|
+
return { fromIndex: fromIndex, toIndex: toIndex };
|
|
7927
|
+
};
|
|
7928
|
+
DragDropRankingChoices.prototype.afterDragOver = function (dropTargetNode) {
|
|
7929
|
+
var _a = this.getIndixies(this.parentElement, this.parentElement.rankingChoices, this.parentElement.rankingChoices), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
|
7930
|
+
this.reorderRankedItem(this.parentElement, fromIndex, toIndex);
|
|
7800
7931
|
};
|
|
7801
7932
|
DragDropRankingChoices.prototype.updateDraggedElementShortcut = function (newIndex) {
|
|
7802
|
-
var
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7933
|
+
var _a;
|
|
7934
|
+
if ((_a = this.domAdapter) === null || _a === void 0 ? void 0 : _a.draggedElementShortcut) {
|
|
7935
|
+
var newIndexText = newIndex !== null ? newIndex + "" : "";
|
|
7936
|
+
// TODO should avoid direct DOM manipulation, do through the frameworks instead
|
|
7937
|
+
var indexNode = this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item__index");
|
|
7938
|
+
indexNode.innerText = newIndexText;
|
|
7939
|
+
}
|
|
7806
7940
|
};
|
|
7807
7941
|
DragDropRankingChoices.prototype.ghostPositionChanged = function () {
|
|
7808
7942
|
this.parentElement.currentDropTarget = this.draggedElement;
|
|
@@ -7820,7 +7954,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7820
7954
|
_super.prototype.clear.call(this);
|
|
7821
7955
|
};
|
|
7822
7956
|
return DragDropRankingChoices;
|
|
7823
|
-
}(
|
|
7957
|
+
}(_choices__WEBPACK_IMPORTED_MODULE_1__["DragDropChoices"]));
|
|
7824
7958
|
|
|
7825
7959
|
|
|
7826
7960
|
|
|
@@ -7836,8 +7970,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
|
|
|
7836
7970
|
"use strict";
|
|
7837
7971
|
__webpack_require__.r(__webpack_exports__);
|
|
7838
7972
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingSelectToRank", function() { return DragDropRankingSelectToRank; });
|
|
7839
|
-
/* harmony import */ var
|
|
7840
|
-
/* harmony import */ var _ranking_choices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ranking-choices */ "./src/dragdrop/ranking-choices.ts");
|
|
7973
|
+
/* harmony import */ var _ranking_choices__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ranking-choices */ "./src/dragdrop/ranking-choices.ts");
|
|
7841
7974
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
7842
7975
|
var extendStatics = function (d, b) {
|
|
7843
7976
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -7854,7 +7987,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
7854
7987
|
};
|
|
7855
7988
|
})();
|
|
7856
7989
|
|
|
7857
|
-
|
|
7858
7990
|
var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
7859
7991
|
__extends(DragDropRankingSelectToRank, _super);
|
|
7860
7992
|
function DragDropRankingSelectToRank() {
|
|
@@ -7871,19 +8003,6 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
7871
8003
|
rankingChoices.splice(fromIndex, 1);
|
|
7872
8004
|
_this.updateChoices(questionModel, rankingChoices);
|
|
7873
8005
|
};
|
|
7874
|
-
_this.reorderRankedItem = function (questionModel, fromIndex, toIndex, dropTargetNode) {
|
|
7875
|
-
var rankingChoices = questionModel.rankingChoices;
|
|
7876
|
-
var item = rankingChoices[fromIndex];
|
|
7877
|
-
if (fromIndex == toIndex)
|
|
7878
|
-
return;
|
|
7879
|
-
questionModel.isValueSetByUser = true;
|
|
7880
|
-
rankingChoices.splice(fromIndex, 1);
|
|
7881
|
-
rankingChoices.splice(toIndex, 0, item);
|
|
7882
|
-
questionModel.setPropertyValue("rankingChoices", rankingChoices);
|
|
7883
|
-
if (dropTargetNode) {
|
|
7884
|
-
_this.doUIEffects(dropTargetNode, fromIndex, toIndex);
|
|
7885
|
-
}
|
|
7886
|
-
};
|
|
7887
8006
|
return _this;
|
|
7888
8007
|
}
|
|
7889
8008
|
DragDropRankingSelectToRank.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
|
|
@@ -7940,50 +8059,6 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
7940
8059
|
var _a = this.getIndixies(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
|
|
7941
8060
|
rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
|
|
7942
8061
|
};
|
|
7943
|
-
DragDropRankingSelectToRank.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
|
|
7944
|
-
var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
|
|
7945
|
-
var toIndex = toChoicesArray.indexOf(this.dropTarget);
|
|
7946
|
-
if (toIndex === -1) {
|
|
7947
|
-
var length_1 = model.value.length;
|
|
7948
|
-
toIndex = length_1;
|
|
7949
|
-
}
|
|
7950
|
-
else if (fromChoicesArray == toChoicesArray) {
|
|
7951
|
-
if (!this.isBottom && fromIndex < toIndex)
|
|
7952
|
-
toIndex--;
|
|
7953
|
-
if (this.isBottom && fromIndex > toIndex)
|
|
7954
|
-
toIndex++;
|
|
7955
|
-
}
|
|
7956
|
-
else if (fromChoicesArray != toChoicesArray) {
|
|
7957
|
-
if (this.isBottom)
|
|
7958
|
-
toIndex++;
|
|
7959
|
-
}
|
|
7960
|
-
return { fromIndex: fromIndex, toIndex: toIndex };
|
|
7961
|
-
};
|
|
7962
|
-
DragDropRankingSelectToRank.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
|
|
7963
|
-
if (this.dropTarget instanceof _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"] && this.draggedElement !== this.dropTarget) {
|
|
7964
|
-
var rect = dropTargetNode.getBoundingClientRect();
|
|
7965
|
-
return clientY >= rect.y + rect.height / 2;
|
|
7966
|
-
}
|
|
7967
|
-
return _super.prototype.calculateIsBottom.call(this, clientY);
|
|
7968
|
-
};
|
|
7969
|
-
DragDropRankingSelectToRank.prototype.doUIEffects = function (dropTargetNode, fromIndex, toIndex) {
|
|
7970
|
-
var questionModel = this.parentElement;
|
|
7971
|
-
var isDropToEmptyRankedContainer = this.dropTarget === "to-container" && questionModel.isEmpty();
|
|
7972
|
-
var isNeedToShowIndexAtShortcut = !this.isDropTargetUnranked || isDropToEmptyRankedContainer;
|
|
7973
|
-
var shortcutIndex = isNeedToShowIndexAtShortcut ? toIndex + 1 : null;
|
|
7974
|
-
this.updateDraggedElementShortcut(shortcutIndex);
|
|
7975
|
-
if (fromIndex !== toIndex) {
|
|
7976
|
-
dropTargetNode.classList.remove("sv-dragdrop-moveup");
|
|
7977
|
-
dropTargetNode.classList.remove("sv-dragdrop-movedown");
|
|
7978
|
-
questionModel.dropTargetNodeMove = null;
|
|
7979
|
-
}
|
|
7980
|
-
if (fromIndex > toIndex) {
|
|
7981
|
-
questionModel.dropTargetNodeMove = "down";
|
|
7982
|
-
}
|
|
7983
|
-
if (fromIndex < toIndex) {
|
|
7984
|
-
questionModel.dropTargetNodeMove = "up";
|
|
7985
|
-
}
|
|
7986
|
-
};
|
|
7987
8062
|
Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDraggedElementRanked", {
|
|
7988
8063
|
get: function () {
|
|
7989
8064
|
return this.parentElement.rankingChoices.indexOf(this.draggedElement) !== -1;
|
|
@@ -8007,28 +8082,13 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
|
|
|
8007
8082
|
enumerable: false,
|
|
8008
8083
|
configurable: true
|
|
8009
8084
|
});
|
|
8010
|
-
Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDropTargetUnranked", {
|
|
8011
|
-
get: function () {
|
|
8012
|
-
return !this.isDropTargetRanked;
|
|
8013
|
-
},
|
|
8014
|
-
enumerable: false,
|
|
8015
|
-
configurable: true
|
|
8016
|
-
});
|
|
8017
8085
|
DragDropRankingSelectToRank.prototype.updateChoices = function (questionModel, rankingChoices) {
|
|
8018
8086
|
questionModel.isValueSetByUser = true;
|
|
8019
8087
|
questionModel.rankingChoices = rankingChoices;
|
|
8020
8088
|
questionModel.updateUnRankingChoices(rankingChoices);
|
|
8021
8089
|
};
|
|
8022
|
-
DragDropRankingSelectToRank.prototype.clear = function () {
|
|
8023
|
-
var questionModel = this.parentElement;
|
|
8024
|
-
if (!!questionModel) {
|
|
8025
|
-
questionModel.rankingChoicesAnimation.cancel();
|
|
8026
|
-
questionModel.unRankingChoicesAnimation.cancel();
|
|
8027
|
-
}
|
|
8028
|
-
_super.prototype.clear.call(this);
|
|
8029
|
-
};
|
|
8030
8090
|
return DragDropRankingSelectToRank;
|
|
8031
|
-
}(
|
|
8091
|
+
}(_ranking_choices__WEBPACK_IMPORTED_MODULE_0__["DragDropRankingChoices"]));
|
|
8032
8092
|
|
|
8033
8093
|
|
|
8034
8094
|
|
|
@@ -8264,10 +8324,17 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8264
8324
|
_this.question.value = item.id;
|
|
8265
8325
|
if (_this.question.searchEnabled)
|
|
8266
8326
|
_this.applyInputString(item);
|
|
8267
|
-
_this.popupModel.
|
|
8327
|
+
_this.popupModel.hide();
|
|
8268
8328
|
};
|
|
8269
8329
|
}
|
|
8270
|
-
var
|
|
8330
|
+
var listOptions = {
|
|
8331
|
+
items: visibleItems,
|
|
8332
|
+
onSelectionChanged: _onSelectionChanged,
|
|
8333
|
+
allowSelection: false,
|
|
8334
|
+
locOwner: this.question,
|
|
8335
|
+
elementId: this.listElementId
|
|
8336
|
+
};
|
|
8337
|
+
var res = new _list__WEBPACK_IMPORTED_MODULE_4__["ListModel"](listOptions);
|
|
8271
8338
|
this.setOnTextSearchCallbackForListModel(res);
|
|
8272
8339
|
res.renderElements = false;
|
|
8273
8340
|
res.forceShowFilter = true;
|
|
@@ -8279,7 +8346,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8279
8346
|
DropdownListModel.prototype.updateAfterListModelCreated = function (model) {
|
|
8280
8347
|
var _this = this;
|
|
8281
8348
|
model.isItemSelected = function (action) { return !!action.selected; };
|
|
8282
|
-
model.locOwner = this.question;
|
|
8283
8349
|
model.onPropertyChanged.add(function (sender, options) {
|
|
8284
8350
|
if (options.name == "hasVerticalScroller") {
|
|
8285
8351
|
_this.hasScroll = options.newValue;
|
|
@@ -8311,7 +8377,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8311
8377
|
this.question.survey.onChoicesSearch.fire(this.question.survey, options);
|
|
8312
8378
|
this.filteredItems = options.filteredChoices;
|
|
8313
8379
|
if (!!this.filterString && !this.popupModel.isVisible) {
|
|
8314
|
-
this.popupModel.
|
|
8380
|
+
this.popupModel.show();
|
|
8315
8381
|
}
|
|
8316
8382
|
var updateAfterFilterStringChanged = function () {
|
|
8317
8383
|
_this.setFilterStringToListModel(_this.filterString);
|
|
@@ -8532,7 +8598,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8532
8598
|
};
|
|
8533
8599
|
DropdownListModel.prototype.onClear = function (event) {
|
|
8534
8600
|
this.question.clearValue(true);
|
|
8535
|
-
this._popupModel.
|
|
8601
|
+
this._popupModel.hide();
|
|
8536
8602
|
if (event) {
|
|
8537
8603
|
event.preventDefault();
|
|
8538
8604
|
event.stopPropagation();
|
|
@@ -8588,19 +8654,17 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8588
8654
|
event.stopPropagation();
|
|
8589
8655
|
}
|
|
8590
8656
|
else if (event.keyCode === 40) {
|
|
8591
|
-
|
|
8592
|
-
this.popupModel.toggleVisibility();
|
|
8593
|
-
}
|
|
8657
|
+
this.popupModel.show();
|
|
8594
8658
|
this.changeSelectionWithKeyboard(false);
|
|
8595
8659
|
event.preventDefault();
|
|
8596
8660
|
event.stopPropagation();
|
|
8597
8661
|
}
|
|
8598
8662
|
if (event.keyCode === 9) {
|
|
8599
|
-
this.popupModel.
|
|
8663
|
+
this.popupModel.hide();
|
|
8600
8664
|
}
|
|
8601
8665
|
else if (!this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32)) {
|
|
8602
8666
|
if (event.keyCode === 32) {
|
|
8603
|
-
this.popupModel.
|
|
8667
|
+
this.popupModel.show();
|
|
8604
8668
|
this.changeSelectionWithKeyboard(false);
|
|
8605
8669
|
}
|
|
8606
8670
|
if (event.keyCode === 13) {
|
|
@@ -8611,7 +8675,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8611
8675
|
}
|
|
8612
8676
|
else if (this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32 && (!this.question.searchEnabled || !this.inputString))) {
|
|
8613
8677
|
if (event.keyCode === 13 && this.question.searchEnabled && !this.inputString && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_6__["QuestionDropdownModel"] && !this._markdownMode && this.question.value) {
|
|
8614
|
-
this._popupModel.
|
|
8678
|
+
this._popupModel.hide();
|
|
8615
8679
|
this.onClear(event);
|
|
8616
8680
|
}
|
|
8617
8681
|
else {
|
|
@@ -8627,7 +8691,7 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8627
8691
|
}
|
|
8628
8692
|
}
|
|
8629
8693
|
else if (event.keyCode === 27) {
|
|
8630
|
-
this._popupModel.
|
|
8694
|
+
this._popupModel.hide();
|
|
8631
8695
|
this.hintString = "";
|
|
8632
8696
|
this.onEscape();
|
|
8633
8697
|
}
|
|
@@ -8655,11 +8719,11 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
|
8655
8719
|
DropdownListModel.prototype.onBlur = function (event) {
|
|
8656
8720
|
this.focused = false;
|
|
8657
8721
|
if (this.popupModel.isVisible && _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"]) {
|
|
8658
|
-
this._popupModel.
|
|
8722
|
+
this._popupModel.show();
|
|
8659
8723
|
return;
|
|
8660
8724
|
}
|
|
8661
8725
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_10__["doKey2ClickBlur"])(event);
|
|
8662
|
-
this._popupModel.
|
|
8726
|
+
this._popupModel.hide();
|
|
8663
8727
|
this.resetFilterString();
|
|
8664
8728
|
this.inputString = null;
|
|
8665
8729
|
this.hintString = "";
|
|
@@ -8850,7 +8914,14 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
|
|
|
8850
8914
|
}
|
|
8851
8915
|
};
|
|
8852
8916
|
}
|
|
8853
|
-
var
|
|
8917
|
+
var listOptions = {
|
|
8918
|
+
items: visibleItems,
|
|
8919
|
+
onSelectionChanged: _onSelectionChanged,
|
|
8920
|
+
allowSelection: false,
|
|
8921
|
+
locOwner: this.question,
|
|
8922
|
+
elementId: this.listElementId
|
|
8923
|
+
};
|
|
8924
|
+
var res = new _multiSelectListModel__WEBPACK_IMPORTED_MODULE_3__["MultiSelectListModel"](listOptions);
|
|
8854
8925
|
res.actions.forEach(function (a) { return a.disableTabStop = true; });
|
|
8855
8926
|
this.setOnTextSearchCallbackForListModel(res);
|
|
8856
8927
|
res.forceShowFilter = true;
|
|
@@ -9714,8 +9785,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9714
9785
|
|
|
9715
9786
|
var Version;
|
|
9716
9787
|
var ReleaseDate;
|
|
9717
|
-
Version = "" + "1.
|
|
9718
|
-
ReleaseDate = "" + "2024-
|
|
9788
|
+
Version = "" + "1.11.1";
|
|
9789
|
+
ReleaseDate = "" + "2024-06-06";
|
|
9719
9790
|
function checkLibraryVersion(ver, libraryName) {
|
|
9720
9791
|
if (Version != ver) {
|
|
9721
9792
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
|
@@ -9896,7 +9967,7 @@ function checkPrefix(prefix) {
|
|
|
9896
9967
|
/*!**************************************!*\
|
|
9897
9968
|
!*** ./src/entries/core-wo-model.ts ***!
|
|
9898
9969
|
\**************************************/
|
|
9899
|
-
/*! 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, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper */
|
|
9970
|
+
/*! 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, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper */
|
|
9900
9971
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
9901
9972
|
|
|
9902
9973
|
"use strict";
|
|
@@ -10333,6 +10404,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10333
10404
|
|
|
10334
10405
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_7__["createDropdownActionModelAdvanced"]; });
|
|
10335
10406
|
|
|
10407
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupModelWithListModel", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_7__["createPopupModelWithListModel"]; });
|
|
10408
|
+
|
|
10336
10409
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActionDropdownButtonTarget", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_7__["getActionDropdownButtonTarget"]; });
|
|
10337
10410
|
|
|
10338
10411
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseAction", function() { return _actions_action__WEBPACK_IMPORTED_MODULE_7__["BaseAction"]; });
|
|
@@ -10391,7 +10464,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10391
10464
|
/*!*****************************!*\
|
|
10392
10465
|
!*** ./src/entries/core.ts ***!
|
|
10393
10466
|
\*****************************/
|
|
10394
|
-
/*! 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, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
10467
|
+
/*! 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, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
|
|
10395
10468
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
10396
10469
|
|
|
10397
10470
|
"use strict";
|
|
@@ -10821,6 +10894,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10821
10894
|
|
|
10822
10895
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createDropdownActionModelAdvanced", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createDropdownActionModelAdvanced"]; });
|
|
10823
10896
|
|
|
10897
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPopupModelWithListModel", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["createPopupModelWithListModel"]; });
|
|
10898
|
+
|
|
10824
10899
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getActionDropdownButtonTarget", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["getActionDropdownButtonTarget"]; });
|
|
10825
10900
|
|
|
10826
10901
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseAction", function() { return _core_wo_model__WEBPACK_IMPORTED_MODULE_0__["BaseAction"]; });
|
|
@@ -14821,7 +14896,7 @@ var FunctionOperand = /** @class */ (function (_super) {
|
|
|
14821
14896
|
return this.evaluateCore(processValue);
|
|
14822
14897
|
};
|
|
14823
14898
|
FunctionOperand.prototype.evaluateCore = function (processValue) {
|
|
14824
|
-
return _functionsfactory__WEBPACK_IMPORTED_MODULE_1__["FunctionFactory"].Instance.run(this.originalValue, this.parameters.evaluate(processValue), processValue.properties);
|
|
14899
|
+
return _functionsfactory__WEBPACK_IMPORTED_MODULE_1__["FunctionFactory"].Instance.run(this.originalValue, this.parameters.evaluate(processValue), processValue.properties, this.parameters.values);
|
|
14825
14900
|
};
|
|
14826
14901
|
FunctionOperand.prototype.toString = function (func) {
|
|
14827
14902
|
if (func === void 0) { func = undefined; }
|
|
@@ -15353,7 +15428,7 @@ var FunctionFactory = /** @class */ (function () {
|
|
|
15353
15428
|
}
|
|
15354
15429
|
return result.sort();
|
|
15355
15430
|
};
|
|
15356
|
-
FunctionFactory.prototype.run = function (name, params, properties) {
|
|
15431
|
+
FunctionFactory.prototype.run = function (name, params, properties, originalParams) {
|
|
15357
15432
|
if (properties === void 0) { properties = null; }
|
|
15358
15433
|
var func = this.functionHash[name];
|
|
15359
15434
|
if (!func) {
|
|
@@ -15368,7 +15443,7 @@ var FunctionFactory = /** @class */ (function () {
|
|
|
15368
15443
|
classRunner[key] = properties[key];
|
|
15369
15444
|
}
|
|
15370
15445
|
}
|
|
15371
|
-
return classRunner.func(params);
|
|
15446
|
+
return classRunner.func(params, originalParams);
|
|
15372
15447
|
};
|
|
15373
15448
|
FunctionFactory.Instance = new FunctionFactory();
|
|
15374
15449
|
return FunctionFactory;
|
|
@@ -15440,7 +15515,7 @@ function avg(params) {
|
|
|
15440
15515
|
return arr.length > 0 ? res / arr.length : 0;
|
|
15441
15516
|
}
|
|
15442
15517
|
FunctionFactory.Instance.register("avg", avg);
|
|
15443
|
-
function getInArrayParams(params) {
|
|
15518
|
+
function getInArrayParams(params, originalParams) {
|
|
15444
15519
|
if (params.length < 2 || params.length > 3)
|
|
15445
15520
|
return null;
|
|
15446
15521
|
var arr = params[0];
|
|
@@ -15451,10 +15526,16 @@ function getInArrayParams(params) {
|
|
|
15451
15526
|
var name = params[1];
|
|
15452
15527
|
if (typeof name !== "string" && !(name instanceof String))
|
|
15453
15528
|
return null;
|
|
15454
|
-
var expression = params.length
|
|
15529
|
+
var expression = params.length > 2 ? params[2] : undefined;
|
|
15455
15530
|
if (typeof expression !== "string" && !(expression instanceof String)) {
|
|
15456
15531
|
expression = undefined;
|
|
15457
15532
|
}
|
|
15533
|
+
if (!expression) {
|
|
15534
|
+
var operand = Array.isArray(originalParams) && originalParams.length > 2 ? originalParams[2] : undefined;
|
|
15535
|
+
if (operand && !!operand.toString()) {
|
|
15536
|
+
expression = operand.toString();
|
|
15537
|
+
}
|
|
15538
|
+
}
|
|
15458
15539
|
return { data: arr, name: name, expression: expression };
|
|
15459
15540
|
}
|
|
15460
15541
|
function convertToNumber(val) {
|
|
@@ -15470,9 +15551,9 @@ function processItemInArray(item, name, res, func, needToConvert, condition) {
|
|
|
15470
15551
|
var val = needToConvert ? convertToNumber(item[name]) : 1;
|
|
15471
15552
|
return func(res, val);
|
|
15472
15553
|
}
|
|
15473
|
-
function calcInArray(params, func, needToConvert) {
|
|
15554
|
+
function calcInArray(params, originalParams, func, needToConvert) {
|
|
15474
15555
|
if (needToConvert === void 0) { needToConvert = true; }
|
|
15475
|
-
var v = getInArrayParams(params);
|
|
15556
|
+
var v = getInArrayParams(params, originalParams);
|
|
15476
15557
|
if (!v)
|
|
15477
15558
|
return undefined;
|
|
15478
15559
|
var condition = !!v.expression ? new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](v.expression) : undefined;
|
|
@@ -15492,8 +15573,8 @@ function calcInArray(params, func, needToConvert) {
|
|
|
15492
15573
|
}
|
|
15493
15574
|
return res;
|
|
15494
15575
|
}
|
|
15495
|
-
function sumInArray(params) {
|
|
15496
|
-
var res = calcInArray(params, function (res, val) {
|
|
15576
|
+
function sumInArray(params, originalParams) {
|
|
15577
|
+
var res = calcInArray(params, originalParams, function (res, val) {
|
|
15497
15578
|
if (res == undefined)
|
|
15498
15579
|
res = 0;
|
|
15499
15580
|
if (val == undefined || val == null)
|
|
@@ -15503,8 +15584,8 @@ function sumInArray(params) {
|
|
|
15503
15584
|
return res !== undefined ? res : 0;
|
|
15504
15585
|
}
|
|
15505
15586
|
FunctionFactory.Instance.register("sumInArray", sumInArray);
|
|
15506
|
-
function minInArray(params) {
|
|
15507
|
-
return calcInArray(params, function (res, val) {
|
|
15587
|
+
function minInArray(params, originalParams) {
|
|
15588
|
+
return calcInArray(params, originalParams, function (res, val) {
|
|
15508
15589
|
if (res == undefined)
|
|
15509
15590
|
return val;
|
|
15510
15591
|
if (val == undefined || val == null)
|
|
@@ -15513,8 +15594,8 @@ function minInArray(params) {
|
|
|
15513
15594
|
});
|
|
15514
15595
|
}
|
|
15515
15596
|
FunctionFactory.Instance.register("minInArray", minInArray);
|
|
15516
|
-
function maxInArray(params) {
|
|
15517
|
-
return calcInArray(params, function (res, val) {
|
|
15597
|
+
function maxInArray(params, originalParams) {
|
|
15598
|
+
return calcInArray(params, originalParams, function (res, val) {
|
|
15518
15599
|
if (res == undefined)
|
|
15519
15600
|
return val;
|
|
15520
15601
|
if (val == undefined || val == null)
|
|
@@ -15523,8 +15604,8 @@ function maxInArray(params) {
|
|
|
15523
15604
|
});
|
|
15524
15605
|
}
|
|
15525
15606
|
FunctionFactory.Instance.register("maxInArray", maxInArray);
|
|
15526
|
-
function countInArray(params) {
|
|
15527
|
-
var res = calcInArray(params, function (res, val) {
|
|
15607
|
+
function countInArray(params, originalParams) {
|
|
15608
|
+
var res = calcInArray(params, originalParams, function (res, val) {
|
|
15528
15609
|
if (res == undefined)
|
|
15529
15610
|
res = 0;
|
|
15530
15611
|
if (val == undefined || val == null)
|
|
@@ -15534,11 +15615,11 @@ function countInArray(params) {
|
|
|
15534
15615
|
return res !== undefined ? res : 0;
|
|
15535
15616
|
}
|
|
15536
15617
|
FunctionFactory.Instance.register("countInArray", countInArray);
|
|
15537
|
-
function avgInArray(params) {
|
|
15538
|
-
var count = countInArray(params);
|
|
15618
|
+
function avgInArray(params, originalParams) {
|
|
15619
|
+
var count = countInArray(params, originalParams);
|
|
15539
15620
|
if (count == 0)
|
|
15540
15621
|
return 0;
|
|
15541
|
-
return sumInArray(params) / count;
|
|
15622
|
+
return sumInArray(params, originalParams) / count;
|
|
15542
15623
|
}
|
|
15543
15624
|
FunctionFactory.Instance.register("avgInArray", avgInArray);
|
|
15544
15625
|
function iif(params) {
|
|
@@ -15555,23 +15636,31 @@ function getDate(params) {
|
|
|
15555
15636
|
return new Date(params[0]);
|
|
15556
15637
|
}
|
|
15557
15638
|
FunctionFactory.Instance.register("getDate", getDate);
|
|
15639
|
+
function dateDiffMonths(date1Param, date2Param, type) {
|
|
15640
|
+
if (type === "days")
|
|
15641
|
+
return diffDays([date1Param, date2Param]);
|
|
15642
|
+
var date1 = !!date1Param ? new Date(date1Param) : new Date();
|
|
15643
|
+
var date2 = !!date2Param ? new Date(date2Param) : new Date();
|
|
15644
|
+
var age = date2.getFullYear() - date1.getFullYear();
|
|
15645
|
+
type = type || "years";
|
|
15646
|
+
var ageInMonths = age * 12 + date2.getMonth() - date1.getMonth();
|
|
15647
|
+
if (date2.getDate() < date1.getDate()) {
|
|
15648
|
+
ageInMonths -= 1;
|
|
15649
|
+
}
|
|
15650
|
+
return type === "months" ? ageInMonths : ~~(ageInMonths / 12);
|
|
15651
|
+
}
|
|
15558
15652
|
function age(params) {
|
|
15559
|
-
if (!params
|
|
15560
|
-
return null;
|
|
15561
|
-
if (!params[0])
|
|
15653
|
+
if (!Array.isArray(params) || params.length < 1 || !params[0])
|
|
15562
15654
|
return null;
|
|
15563
|
-
|
|
15564
|
-
var today = new Date();
|
|
15565
|
-
var age = today.getFullYear() - birthDate.getFullYear();
|
|
15566
|
-
if (age > 0) {
|
|
15567
|
-
var m = today.getMonth() - birthDate.getMonth();
|
|
15568
|
-
if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
|
|
15569
|
-
age -= 1;
|
|
15570
|
-
}
|
|
15571
|
-
}
|
|
15572
|
-
return age;
|
|
15655
|
+
return dateDiffMonths(params[0], undefined, (params.length > 1 ? params[1] : "") || "years");
|
|
15573
15656
|
}
|
|
15574
15657
|
FunctionFactory.Instance.register("age", age);
|
|
15658
|
+
function dateDiff(params) {
|
|
15659
|
+
if (!Array.isArray(params) || params.length < 2 || !params[0] || !params[1])
|
|
15660
|
+
return null;
|
|
15661
|
+
return dateDiffMonths(params[0], params[1], (params.length > 2 ? params[2] : "") || "days");
|
|
15662
|
+
}
|
|
15663
|
+
FunctionFactory.Instance.register("dateDiff", dateDiff);
|
|
15575
15664
|
function isContainerReadyCore(container) {
|
|
15576
15665
|
if (!container)
|
|
15577
15666
|
return false;
|
|
@@ -16786,6 +16875,7 @@ var map = {
|
|
|
16786
16875
|
"./full-screen_16x16.svg": "./src/images/full-screen_16x16.svg",
|
|
16787
16876
|
"./loading.svg": "./src/images/loading.svg",
|
|
16788
16877
|
"./minimize_16x16.svg": "./src/images/minimize_16x16.svg",
|
|
16878
|
+
"./next_16x16.svg": "./src/images/next_16x16.svg",
|
|
16789
16879
|
"./no-image.svg": "./src/images/no-image.svg",
|
|
16790
16880
|
"./ranking-arrows.svg": "./src/images/ranking-arrows.svg",
|
|
16791
16881
|
"./ranking-dash.svg": "./src/images/ranking-dash.svg",
|
|
@@ -17270,6 +17360,17 @@ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\
|
|
|
17270
17360
|
|
|
17271
17361
|
/***/ }),
|
|
17272
17362
|
|
|
17363
|
+
/***/ "./src/images/next_16x16.svg":
|
|
17364
|
+
/*!***********************************!*\
|
|
17365
|
+
!*** ./src/images/next_16x16.svg ***!
|
|
17366
|
+
\***********************************/
|
|
17367
|
+
/*! no static exports found */
|
|
17368
|
+
/***/ (function(module, exports) {
|
|
17369
|
+
|
|
17370
|
+
module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.64648 12.6465L6.34648 13.3465L11.7465 8.04648L6.34648 2.64648L5.64648 3.34648L10.2465 8.04648L5.64648 12.6465Z\"></path></svg>"
|
|
17371
|
+
|
|
17372
|
+
/***/ }),
|
|
17373
|
+
|
|
17273
17374
|
/***/ "./src/images/no-image.svg":
|
|
17274
17375
|
/*!*********************************!*\
|
|
17275
17376
|
!*** ./src/images/no-image.svg ***!
|
|
@@ -20178,8 +20279,10 @@ var defaultListCss = {
|
|
|
20178
20279
|
itemWithIcon: "sv-list__item--with-icon",
|
|
20179
20280
|
itemDisabled: "sv-list__item--disabled",
|
|
20180
20281
|
itemFocused: "sv-list__item--focused",
|
|
20282
|
+
itemHovered: "sv-list__item--hovered",
|
|
20181
20283
|
itemTextWrap: "sv-list__item-text--wrap",
|
|
20182
20284
|
itemIcon: "sv-list__item-icon",
|
|
20285
|
+
itemMarkerIcon: "sv-list-item__marker-icon",
|
|
20183
20286
|
itemSeparator: "sv-list__item-separator",
|
|
20184
20287
|
itemBody: "sv-list__item-body",
|
|
20185
20288
|
itemsContainer: "sv-list",
|
|
@@ -20205,10 +20308,17 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
20205
20308
|
if (_this.allowSelection) {
|
|
20206
20309
|
_this.selectedItem = itemValue;
|
|
20207
20310
|
}
|
|
20311
|
+
var action = itemValue.action;
|
|
20312
|
+
if (!!action) {
|
|
20313
|
+
action(itemValue);
|
|
20314
|
+
}
|
|
20208
20315
|
if (!!_this.onSelectionChanged) {
|
|
20209
20316
|
_this.onSelectionChanged(itemValue);
|
|
20210
20317
|
}
|
|
20211
20318
|
};
|
|
20319
|
+
_this.onItemHover = function (itemValue) {
|
|
20320
|
+
_this.mouseOverHandler(itemValue);
|
|
20321
|
+
};
|
|
20212
20322
|
_this.isItemDisabled = function (itemValue) {
|
|
20213
20323
|
return itemValue.enabled !== undefined && !itemValue.enabled;
|
|
20214
20324
|
};
|
|
@@ -20231,6 +20341,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
20231
20341
|
.append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
|
|
20232
20342
|
.append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
|
|
20233
20343
|
.append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
|
|
20344
|
+
.append(_this.cssClasses.itemHovered, itemValue.isHovered)
|
|
20234
20345
|
.append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
|
|
20235
20346
|
.append(itemValue.css)
|
|
20236
20347
|
.toString();
|
|
@@ -20239,8 +20350,28 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
20239
20350
|
var level = itemValue.level || 0;
|
|
20240
20351
|
return (level + 1) * ListModel.INDENT + "px";
|
|
20241
20352
|
};
|
|
20242
|
-
|
|
20243
|
-
|
|
20353
|
+
if (Object.keys(items).indexOf("items") !== -1) {
|
|
20354
|
+
var options_1 = items;
|
|
20355
|
+
Object.keys(options_1).forEach(function (key) {
|
|
20356
|
+
switch (key) {
|
|
20357
|
+
case "items":
|
|
20358
|
+
_this.setItems(options_1.items);
|
|
20359
|
+
break;
|
|
20360
|
+
case "onFilterStringChangedCallback":
|
|
20361
|
+
_this.setOnFilterStringChangedCallback(options_1.onFilterStringChangedCallback);
|
|
20362
|
+
break;
|
|
20363
|
+
case "onTextSearchCallback":
|
|
20364
|
+
_this.setOnTextSearchCallback(options_1.onTextSearchCallback);
|
|
20365
|
+
break;
|
|
20366
|
+
default:
|
|
20367
|
+
_this[key] = options_1[key];
|
|
20368
|
+
}
|
|
20369
|
+
});
|
|
20370
|
+
}
|
|
20371
|
+
else {
|
|
20372
|
+
_this.setItems(items);
|
|
20373
|
+
_this.selectedItem = selectedItem;
|
|
20374
|
+
}
|
|
20244
20375
|
return _this;
|
|
20245
20376
|
}
|
|
20246
20377
|
ListModel.prototype.hasText = function (item, filterStringInLow) {
|
|
@@ -20256,6 +20387,26 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
20256
20387
|
ListModel.prototype.isItemVisible = function (item) {
|
|
20257
20388
|
return item.visible && (!this.shouldProcessFilter || this.hasText(item, this.filterString));
|
|
20258
20389
|
};
|
|
20390
|
+
ListModel.prototype.getRenderedActions = function () {
|
|
20391
|
+
var actions = _super.prototype.getRenderedActions.call(this);
|
|
20392
|
+
if (this.filterString) {
|
|
20393
|
+
var newActions_1 = [];
|
|
20394
|
+
actions.forEach(function (action) {
|
|
20395
|
+
newActions_1.push(action);
|
|
20396
|
+
if (action.items) {
|
|
20397
|
+
action.items.forEach(function (item) {
|
|
20398
|
+
var a = new _actions_action__WEBPACK_IMPORTED_MODULE_2__["Action"](item);
|
|
20399
|
+
if (!a.iconName) {
|
|
20400
|
+
a.iconName = action.iconName;
|
|
20401
|
+
}
|
|
20402
|
+
newActions_1.push(a);
|
|
20403
|
+
});
|
|
20404
|
+
}
|
|
20405
|
+
});
|
|
20406
|
+
return newActions_1;
|
|
20407
|
+
}
|
|
20408
|
+
return actions;
|
|
20409
|
+
};
|
|
20259
20410
|
Object.defineProperty(ListModel.prototype, "visibleItems", {
|
|
20260
20411
|
get: function () {
|
|
20261
20412
|
var _this = this;
|
|
@@ -20316,6 +20467,14 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
20316
20467
|
ListModel.prototype.getDefaultCssClasses = function () {
|
|
20317
20468
|
return defaultListCss;
|
|
20318
20469
|
};
|
|
20470
|
+
ListModel.prototype.popupAfterShowCallback = function (itemValue) {
|
|
20471
|
+
this.addScrollEventListener(function () {
|
|
20472
|
+
itemValue.hidePopup();
|
|
20473
|
+
});
|
|
20474
|
+
};
|
|
20475
|
+
ListModel.prototype.onItemLeave = function (itemValue) {
|
|
20476
|
+
itemValue.hidePopupDelayed(this.subItemsHideDelay);
|
|
20477
|
+
};
|
|
20319
20478
|
ListModel.prototype.areSameItems = function (item1, item2) {
|
|
20320
20479
|
if (!!this.areSameItemsCallback)
|
|
20321
20480
|
return this.areSameItemsCallback(item1, item2);
|
|
@@ -20467,6 +20626,7 @@ var ListModel = /** @class */ (function (_super) {
|
|
|
20467
20626
|
};
|
|
20468
20627
|
ListModel.prototype.addScrollEventListener = function (handler) {
|
|
20469
20628
|
if (!!handler) {
|
|
20629
|
+
this.removeScrollEventListener();
|
|
20470
20630
|
this.scrollHandler = handler;
|
|
20471
20631
|
}
|
|
20472
20632
|
if (!!this.scrollHandler) {
|
|
@@ -22915,12 +23075,53 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
|
22915
23075
|
if (Number.isNaN(value)) {
|
|
22916
23076
|
return true;
|
|
22917
23077
|
}
|
|
23078
|
+
if (value >= min && value <= max)
|
|
23079
|
+
return true;
|
|
22918
23080
|
if (!matchWholeMask) {
|
|
23081
|
+
if (!number.hasDecimalSeparator) {
|
|
23082
|
+
var test_high = value;
|
|
23083
|
+
var test_low = value;
|
|
23084
|
+
if (value >= 0) {
|
|
23085
|
+
if (value + 1 > min && value <= max)
|
|
23086
|
+
return true;
|
|
23087
|
+
while (true) {
|
|
23088
|
+
test_high = test_high * 10 + 9;
|
|
23089
|
+
test_low = test_low * 10;
|
|
23090
|
+
if (test_low > max) {
|
|
23091
|
+
break;
|
|
23092
|
+
}
|
|
23093
|
+
if (test_high > min) {
|
|
23094
|
+
return true;
|
|
23095
|
+
}
|
|
23096
|
+
}
|
|
23097
|
+
return false;
|
|
23098
|
+
}
|
|
23099
|
+
if (value < 0) {
|
|
23100
|
+
if (value >= min && value - 1 < max)
|
|
23101
|
+
return true;
|
|
23102
|
+
while (true) {
|
|
23103
|
+
test_high = test_high * 10;
|
|
23104
|
+
test_low = test_low * 10 - 9;
|
|
23105
|
+
if (test_high < min) {
|
|
23106
|
+
break;
|
|
23107
|
+
}
|
|
23108
|
+
if (test_low < max) {
|
|
23109
|
+
return true;
|
|
23110
|
+
}
|
|
23111
|
+
}
|
|
23112
|
+
return false;
|
|
23113
|
+
}
|
|
23114
|
+
}
|
|
23115
|
+
else {
|
|
23116
|
+
var delta = Math.pow(0.1, (number.fractionalPart || "").length);
|
|
23117
|
+
if (value >= 0)
|
|
23118
|
+
return value + delta > min && value <= max;
|
|
23119
|
+
if (value < 0)
|
|
23120
|
+
return value >= min && value - delta < max;
|
|
23121
|
+
}
|
|
22919
23122
|
return value >= 0 && value <= max || value < 0 && value >= min;
|
|
22920
23123
|
}
|
|
22921
|
-
|
|
22922
|
-
return value >= min && value <= max;
|
|
22923
|
-
}
|
|
23124
|
+
return false;
|
|
22924
23125
|
}
|
|
22925
23126
|
return true;
|
|
22926
23127
|
};
|
|
@@ -23316,8 +23517,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
23316
23517
|
|
|
23317
23518
|
var MultiSelectListModel = /** @class */ (function (_super) {
|
|
23318
23519
|
__extends(MultiSelectListModel, _super);
|
|
23319
|
-
function MultiSelectListModel(
|
|
23320
|
-
var _this = _super.call(this,
|
|
23520
|
+
function MultiSelectListModel(options) {
|
|
23521
|
+
var _this = _super.call(this, options) || this;
|
|
23321
23522
|
_this.onItemClick = function (item) {
|
|
23322
23523
|
if (_this.isItemDisabled(item))
|
|
23323
23524
|
return;
|
|
@@ -23337,7 +23538,7 @@ var MultiSelectListModel = /** @class */ (function (_super) {
|
|
|
23337
23538
|
_this.isItemSelected = function (itemValue) {
|
|
23338
23539
|
return !!_this.allowSelection && _this.selectedItems.filter(function (item) { return _this.areSameItems(item, itemValue); }).length > 0;
|
|
23339
23540
|
};
|
|
23340
|
-
_this.setSelectedItems(selectedItems || []);
|
|
23541
|
+
_this.setSelectedItems(options.selectedItems || []);
|
|
23341
23542
|
return _this;
|
|
23342
23543
|
}
|
|
23343
23544
|
MultiSelectListModel.prototype.updateItemState = function () {
|
|
@@ -23672,7 +23873,7 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
23672
23873
|
configurable: true
|
|
23673
23874
|
});
|
|
23674
23875
|
PageModel.prototype.calcCssClasses = function (css) {
|
|
23675
|
-
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "",
|
|
23876
|
+
var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "", rowDelayedFadeIn: "" };
|
|
23676
23877
|
this.copyCssClasses(classes.page, css.page);
|
|
23677
23878
|
this.copyCssClasses(classes.error, css.error);
|
|
23678
23879
|
if (!!css.pageTitle) {
|
|
@@ -23696,12 +23897,12 @@ var PageModel = /** @class */ (function (_super) {
|
|
|
23696
23897
|
if (!!css.rowFadeIn) {
|
|
23697
23898
|
classes.rowFadeIn = css.rowFadeIn;
|
|
23698
23899
|
}
|
|
23900
|
+
if (!!css.rowDelayedFadeIn) {
|
|
23901
|
+
classes.rowDelayedFadeIn = css.rowDelayedFadeIn;
|
|
23902
|
+
}
|
|
23699
23903
|
if (!!css.rowFadeOut) {
|
|
23700
23904
|
classes.rowFadeOut = css.rowFadeOut;
|
|
23701
23905
|
}
|
|
23702
|
-
if (!!css.rowFadeOutActive) {
|
|
23703
|
-
classes.rowFadeOutActive = css.rowFadeOutActive;
|
|
23704
|
-
}
|
|
23705
23906
|
if (this.survey) {
|
|
23706
23907
|
this.survey.updatePageCssClasses(this, classes);
|
|
23707
23908
|
}
|
|
@@ -23978,8 +24179,8 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
23978
24179
|
_this._scrollableParent = undefined;
|
|
23979
24180
|
_this._updateVisibility = undefined;
|
|
23980
24181
|
_this.visibleElementsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getVisibleElementsAnimationOptions(), function (value) {
|
|
24182
|
+
_this.setWidth(value);
|
|
23981
24183
|
_this.setPropertyValue("visibleElements", value);
|
|
23982
|
-
_this.setWidth();
|
|
23983
24184
|
}, function () { return _this.visibleElements; });
|
|
23984
24185
|
_this.idValue = QuestionRowModel.getRowId();
|
|
23985
24186
|
_this.visible = panel.areInvisibleElementsShowing;
|
|
@@ -24068,7 +24269,9 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
24068
24269
|
el.style.setProperty("--animation-width", Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["getElementWidth"])(el) + "px");
|
|
24069
24270
|
};
|
|
24070
24271
|
return {
|
|
24272
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
|
24071
24273
|
isAnimationEnabled: function () { return _this.animationAllowed; },
|
|
24274
|
+
allowSyncRemovalAddition: false,
|
|
24072
24275
|
getAnimatedElement: function (element) { return element.getWrapperElement(); },
|
|
24073
24276
|
getLeaveOptions: function (element) {
|
|
24074
24277
|
var surveyElement = element;
|
|
@@ -24148,12 +24351,12 @@ var QuestionRowModel = /** @class */ (function (_super) {
|
|
|
24148
24351
|
enumerable: false,
|
|
24149
24352
|
configurable: true
|
|
24150
24353
|
});
|
|
24151
|
-
QuestionRowModel.prototype.setWidth = function () {
|
|
24354
|
+
QuestionRowModel.prototype.setWidth = function (visibleElement) {
|
|
24152
24355
|
var _a;
|
|
24153
|
-
var visCount =
|
|
24356
|
+
var visCount = visibleElement.length;
|
|
24154
24357
|
if (visCount == 0)
|
|
24155
24358
|
return;
|
|
24156
|
-
var isSingleInRow =
|
|
24359
|
+
var isSingleInRow = visibleElement.length === 1;
|
|
24157
24360
|
var counter = 0;
|
|
24158
24361
|
var preSetWidthElements = [];
|
|
24159
24362
|
for (var i = 0; i < this.elements.length; i++) {
|
|
@@ -24284,6 +24487,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24284
24487
|
el.style.setProperty("--animation-height", el.offsetHeight + "px");
|
|
24285
24488
|
};
|
|
24286
24489
|
return {
|
|
24490
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
|
24287
24491
|
isAnimationEnabled: function () { return _this.animationAllowed; },
|
|
24288
24492
|
getAnimatedElement: function (row) { return row.getRootElement(); },
|
|
24289
24493
|
getLeaveOptions: function (_) {
|
|
@@ -24291,9 +24495,10 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24291
24495
|
onBeforeRunAnimation: beforeRunAnimation
|
|
24292
24496
|
};
|
|
24293
24497
|
},
|
|
24294
|
-
getEnterOptions: function (_) {
|
|
24498
|
+
getEnterOptions: function (_, animationInfo) {
|
|
24499
|
+
var cssClasses = _this.cssClasses;
|
|
24295
24500
|
return {
|
|
24296
|
-
cssClass:
|
|
24501
|
+
cssClass: new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(cssClasses.rowFadeIn).append(cssClasses.rowDelayedFadeIn, animationInfo.isDeletingRunning).toString(),
|
|
24297
24502
|
onBeforeRunAnimation: beforeRunAnimation
|
|
24298
24503
|
};
|
|
24299
24504
|
}
|
|
@@ -24557,7 +24762,7 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24557
24762
|
configurable: true
|
|
24558
24763
|
});
|
|
24559
24764
|
PanelModelBase.prototype.calcCssClasses = function (css) {
|
|
24560
|
-
var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "",
|
|
24765
|
+
var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "", rowDelayedFadeIn: "", rowMultiple: "", pageRow: "", rowCompact: "" };
|
|
24561
24766
|
this.copyCssClasses(classes.panel, css.panel);
|
|
24562
24767
|
this.copyCssClasses(classes.error, css.error);
|
|
24563
24768
|
if (!!css.pageRow) {
|
|
@@ -24575,8 +24780,8 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24575
24780
|
if (!!css.rowFadeOut) {
|
|
24576
24781
|
classes.rowFadeOut = css.rowFadeOut;
|
|
24577
24782
|
}
|
|
24578
|
-
if (!!css.
|
|
24579
|
-
classes.
|
|
24783
|
+
if (!!css.rowDelayedFadeIn) {
|
|
24784
|
+
classes.rowDelayedFadeIn = css.rowDelayedFadeIn;
|
|
24580
24785
|
}
|
|
24581
24786
|
if (!!css.rowMultiple) {
|
|
24582
24787
|
classes.rowMultiple = css.rowMultiple;
|
|
@@ -24896,16 +25101,13 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24896
25101
|
? rec
|
|
24897
25102
|
: {
|
|
24898
25103
|
fireCallback: fireCallback,
|
|
24899
|
-
|
|
25104
|
+
focusOnFirstError: focusOnFirstError,
|
|
24900
25105
|
firstErrorQuestion: null,
|
|
24901
25106
|
result: false,
|
|
24902
25107
|
};
|
|
24903
25108
|
if (rec.result !== true)
|
|
24904
25109
|
rec.result = false;
|
|
24905
25110
|
this.hasErrorsCore(rec);
|
|
24906
|
-
if (rec.focuseOnFirstError && rec.firstErrorQuestion) {
|
|
24907
|
-
rec.firstErrorQuestion.focus(true);
|
|
24908
|
-
}
|
|
24909
25111
|
return !rec.result;
|
|
24910
25112
|
};
|
|
24911
25113
|
PanelModelBase.prototype.validateContainerOnly = function () {
|
|
@@ -24950,13 +25152,14 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24950
25152
|
}
|
|
24951
25153
|
rec.result = true;
|
|
24952
25154
|
errors.push(new _error__WEBPACK_IMPORTED_MODULE_6__["OneAnswerRequiredError"](this.requiredErrorText, this));
|
|
24953
|
-
if (rec.
|
|
25155
|
+
if (rec.focusOnFirstError && !rec.firstErrorQuestion) {
|
|
24954
25156
|
rec.firstErrorQuestion = visQuestions[0];
|
|
24955
25157
|
}
|
|
24956
25158
|
};
|
|
24957
25159
|
PanelModelBase.prototype.hasErrorsCore = function (rec) {
|
|
24958
25160
|
var elements = this.elements;
|
|
24959
25161
|
var element = null;
|
|
25162
|
+
var firstErroredEl = null;
|
|
24960
25163
|
for (var i = 0; i < elements.length; i++) {
|
|
24961
25164
|
element = elements[i];
|
|
24962
25165
|
if (!element.isVisible)
|
|
@@ -24967,7 +25170,10 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24967
25170
|
else {
|
|
24968
25171
|
var question = element;
|
|
24969
25172
|
if (!question.validate(rec.fireCallback, rec)) {
|
|
24970
|
-
if (
|
|
25173
|
+
if (!firstErroredEl) {
|
|
25174
|
+
firstErroredEl = question;
|
|
25175
|
+
}
|
|
25176
|
+
if (!rec.firstErrorQuestion) {
|
|
24971
25177
|
rec.firstErrorQuestion = question;
|
|
24972
25178
|
}
|
|
24973
25179
|
rec.result = true;
|
|
@@ -24976,6 +25182,20 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
24976
25182
|
}
|
|
24977
25183
|
this.hasErrorsInPanels(rec);
|
|
24978
25184
|
this.updateContainsErrors();
|
|
25185
|
+
if (!firstErroredEl && this.errors.length > 0) {
|
|
25186
|
+
firstErroredEl = this.getFirstQuestionToFocus(false, true);
|
|
25187
|
+
if (!rec.firstErrorQuestion) {
|
|
25188
|
+
rec.firstErrorQuestion = firstErroredEl;
|
|
25189
|
+
}
|
|
25190
|
+
}
|
|
25191
|
+
if (rec.fireCallback && firstErroredEl) {
|
|
25192
|
+
if (firstErroredEl === rec.firstErrorQuestion && rec.focusOnFirstError) {
|
|
25193
|
+
firstErroredEl.focus(true);
|
|
25194
|
+
}
|
|
25195
|
+
else {
|
|
25196
|
+
firstErroredEl.expandAllParents();
|
|
25197
|
+
}
|
|
25198
|
+
}
|
|
24979
25199
|
};
|
|
24980
25200
|
PanelModelBase.prototype.getContainsErrors = function () {
|
|
24981
25201
|
var res = _super.prototype.getContainsErrors.call(this);
|
|
@@ -25488,21 +25708,10 @@ var PanelModelBase = /** @class */ (function (_super) {
|
|
|
25488
25708
|
}
|
|
25489
25709
|
};
|
|
25490
25710
|
PanelModelBase.prototype.notifyStateChanged = function (prevState) {
|
|
25491
|
-
var _this = this;
|
|
25492
25711
|
_super.prototype.notifyStateChanged.call(this, prevState);
|
|
25493
25712
|
if (this.isCollapsed) {
|
|
25494
25713
|
this.questions.forEach(function (q) { return q.onHidingContent(); });
|
|
25495
25714
|
}
|
|
25496
|
-
if (this.survey != null && !this.isLoadingFromJson && this.isExpanded && prevState === "collapsed") {
|
|
25497
|
-
var q_1 = this.getFirstQuestionToFocus(false);
|
|
25498
|
-
if (!!q_1) {
|
|
25499
|
-
setTimeout(function () {
|
|
25500
|
-
if (!_this.isDisposed && !!_this.survey) {
|
|
25501
|
-
_this.survey.scrollElementToTop(q_1, q_1, null, q_1.inputId, false);
|
|
25502
|
-
}
|
|
25503
|
-
}, 15);
|
|
25504
|
-
}
|
|
25505
|
-
}
|
|
25506
25715
|
};
|
|
25507
25716
|
Object.defineProperty(PanelModelBase.prototype, "isVisible", {
|
|
25508
25717
|
/**
|
|
@@ -26099,12 +26308,6 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
26099
26308
|
this.survey.panelVisibilityChanged(this, this.isVisible);
|
|
26100
26309
|
}
|
|
26101
26310
|
};
|
|
26102
|
-
PanelModel.prototype.hasErrorsCore = function (rec) {
|
|
26103
|
-
_super.prototype.hasErrorsCore.call(this, rec);
|
|
26104
|
-
if (this.isCollapsed && rec.result && rec.fireCallback) {
|
|
26105
|
-
this.expand();
|
|
26106
|
-
}
|
|
26107
|
-
};
|
|
26108
26311
|
PanelModel.prototype.getRenderedTitle = function (str) {
|
|
26109
26312
|
if (!str) {
|
|
26110
26313
|
if (this.isCollapsed || this.isExpanded)
|
|
@@ -26288,6 +26491,19 @@ var PanelModel = /** @class */ (function (_super) {
|
|
|
26288
26491
|
enumerable: false,
|
|
26289
26492
|
configurable: true
|
|
26290
26493
|
});
|
|
26494
|
+
PanelModel.prototype.onElementExpanded = function (elementIsRendered) {
|
|
26495
|
+
var _this = this;
|
|
26496
|
+
if (this.survey != null && !this.isLoadingFromJson) {
|
|
26497
|
+
var q_1 = this.getFirstQuestionToFocus(false);
|
|
26498
|
+
if (!!q_1) {
|
|
26499
|
+
setTimeout(function () {
|
|
26500
|
+
if (!_this.isDisposed && !!_this.survey) {
|
|
26501
|
+
_this.survey.scrollElementToTop(q_1, q_1, null, q_1.inputId, false, { behavior: "smooth" });
|
|
26502
|
+
}
|
|
26503
|
+
}, elementIsRendered ? 0 : 15);
|
|
26504
|
+
}
|
|
26505
|
+
}
|
|
26506
|
+
};
|
|
26291
26507
|
PanelModel.prototype.getCssRoot = function (cssClasses) {
|
|
26292
26508
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
|
26293
26509
|
.append(_super.prototype.getCssRoot.call(this, cssClasses))
|
|
@@ -26430,9 +26646,10 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
26430
26646
|
|
|
26431
26647
|
var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
26432
26648
|
__extends(PopupDropdownViewModel, _super);
|
|
26433
|
-
function PopupDropdownViewModel(model, targetElement) {
|
|
26649
|
+
function PopupDropdownViewModel(model, targetElement, areaElement) {
|
|
26434
26650
|
var _this = _super.call(this, model) || this;
|
|
26435
26651
|
_this.targetElement = targetElement;
|
|
26652
|
+
_this.areaElement = areaElement;
|
|
26436
26653
|
_this.scrollEventCallBack = function (event) {
|
|
26437
26654
|
if (_this.isOverlay && _utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
|
|
26438
26655
|
event.stopPropagation();
|
|
@@ -26470,11 +26687,24 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
|
26470
26687
|
var width = Math.min(windowWidth, windowHeight);
|
|
26471
26688
|
this.isTablet = width >= PopupDropdownViewModel.tabletSizeBreakpoint;
|
|
26472
26689
|
};
|
|
26690
|
+
PopupDropdownViewModel.prototype.getAvailableAreaRect = function () {
|
|
26691
|
+
if (this.areaElement) {
|
|
26692
|
+
var areaRect = this.areaElement.getBoundingClientRect();
|
|
26693
|
+
return new _utils_popup__WEBPACK_IMPORTED_MODULE_1__["Rect"](areaRect.x, areaRect.y, areaRect.width, areaRect.height);
|
|
26694
|
+
}
|
|
26695
|
+
return new _utils_popup__WEBPACK_IMPORTED_MODULE_1__["Rect"](0, 0, _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerWidth(), _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerHeight());
|
|
26696
|
+
};
|
|
26697
|
+
PopupDropdownViewModel.prototype.getTargetElementRect = function () {
|
|
26698
|
+
var rect = this.targetElement.getBoundingClientRect();
|
|
26699
|
+
var areaRect = this.getAvailableAreaRect();
|
|
26700
|
+
return new _utils_popup__WEBPACK_IMPORTED_MODULE_1__["Rect"](rect.left - areaRect.left, rect.top - areaRect.top, rect.width, rect.height);
|
|
26701
|
+
};
|
|
26473
26702
|
PopupDropdownViewModel.prototype._updatePosition = function () {
|
|
26474
26703
|
var _a, _b, _c;
|
|
26475
26704
|
if (!this.targetElement)
|
|
26476
26705
|
return;
|
|
26477
|
-
var targetElementRect = this.
|
|
26706
|
+
var targetElementRect = this.getTargetElementRect();
|
|
26707
|
+
var area = this.getAvailableAreaRect();
|
|
26478
26708
|
var popupContainer = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.containerSelector);
|
|
26479
26709
|
if (!popupContainer)
|
|
26480
26710
|
return;
|
|
@@ -26491,12 +26721,13 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
|
26491
26721
|
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].isAvailable()) {
|
|
26492
26722
|
var heightValues = [height, _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerHeight() * 0.9, (_c = _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getVisualViewport()) === null || _c === void 0 ? void 0 : _c.height];
|
|
26493
26723
|
height = Math.ceil(Math.min.apply(Math, heightValues.filter(function (each) { return typeof each === "number"; })));
|
|
26494
|
-
verticalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalPosition(targetElementRect, height, this.model.
|
|
26724
|
+
verticalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalPosition(targetElementRect, height, this.model.horizontalPosition, this.model.verticalPosition, area.height);
|
|
26725
|
+
actualHorizontalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateHorizontalPosition(targetElementRect, width, this.model.horizontalPosition, area.width);
|
|
26495
26726
|
}
|
|
26496
26727
|
this.popupDirection = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePopupDirection(verticalPosition, actualHorizontalPosition);
|
|
26497
|
-
var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.
|
|
26728
|
+
var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.model.positionMode);
|
|
26498
26729
|
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].isAvailable()) {
|
|
26499
|
-
var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height,
|
|
26730
|
+
var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height, area.height, verticalPosition, this.model.canShrink);
|
|
26500
26731
|
if (!!newVerticalDimensions) {
|
|
26501
26732
|
this.height = newVerticalDimensions.height + "px";
|
|
26502
26733
|
pos.top = newVerticalDimensions.top;
|
|
@@ -26518,6 +26749,8 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
|
26518
26749
|
pos.top -= rect.top;
|
|
26519
26750
|
pos.left -= rect.left;
|
|
26520
26751
|
}
|
|
26752
|
+
pos.left += area.left;
|
|
26753
|
+
pos.top += area.top;
|
|
26521
26754
|
this.left = pos.left + "px";
|
|
26522
26755
|
this.top = pos.top + "px";
|
|
26523
26756
|
if (this.showHeader) {
|
|
@@ -26555,10 +26788,11 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
|
|
|
26555
26788
|
PopupDropdownViewModel.prototype.getPopupHeaderTemplate = function () {
|
|
26556
26789
|
return "popup-pointer";
|
|
26557
26790
|
};
|
|
26558
|
-
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot, targetElement) {
|
|
26791
|
+
PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot, targetElement, areaElement) {
|
|
26559
26792
|
_super.prototype.setComponentElement.call(this, componentRoot);
|
|
26560
26793
|
if (!!componentRoot && !!componentRoot.parentElement && !this.isModal) {
|
|
26561
26794
|
this.targetElement = targetElement || componentRoot.parentElement;
|
|
26795
|
+
this.areaElement = areaElement;
|
|
26562
26796
|
}
|
|
26563
26797
|
};
|
|
26564
26798
|
PopupDropdownViewModel.prototype.resetComponentElement = function () {
|
|
@@ -26716,6 +26950,7 @@ var PopupModalViewModel = /** @class */ (function (_super) {
|
|
|
26716
26950
|
PopupModalViewModel.prototype.createFooterActionBar = function () {
|
|
26717
26951
|
var _this = this;
|
|
26718
26952
|
_super.prototype.createFooterActionBar.call(this);
|
|
26953
|
+
this.footerToolbar.containerCss = "sv-footer-action-bar";
|
|
26719
26954
|
this.footerToolbarValue.addAction({
|
|
26720
26955
|
id: "apply",
|
|
26721
26956
|
visibleIndex: 20,
|
|
@@ -27343,9 +27578,11 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
27343
27578
|
if (!val) {
|
|
27344
27579
|
_this.updateOnHiding();
|
|
27345
27580
|
_this.updateIsVisible(val);
|
|
27581
|
+
_this.updateAfterHiding();
|
|
27346
27582
|
_this._isPositionSetValue = false;
|
|
27347
27583
|
}
|
|
27348
27584
|
else {
|
|
27585
|
+
_this.updateBeforeShowing();
|
|
27349
27586
|
_this.updateIsVisible(val);
|
|
27350
27587
|
}
|
|
27351
27588
|
}
|
|
@@ -27363,8 +27600,18 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
27363
27600
|
this._isVisible = val;
|
|
27364
27601
|
this.onVisibilityChanged.fire(this, { isVisible: val });
|
|
27365
27602
|
};
|
|
27603
|
+
PopupBaseViewModel.prototype.updateBeforeShowing = function () {
|
|
27604
|
+
this.model.onShow();
|
|
27605
|
+
};
|
|
27606
|
+
PopupBaseViewModel.prototype.updateAfterHiding = function () {
|
|
27607
|
+
this.model.onHiding();
|
|
27608
|
+
};
|
|
27366
27609
|
PopupBaseViewModel.prototype.getLeaveOptions = function () {
|
|
27367
|
-
return { cssClass: "sv-popup--animate-leave"
|
|
27610
|
+
return { cssClass: "sv-popup--animate-leave", onBeforeRunAnimation: function (el) {
|
|
27611
|
+
el.setAttribute("inert", "");
|
|
27612
|
+
},
|
|
27613
|
+
onAfterRunAnimation: function (el) { return el.removeAttribute("inert"); }
|
|
27614
|
+
};
|
|
27368
27615
|
};
|
|
27369
27616
|
PopupBaseViewModel.prototype.getEnterOptions = function () {
|
|
27370
27617
|
return { cssClass: "sv-popup--animate-enter" };
|
|
@@ -27375,6 +27622,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
27375
27622
|
PopupBaseViewModel.prototype.isAnimationEnabled = function () {
|
|
27376
27623
|
return this.model.displayMode !== "overlay" && _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].animationEnabled;
|
|
27377
27624
|
};
|
|
27625
|
+
PopupBaseViewModel.prototype.getRerenderEvent = function () { return this.onElementRerendered; };
|
|
27378
27626
|
PopupBaseViewModel.prototype.getAnimationContainer = function () {
|
|
27379
27627
|
var _a;
|
|
27380
27628
|
return (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.fixedPopupContainer);
|
|
@@ -27659,7 +27907,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
|
|
|
27659
27907
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.popupMountContainer).appendChild(container);
|
|
27660
27908
|
}
|
|
27661
27909
|
};
|
|
27662
|
-
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot, targetElement) {
|
|
27910
|
+
PopupBaseViewModel.prototype.setComponentElement = function (componentRoot, targetElement, areaElement) {
|
|
27663
27911
|
if (!!componentRoot) {
|
|
27664
27912
|
this.containerElement = componentRoot;
|
|
27665
27913
|
}
|
|
@@ -27790,13 +28038,6 @@ var PopupModel = /** @class */ (function (_super) {
|
|
|
27790
28038
|
}
|
|
27791
28039
|
this.setPropertyValue("isVisible", value);
|
|
27792
28040
|
this.onVisibilityChanged.fire(this, { model: this, isVisible: value });
|
|
27793
|
-
if (this.isVisible) {
|
|
27794
|
-
this.onShow();
|
|
27795
|
-
}
|
|
27796
|
-
else {
|
|
27797
|
-
this.refreshInnerModel();
|
|
27798
|
-
this.onHide();
|
|
27799
|
-
}
|
|
27800
28041
|
},
|
|
27801
28042
|
enumerable: false,
|
|
27802
28043
|
configurable: true
|
|
@@ -27804,6 +28045,14 @@ var PopupModel = /** @class */ (function (_super) {
|
|
|
27804
28045
|
PopupModel.prototype.toggleVisibility = function () {
|
|
27805
28046
|
this.isVisible = !this.isVisible;
|
|
27806
28047
|
};
|
|
28048
|
+
PopupModel.prototype.show = function () {
|
|
28049
|
+
if (!this.isVisible)
|
|
28050
|
+
this.isVisible = true;
|
|
28051
|
+
};
|
|
28052
|
+
PopupModel.prototype.hide = function () {
|
|
28053
|
+
if (this.isVisible)
|
|
28054
|
+
this.isVisible = false;
|
|
28055
|
+
};
|
|
27807
28056
|
PopupModel.prototype.recalculatePosition = function (isResetHeight) {
|
|
27808
28057
|
this.onRecalculatePosition.fire(this, { isResetHeight: isResetHeight });
|
|
27809
28058
|
};
|
|
@@ -27812,6 +28061,10 @@ var PopupModel = /** @class */ (function (_super) {
|
|
|
27812
28061
|
this.onFooterActionsCreated.fire(this, options);
|
|
27813
28062
|
return options.actions;
|
|
27814
28063
|
};
|
|
28064
|
+
PopupModel.prototype.onHiding = function () {
|
|
28065
|
+
this.refreshInnerModel();
|
|
28066
|
+
this.onHide();
|
|
28067
|
+
};
|
|
27815
28068
|
PopupModel.prototype.dispose = function () {
|
|
27816
28069
|
_super.prototype.dispose.call(this);
|
|
27817
28070
|
this.onDispose();
|
|
@@ -27834,6 +28087,9 @@ var PopupModel = /** @class */ (function (_super) {
|
|
|
27834
28087
|
__decorate([
|
|
27835
28088
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
|
|
27836
28089
|
], PopupModel.prototype, "isModal", void 0);
|
|
28090
|
+
__decorate([
|
|
28091
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
|
|
28092
|
+
], PopupModel.prototype, "canShrink", void 0);
|
|
27837
28093
|
__decorate([
|
|
27838
28094
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
|
|
27839
28095
|
], PopupModel.prototype, "isFocusedContent", void 0);
|
|
@@ -29308,6 +29564,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
29308
29564
|
.append(cssClasses.hasErrorBottom, hasError && this.getErrorLocation() == "bottom")
|
|
29309
29565
|
.append(cssClasses.small, !this.width)
|
|
29310
29566
|
.append(cssClasses.answered, this.isAnswered)
|
|
29567
|
+
.append(cssClasses.noPointerEventsMode, this.isReadOnlyAttr)
|
|
29311
29568
|
.toString();
|
|
29312
29569
|
};
|
|
29313
29570
|
Object.defineProperty(Question.prototype, "cssHeader", {
|
|
@@ -29550,7 +29807,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
29550
29807
|
Question.prototype.focuscore = function (onError, scrollIfVisible) {
|
|
29551
29808
|
if (onError === void 0) { onError = false; }
|
|
29552
29809
|
if (!!this.survey) {
|
|
29553
|
-
this.expandAllParents(
|
|
29810
|
+
this.expandAllParents();
|
|
29554
29811
|
this.survey.scrollElementToTop(this, this, null, this.id, scrollIfVisible);
|
|
29555
29812
|
}
|
|
29556
29813
|
var id = !onError
|
|
@@ -29560,14 +29817,17 @@ var Question = /** @class */ (function (_super) {
|
|
|
29560
29817
|
this.fireCallback(this.focusCallback);
|
|
29561
29818
|
}
|
|
29562
29819
|
};
|
|
29563
|
-
Question.prototype.expandAllParents = function (
|
|
29820
|
+
Question.prototype.expandAllParents = function () {
|
|
29821
|
+
this.expandAllParentsCore(this);
|
|
29822
|
+
};
|
|
29823
|
+
Question.prototype.expandAllParentsCore = function (element) {
|
|
29564
29824
|
if (!element)
|
|
29565
29825
|
return;
|
|
29566
29826
|
if (element.isCollapsed) {
|
|
29567
29827
|
element.expand();
|
|
29568
29828
|
}
|
|
29569
|
-
this.
|
|
29570
|
-
this.
|
|
29829
|
+
this.expandAllParentsCore(element.parent);
|
|
29830
|
+
this.expandAllParentsCore(element.parentQuestion);
|
|
29571
29831
|
};
|
|
29572
29832
|
Question.prototype.focusIn = function () {
|
|
29573
29833
|
if (!this.survey || this.isDisposed || this.isContainer)
|
|
@@ -29776,6 +30036,20 @@ var Question = /** @class */ (function (_super) {
|
|
|
29776
30036
|
enumerable: false,
|
|
29777
30037
|
configurable: true
|
|
29778
30038
|
});
|
|
30039
|
+
Object.defineProperty(Question.prototype, "isReadOnlyAttr", {
|
|
30040
|
+
get: function () {
|
|
30041
|
+
return this.isReadOnly;
|
|
30042
|
+
},
|
|
30043
|
+
enumerable: false,
|
|
30044
|
+
configurable: true
|
|
30045
|
+
});
|
|
30046
|
+
Object.defineProperty(Question.prototype, "isDisabledAttr", {
|
|
30047
|
+
get: function () {
|
|
30048
|
+
return this.isDesignModeV2;
|
|
30049
|
+
},
|
|
30050
|
+
enumerable: false,
|
|
30051
|
+
configurable: true
|
|
30052
|
+
});
|
|
29779
30053
|
Question.prototype.onReadOnlyChanged = function () {
|
|
29780
30054
|
this.setPropertyValue("isInputReadOnly", this.isInputReadOnly);
|
|
29781
30055
|
_super.prototype.onReadOnlyChanged.call(this);
|
|
@@ -30391,6 +30665,13 @@ var Question = /** @class */ (function (_super) {
|
|
|
30391
30665
|
return;
|
|
30392
30666
|
this.setDefaultValue();
|
|
30393
30667
|
};
|
|
30668
|
+
Object.defineProperty(Question.prototype, "isValueDefault", {
|
|
30669
|
+
get: function () {
|
|
30670
|
+
return !this.isEmpty() && (this.isTwoValueEquals(this.defaultValue, this.value) || !this.isValueChangedDirectly && !!this.defaultValueExpression);
|
|
30671
|
+
},
|
|
30672
|
+
enumerable: false,
|
|
30673
|
+
configurable: true
|
|
30674
|
+
});
|
|
30394
30675
|
Object.defineProperty(Question.prototype, "isClearValueOnHidden", {
|
|
30395
30676
|
get: function () {
|
|
30396
30677
|
var clearIf = this.getClearIfInvisible();
|
|
@@ -30467,9 +30748,9 @@ var Question = /** @class */ (function (_super) {
|
|
|
30467
30748
|
};
|
|
30468
30749
|
}
|
|
30469
30750
|
if (!values)
|
|
30470
|
-
values = this.data.getFilteredValues();
|
|
30751
|
+
values = this.defaultValueExpression ? this.data.getFilteredValues() : {};
|
|
30471
30752
|
if (!properties)
|
|
30472
|
-
properties = this.data.getFilteredProperties();
|
|
30753
|
+
properties = this.defaultValueExpression ? this.data.getFilteredProperties() : {};
|
|
30473
30754
|
if (!!runner && runner.canRun) {
|
|
30474
30755
|
runner.onRunComplete = function (res) {
|
|
30475
30756
|
if (res == undefined)
|
|
@@ -30819,13 +31100,9 @@ var Question = /** @class */ (function (_super) {
|
|
|
30819
31100
|
Question.prototype.isTextValue = function () {
|
|
30820
31101
|
return false;
|
|
30821
31102
|
};
|
|
30822
|
-
|
|
30823
|
-
|
|
30824
|
-
|
|
30825
|
-
},
|
|
30826
|
-
enumerable: false,
|
|
30827
|
-
configurable: true
|
|
30828
|
-
});
|
|
31103
|
+
Question.prototype.getIsInputTextUpdate = function () {
|
|
31104
|
+
return !!this.survey ? this.survey.isUpdateValueTextOnTyping : false;
|
|
31105
|
+
};
|
|
30829
31106
|
Object.defineProperty(Question.prototype, "requireStrictCompare", {
|
|
30830
31107
|
get: function () { return false; },
|
|
30831
31108
|
enumerable: false,
|
|
@@ -30836,7 +31113,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
30836
31113
|
};
|
|
30837
31114
|
Object.defineProperty(Question.prototype, "isInputTextUpdate", {
|
|
30838
31115
|
get: function () {
|
|
30839
|
-
return this.
|
|
31116
|
+
return this.getIsInputTextUpdate() && this.isTextValue();
|
|
30840
31117
|
},
|
|
30841
31118
|
enumerable: false,
|
|
30842
31119
|
configurable: true
|
|
@@ -30876,7 +31153,7 @@ var Question = /** @class */ (function (_super) {
|
|
|
30876
31153
|
};
|
|
30877
31154
|
Question.prototype.setCommentIntoData = function (newValue) {
|
|
30878
31155
|
if (this.data != null) {
|
|
30879
|
-
this.data.setComment(this.getValueName(), newValue, this.
|
|
31156
|
+
this.data.setComment(this.getValueName(), newValue, this.getIsInputTextUpdate() ? "text" : false);
|
|
30880
31157
|
}
|
|
30881
31158
|
};
|
|
30882
31159
|
Question.prototype.getValidName = function (name) {
|
|
@@ -31477,8 +31754,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
|
|
|
31477
31754
|
visibleIf: function (obj) {
|
|
31478
31755
|
return obj.showCommentArea;
|
|
31479
31756
|
},
|
|
31480
|
-
serializationProperty: "locCommentText"
|
|
31481
|
-
layout: "row",
|
|
31757
|
+
serializationProperty: "locCommentText"
|
|
31482
31758
|
},
|
|
31483
31759
|
{
|
|
31484
31760
|
name: "commentPlaceholder",
|
|
@@ -31883,6 +32159,15 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
31883
32159
|
_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.choicesFromUrl);
|
|
31884
32160
|
_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.visibleChoices);
|
|
31885
32161
|
}
|
|
32162
|
+
if (this.isUsingCarryForward) {
|
|
32163
|
+
_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.visibleChoices);
|
|
32164
|
+
}
|
|
32165
|
+
};
|
|
32166
|
+
QuestionSelectBase.prototype.updatePrevOtherErrorValue = function (val) {
|
|
32167
|
+
var oldVal = this.otherValue;
|
|
32168
|
+
if (val !== oldVal) {
|
|
32169
|
+
this.prevOtherErrorValue = oldVal;
|
|
32170
|
+
}
|
|
31886
32171
|
};
|
|
31887
32172
|
Object.defineProperty(QuestionSelectBase.prototype, "otherValue", {
|
|
31888
32173
|
get: function () {
|
|
@@ -31891,6 +32176,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
31891
32176
|
return this.otherValueCore;
|
|
31892
32177
|
},
|
|
31893
32178
|
set: function (val) {
|
|
32179
|
+
this.updatePrevOtherErrorValue(val);
|
|
31894
32180
|
if (!this.showCommentArea) {
|
|
31895
32181
|
this.comment = val;
|
|
31896
32182
|
}
|
|
@@ -32343,6 +32629,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32343
32629
|
this.value = val ? this.otherItem.value : undefined;
|
|
32344
32630
|
};
|
|
32345
32631
|
QuestionSelectBase.prototype.setQuestionComment = function (newValue) {
|
|
32632
|
+
this.updatePrevOtherErrorValue(newValue);
|
|
32346
32633
|
if (this.showCommentArea) {
|
|
32347
32634
|
_super.prototype.setQuestionComment.call(this, newValue);
|
|
32348
32635
|
return;
|
|
@@ -32387,6 +32674,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32387
32674
|
return this.getPropertyValue("renderedValue", null);
|
|
32388
32675
|
},
|
|
32389
32676
|
set: function (val) {
|
|
32677
|
+
if (this.isReadOnlyAttr)
|
|
32678
|
+
return;
|
|
32390
32679
|
this.setPropertyValue("renderedValue", val);
|
|
32391
32680
|
var val = this.rendredValueToData(val);
|
|
32392
32681
|
if (!this.isTwoValueEquals(val, this.value)) {
|
|
@@ -32920,13 +33209,18 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
32920
33209
|
}
|
|
32921
33210
|
};
|
|
32922
33211
|
QuestionSelectBase.prototype.addNewItemToVisibleChoices = function (items, isAddAll) {
|
|
33212
|
+
var _this = this;
|
|
32923
33213
|
if (!isAddAll)
|
|
32924
33214
|
return;
|
|
32925
33215
|
if (!this.newItemValue) {
|
|
32926
33216
|
this.newItemValue = this.createItemValue("newitem"); //TODO
|
|
32927
33217
|
this.newItemValue.isGhost = true;
|
|
33218
|
+
this.newItemValue.registerFunctionOnPropertyValueChanged("isVisible", function () {
|
|
33219
|
+
_this.updateVisibleChoices();
|
|
33220
|
+
});
|
|
32928
33221
|
}
|
|
32929
|
-
if (
|
|
33222
|
+
if (this.newItemValue.isVisible && !this.isUsingCarryForward
|
|
33223
|
+
&& this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
|
|
32930
33224
|
this.footItemsCount = 1;
|
|
32931
33225
|
items.push(this.newItemValue);
|
|
32932
33226
|
}
|
|
@@ -33017,6 +33311,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
33017
33311
|
return questionPlainData;
|
|
33018
33312
|
};
|
|
33019
33313
|
QuestionSelectBase.prototype.getDisplayValueCore = function (keysAsText, value) {
|
|
33314
|
+
if (!this.useDisplayValuesInDynamicTexts)
|
|
33315
|
+
return value;
|
|
33020
33316
|
return this.getChoicesDisplayValue(this.visibleChoices, value);
|
|
33021
33317
|
};
|
|
33022
33318
|
QuestionSelectBase.prototype.getDisplayValueEmpty = function () {
|
|
@@ -33243,7 +33539,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
33243
33539
|
QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
|
|
33244
33540
|
var _this = this;
|
|
33245
33541
|
_super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
|
|
33246
|
-
if (!this.hasOther || !this.isOtherSelected || this.otherValue
|
|
33542
|
+
if (!this.hasOther || !this.isOtherSelected || this.otherValue
|
|
33543
|
+
|| isOnValueChanged && !this.prevOtherErrorValue)
|
|
33247
33544
|
return;
|
|
33248
33545
|
var otherEmptyError = new _error__WEBPACK_IMPORTED_MODULE_5__["OtherEmptyError"](this.otherErrorText, this);
|
|
33249
33546
|
otherEmptyError.onUpdateErrorTextCallback = function (err) { err.text = _this.otherErrorText; };
|
|
@@ -33840,7 +34137,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
|
|
|
33840
34137
|
configurable: true
|
|
33841
34138
|
});
|
|
33842
34139
|
QuestionSelectBase.prototype.getItemEnabled = function (item) {
|
|
33843
|
-
return !this.
|
|
34140
|
+
return !this.isDisabledAttr && item.isEnabled;
|
|
33844
34141
|
};
|
|
33845
34142
|
QuestionSelectBase.prototype.afterRender = function (el) {
|
|
33846
34143
|
_super.prototype.afterRender.call(this, el);
|
|
@@ -34222,7 +34519,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
|
34222
34519
|
this.value = val == true ? this.getValueTrue() : this.getValueFalse();
|
|
34223
34520
|
this.booleanValueRendered = val;
|
|
34224
34521
|
}
|
|
34225
|
-
this.updateThumbMargin();
|
|
34226
34522
|
};
|
|
34227
34523
|
Object.defineProperty(QuestionBooleanModel.prototype, "defaultValue", {
|
|
34228
34524
|
get: function () {
|
|
@@ -34427,6 +34723,15 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
|
|
|
34427
34723
|
.append(this.cssClasses.labelFalse, !this.isIndeterminate && checked === this.swapOrder)
|
|
34428
34724
|
.toString();
|
|
34429
34725
|
};
|
|
34726
|
+
QuestionBooleanModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
|
|
34727
|
+
if (clearData === void 0) { clearData = false; }
|
|
34728
|
+
_super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
|
|
34729
|
+
this.updateThumbMargin();
|
|
34730
|
+
};
|
|
34731
|
+
QuestionBooleanModel.prototype.onValueChanged = function () {
|
|
34732
|
+
_super.prototype.onValueChanged.call(this);
|
|
34733
|
+
this.updateThumbMargin();
|
|
34734
|
+
};
|
|
34430
34735
|
Object.defineProperty(QuestionBooleanModel.prototype, "svgIcon", {
|
|
34431
34736
|
get: function () {
|
|
34432
34737
|
if (this.booleanValue && this.cssClasses.svgIconCheckedId)
|
|
@@ -35046,6 +35351,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
|
|
|
35046
35351
|
this.renderedValue = val;
|
|
35047
35352
|
};
|
|
35048
35353
|
QuestionCheckboxModel.prototype.clickItemHandler = function (item, checked) {
|
|
35354
|
+
if (this.isReadOnlyAttr)
|
|
35355
|
+
return;
|
|
35049
35356
|
if (item === this.selectAllItem) {
|
|
35050
35357
|
if (checked === true || checked === false) {
|
|
35051
35358
|
this.isAllSelected = checked;
|
|
@@ -36930,6 +37237,9 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
|
|
|
36930
37237
|
this.contentPanel.getValue() : this.getValueForContentPanel(this.value);
|
|
36931
37238
|
if (!val)
|
|
36932
37239
|
val = {};
|
|
37240
|
+
if (!val.getType) {
|
|
37241
|
+
val = _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].getUnbindValue(val);
|
|
37242
|
+
}
|
|
36933
37243
|
if (this.isValueEmpty(newValue) && !this.isEditingSurveyElement) {
|
|
36934
37244
|
delete val[name];
|
|
36935
37245
|
}
|
|
@@ -38319,7 +38629,16 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
38319
38629
|
}
|
|
38320
38630
|
_this.clearFilesCore();
|
|
38321
38631
|
};
|
|
38632
|
+
_this.doDownloadFileFromContainer = function (event) {
|
|
38633
|
+
event.stopPropagation();
|
|
38634
|
+
var currentTarget = event.currentTarget;
|
|
38635
|
+
if (currentTarget && currentTarget.getElementsByTagName) {
|
|
38636
|
+
var link = currentTarget.getElementsByTagName("a")[0];
|
|
38637
|
+
link === null || link === void 0 ? void 0 : link.click();
|
|
38638
|
+
}
|
|
38639
|
+
};
|
|
38322
38640
|
_this.doDownloadFile = function (event, data) {
|
|
38641
|
+
event.stopPropagation();
|
|
38323
38642
|
if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["detectIEOrEdge"])()) {
|
|
38324
38643
|
event.preventDefault();
|
|
38325
38644
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["loadFileFromBase64"])(data.content, data.name);
|
|
@@ -39234,8 +39553,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
|
|
|
39234
39553
|
}
|
|
39235
39554
|
this.clear();
|
|
39236
39555
|
};
|
|
39237
|
-
QuestionFileModel.prototype.doRemoveFile = function (data) {
|
|
39556
|
+
QuestionFileModel.prototype.doRemoveFile = function (data, event) {
|
|
39238
39557
|
var _this = this;
|
|
39558
|
+
event.stopPropagation();
|
|
39239
39559
|
if (this.needConfirmRemoveFile) {
|
|
39240
39560
|
Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(this.getConfirmRemoveMessage(data.name), function () { _this.removeFileCore(data); }, undefined, this.getLocale(), this.survey.rootElement);
|
|
39241
39561
|
return;
|
|
@@ -40605,6 +40925,16 @@ var MatrixRowModel = /** @class */ (function (_super) {
|
|
|
40605
40925
|
enumerable: false,
|
|
40606
40926
|
configurable: true
|
|
40607
40927
|
});
|
|
40928
|
+
Object.defineProperty(MatrixRowModel.prototype, "isReadOnlyAttr", {
|
|
40929
|
+
get: function () { return this.data.isReadOnlyAttr; },
|
|
40930
|
+
enumerable: false,
|
|
40931
|
+
configurable: true
|
|
40932
|
+
});
|
|
40933
|
+
Object.defineProperty(MatrixRowModel.prototype, "isDisabledAttr", {
|
|
40934
|
+
get: function () { return !this.item.enabled || this.data.isDisabledAttr; },
|
|
40935
|
+
enumerable: false,
|
|
40936
|
+
configurable: true
|
|
40937
|
+
});
|
|
40608
40938
|
Object.defineProperty(MatrixRowModel.prototype, "rowTextClasses", {
|
|
40609
40939
|
get: function () {
|
|
40610
40940
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(this.data.cssClasses.rowTextCell).toString();
|
|
@@ -41443,6 +41773,7 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
|
|
|
41443
41773
|
__extends(QuestionMatrixDropdownModel, _super);
|
|
41444
41774
|
function QuestionMatrixDropdownModel(name) {
|
|
41445
41775
|
var _this = _super.call(this, name) || this;
|
|
41776
|
+
_this.defaultValuesInRows = {};
|
|
41446
41777
|
_this.createLocalizableString("totalText", _this, true);
|
|
41447
41778
|
_this.registerPropertyChangedHandlers(["rows"], function () {
|
|
41448
41779
|
_this.clearGeneratedRows();
|
|
@@ -41565,6 +41896,29 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
|
|
|
41565
41896
|
_super.prototype.clearValueIfInvisibleCore.call(this, reason);
|
|
41566
41897
|
this.clearInvisibleValuesInRows();
|
|
41567
41898
|
};
|
|
41899
|
+
QuestionMatrixDropdownModel.prototype.clearGeneratedRows = function () {
|
|
41900
|
+
var _this = this;
|
|
41901
|
+
if (!this.generatedVisibleRows)
|
|
41902
|
+
return;
|
|
41903
|
+
if (!this.isDisposed) {
|
|
41904
|
+
this.generatedVisibleRows.forEach(function (row) {
|
|
41905
|
+
_this.defaultValuesInRows[row.rowName] = row.getNamesWithDefaultValues();
|
|
41906
|
+
});
|
|
41907
|
+
}
|
|
41908
|
+
_super.prototype.clearGeneratedRows.call(this);
|
|
41909
|
+
};
|
|
41910
|
+
QuestionMatrixDropdownModel.prototype.getRowValueForCreation = function (val, rowValue) {
|
|
41911
|
+
var res = val[rowValue];
|
|
41912
|
+
if (!res)
|
|
41913
|
+
return res;
|
|
41914
|
+
var names = this.defaultValuesInRows[rowValue];
|
|
41915
|
+
if (!Array.isArray(names) || names.length === 0)
|
|
41916
|
+
return res;
|
|
41917
|
+
names.forEach(function (name) {
|
|
41918
|
+
delete res[name];
|
|
41919
|
+
});
|
|
41920
|
+
return res;
|
|
41921
|
+
};
|
|
41568
41922
|
QuestionMatrixDropdownModel.prototype.generateRows = function () {
|
|
41569
41923
|
var result = new Array();
|
|
41570
41924
|
var rows = !!this.filteredRows ? this.filteredRows : this.rows;
|
|
@@ -41574,9 +41928,10 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
|
|
|
41574
41928
|
if (!val)
|
|
41575
41929
|
val = {};
|
|
41576
41930
|
for (var i = 0; i < rows.length; i++) {
|
|
41577
|
-
|
|
41931
|
+
var row = rows[i];
|
|
41932
|
+
if (this.isValueEmpty(row.value))
|
|
41578
41933
|
continue;
|
|
41579
|
-
result.push(this.createMatrixRow(
|
|
41934
|
+
result.push(this.createMatrixRow(row, this.getRowValueForCreation(val, row.value)));
|
|
41580
41935
|
}
|
|
41581
41936
|
return result;
|
|
41582
41937
|
};
|
|
@@ -42037,18 +42392,22 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42037
42392
|
}
|
|
42038
42393
|
}
|
|
42039
42394
|
res.row = this.getAllValues();
|
|
42395
|
+
this.applyRowVariablesToValues(res, this.rowIndex);
|
|
42040
42396
|
return res;
|
|
42041
42397
|
};
|
|
42042
42398
|
MatrixDropdownRowModelBase.prototype.getFilteredProperties = function () {
|
|
42043
42399
|
return { survey: this.getSurvey(), row: this };
|
|
42044
42400
|
};
|
|
42401
|
+
MatrixDropdownRowModelBase.prototype.applyRowVariablesToValues = function (res, rowIndex) {
|
|
42402
|
+
res[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
|
|
42403
|
+
res[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
|
|
42404
|
+
};
|
|
42045
42405
|
MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties) {
|
|
42046
42406
|
if (!!this.data) {
|
|
42047
42407
|
values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
|
|
42048
42408
|
}
|
|
42049
42409
|
var rowIndex = this.rowIndex;
|
|
42050
|
-
values
|
|
42051
|
-
values[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
|
|
42410
|
+
this.applyRowVariablesToValues(values, rowIndex);
|
|
42052
42411
|
var newProps = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].createCopy(properties);
|
|
42053
42412
|
newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
|
|
42054
42413
|
var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
|
|
@@ -42063,6 +42422,15 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
|
|
|
42063
42422
|
this.detailPanel.runCondition(values, newProps);
|
|
42064
42423
|
}
|
|
42065
42424
|
};
|
|
42425
|
+
MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
|
|
42426
|
+
var res = [];
|
|
42427
|
+
this.questions.forEach(function (q) {
|
|
42428
|
+
if (q.isValueDefault) {
|
|
42429
|
+
res.push(q.getValueName());
|
|
42430
|
+
}
|
|
42431
|
+
});
|
|
42432
|
+
return res;
|
|
42433
|
+
};
|
|
42066
42434
|
MatrixDropdownRowModelBase.prototype.clearValue = function (keepComment) {
|
|
42067
42435
|
var questions = this.questions;
|
|
42068
42436
|
for (var i = 0; i < questions.length; i++) {
|
|
@@ -45295,6 +45663,13 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
|
45295
45663
|
json[prop] = _this.jsonObj[prop];
|
|
45296
45664
|
});
|
|
45297
45665
|
}
|
|
45666
|
+
if (json["choicesOrder"] === "random") {
|
|
45667
|
+
json["choicesOrder"] = "none";
|
|
45668
|
+
var visChoices = this.templateQuestion["visibleChoices"];
|
|
45669
|
+
if (Array.isArray(visChoices)) {
|
|
45670
|
+
json["choices"] = visChoices;
|
|
45671
|
+
}
|
|
45672
|
+
}
|
|
45298
45673
|
new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, question);
|
|
45299
45674
|
question.isContentElement = this.templateQuestion.isContentElement;
|
|
45300
45675
|
this.previousChoicesId = undefined;
|
|
@@ -45317,8 +45692,12 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
|
|
|
45317
45692
|
}
|
|
45318
45693
|
if (!this.colOwner || this.isLoadingFromJson)
|
|
45319
45694
|
return;
|
|
45320
|
-
if (this.isShowInMultipleColumns
|
|
45321
|
-
|
|
45695
|
+
if (this.isShowInMultipleColumns) {
|
|
45696
|
+
if (name === "choicesOrder")
|
|
45697
|
+
return;
|
|
45698
|
+
if (["visibleChoices", "choices"].indexOf(name) > -1) {
|
|
45699
|
+
this.colOwner.onShowInMultipleColumnsChanged(this);
|
|
45700
|
+
}
|
|
45322
45701
|
}
|
|
45323
45702
|
if (!_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].hasOriginalProperty(this, name))
|
|
45324
45703
|
return;
|
|
@@ -45798,11 +46177,9 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
45798
46177
|
function QuestionMatrixDropdownRenderedTable(matrix) {
|
|
45799
46178
|
var _this = _super.call(this) || this;
|
|
45800
46179
|
_this.matrix = matrix;
|
|
45801
|
-
_this.renderedRowsChangedCallback = function () { };
|
|
45802
46180
|
_this._renderedRows = [];
|
|
45803
46181
|
_this.renderedRowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationGroup"](_this.getRenderedRowsAnimationOptions(), function (val) {
|
|
45804
46182
|
_this._renderedRows = val;
|
|
45805
|
-
_this.renderedRowsChangedCallback();
|
|
45806
46183
|
}, function () { return _this._renderedRows; });
|
|
45807
46184
|
_this.hasActionCellInRowsValues = {};
|
|
45808
46185
|
_this.build();
|
|
@@ -45822,6 +46199,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
45822
46199
|
isAnimationEnabled: function () {
|
|
45823
46200
|
return _this.animationAllowed;
|
|
45824
46201
|
},
|
|
46202
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
|
45825
46203
|
getAnimatedElement: function (el) {
|
|
45826
46204
|
return el.getRootElement();
|
|
45827
46205
|
},
|
|
@@ -46682,7 +47060,6 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
|
|
|
46682
47060
|
__decorate([
|
|
46683
47061
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])({
|
|
46684
47062
|
onPush: function (_, i, target) {
|
|
46685
|
-
target.renderedRowsChangedCallback();
|
|
46686
47063
|
target.updateRenderedRows();
|
|
46687
47064
|
},
|
|
46688
47065
|
onRemove: function (_, i, target) {
|
|
@@ -49832,6 +50209,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
49832
50209
|
.toString();
|
|
49833
50210
|
};
|
|
49834
50211
|
return {
|
|
50212
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
|
49835
50213
|
getAnimatedElement: function (panel) {
|
|
49836
50214
|
var _a, _b;
|
|
49837
50215
|
if (panel && _this.cssContent) {
|
|
@@ -51336,7 +51714,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
|
51336
51714
|
this.setOnCompleteAsyncInPanel(panels[i]);
|
|
51337
51715
|
}
|
|
51338
51716
|
for (var i = 0; i < panels.length; i++) {
|
|
51339
|
-
var pnlError = panels[i].hasErrors(fireCallback, !!rec && rec.
|
|
51717
|
+
var pnlError = panels[i].hasErrors(fireCallback, !!rec && rec.focusOnFirstError, rec);
|
|
51340
51718
|
pnlError = this.isValueDuplicated(panels[i], keyValues, rec, fireCallback) || pnlError;
|
|
51341
51719
|
if (!this.isRenderModeList && pnlError && !res) {
|
|
51342
51720
|
this.currentIndex = i;
|
|
@@ -52168,6 +52546,8 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
|
|
|
52168
52546
|
configurable: true
|
|
52169
52547
|
});
|
|
52170
52548
|
QuestionRadiogroupModel.prototype.clickItemHandler = function (item) {
|
|
52549
|
+
if (this.isReadOnlyAttr)
|
|
52550
|
+
return;
|
|
52171
52551
|
this.renderedValue = item.value;
|
|
52172
52552
|
};
|
|
52173
52553
|
QuestionRadiogroupModel.prototype.getDefaultTitleActions = function () {
|
|
@@ -52240,6 +52620,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
52240
52620
|
/* harmony import */ var _src_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../src/settings */ "./src/settings.ts");
|
|
52241
52621
|
/* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
|
|
52242
52622
|
/* harmony import */ var _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/dragOrClickHelper */ "./src/utils/dragOrClickHelper.ts");
|
|
52623
|
+
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
|
|
52243
52624
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
52244
52625
|
var extendStatics = function (d, b) {
|
|
52245
52626
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -52273,6 +52654,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
52273
52654
|
|
|
52274
52655
|
|
|
52275
52656
|
|
|
52657
|
+
|
|
52276
52658
|
/**
|
|
52277
52659
|
* A class that describes the Ranking question type.
|
|
52278
52660
|
*
|
|
@@ -52292,33 +52674,37 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52292
52674
|
if (_this.visibleChoices.length === 1 && !_this.selectToRankEnabled) {
|
|
52293
52675
|
_this.value = [];
|
|
52294
52676
|
_this.value.push(_this.visibleChoices[0].value);
|
|
52295
|
-
_this.
|
|
52677
|
+
_this.updateRankingChoices();
|
|
52296
52678
|
return;
|
|
52297
52679
|
}
|
|
52298
52680
|
if (_this.isEmpty()) {
|
|
52299
|
-
_this.
|
|
52681
|
+
_this.updateRankingChoices();
|
|
52300
52682
|
return;
|
|
52301
52683
|
}
|
|
52302
52684
|
if (_this.selectToRankEnabled) {
|
|
52303
|
-
_this.
|
|
52685
|
+
_this.updateRankingChoices();
|
|
52304
52686
|
return;
|
|
52305
52687
|
}
|
|
52306
52688
|
if (_this.visibleChoices.length > _this.value.length)
|
|
52307
52689
|
_this.addToValueByVisibleChoices();
|
|
52308
52690
|
if (_this.visibleChoices.length < _this.value.length)
|
|
52309
52691
|
_this.removeFromValueByVisibleChoices();
|
|
52310
|
-
_this.
|
|
52692
|
+
_this.updateRankingChoices();
|
|
52311
52693
|
};
|
|
52312
52694
|
_this.localeChanged = function () {
|
|
52313
52695
|
_super.prototype.localeChanged.call(_this);
|
|
52314
52696
|
_this.updateRankingChoicesSync();
|
|
52315
52697
|
};
|
|
52316
|
-
_this._rankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.
|
|
52317
|
-
_this.
|
|
52318
|
-
}, function () { return _this.
|
|
52319
|
-
_this._unRankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.
|
|
52320
|
-
_this.
|
|
52321
|
-
}, function () { return _this.
|
|
52698
|
+
_this._rankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimationOptions(true), function (val) {
|
|
52699
|
+
_this._renderedRankingChoices = val;
|
|
52700
|
+
}, function () { return _this.renderedRankingChoices; });
|
|
52701
|
+
_this._unRankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimationOptions(false), function (val) {
|
|
52702
|
+
_this._renderedUnRankingChoices = val;
|
|
52703
|
+
}, function () { return _this.renderedUnRankingChoices; });
|
|
52704
|
+
_this.rankingChoices = [];
|
|
52705
|
+
_this.unRankingChoices = [];
|
|
52706
|
+
_this._renderedRankingChoices = [];
|
|
52707
|
+
_this._renderedUnRankingChoices = [];
|
|
52322
52708
|
_this.handlePointerDown = function (event, choice, node) {
|
|
52323
52709
|
var target = event.target;
|
|
52324
52710
|
if (!_this.isDragStartNodeValid(target))
|
|
@@ -52342,6 +52728,8 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52342
52728
|
}
|
|
52343
52729
|
};
|
|
52344
52730
|
_this.handleKeydown = function (event, choice) {
|
|
52731
|
+
if (_this.isReadOnlyAttr)
|
|
52732
|
+
return;
|
|
52345
52733
|
if (!_this.isDesignMode) {
|
|
52346
52734
|
var key = event.key;
|
|
52347
52735
|
var index = _this.rankingChoices.indexOf(choice);
|
|
@@ -52349,27 +52737,16 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52349
52737
|
_this.handleKeydownSelectToRank(event, choice);
|
|
52350
52738
|
return;
|
|
52351
52739
|
}
|
|
52352
|
-
if (key === "ArrowUp" && index) {
|
|
52353
|
-
|
|
52354
|
-
|
|
52355
|
-
|
|
52356
|
-
if (key === "ArrowDown" && index !== _this.rankingChoices.length - 1) {
|
|
52357
|
-
_this.handleArrowKeys(index, choice, true);
|
|
52358
|
-
event.preventDefault();
|
|
52740
|
+
if ((key === "ArrowUp" && index) || (key === "ArrowDown" && index !== _this.rankingChoices.length - 1)) {
|
|
52741
|
+
var toIndex = key == "ArrowUp" ? index - 1 : index + 1;
|
|
52742
|
+
_this.dragDropRankingChoices.reorderRankedItem(_this, index, toIndex);
|
|
52743
|
+
_this.setValueAfterKeydown(toIndex, "", true, event);
|
|
52359
52744
|
}
|
|
52360
52745
|
}
|
|
52361
52746
|
};
|
|
52362
|
-
_this.handleArrowKeys = function (index, choice, isDown) {
|
|
52363
|
-
var delta = isDown ? 1 : -1;
|
|
52364
|
-
var choices = _this.rankingChoices;
|
|
52365
|
-
choices.splice(index, 1);
|
|
52366
|
-
choices.splice(index + delta, 0, choice);
|
|
52367
|
-
_this.setValue();
|
|
52368
|
-
setTimeout(function () {
|
|
52369
|
-
_this.focusItem(index + delta);
|
|
52370
|
-
}, 1);
|
|
52371
|
-
};
|
|
52372
52747
|
_this.focusItem = function (index, container) {
|
|
52748
|
+
if (!_this.domNode)
|
|
52749
|
+
return;
|
|
52373
52750
|
if (_this.selectToRankEnabled && container) {
|
|
52374
52751
|
var containerSelector = "[data-ranking='" + container + "']";
|
|
52375
52752
|
var itemsNodes = _this.domNode.querySelectorAll(containerSelector + " " + "." + _this.cssClasses.item);
|
|
@@ -52383,16 +52760,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52383
52760
|
_this.isValueSetByUser = false;
|
|
52384
52761
|
_this.setValue = function () {
|
|
52385
52762
|
var value = [];
|
|
52386
|
-
_this.rankingChoicesAnimation.cancel();
|
|
52387
|
-
_this.unRankingChoicesAnimation.cancel();
|
|
52388
52763
|
_this.rankingChoices.forEach(function (choice) {
|
|
52389
52764
|
value.push(choice.value);
|
|
52390
52765
|
});
|
|
52391
52766
|
_this.value = value;
|
|
52392
52767
|
_this.isValueSetByUser = true;
|
|
52393
52768
|
};
|
|
52394
|
-
_this.createNewArray("rankingChoices");
|
|
52395
|
-
_this.createNewArray("unRankingChoices");
|
|
52396
52769
|
_this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
|
|
52397
52770
|
_this.clearValue(true);
|
|
52398
52771
|
_this.setDragDropRankingChoices();
|
|
@@ -52442,15 +52815,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52442
52815
|
return true;
|
|
52443
52816
|
};
|
|
52444
52817
|
QuestionRankingModel.prototype.getItemClassCore = function (item, options) {
|
|
52445
|
-
var itemIndex = this.rankingChoices.indexOf(item);
|
|
52446
|
-
var unrankedItemIndex = this.unRankingChoices.indexOf(item);
|
|
52447
|
-
var dropTargetIndex = this.rankingChoices.indexOf(this.currentDropTarget);
|
|
52448
|
-
var isDrop = (this.selectToRankEnabled && itemIndex > -1 && unrankedItemIndex > -1) || this.currentDropTarget === item;
|
|
52449
52818
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
|
52450
52819
|
.append(_super.prototype.getItemClassCore.call(this, item, options))
|
|
52451
|
-
.append(this.cssClasses.itemGhostMod,
|
|
52452
|
-
.append("sv-dragdrop-movedown", itemIndex === dropTargetIndex + 1 && this.dropTargetNodeMove === "down")
|
|
52453
|
-
.append("sv-dragdrop-moveup", itemIndex === dropTargetIndex - 1 && this.dropTargetNodeMove === "up")
|
|
52820
|
+
.append(this.cssClasses.itemGhostMod, this.currentDropTarget === item)
|
|
52454
52821
|
.toString();
|
|
52455
52822
|
};
|
|
52456
52823
|
QuestionRankingModel.prototype.getContainerClasses = function (containerType) {
|
|
@@ -52458,10 +52825,10 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52458
52825
|
var isToContainer = containerType === "to";
|
|
52459
52826
|
var isFromContainer = containerType === "from";
|
|
52460
52827
|
if (isToContainer) {
|
|
52461
|
-
isEmpty = this.
|
|
52828
|
+
isEmpty = this.renderedRankingChoices.length === 0;
|
|
52462
52829
|
}
|
|
52463
52830
|
else if (isFromContainer) {
|
|
52464
|
-
isEmpty = this.
|
|
52831
|
+
isEmpty = this.renderedUnRankingChoices.length === 0;
|
|
52465
52832
|
}
|
|
52466
52833
|
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
|
|
52467
52834
|
.append(this.cssClasses.container)
|
|
@@ -52522,7 +52889,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52522
52889
|
_super.prototype.onSurveyValueChanged.call(this, newValue);
|
|
52523
52890
|
if (this.isLoadingFromJson)
|
|
52524
52891
|
return;
|
|
52525
|
-
this.
|
|
52892
|
+
this.updateRankingChoices();
|
|
52893
|
+
};
|
|
52894
|
+
QuestionRankingModel.prototype.onSurveyLoad = function () {
|
|
52895
|
+
this.blockAnimations();
|
|
52896
|
+
_super.prototype.onSurveyLoad.call(this);
|
|
52897
|
+
this.releaseAnimations();
|
|
52526
52898
|
};
|
|
52527
52899
|
QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
|
|
52528
52900
|
var newValue = this.value.slice();
|
|
@@ -52543,19 +52915,32 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52543
52915
|
}
|
|
52544
52916
|
this.value = newValue;
|
|
52545
52917
|
};
|
|
52546
|
-
QuestionRankingModel.prototype.
|
|
52918
|
+
QuestionRankingModel.prototype.getChoicesAnimationOptions = function (isRankingChoices) {
|
|
52547
52919
|
var _this = this;
|
|
52548
52920
|
return {
|
|
52549
|
-
|
|
52921
|
+
getKey: function (item) {
|
|
52922
|
+
return item.value;
|
|
52923
|
+
},
|
|
52924
|
+
getRerenderEvent: function () {
|
|
52925
|
+
return _this.onElementRerendered;
|
|
52926
|
+
},
|
|
52927
|
+
isAnimationEnabled: function () { return _this.animationAllowed && !_this.isDesignMode && _this.isVisible && !!_this.domNode; },
|
|
52928
|
+
getReorderOptions: function (item, movedForward) {
|
|
52929
|
+
var cssClass = "";
|
|
52930
|
+
if (item !== _this.currentDropTarget) {
|
|
52931
|
+
cssClass = movedForward ? "sv-dragdrop-movedown" : "sv-dragdrop-moveup";
|
|
52932
|
+
}
|
|
52933
|
+
return { cssClass: cssClass };
|
|
52934
|
+
},
|
|
52550
52935
|
getLeaveOptions: function (item) {
|
|
52551
|
-
var choices = isRankingChoices ? _this.
|
|
52936
|
+
var choices = isRankingChoices ? _this.renderedRankingChoices : _this.renderedUnRankingChoices;
|
|
52552
52937
|
if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
|
|
52553
52938
|
return { cssClass: "sv-ranking-item--animate-item-removing-empty" };
|
|
52554
52939
|
}
|
|
52555
52940
|
return { cssClass: "sv-ranking-item--animate-item-removing" };
|
|
52556
52941
|
},
|
|
52557
52942
|
getEnterOptions: function (item) {
|
|
52558
|
-
var choices = isRankingChoices ? _this.
|
|
52943
|
+
var choices = isRankingChoices ? _this.renderedRankingChoices : _this.renderedUnRankingChoices;
|
|
52559
52944
|
if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
|
|
52560
52945
|
return { cssClass: "sv-ranking-item--animate-item-adding-empty" };
|
|
52561
52946
|
}
|
|
@@ -52563,9 +52948,20 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52563
52948
|
},
|
|
52564
52949
|
getAnimatedElement: function (item) {
|
|
52565
52950
|
var _a;
|
|
52566
|
-
var
|
|
52567
|
-
|
|
52568
|
-
|
|
52951
|
+
var cssClasses = _this.cssClasses;
|
|
52952
|
+
var containerSelector = "";
|
|
52953
|
+
if (_this.selectToRankEnabled) {
|
|
52954
|
+
if (!isRankingChoices && cssClasses.containerFromMode) {
|
|
52955
|
+
containerSelector = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_12__["classesToSelector"])(cssClasses.containerFromMode);
|
|
52956
|
+
}
|
|
52957
|
+
else if (isRankingChoices && cssClasses.containerToMode) {
|
|
52958
|
+
containerSelector = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_12__["classesToSelector"])(cssClasses.containerToMode);
|
|
52959
|
+
}
|
|
52960
|
+
}
|
|
52961
|
+
var index = isRankingChoices ? _this.renderedRankingChoices.indexOf(item) : _this.renderedUnRankingChoices.indexOf(item);
|
|
52962
|
+
return (_a = _this.domNode) === null || _a === void 0 ? void 0 : _a.querySelector(containerSelector + " [data-sv-drop-target-ranking-item='" + index + "']");
|
|
52963
|
+
},
|
|
52964
|
+
allowSyncRemovalAddition: true
|
|
52569
52965
|
};
|
|
52570
52966
|
};
|
|
52571
52967
|
Object.defineProperty(QuestionRankingModel.prototype, "rankingChoicesAnimation", {
|
|
@@ -52582,26 +52978,32 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52582
52978
|
enumerable: false,
|
|
52583
52979
|
configurable: true
|
|
52584
52980
|
});
|
|
52585
|
-
Object.defineProperty(QuestionRankingModel.prototype, "
|
|
52981
|
+
Object.defineProperty(QuestionRankingModel.prototype, "renderedRankingChoices", {
|
|
52586
52982
|
get: function () {
|
|
52587
|
-
return this.
|
|
52983
|
+
return this._renderedRankingChoices;
|
|
52588
52984
|
},
|
|
52589
52985
|
set: function (val) {
|
|
52590
|
-
this.
|
|
52986
|
+
this.rankingChoicesAnimation.sync(val);
|
|
52591
52987
|
},
|
|
52592
52988
|
enumerable: false,
|
|
52593
52989
|
configurable: true
|
|
52594
52990
|
});
|
|
52595
|
-
Object.defineProperty(QuestionRankingModel.prototype, "
|
|
52991
|
+
Object.defineProperty(QuestionRankingModel.prototype, "renderedUnRankingChoices", {
|
|
52596
52992
|
get: function () {
|
|
52597
|
-
return this.
|
|
52993
|
+
return this._renderedUnRankingChoices;
|
|
52598
52994
|
},
|
|
52599
52995
|
set: function (val) {
|
|
52600
|
-
this.
|
|
52996
|
+
this.unRankingChoicesAnimation.sync(val);
|
|
52601
52997
|
},
|
|
52602
52998
|
enumerable: false,
|
|
52603
52999
|
configurable: true
|
|
52604
53000
|
});
|
|
53001
|
+
QuestionRankingModel.prototype.updateRenderedRankingChoices = function () {
|
|
53002
|
+
this.renderedRankingChoices = this.rankingChoices;
|
|
53003
|
+
};
|
|
53004
|
+
QuestionRankingModel.prototype.updateRenderedUnRankingChoices = function () {
|
|
53005
|
+
this.renderedUnRankingChoices = this.unRankingChoices;
|
|
53006
|
+
};
|
|
52605
53007
|
QuestionRankingModel.prototype.updateRankingChoices = function (forceUpdate) {
|
|
52606
53008
|
var _this = this;
|
|
52607
53009
|
if (forceUpdate === void 0) { forceUpdate = false; }
|
|
@@ -52616,9 +53018,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52616
53018
|
// return;
|
|
52617
53019
|
// }
|
|
52618
53020
|
if (forceUpdate)
|
|
52619
|
-
this.
|
|
53021
|
+
this.rankingChoices = [];
|
|
52620
53022
|
if (this.isEmpty()) {
|
|
52621
|
-
this.
|
|
53023
|
+
this.rankingChoices = this.visibleChoices;
|
|
52622
53024
|
return;
|
|
52623
53025
|
}
|
|
52624
53026
|
this.value.forEach(function (valueItem) {
|
|
@@ -52627,7 +53029,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52627
53029
|
newRankingChoices.push(choice);
|
|
52628
53030
|
});
|
|
52629
53031
|
});
|
|
52630
|
-
this.
|
|
53032
|
+
this.rankingChoices = newRankingChoices;
|
|
52631
53033
|
};
|
|
52632
53034
|
QuestionRankingModel.prototype.updateUnRankingChoices = function (newRankingChoices) {
|
|
52633
53035
|
var unRankingChoices = [];
|
|
@@ -52707,6 +53109,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52707
53109
|
};
|
|
52708
53110
|
//cross framework destroy
|
|
52709
53111
|
QuestionRankingModel.prototype.beforeDestroyQuestionElement = function (el) {
|
|
53112
|
+
this.domNode = undefined;
|
|
52710
53113
|
_super.prototype.beforeDestroyQuestionElement.call(this, el);
|
|
52711
53114
|
};
|
|
52712
53115
|
QuestionRankingModel.prototype.supportSelectAll = function () { return false; };
|
|
@@ -52735,20 +53138,16 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52735
53138
|
if (!this.checkMaxSelectedChoicesUnreached() || !this.canStartDragDueItemEnabled(movedElement))
|
|
52736
53139
|
return;
|
|
52737
53140
|
toIndex = this.value.length;
|
|
52738
|
-
this.blockAnimations();
|
|
52739
53141
|
dnd.selectToRank(this, fromIndex, toIndex);
|
|
52740
|
-
this.
|
|
52741
|
-
this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus);
|
|
53142
|
+
this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus, event);
|
|
52742
53143
|
return;
|
|
52743
53144
|
}
|
|
52744
53145
|
if (!isMovedElementRanked)
|
|
52745
53146
|
return;
|
|
52746
53147
|
if (key === " ") {
|
|
52747
|
-
this.blockAnimations();
|
|
52748
53148
|
dnd.unselectFromRank(this, fromIndex);
|
|
52749
|
-
this.releaseAnimations();
|
|
52750
53149
|
toIndex = this.unRankingChoices.indexOf(movedElement); //'this.' leads to actual array after the 'unselectFromRank' method
|
|
52751
|
-
this.setValueAfterKeydown(toIndex, "from-container", isNeedFocus);
|
|
53150
|
+
this.setValueAfterKeydown(toIndex, "from-container", isNeedFocus, event);
|
|
52752
53151
|
return;
|
|
52753
53152
|
}
|
|
52754
53153
|
var delta = key === "ArrowUp" ? -1 : (key === "ArrowDown" ? 1 : 0);
|
|
@@ -52758,9 +53157,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52758
53157
|
if (toIndex < 0 || toIndex >= rankingChoices.length)
|
|
52759
53158
|
return;
|
|
52760
53159
|
dnd.reorderRankedItem(this, fromIndex, toIndex);
|
|
52761
|
-
this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus);
|
|
53160
|
+
this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus, event);
|
|
52762
53161
|
};
|
|
52763
|
-
QuestionRankingModel.prototype.setValueAfterKeydown = function (index, container, isNeedFocus) {
|
|
53162
|
+
QuestionRankingModel.prototype.setValueAfterKeydown = function (index, container, isNeedFocus, event) {
|
|
52764
53163
|
var _this = this;
|
|
52765
53164
|
if (isNeedFocus === void 0) { isNeedFocus = true; }
|
|
52766
53165
|
this.setValue();
|
|
@@ -52800,6 +53199,19 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52800
53199
|
enumerable: false,
|
|
52801
53200
|
configurable: true
|
|
52802
53201
|
});
|
|
53202
|
+
Object.defineProperty(QuestionRankingModel.prototype, "itemContentComponent", {
|
|
53203
|
+
/**
|
|
53204
|
+
* The name of a component used to render items.
|
|
53205
|
+
*/
|
|
53206
|
+
get: function () {
|
|
53207
|
+
return this.getPropertyValue("itemContentComponent", "sv-ranking-item-content");
|
|
53208
|
+
},
|
|
53209
|
+
set: function (value) {
|
|
53210
|
+
this.setPropertyValue("itemContentComponent", value);
|
|
53211
|
+
},
|
|
53212
|
+
enumerable: false,
|
|
53213
|
+
configurable: true
|
|
53214
|
+
});
|
|
52803
53215
|
Object.defineProperty(QuestionRankingModel.prototype, "selectToRankEnabled", {
|
|
52804
53216
|
/**
|
|
52805
53217
|
* Specifies whether users can select choices they want to rank.
|
|
@@ -52889,11 +53301,27 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
|
52889
53301
|
configurable: true
|
|
52890
53302
|
});
|
|
52891
53303
|
__decorate([
|
|
52892
|
-
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["
|
|
52893
|
-
|
|
53304
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])({
|
|
53305
|
+
onSet: function (val, target) { return target.updateRenderedRankingChoices(); },
|
|
53306
|
+
onRemove: function (_, _i, target) { return target.updateRenderedRankingChoices(); },
|
|
53307
|
+
onPush: function (_, _i, target) { return target.updateRenderedRankingChoices(); },
|
|
53308
|
+
})
|
|
53309
|
+
], QuestionRankingModel.prototype, "rankingChoices", void 0);
|
|
53310
|
+
__decorate([
|
|
53311
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])({ onSet: function (val, target) { return target.updateRenderedUnRankingChoices(); },
|
|
53312
|
+
onRemove: function (_, _i, target) { return target.updateRenderedUnRankingChoices(); },
|
|
53313
|
+
onPush: function (_, _i, target) { return target.updateRenderedUnRankingChoices(); },
|
|
53314
|
+
})
|
|
53315
|
+
], QuestionRankingModel.prototype, "unRankingChoices", void 0);
|
|
53316
|
+
__decorate([
|
|
53317
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])()
|
|
53318
|
+
], QuestionRankingModel.prototype, "_renderedRankingChoices", void 0);
|
|
53319
|
+
__decorate([
|
|
53320
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])()
|
|
53321
|
+
], QuestionRankingModel.prototype, "_renderedUnRankingChoices", void 0);
|
|
52894
53322
|
__decorate([
|
|
52895
53323
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: null })
|
|
52896
|
-
], QuestionRankingModel.prototype, "
|
|
53324
|
+
], QuestionRankingModel.prototype, "currentDropTarget", void 0);
|
|
52897
53325
|
__decorate([
|
|
52898
53326
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: true })
|
|
52899
53327
|
], QuestionRankingModel.prototype, "carryForwardStartUnranked", void 0);
|
|
@@ -52976,7 +53404,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("ranking", [
|
|
|
52976
53404
|
dependsOn: "selectToRankEnabled", visibleIf: function (obj) {
|
|
52977
53405
|
return !!obj.selectToRankEnabled;
|
|
52978
53406
|
}, isSerializable: true },
|
|
52979
|
-
{ name: "itemComponent", visible: false, default: "" }
|
|
53407
|
+
{ name: "itemComponent", visible: false, default: "" },
|
|
53408
|
+
{ name: "itemContentComponent", visible: false, default: "sv-ranking-item-content" },
|
|
52980
53409
|
], function () {
|
|
52981
53410
|
return new QuestionRankingModel("");
|
|
52982
53411
|
}, "checkbox");
|
|
@@ -53619,6 +54048,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
|
|
|
53619
54048
|
return !isNaN(val) ? parseFloat(val) : val;
|
|
53620
54049
|
};
|
|
53621
54050
|
QuestionRatingModel.prototype.setValueFromClick = function (value) {
|
|
54051
|
+
if (this.isReadOnlyAttr)
|
|
54052
|
+
return;
|
|
53622
54053
|
if (this.value === parseFloat(value)) {
|
|
53623
54054
|
this.clearValue(true);
|
|
53624
54055
|
}
|
|
@@ -55680,8 +56111,11 @@ var QuestionTextModel = /** @class */ (function (_super) {
|
|
|
55680
56111
|
enumerable: false,
|
|
55681
56112
|
configurable: true
|
|
55682
56113
|
});
|
|
56114
|
+
QuestionTextModel.prototype.getIsInputTextUpdate = function () {
|
|
56115
|
+
return this.maskTypeIsEmpty ? _super.prototype.getIsInputTextUpdate.call(this) : false;
|
|
56116
|
+
};
|
|
55683
56117
|
QuestionTextModel.prototype.supportGoNextPageAutomatic = function () {
|
|
55684
|
-
return !this.
|
|
56118
|
+
return !this.getIsInputTextUpdate() &&
|
|
55685
56119
|
["date", "datetime-local"].indexOf(this.inputType) < 0;
|
|
55686
56120
|
};
|
|
55687
56121
|
QuestionTextModel.prototype.supportGoNextPageError = function () {
|
|
@@ -56155,15 +56589,11 @@ var QuestionTextBase = /** @class */ (function (_super) {
|
|
|
56155
56589
|
enumerable: false,
|
|
56156
56590
|
configurable: true
|
|
56157
56591
|
});
|
|
56158
|
-
|
|
56159
|
-
|
|
56160
|
-
|
|
56161
|
-
|
|
56162
|
-
|
|
56163
|
-
},
|
|
56164
|
-
enumerable: false,
|
|
56165
|
-
configurable: true
|
|
56166
|
-
});
|
|
56592
|
+
QuestionTextBase.prototype.getIsInputTextUpdate = function () {
|
|
56593
|
+
if (this.textUpdateMode == "default")
|
|
56594
|
+
return _super.prototype.getIsInputTextUpdate.call(this);
|
|
56595
|
+
return this.textUpdateMode == "onTyping";
|
|
56596
|
+
};
|
|
56167
56597
|
Object.defineProperty(QuestionTextBase.prototype, "renderedPlaceholder", {
|
|
56168
56598
|
get: function () {
|
|
56169
56599
|
return this.getPropertyValue("renderedPlaceholder");
|
|
@@ -57963,12 +58393,12 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
57963
58393
|
}
|
|
57964
58394
|
return info;
|
|
57965
58395
|
};
|
|
57966
|
-
SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible) {
|
|
58396
|
+
SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible, scrollIntoViewOptions) {
|
|
57967
58397
|
var root = _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root;
|
|
57968
58398
|
if (!elementId || typeof root === "undefined")
|
|
57969
58399
|
return false;
|
|
57970
58400
|
var el = root.getElementById(elementId);
|
|
57971
|
-
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible);
|
|
58401
|
+
return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions);
|
|
57972
58402
|
};
|
|
57973
58403
|
SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions) {
|
|
57974
58404
|
if (!el || !el.scrollIntoView)
|
|
@@ -59059,6 +59489,8 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
59059
59489
|
enumerable: false,
|
|
59060
59490
|
configurable: true
|
|
59061
59491
|
});
|
|
59492
|
+
SurveyElement.prototype.onElementExpanded = function (elementIsRendered) {
|
|
59493
|
+
};
|
|
59062
59494
|
SurveyElement.prototype.getExpandCollapseAnimationOptions = function () {
|
|
59063
59495
|
var _this = this;
|
|
59064
59496
|
var beforeRunAnimation = function (el) {
|
|
@@ -59069,12 +59501,16 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
59069
59501
|
_this.isAnimatingCollapseExpand = false;
|
|
59070
59502
|
};
|
|
59071
59503
|
return {
|
|
59504
|
+
getRerenderEvent: function () { return _this.onElementRerendered; },
|
|
59072
59505
|
getEnterOptions: function () {
|
|
59073
59506
|
var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
|
|
59074
59507
|
return {
|
|
59075
59508
|
cssClass: cssClasses.contentFadeIn,
|
|
59076
59509
|
onBeforeRunAnimation: beforeRunAnimation,
|
|
59077
|
-
onAfterRunAnimation:
|
|
59510
|
+
onAfterRunAnimation: function (el) {
|
|
59511
|
+
afterRunAnimation(el);
|
|
59512
|
+
_this.onElementExpanded(true);
|
|
59513
|
+
},
|
|
59078
59514
|
};
|
|
59079
59515
|
},
|
|
59080
59516
|
getLeaveOptions: function () {
|
|
@@ -59095,15 +59531,26 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
|
59095
59531
|
}
|
|
59096
59532
|
return undefined;
|
|
59097
59533
|
},
|
|
59098
|
-
isAnimationEnabled: function () { return _this.
|
|
59534
|
+
isAnimationEnabled: function () { return _this.isExpandCollapseAnimationEnabled; }
|
|
59099
59535
|
};
|
|
59100
59536
|
};
|
|
59537
|
+
Object.defineProperty(SurveyElement.prototype, "isExpandCollapseAnimationEnabled", {
|
|
59538
|
+
get: function () {
|
|
59539
|
+
return this.animationAllowed && !this.isDesignMode;
|
|
59540
|
+
},
|
|
59541
|
+
enumerable: false,
|
|
59542
|
+
configurable: true
|
|
59543
|
+
});
|
|
59101
59544
|
Object.defineProperty(SurveyElement.prototype, "renderedIsExpanded", {
|
|
59102
59545
|
get: function () {
|
|
59103
59546
|
return !!this._renderedIsExpanded;
|
|
59104
59547
|
},
|
|
59105
59548
|
set: function (val) {
|
|
59549
|
+
var oldValue = this._renderedIsExpanded;
|
|
59106
59550
|
this.animationCollapsed.sync(val);
|
|
59551
|
+
if (!this.isExpandCollapseAnimationEnabled && !oldValue && this.renderedIsExpanded) {
|
|
59552
|
+
this.onElementExpanded(false);
|
|
59553
|
+
}
|
|
59107
59554
|
},
|
|
59108
59555
|
enumerable: false,
|
|
59109
59556
|
configurable: true
|
|
@@ -60164,7 +60611,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60164
60611
|
_this.onPopupVisibleChanged.add(function (_, opt) {
|
|
60165
60612
|
if (opt.visible) {
|
|
60166
60613
|
_this.onScrollCallback = function () {
|
|
60167
|
-
opt.popup.
|
|
60614
|
+
opt.popup.hide();
|
|
60168
60615
|
};
|
|
60169
60616
|
}
|
|
60170
60617
|
else {
|
|
@@ -60204,10 +60651,12 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
60204
60651
|
component: "sv-progress-requiredquestions",
|
|
60205
60652
|
data: _this
|
|
60206
60653
|
});
|
|
60654
|
+
var tocModel = new _surveyToc__WEBPACK_IMPORTED_MODULE_24__["TOCModel"](_this);
|
|
60207
60655
|
_this.addLayoutElement({
|
|
60208
60656
|
id: "toc-navigation",
|
|
60209
60657
|
component: "sv-navigation-toc",
|
|
60210
|
-
data:
|
|
60658
|
+
data: tocModel,
|
|
60659
|
+
processResponsiveness: function (width) { return tocModel.updateStickyTOCSize(_this.rootElement); }
|
|
60211
60660
|
});
|
|
60212
60661
|
_this.layoutElements.push({
|
|
60213
60662
|
id: "buttons-navigation",
|
|
@@ -63472,7 +63921,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
63472
63921
|
if (this.isValidateOnComplete) {
|
|
63473
63922
|
if (!this.isLastPage)
|
|
63474
63923
|
return false;
|
|
63475
|
-
return this.validate(true,
|
|
63924
|
+
return this.validate(true, this.focusOnFirstError, func, true) !== true && !skipValidation;
|
|
63476
63925
|
}
|
|
63477
63926
|
return this.validateCurrentPage(func) !== true && !skipValidation;
|
|
63478
63927
|
};
|
|
@@ -63604,25 +64053,27 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
63604
64053
|
* @see validateCurrentPage
|
|
63605
64054
|
* @see validatePage
|
|
63606
64055
|
*/
|
|
63607
|
-
SurveyModel.prototype.validate = function (fireCallback, focusOnFirstError, onAsyncValidation) {
|
|
64056
|
+
SurveyModel.prototype.validate = function (fireCallback, focusOnFirstError, onAsyncValidation, changeCurrentPage) {
|
|
63608
64057
|
if (fireCallback === void 0) { fireCallback = true; }
|
|
63609
64058
|
if (focusOnFirstError === void 0) { focusOnFirstError = false; }
|
|
63610
64059
|
if (!!onAsyncValidation) {
|
|
63611
64060
|
fireCallback = true;
|
|
63612
64061
|
}
|
|
63613
64062
|
var visPages = this.visiblePages;
|
|
63614
|
-
var firstErrorPage = null;
|
|
63615
64063
|
var res = true;
|
|
63616
|
-
var rec = { fireCallback: fireCallback,
|
|
64064
|
+
var rec = { fireCallback: fireCallback, focusOnFirstError: focusOnFirstError, firstErrorQuestion: null, result: false };
|
|
63617
64065
|
for (var i = 0; i < visPages.length; i++) {
|
|
63618
64066
|
if (!visPages[i].validate(fireCallback, focusOnFirstError, rec)) {
|
|
63619
|
-
if (!firstErrorPage)
|
|
63620
|
-
firstErrorPage = visPages[i];
|
|
63621
64067
|
res = false;
|
|
63622
64068
|
}
|
|
63623
64069
|
}
|
|
63624
|
-
if (
|
|
63625
|
-
|
|
64070
|
+
if (!!rec.firstErrorQuestion && (focusOnFirstError || changeCurrentPage)) {
|
|
64071
|
+
if (focusOnFirstError) {
|
|
64072
|
+
rec.firstErrorQuestion.focus(true);
|
|
64073
|
+
}
|
|
64074
|
+
else {
|
|
64075
|
+
this.currentPage = rec.firstErrorQuestion.page;
|
|
64076
|
+
}
|
|
63626
64077
|
}
|
|
63627
64078
|
if (!res || !onAsyncValidation)
|
|
63628
64079
|
return res;
|
|
@@ -64949,7 +65400,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
64949
65400
|
this.onGetMatrixRowActions.fire(this, options);
|
|
64950
65401
|
return options.actions;
|
|
64951
65402
|
};
|
|
64952
|
-
SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible) {
|
|
65403
|
+
SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible, scrollIntoViewOptions) {
|
|
64953
65404
|
var options = {
|
|
64954
65405
|
element: element,
|
|
64955
65406
|
question: question,
|
|
@@ -64959,7 +65410,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
64959
65410
|
};
|
|
64960
65411
|
this.onScrollingElementToTop.fire(this, options);
|
|
64961
65412
|
if (!options.cancel) {
|
|
64962
|
-
_survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].ScrollElementToTop(options.elementId, scrollIfVisible);
|
|
65413
|
+
_survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions);
|
|
64963
65414
|
}
|
|
64964
65415
|
};
|
|
64965
65416
|
/**
|
|
@@ -65611,6 +66062,12 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
65611
66062
|
}
|
|
65612
66063
|
this.isTriggerIsRunning = false;
|
|
65613
66064
|
};
|
|
66065
|
+
SurveyModel.prototype.checkTriggersAndRunConditions = function (name, newValue, oldValue) {
|
|
66066
|
+
var triggerKeys = {};
|
|
66067
|
+
triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
|
|
66068
|
+
this.runConditionOnValueChanged(name, newValue);
|
|
66069
|
+
this.checkTriggers(triggerKeys, false, false, name);
|
|
66070
|
+
};
|
|
65614
66071
|
Object.defineProperty(SurveyModel.prototype, "hasRequiredValidQuestionTrigger", {
|
|
65615
66072
|
get: function () {
|
|
65616
66073
|
for (var i = 0; i < this.triggers.length; i++) {
|
|
@@ -66168,10 +66625,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
66168
66625
|
this.variablesHash[name] = newValue;
|
|
66169
66626
|
this.notifyElementsOnAnyValueOrVariableChanged(name);
|
|
66170
66627
|
if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(oldValue, newValue)) {
|
|
66171
|
-
this.
|
|
66172
|
-
var triggerKeys = {};
|
|
66173
|
-
triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
|
|
66174
|
-
this.checkTriggers(triggerKeys, false, false, name);
|
|
66628
|
+
this.checkTriggersAndRunConditions(name, newValue, oldValue);
|
|
66175
66629
|
this.onVariableChanged.fire(this, { name: name, value: newValue });
|
|
66176
66630
|
}
|
|
66177
66631
|
};
|
|
@@ -66260,10 +66714,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
66260
66714
|
if (locNotification === true || this.isDisposed || this.isRunningElementsBindings)
|
|
66261
66715
|
return;
|
|
66262
66716
|
questionName = questionName || name;
|
|
66263
|
-
|
|
66264
|
-
triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
|
|
66265
|
-
this.runConditionOnValueChanged(name, newValue);
|
|
66266
|
-
this.checkTriggers(triggerKeys, false, false, name);
|
|
66717
|
+
this.checkTriggersAndRunConditions(name, newValue, oldValue);
|
|
66267
66718
|
if (allowNotifyValueChanged)
|
|
66268
66719
|
this.notifyQuestionOnValueChanged(name, newValue, questionName);
|
|
66269
66720
|
if (locNotification !== "text") {
|
|
@@ -66396,7 +66847,7 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
|
66396
66847
|
}
|
|
66397
66848
|
}
|
|
66398
66849
|
if (!locNotification) {
|
|
66399
|
-
this.
|
|
66850
|
+
this.checkTriggersAndRunConditions(name, this.getValue(name), undefined);
|
|
66400
66851
|
}
|
|
66401
66852
|
if (locNotification !== "text") {
|
|
66402
66853
|
this.tryGoNextPageAutomatic(name);
|
|
@@ -68389,14 +68840,21 @@ function createTOCListModel(survey, onAction) {
|
|
|
68389
68840
|
visible: new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return page.isVisible && !(page["isStartPage"]); })
|
|
68390
68841
|
});
|
|
68391
68842
|
});
|
|
68392
|
-
var
|
|
68393
|
-
|
|
68394
|
-
|
|
68395
|
-
|
|
68396
|
-
|
|
68843
|
+
var selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0] || items.filter(function (i) { return i.id === pagesSource[0].name; })[0];
|
|
68844
|
+
var listOptions = {
|
|
68845
|
+
items: items,
|
|
68846
|
+
onSelectionChanged: function (item) {
|
|
68847
|
+
if (!!item.action()) {
|
|
68848
|
+
listModel.selectedItem = item;
|
|
68849
|
+
}
|
|
68850
|
+
},
|
|
68851
|
+
allowSelection: true,
|
|
68852
|
+
searchEnabled: false,
|
|
68853
|
+
locOwner: survey,
|
|
68854
|
+
selectedItem: selectedItem
|
|
68855
|
+
};
|
|
68856
|
+
var listModel = new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](listOptions);
|
|
68397
68857
|
listModel.allowSelection = false;
|
|
68398
|
-
listModel.locOwner = survey;
|
|
68399
|
-
listModel.searchEnabled = false;
|
|
68400
68858
|
survey.onCurrentPageChanged.add(function (s, o) {
|
|
68401
68859
|
listModel.selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0];
|
|
68402
68860
|
});
|
|
@@ -68404,10 +68862,15 @@ function createTOCListModel(survey, onAction) {
|
|
|
68404
68862
|
}
|
|
68405
68863
|
function getTocRootCss(survey, isMobile) {
|
|
68406
68864
|
if (isMobile === void 0) { isMobile = false; }
|
|
68865
|
+
var rootCss = TOCModel.RootStyle;
|
|
68407
68866
|
if (isMobile) {
|
|
68408
|
-
return "
|
|
68867
|
+
return rootCss + " " + TOCModel.RootStyle + "--mobile";
|
|
68868
|
+
}
|
|
68869
|
+
rootCss += (" " + TOCModel.RootStyle + "--" + (survey.tocLocation || "").toLowerCase());
|
|
68870
|
+
if (TOCModel.StickyPosition) {
|
|
68871
|
+
rootCss += " " + TOCModel.RootStyle + "--sticky";
|
|
68409
68872
|
}
|
|
68410
|
-
return
|
|
68873
|
+
return rootCss;
|
|
68411
68874
|
}
|
|
68412
68875
|
var TOCModel = /** @class */ (function () {
|
|
68413
68876
|
function TOCModel(survey) {
|
|
@@ -68421,7 +68884,37 @@ var TOCModel = /** @class */ (function () {
|
|
|
68421
68884
|
this.popupModel = new _popup__WEBPACK_IMPORTED_MODULE_5__["PopupModel"]("sv-list", { model: this.listModel });
|
|
68422
68885
|
this.popupModel.overlayDisplayMode = "overlay";
|
|
68423
68886
|
this.popupModel.displayMode = new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.isMobile ? "overlay" : "popup"; });
|
|
68887
|
+
if (TOCModel.StickyPosition) {
|
|
68888
|
+
survey.onAfterRenderSurvey.add(function (s, o) { return _this.initStickyTOCSubscriptions(o.htmlElement); });
|
|
68889
|
+
this.initStickyTOCSubscriptions(survey.rootElement);
|
|
68890
|
+
}
|
|
68424
68891
|
}
|
|
68892
|
+
TOCModel.prototype.initStickyTOCSubscriptions = function (rootElement) {
|
|
68893
|
+
var _this = this;
|
|
68894
|
+
if (TOCModel.StickyPosition && !!rootElement) {
|
|
68895
|
+
rootElement.addEventListener("scroll", function (event) {
|
|
68896
|
+
_this.updateStickyTOCSize(rootElement);
|
|
68897
|
+
});
|
|
68898
|
+
this.updateStickyTOCSize(rootElement);
|
|
68899
|
+
}
|
|
68900
|
+
};
|
|
68901
|
+
TOCModel.prototype.updateStickyTOCSize = function (rootElement) {
|
|
68902
|
+
if (!rootElement) {
|
|
68903
|
+
return;
|
|
68904
|
+
}
|
|
68905
|
+
var tocRootElement = rootElement.querySelector("." + TOCModel.RootStyle);
|
|
68906
|
+
if (!!tocRootElement) {
|
|
68907
|
+
tocRootElement.style.height = "";
|
|
68908
|
+
if (!this.isMobile && TOCModel.StickyPosition && !!rootElement) {
|
|
68909
|
+
var rootHeight = rootElement.getBoundingClientRect().height;
|
|
68910
|
+
var titleSelector = this.survey.headerView === "advanced" ? ".sv-header" : ".sv_custom_header+div div." + (this.survey.css.title || "sd-title");
|
|
68911
|
+
var titleElement = rootElement.querySelector(titleSelector);
|
|
68912
|
+
var titleElementHeight = titleElement ? titleElement.getBoundingClientRect().height : 0;
|
|
68913
|
+
var scrollCompensationHeight = rootElement.scrollTop > titleElementHeight ? 0 : titleElementHeight - rootElement.scrollTop;
|
|
68914
|
+
tocRootElement.style.height = (rootHeight - scrollCompensationHeight - 2) + "px";
|
|
68915
|
+
}
|
|
68916
|
+
}
|
|
68917
|
+
};
|
|
68425
68918
|
Object.defineProperty(TOCModel.prototype, "isMobile", {
|
|
68426
68919
|
get: function () {
|
|
68427
68920
|
return this.survey.isMobile;
|
|
@@ -68440,6 +68933,8 @@ var TOCModel = /** @class */ (function () {
|
|
|
68440
68933
|
this.popupModel.dispose();
|
|
68441
68934
|
this.listModel.dispose();
|
|
68442
68935
|
};
|
|
68936
|
+
TOCModel.RootStyle = "sv_progress-toc";
|
|
68937
|
+
TOCModel.StickyPosition = true;
|
|
68443
68938
|
return TOCModel;
|
|
68444
68939
|
}());
|
|
68445
68940
|
|
|
@@ -69550,8 +70045,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
69550
70045
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return AnimationBoolean; });
|
|
69551
70046
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return AnimationGroup; });
|
|
69552
70047
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationTab", function() { return AnimationTab; });
|
|
69553
|
-
/* harmony import */ var
|
|
69554
|
-
/* harmony import */ var
|
|
70048
|
+
/* harmony import */ var _taskmanager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./taskmanager */ "./src/utils/taskmanager.ts");
|
|
70049
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./src/utils/utils.ts");
|
|
70050
|
+
/* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
|
|
69555
70051
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
69556
70052
|
var extendStatics = function (d, b) {
|
|
69557
70053
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -69569,6 +70065,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
|
69569
70065
|
})();
|
|
69570
70066
|
|
|
69571
70067
|
|
|
70068
|
+
|
|
69572
70069
|
var AnimationUtils = /** @class */ (function () {
|
|
69573
70070
|
function AnimationUtils() {
|
|
69574
70071
|
this.cancelQueue = [];
|
|
@@ -69612,7 +70109,7 @@ var AnimationUtils = /** @class */ (function () {
|
|
|
69612
70109
|
var animationsCount = this.getAnimationsCount(element);
|
|
69613
70110
|
var onEndCallback = function (isCancel) {
|
|
69614
70111
|
if (isCancel === void 0) { isCancel = true; }
|
|
69615
|
-
|
|
70112
|
+
_this.afterAnimationRun(element, options);
|
|
69616
70113
|
callback(isCancel);
|
|
69617
70114
|
clearTimeout(cancelTimeout);
|
|
69618
70115
|
_this.removeCancelCallback(onEndCallback);
|
|
@@ -69631,9 +70128,15 @@ var AnimationUtils = /** @class */ (function () {
|
|
|
69631
70128
|
}, this.getAnimationDuration(element) + 10);
|
|
69632
70129
|
}
|
|
69633
70130
|
else {
|
|
70131
|
+
this.afterAnimationRun(element, options);
|
|
69634
70132
|
callback(true);
|
|
69635
70133
|
}
|
|
69636
70134
|
};
|
|
70135
|
+
AnimationUtils.prototype.afterAnimationRun = function (element, options) {
|
|
70136
|
+
if (element && options) {
|
|
70137
|
+
options.onAfterRunAnimation && options.onAfterRunAnimation(element);
|
|
70138
|
+
}
|
|
70139
|
+
};
|
|
69637
70140
|
AnimationUtils.prototype.beforeAnimationRun = function (element, options) {
|
|
69638
70141
|
if (element && options) {
|
|
69639
70142
|
options.onBeforeRunAnimation && options.onBeforeRunAnimation(element);
|
|
@@ -69643,7 +70146,7 @@ var AnimationUtils = /** @class */ (function () {
|
|
|
69643
70146
|
return options.cssClass.replace(/\s+$/, "").split(/\s+/);
|
|
69644
70147
|
};
|
|
69645
70148
|
AnimationUtils.prototype.runAnimation = function (element, options, callback) {
|
|
69646
|
-
if (element && options.cssClass) {
|
|
70149
|
+
if (element && (options === null || options === void 0 ? void 0 : options.cssClass)) {
|
|
69647
70150
|
this.reflow(element);
|
|
69648
70151
|
this.getCssClasses(options).forEach(function (cssClass) {
|
|
69649
70152
|
element.classList.add(cssClass);
|
|
@@ -69661,30 +70164,24 @@ var AnimationUtils = /** @class */ (function () {
|
|
|
69661
70164
|
});
|
|
69662
70165
|
}
|
|
69663
70166
|
};
|
|
69664
|
-
AnimationUtils.prototype.onNextRender = function (callback,
|
|
70167
|
+
AnimationUtils.prototype.onNextRender = function (callback, isCancel) {
|
|
69665
70168
|
var _this = this;
|
|
69666
70169
|
if (isCancel === void 0) { isCancel = false; }
|
|
69667
|
-
if (!isCancel &&
|
|
70170
|
+
if (!isCancel && _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].isAvailable()) {
|
|
69668
70171
|
var cancelCallback_1 = function () {
|
|
69669
|
-
callback();
|
|
70172
|
+
callback(true);
|
|
69670
70173
|
cancelAnimationFrame(latestRAF_1);
|
|
69671
70174
|
};
|
|
69672
|
-
var latestRAF_1 =
|
|
69673
|
-
|
|
69674
|
-
callback();
|
|
70175
|
+
var latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].requestAnimationFrame(function () {
|
|
70176
|
+
latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].requestAnimationFrame(function () {
|
|
70177
|
+
callback(false);
|
|
69675
70178
|
_this.removeCancelCallback(cancelCallback_1);
|
|
69676
|
-
}
|
|
69677
|
-
else {
|
|
69678
|
-
latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
|
|
69679
|
-
callback();
|
|
69680
|
-
_this.removeCancelCallback(cancelCallback_1);
|
|
69681
|
-
});
|
|
69682
|
-
}
|
|
70179
|
+
});
|
|
69683
70180
|
});
|
|
69684
70181
|
this.addCancelCallback(cancelCallback_1);
|
|
69685
70182
|
}
|
|
69686
70183
|
else {
|
|
69687
|
-
callback();
|
|
70184
|
+
callback(true);
|
|
69688
70185
|
}
|
|
69689
70186
|
};
|
|
69690
70187
|
AnimationUtils.prototype.cancel = function () {
|
|
@@ -69702,25 +70199,23 @@ var AnimationPropertyUtils = /** @class */ (function (_super) {
|
|
|
69702
70199
|
}
|
|
69703
70200
|
AnimationPropertyUtils.prototype.onEnter = function (options) {
|
|
69704
70201
|
var _this = this;
|
|
69705
|
-
|
|
69706
|
-
|
|
69707
|
-
|
|
69708
|
-
|
|
69709
|
-
_this.
|
|
69710
|
-
|
|
69711
|
-
});
|
|
69712
|
-
}, function () { return !!options.getAnimatedElement(); });
|
|
70202
|
+
var htmlElement = options.getAnimatedElement();
|
|
70203
|
+
var enterOptions = options.getEnterOptions ? options.getEnterOptions() : {};
|
|
70204
|
+
this.beforeAnimationRun(htmlElement, enterOptions);
|
|
70205
|
+
this.runAnimation(htmlElement, enterOptions, function () {
|
|
70206
|
+
_this.clearHtmlElement(htmlElement, enterOptions);
|
|
70207
|
+
});
|
|
69713
70208
|
};
|
|
69714
70209
|
AnimationPropertyUtils.prototype.onLeave = function (options, callback) {
|
|
69715
70210
|
var _this = this;
|
|
69716
70211
|
var htmlElement = options.getAnimatedElement();
|
|
69717
|
-
var leaveOptions = options.getLeaveOptions();
|
|
70212
|
+
var leaveOptions = options.getLeaveOptions ? options.getLeaveOptions() : {};
|
|
69718
70213
|
this.beforeAnimationRun(htmlElement, leaveOptions);
|
|
69719
70214
|
this.runAnimation(htmlElement, leaveOptions, function (isCancel) {
|
|
69720
70215
|
callback();
|
|
69721
70216
|
_this.onNextRender(function () {
|
|
69722
70217
|
_this.clearHtmlElement(htmlElement, leaveOptions);
|
|
69723
|
-
},
|
|
70218
|
+
}, isCancel);
|
|
69724
70219
|
});
|
|
69725
70220
|
};
|
|
69726
70221
|
return AnimationPropertyUtils;
|
|
@@ -69731,40 +70226,54 @@ var AnimationGroupUtils = /** @class */ (function (_super) {
|
|
|
69731
70226
|
function AnimationGroupUtils() {
|
|
69732
70227
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
69733
70228
|
}
|
|
69734
|
-
AnimationGroupUtils.prototype.runGroupAnimation = function (options,
|
|
70229
|
+
AnimationGroupUtils.prototype.runGroupAnimation = function (options, addedItems, removedItems, reorderedItems, callback) {
|
|
69735
70230
|
var _this = this;
|
|
69736
|
-
|
|
69737
|
-
|
|
69738
|
-
|
|
69739
|
-
|
|
69740
|
-
|
|
69741
|
-
|
|
69742
|
-
|
|
69743
|
-
|
|
69744
|
-
|
|
69745
|
-
|
|
69746
|
-
|
|
69747
|
-
|
|
69748
|
-
|
|
69749
|
-
|
|
69750
|
-
|
|
69751
|
-
|
|
69752
|
-
|
|
69753
|
-
|
|
69754
|
-
|
|
69755
|
-
|
|
69756
|
-
|
|
69757
|
-
|
|
69758
|
-
|
|
69759
|
-
|
|
69760
|
-
|
|
69761
|
-
|
|
69762
|
-
|
|
69763
|
-
|
|
69764
|
-
|
|
69765
|
-
|
|
69766
|
-
|
|
69767
|
-
|
|
70231
|
+
var info = {
|
|
70232
|
+
isAddingRunning: addedItems.length > 0,
|
|
70233
|
+
isDeletingRunning: removedItems.length > 0,
|
|
70234
|
+
isReorderingRunning: reorderedItems.length > 0
|
|
70235
|
+
};
|
|
70236
|
+
var addedHtmlElements = addedItems.map(function (el) { return options.getAnimatedElement(el); });
|
|
70237
|
+
var enterOptions = addedItems.map(function (el) { return options.getEnterOptions ? options.getEnterOptions(el, info) : {}; });
|
|
70238
|
+
var removedHtmlElements = removedItems.map(function (el) { return options.getAnimatedElement(el); });
|
|
70239
|
+
var leaveOptions = removedItems.map(function (el) { return options.getLeaveOptions ? options.getLeaveOptions(el, info) : {}; });
|
|
70240
|
+
var reorderedHtmlElements = reorderedItems.map(function (el) { return options.getAnimatedElement(el.item); });
|
|
70241
|
+
var reorderedOptions = reorderedItems.map(function (el) { return options.getReorderOptions ? options.getReorderOptions(el.item, el.movedForward, info) : {}; });
|
|
70242
|
+
addedItems.forEach(function (_, i) {
|
|
70243
|
+
_this.beforeAnimationRun(addedHtmlElements[i], enterOptions[i]);
|
|
70244
|
+
});
|
|
70245
|
+
removedItems.forEach(function (_, i) {
|
|
70246
|
+
_this.beforeAnimationRun(removedHtmlElements[i], leaveOptions[i]);
|
|
70247
|
+
});
|
|
70248
|
+
reorderedItems.forEach(function (_, i) {
|
|
70249
|
+
_this.beforeAnimationRun(reorderedHtmlElements[i], reorderedOptions[i]);
|
|
70250
|
+
});
|
|
70251
|
+
var counter = addedItems.length + removedItems.length + reorderedHtmlElements.length;
|
|
70252
|
+
var onAnimationEndCallback = function (isCancel) {
|
|
70253
|
+
if (--counter <= 0) {
|
|
70254
|
+
callback && callback();
|
|
70255
|
+
_this.onNextRender(function () {
|
|
70256
|
+
addedItems.forEach(function (_, i) {
|
|
70257
|
+
_this.clearHtmlElement(addedHtmlElements[i], enterOptions[i]);
|
|
70258
|
+
});
|
|
70259
|
+
removedItems.forEach(function (_, i) {
|
|
70260
|
+
_this.clearHtmlElement(removedHtmlElements[i], leaveOptions[i]);
|
|
70261
|
+
});
|
|
70262
|
+
reorderedItems.forEach(function (_, i) {
|
|
70263
|
+
_this.clearHtmlElement(reorderedHtmlElements[i], reorderedOptions[i]);
|
|
70264
|
+
});
|
|
70265
|
+
}, isCancel);
|
|
70266
|
+
}
|
|
70267
|
+
};
|
|
70268
|
+
addedItems.forEach(function (_, i) {
|
|
70269
|
+
_this.runAnimation(addedHtmlElements[i], enterOptions[i], onAnimationEndCallback);
|
|
70270
|
+
});
|
|
70271
|
+
removedItems.forEach(function (_, i) {
|
|
70272
|
+
_this.runAnimation(removedHtmlElements[i], leaveOptions[i], onAnimationEndCallback);
|
|
70273
|
+
});
|
|
70274
|
+
reorderedItems.forEach(function (_, i) {
|
|
70275
|
+
_this.runAnimation(reorderedHtmlElements[i], reorderedOptions[i], onAnimationEndCallback);
|
|
70276
|
+
});
|
|
69768
70277
|
};
|
|
69769
70278
|
return AnimationGroupUtils;
|
|
69770
70279
|
}(AnimationUtils));
|
|
@@ -69775,11 +70284,51 @@ var AnimationProperty = /** @class */ (function () {
|
|
|
69775
70284
|
this.animationOptions = animationOptions;
|
|
69776
70285
|
this.update = update;
|
|
69777
70286
|
this.getCurrentValue = getCurrentValue;
|
|
69778
|
-
this._debouncedSync = Object(
|
|
70287
|
+
this._debouncedSync = Object(_taskmanager__WEBPACK_IMPORTED_MODULE_0__["debounce"])(function (newValue) {
|
|
69779
70288
|
_this.animation.cancel();
|
|
69780
|
-
|
|
70289
|
+
try {
|
|
70290
|
+
_this._sync(newValue);
|
|
70291
|
+
}
|
|
70292
|
+
catch (_a) {
|
|
70293
|
+
_this.update(newValue);
|
|
70294
|
+
}
|
|
69781
70295
|
});
|
|
69782
70296
|
}
|
|
70297
|
+
AnimationProperty.prototype.onNextRender = function (callback, onCancel) {
|
|
70298
|
+
var _this = this;
|
|
70299
|
+
var rerenderEvent = this.animationOptions.getRerenderEvent();
|
|
70300
|
+
if (!rerenderEvent) {
|
|
70301
|
+
if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].isAvailable()) {
|
|
70302
|
+
var raf_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].requestAnimationFrame(function () {
|
|
70303
|
+
callback();
|
|
70304
|
+
_this.cancelCallback = undefined;
|
|
70305
|
+
});
|
|
70306
|
+
this.cancelCallback = function () {
|
|
70307
|
+
onCancel && onCancel();
|
|
70308
|
+
cancelAnimationFrame(raf_1);
|
|
70309
|
+
_this.cancelCallback = undefined;
|
|
70310
|
+
};
|
|
70311
|
+
}
|
|
70312
|
+
else {
|
|
70313
|
+
throw new Error("Can't get next render");
|
|
70314
|
+
}
|
|
70315
|
+
}
|
|
70316
|
+
else {
|
|
70317
|
+
var clear_1 = function () {
|
|
70318
|
+
rerenderEvent.remove(nextRenderCallback_1);
|
|
70319
|
+
_this.cancelCallback = undefined;
|
|
70320
|
+
};
|
|
70321
|
+
var nextRenderCallback_1 = function () {
|
|
70322
|
+
callback();
|
|
70323
|
+
clear_1();
|
|
70324
|
+
};
|
|
70325
|
+
this.cancelCallback = function () {
|
|
70326
|
+
onCancel && onCancel();
|
|
70327
|
+
clear_1();
|
|
70328
|
+
};
|
|
70329
|
+
rerenderEvent.add(nextRenderCallback_1);
|
|
70330
|
+
}
|
|
70331
|
+
};
|
|
69783
70332
|
AnimationProperty.prototype.sync = function (newValue) {
|
|
69784
70333
|
if (this.animationOptions.isAnimationEnabled()) {
|
|
69785
70334
|
this._debouncedSync.run(newValue);
|
|
@@ -69790,8 +70339,9 @@ var AnimationProperty = /** @class */ (function () {
|
|
|
69790
70339
|
}
|
|
69791
70340
|
};
|
|
69792
70341
|
AnimationProperty.prototype.cancel = function () {
|
|
69793
|
-
this.animation.cancel();
|
|
69794
70342
|
this._debouncedSync.cancel();
|
|
70343
|
+
this.cancelCallback && this.cancelCallback();
|
|
70344
|
+
this.animation.cancel();
|
|
69795
70345
|
};
|
|
69796
70346
|
return AnimationProperty;
|
|
69797
70347
|
}());
|
|
@@ -69807,8 +70357,10 @@ var AnimationBoolean = /** @class */ (function (_super) {
|
|
|
69807
70357
|
var _this = this;
|
|
69808
70358
|
if (newValue !== this.getCurrentValue()) {
|
|
69809
70359
|
if (newValue) {
|
|
70360
|
+
this.onNextRender(function () {
|
|
70361
|
+
_this.animation.onEnter(_this.animationOptions);
|
|
70362
|
+
});
|
|
69810
70363
|
this.update(newValue);
|
|
69811
|
-
this.animation.onEnter(this.animationOptions);
|
|
69812
70364
|
}
|
|
69813
70365
|
else {
|
|
69814
70366
|
this.animation.onLeave(this.animationOptions, function () {
|
|
@@ -69832,15 +70384,34 @@ var AnimationGroup = /** @class */ (function (_super) {
|
|
|
69832
70384
|
}
|
|
69833
70385
|
AnimationGroup.prototype._sync = function (newValue) {
|
|
69834
70386
|
var _this = this;
|
|
70387
|
+
var _a, _b;
|
|
69835
70388
|
var oldValue = this.getCurrentValue();
|
|
69836
|
-
var
|
|
69837
|
-
var
|
|
69838
|
-
if (
|
|
69839
|
-
|
|
70389
|
+
var allowSyncRemovalAddition = (_a = this.animationOptions.allowSyncRemovalAddition) !== null && _a !== void 0 ? _a : true;
|
|
70390
|
+
var _c = Object(_utils__WEBPACK_IMPORTED_MODULE_1__["compareArrays"])(oldValue, newValue, (_b = this.animationOptions.getKey) !== null && _b !== void 0 ? _b : (function (item) { return item; })), addedItems = _c.addedItems, deletedItems = _c.deletedItems, reorderedItems = _c.reorderedItems, mergedItems = _c.mergedItems;
|
|
70391
|
+
if (!allowSyncRemovalAddition && (reorderedItems.length > 0 || addedItems.length > 0)) {
|
|
70392
|
+
deletedItems = [];
|
|
70393
|
+
mergedItems = newValue;
|
|
70394
|
+
}
|
|
70395
|
+
var runAnimationCallback = function () {
|
|
70396
|
+
_this.animation.runGroupAnimation(_this.animationOptions, addedItems, deletedItems, reorderedItems, function () {
|
|
70397
|
+
if (deletedItems.length > 0) {
|
|
70398
|
+
_this.update(newValue);
|
|
70399
|
+
}
|
|
70400
|
+
});
|
|
70401
|
+
};
|
|
70402
|
+
if ([addedItems, deletedItems, reorderedItems].some(function (arr) { return arr.length > 0; })) {
|
|
70403
|
+
if (deletedItems.length <= 0 || reorderedItems.length > 0 || addedItems.length > 0) {
|
|
70404
|
+
this.onNextRender(runAnimationCallback, function () {
|
|
70405
|
+
_this.update(newValue);
|
|
70406
|
+
});
|
|
70407
|
+
this.update(mergedItems);
|
|
70408
|
+
}
|
|
70409
|
+
else {
|
|
70410
|
+
runAnimationCallback();
|
|
70411
|
+
}
|
|
69840
70412
|
}
|
|
69841
70413
|
else {
|
|
69842
70414
|
this.update(newValue);
|
|
69843
|
-
this.animation.runGroupAnimation(this.animationOptions, itemsToAdd, []);
|
|
69844
70415
|
}
|
|
69845
70416
|
};
|
|
69846
70417
|
return AnimationGroup;
|
|
@@ -69859,10 +70430,12 @@ var AnimationTab = /** @class */ (function (_super) {
|
|
|
69859
70430
|
var oldValue = [].concat(this.getCurrentValue());
|
|
69860
70431
|
if (oldValue[0] !== newValue[0]) {
|
|
69861
70432
|
var tempValue = !!this.mergeValues ? this.mergeValues(newValue, oldValue) : [].concat(oldValue, newValue);
|
|
70433
|
+
this.onNextRender(function () {
|
|
70434
|
+
_this.animation.runGroupAnimation(_this.animationOptions, newValue, oldValue, [], function () {
|
|
70435
|
+
_this.update(newValue);
|
|
70436
|
+
});
|
|
70437
|
+
}, function () { return _this.update(newValue); });
|
|
69862
70438
|
this.update(tempValue, true);
|
|
69863
|
-
this.animation.runGroupAnimation(this.animationOptions, newValue, oldValue, function () {
|
|
69864
|
-
_this.update(newValue);
|
|
69865
|
-
});
|
|
69866
70439
|
}
|
|
69867
70440
|
else {
|
|
69868
70441
|
this.update(newValue);
|
|
@@ -70256,16 +70829,55 @@ var DragOrClickHelper = /** @class */ (function () {
|
|
|
70256
70829
|
/*!****************************!*\
|
|
70257
70830
|
!*** ./src/utils/popup.ts ***!
|
|
70258
70831
|
\****************************/
|
|
70259
|
-
/*! exports provided: PopupUtils */
|
|
70832
|
+
/*! exports provided: Rect, PopupUtils */
|
|
70260
70833
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
70261
70834
|
|
|
70262
70835
|
"use strict";
|
|
70263
70836
|
__webpack_require__.r(__webpack_exports__);
|
|
70837
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return Rect; });
|
|
70264
70838
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupUtils", function() { return PopupUtils; });
|
|
70839
|
+
var Rect = /** @class */ (function () {
|
|
70840
|
+
function Rect(x, y, width, height) {
|
|
70841
|
+
this.x = x;
|
|
70842
|
+
this.y = y;
|
|
70843
|
+
this.width = width;
|
|
70844
|
+
this.height = height;
|
|
70845
|
+
}
|
|
70846
|
+
Object.defineProperty(Rect.prototype, "left", {
|
|
70847
|
+
get: function () {
|
|
70848
|
+
return this.x;
|
|
70849
|
+
},
|
|
70850
|
+
enumerable: false,
|
|
70851
|
+
configurable: true
|
|
70852
|
+
});
|
|
70853
|
+
Object.defineProperty(Rect.prototype, "top", {
|
|
70854
|
+
get: function () {
|
|
70855
|
+
return this.y;
|
|
70856
|
+
},
|
|
70857
|
+
enumerable: false,
|
|
70858
|
+
configurable: true
|
|
70859
|
+
});
|
|
70860
|
+
Object.defineProperty(Rect.prototype, "right", {
|
|
70861
|
+
get: function () {
|
|
70862
|
+
return this.x + this.width;
|
|
70863
|
+
},
|
|
70864
|
+
enumerable: false,
|
|
70865
|
+
configurable: true
|
|
70866
|
+
});
|
|
70867
|
+
Object.defineProperty(Rect.prototype, "bottom", {
|
|
70868
|
+
get: function () {
|
|
70869
|
+
return this.y + this.height;
|
|
70870
|
+
},
|
|
70871
|
+
enumerable: false,
|
|
70872
|
+
configurable: true
|
|
70873
|
+
});
|
|
70874
|
+
return Rect;
|
|
70875
|
+
}());
|
|
70876
|
+
|
|
70265
70877
|
var PopupUtils = /** @class */ (function () {
|
|
70266
70878
|
function PopupUtils() {
|
|
70267
70879
|
}
|
|
70268
|
-
PopupUtils.calculatePosition = function (targetRect, height, width, verticalPosition, horizontalPosition,
|
|
70880
|
+
PopupUtils.calculatePosition = function (targetRect, height, width, verticalPosition, horizontalPosition, positionMode) {
|
|
70269
70881
|
if (positionMode === void 0) { positionMode = "flex"; }
|
|
70270
70882
|
var currentLeft = targetRect.left;
|
|
70271
70883
|
var currentTop = targetRect.top;
|
|
@@ -70283,29 +70895,33 @@ var PopupUtils = /** @class */ (function () {
|
|
|
70283
70895
|
currentTop = targetRect.top - height;
|
|
70284
70896
|
else
|
|
70285
70897
|
currentTop = targetRect.bottom;
|
|
70286
|
-
if (
|
|
70287
|
-
if (
|
|
70288
|
-
|
|
70289
|
-
|
|
70290
|
-
|
|
70291
|
-
|
|
70292
|
-
currentTop = currentTop - targetRect.height;
|
|
70293
|
-
}
|
|
70898
|
+
if (horizontalPosition != "center" && verticalPosition != "middle") {
|
|
70899
|
+
if (verticalPosition == "top") {
|
|
70900
|
+
currentTop = currentTop + targetRect.height;
|
|
70901
|
+
}
|
|
70902
|
+
else {
|
|
70903
|
+
currentTop = currentTop - targetRect.height;
|
|
70294
70904
|
}
|
|
70295
70905
|
}
|
|
70296
70906
|
return { left: Math.round(currentLeft), top: Math.round(currentTop) };
|
|
70297
70907
|
};
|
|
70298
|
-
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition) {
|
|
70908
|
+
PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition, canShrink) {
|
|
70909
|
+
if (canShrink === void 0) { canShrink = true; }
|
|
70299
70910
|
var result;
|
|
70911
|
+
var maxHeight = windowHeight - PopupUtils.bottomIndent;
|
|
70300
70912
|
if (verticalPosition === "top") {
|
|
70301
70913
|
result = { height: height, top: top };
|
|
70302
70914
|
}
|
|
70303
70915
|
if (top < 0) {
|
|
70304
|
-
result = { height: height + top, top: 0 };
|
|
70916
|
+
result = { height: canShrink ? height + top : height, top: 0 };
|
|
70305
70917
|
}
|
|
70306
70918
|
else if (height + top > windowHeight) {
|
|
70307
|
-
var newHeight = Math.min(height,
|
|
70308
|
-
result = { height: newHeight, top: top };
|
|
70919
|
+
var newHeight = Math.min(height, maxHeight - top);
|
|
70920
|
+
result = { height: canShrink ? newHeight : height, top: canShrink ? top : top - (height - newHeight) };
|
|
70921
|
+
}
|
|
70922
|
+
if (result) {
|
|
70923
|
+
result.height = Math.min(result.height, maxHeight);
|
|
70924
|
+
result.top = Math.max(result.top, 0);
|
|
70309
70925
|
}
|
|
70310
70926
|
return result;
|
|
70311
70927
|
};
|
|
@@ -70346,18 +70962,15 @@ var PopupUtils = /** @class */ (function () {
|
|
|
70346
70962
|
}
|
|
70347
70963
|
return { width: newWidth - margins.left - margins.right, left: newLeft };
|
|
70348
70964
|
};
|
|
70349
|
-
PopupUtils.updateVerticalPosition = function (targetRect, height,
|
|
70350
|
-
|
|
70351
|
-
|
|
70352
|
-
|
|
70353
|
-
|
|
70354
|
-
windowHeight;
|
|
70965
|
+
PopupUtils.updateVerticalPosition = function (targetRect, height, horizontalPosition, verticalPosition, windowHeight) {
|
|
70966
|
+
if (verticalPosition === "middle")
|
|
70967
|
+
return verticalPosition;
|
|
70968
|
+
var deltaTop = height - (targetRect.top + (horizontalPosition !== "center" ? targetRect.height : 0));
|
|
70969
|
+
var deltaBottom = height + targetRect.bottom - (horizontalPosition !== "center" ? targetRect.height : 0) - windowHeight;
|
|
70355
70970
|
if (deltaTop > 0 && deltaBottom <= 0 && verticalPosition == "top") {
|
|
70356
70971
|
verticalPosition = "bottom";
|
|
70357
70972
|
}
|
|
70358
|
-
else if (deltaBottom > 0 &&
|
|
70359
|
-
deltaTop <= 0 &&
|
|
70360
|
-
verticalPosition == "bottom") {
|
|
70973
|
+
else if (deltaBottom > 0 && deltaTop <= 0 && verticalPosition == "bottom") {
|
|
70361
70974
|
verticalPosition = "top";
|
|
70362
70975
|
}
|
|
70363
70976
|
else if (deltaBottom > 0 && deltaTop > 0) {
|
|
@@ -70365,6 +70978,22 @@ var PopupUtils = /** @class */ (function () {
|
|
|
70365
70978
|
}
|
|
70366
70979
|
return verticalPosition;
|
|
70367
70980
|
};
|
|
70981
|
+
PopupUtils.updateHorizontalPosition = function (targetRect, width, horizontalPosition, windowWidth) {
|
|
70982
|
+
if (horizontalPosition === "center")
|
|
70983
|
+
return horizontalPosition;
|
|
70984
|
+
var deltaLeft = width - targetRect.left;
|
|
70985
|
+
var deltaRight = width + targetRect.right - windowWidth;
|
|
70986
|
+
if (deltaLeft > 0 && deltaRight <= 0 && horizontalPosition == "left") {
|
|
70987
|
+
horizontalPosition = "right";
|
|
70988
|
+
}
|
|
70989
|
+
else if (deltaRight > 0 && deltaLeft <= 0 && horizontalPosition == "right") {
|
|
70990
|
+
horizontalPosition = "left";
|
|
70991
|
+
}
|
|
70992
|
+
else if (deltaRight > 0 && deltaLeft > 0) {
|
|
70993
|
+
horizontalPosition = deltaLeft < deltaRight ? "left" : "right";
|
|
70994
|
+
}
|
|
70995
|
+
return horizontalPosition;
|
|
70996
|
+
};
|
|
70368
70997
|
PopupUtils.calculatePopupDirection = function (verticalPosition, horizontalPosition) {
|
|
70369
70998
|
var popupDirection;
|
|
70370
70999
|
if (horizontalPosition == "center" && verticalPosition != "middle") {
|
|
@@ -70729,7 +71358,7 @@ function debounce(func) {
|
|
|
70729
71358
|
/*!****************************!*\
|
|
70730
71359
|
!*** ./src/utils/utils.ts ***!
|
|
70731
71360
|
\****************************/
|
|
70732
|
-
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles */
|
|
71361
|
+
/*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, compareArrays, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles */
|
|
70733
71362
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
70734
71363
|
|
|
70735
71364
|
"use strict";
|
|
@@ -70744,6 +71373,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70744
71373
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
|
|
70745
71374
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
|
|
70746
71375
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
|
|
71376
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareArrays", function() { return compareArrays; });
|
|
70747
71377
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
|
|
70748
71378
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
|
|
70749
71379
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
|
|
@@ -71064,6 +71694,8 @@ function preventDefaults(event) {
|
|
|
71064
71694
|
event.stopPropagation();
|
|
71065
71695
|
}
|
|
71066
71696
|
function classesToSelector(str) {
|
|
71697
|
+
if (!str)
|
|
71698
|
+
return str;
|
|
71067
71699
|
var re = /\s*?([\w-]+)\s*?/g;
|
|
71068
71700
|
return str.replace(re, ".$1");
|
|
71069
71701
|
}
|
|
@@ -71212,6 +71844,100 @@ function chooseFiles(input, callback) {
|
|
|
71212
71844
|
};
|
|
71213
71845
|
input.click();
|
|
71214
71846
|
}
|
|
71847
|
+
function compareArrays(oldValue, newValue, getKey) {
|
|
71848
|
+
var oldItemsMap = new Map();
|
|
71849
|
+
var newItemsMap = new Map();
|
|
71850
|
+
var commonItemsInNewMap = new Map();
|
|
71851
|
+
var commonItemsInOldMap = new Map();
|
|
71852
|
+
oldValue.forEach(function (item) {
|
|
71853
|
+
var itemKey = getKey(item);
|
|
71854
|
+
if (!oldItemsMap.has(itemKey)) {
|
|
71855
|
+
oldItemsMap.set(getKey(item), item);
|
|
71856
|
+
}
|
|
71857
|
+
else {
|
|
71858
|
+
//if keys are set incorrectly do not process comparing
|
|
71859
|
+
throw new Error("keys must be unique");
|
|
71860
|
+
}
|
|
71861
|
+
});
|
|
71862
|
+
newValue.forEach(function (item) {
|
|
71863
|
+
var itemKey = getKey(item);
|
|
71864
|
+
if (!newItemsMap.has(itemKey)) {
|
|
71865
|
+
newItemsMap.set(itemKey, item);
|
|
71866
|
+
}
|
|
71867
|
+
else {
|
|
71868
|
+
//if keys are set incorrectly do not process comparing
|
|
71869
|
+
throw new Error("keys must be unique");
|
|
71870
|
+
}
|
|
71871
|
+
});
|
|
71872
|
+
var addedItems = [];
|
|
71873
|
+
var deletedItems = [];
|
|
71874
|
+
//calculating addedItems and items that exist in both arrays
|
|
71875
|
+
newItemsMap.forEach(function (item, key) {
|
|
71876
|
+
if (!oldItemsMap.has(key)) {
|
|
71877
|
+
addedItems.push(item);
|
|
71878
|
+
}
|
|
71879
|
+
else {
|
|
71880
|
+
commonItemsInNewMap.set(key, commonItemsInNewMap.size);
|
|
71881
|
+
}
|
|
71882
|
+
});
|
|
71883
|
+
//calculating deletedItems and items that exist in both arrays
|
|
71884
|
+
oldItemsMap.forEach(function (item, key) {
|
|
71885
|
+
if (!newItemsMap.has(key)) {
|
|
71886
|
+
deletedItems.push(item);
|
|
71887
|
+
}
|
|
71888
|
+
else {
|
|
71889
|
+
commonItemsInOldMap.set(key, commonItemsInOldMap.size);
|
|
71890
|
+
}
|
|
71891
|
+
});
|
|
71892
|
+
//calculating reordered items
|
|
71893
|
+
var reorderedItems = [];
|
|
71894
|
+
commonItemsInNewMap.forEach(function (index, key) {
|
|
71895
|
+
var oldIndex = commonItemsInOldMap.get(key);
|
|
71896
|
+
var item = newItemsMap.get(key);
|
|
71897
|
+
if (oldIndex !== index)
|
|
71898
|
+
reorderedItems.push({ item: item, movedForward: oldIndex < index });
|
|
71899
|
+
});
|
|
71900
|
+
//calculating merged array if multiple operations are applied at once
|
|
71901
|
+
var oldItemsWithCorrectOrder = new Array(oldValue.length);
|
|
71902
|
+
var commonItemsIndex = 0;
|
|
71903
|
+
var commonItemsKeysOrder = Array.from(commonItemsInNewMap.keys());
|
|
71904
|
+
oldValue.forEach(function (item, index) {
|
|
71905
|
+
if (commonItemsInNewMap.has(getKey(item))) {
|
|
71906
|
+
oldItemsWithCorrectOrder[index] = newItemsMap.get(commonItemsKeysOrder[commonItemsIndex]);
|
|
71907
|
+
commonItemsIndex++;
|
|
71908
|
+
}
|
|
71909
|
+
else {
|
|
71910
|
+
oldItemsWithCorrectOrder[index] = item;
|
|
71911
|
+
}
|
|
71912
|
+
});
|
|
71913
|
+
var valuesToInsertBeforeKey = new Map();
|
|
71914
|
+
var tempValuesArray = [];
|
|
71915
|
+
oldItemsWithCorrectOrder.forEach(function (item) {
|
|
71916
|
+
var itemKey = getKey(item);
|
|
71917
|
+
if (newItemsMap.has(itemKey)) {
|
|
71918
|
+
if (tempValuesArray.length > 0) {
|
|
71919
|
+
valuesToInsertBeforeKey.set(itemKey, tempValuesArray);
|
|
71920
|
+
tempValuesArray = [];
|
|
71921
|
+
}
|
|
71922
|
+
}
|
|
71923
|
+
else {
|
|
71924
|
+
tempValuesArray.push(item);
|
|
71925
|
+
}
|
|
71926
|
+
});
|
|
71927
|
+
var mergedItems = new Array();
|
|
71928
|
+
newItemsMap.forEach(function (item, key) {
|
|
71929
|
+
if (valuesToInsertBeforeKey.has(key)) {
|
|
71930
|
+
valuesToInsertBeforeKey.get(key).forEach(function (item) {
|
|
71931
|
+
mergedItems.push(item);
|
|
71932
|
+
});
|
|
71933
|
+
}
|
|
71934
|
+
mergedItems.push(item);
|
|
71935
|
+
});
|
|
71936
|
+
tempValuesArray.forEach(function (item) {
|
|
71937
|
+
mergedItems.push(item);
|
|
71938
|
+
});
|
|
71939
|
+
return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
|
|
71940
|
+
}
|
|
71215
71941
|
|
|
71216
71942
|
|
|
71217
71943
|
|