survey-react 1.10.6 → 1.11.2

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/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.10.6
2
+ * surveyjs - Survey JavaScript library v1.11.2
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
  */
@@ -726,6 +726,11 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
726
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;
727
727
  return c > 3 && r && Object.defineProperty(target, key, r), r;
728
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
+ };
729
734
 
730
735
 
731
736
 
@@ -748,7 +753,9 @@ function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOpti
748
753
  if (newAction.hasTitle) {
749
754
  newAction.title = item.title;
750
755
  }
751
- originalSelectionChanged(item, params);
756
+ if (originalSelectionChanged) {
757
+ originalSelectionChanged(item, params);
758
+ }
752
759
  };
753
760
  var popupModel = createPopupModelWithListModel(listOptions, popupOptions);
754
761
  var newActionOptions = Object.assign({}, actionOptions, {
@@ -767,7 +774,9 @@ function createDropdownActionModelAdvanced(actionOptions, listOptions, popupOpti
767
774
  function createPopupModelWithListModel(listOptions, popupOptions) {
768
775
  var listModel = new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](listOptions);
769
776
  listModel.onSelectionChanged = function (item) {
770
- listOptions.onSelectionChanged(item);
777
+ if (listOptions.onSelectionChanged) {
778
+ listOptions.onSelectionChanged(item);
779
+ }
771
780
  popupModel.hide();
772
781
  };
773
782
  var _popupOptions = popupOptions || {};
@@ -789,6 +798,7 @@ var BaseAction = /** @class */ (function (_super) {
789
798
  function BaseAction() {
790
799
  var _this = _super !== null && _super.apply(this, arguments) || this;
791
800
  _this.rendredIdValue = BaseAction.getNextRendredId();
801
+ _this.markerIconSize = 16;
792
802
  return _this;
793
803
  }
794
804
  BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
@@ -932,6 +942,46 @@ var BaseAction = /** @class */ (function (_super) {
932
942
  }
933
943
  return args.isTrusted;
934
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
+ };
935
985
  BaseAction.renderedId = 1;
936
986
  __decorate([
937
987
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
@@ -993,9 +1043,21 @@ var BaseAction = /** @class */ (function (_super) {
993
1043
  __decorate([
994
1044
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: 24 })
995
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);
996
1052
  __decorate([
997
1053
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
998
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);
999
1061
  return BaseAction;
1000
1062
  }(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));
1001
1063
 
@@ -1033,6 +1095,14 @@ var Action = /** @class */ (function (_super) {
1033
1095
  Action.prototype.createLocTitle = function () {
1034
1096
  return this.createLocalizableString("title", this, true);
1035
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
+ };
1036
1106
  Action.prototype.getLocTitle = function () {
1037
1107
  return this.locTitleValue;
1038
1108
  };
@@ -1249,9 +1319,6 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
1249
1319
  tooltip: _surveyStrings__WEBPACK_IMPORTED_MODULE_3__["surveyLocalization"].getString("more"),
1250
1320
  }, {
1251
1321
  items: [],
1252
- onSelectionChanged: function (item) {
1253
- _this.hiddenItemSelected(item);
1254
- },
1255
1322
  allowSelection: false
1256
1323
  });
1257
1324
  return _this;
@@ -1317,11 +1384,6 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
1317
1384
  enumerable: false,
1318
1385
  configurable: true
1319
1386
  });
1320
- AdaptiveActionContainer.prototype.hiddenItemSelected = function (item) {
1321
- if (!!item && typeof item.action === "function") {
1322
- item.action();
1323
- }
1324
- };
1325
1387
  AdaptiveActionContainer.prototype.onSet = function () {
1326
1388
  var _this = this;
1327
1389
  this.actions.forEach(function (action) { return action.updateCallback = function (isResetInitialized) { return _this.raiseUpdate(isResetInitialized); }; });
@@ -1578,6 +1640,21 @@ var ActionContainer = /** @class */ (function (_super) {
1578
1640
  this.sortItems();
1579
1641
  }
1580
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
+ };
1581
1658
  ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
1582
1659
  return;
1583
1660
  };
@@ -1613,6 +1690,12 @@ var ActionContainer = /** @class */ (function (_super) {
1613
1690
  __decorate([
1614
1691
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
1615
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);
1616
1699
  return ActionContainer;
1617
1700
  }(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
1618
1701
 
@@ -1888,6 +1971,10 @@ var Base = /** @class */ (function () {
1888
1971
  this.onItemValuePropertyChanged = this.addEvent();
1889
1972
  this.isCreating = true;
1890
1973
  this.animationAllowedLock = 0;
1974
+ //remove when knockout obsolete
1975
+ this.supportOnElementRenderedEvent = true;
1976
+ this.onElementRenderedEventEnabled = false;
1977
+ this._onElementRerendered = new EventBase();
1891
1978
  this.bindingsValue = new Bindings(this);
1892
1979
  _jsonobject__WEBPACK_IMPORTED_MODULE_2__["CustomPropertiesCollection"].createProperties(this);
1893
1980
  this.onBaseCreating();
@@ -2816,7 +2903,7 @@ var Base = /** @class */ (function () {
2816
2903
  configurable: true
2817
2904
  });
2818
2905
  Base.prototype.getIsAnimationAllowed = function () {
2819
- 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);
2820
2907
  };
2821
2908
  Base.prototype.blockAnimations = function () {
2822
2909
  this.animationAllowedLock--;
@@ -2824,6 +2911,22 @@ var Base = /** @class */ (function () {
2824
2911
  Base.prototype.releaseAnimations = function () {
2825
2912
  this.animationAllowedLock++;
2826
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
+ };
2827
2930
  Base.currentDependencis = undefined;
2828
2931
  return Base;
2829
2932
  }());
@@ -2867,8 +2970,9 @@ var Event = /** @class */ (function () {
2867
2970
  Event.prototype.fire = function (sender, options) {
2868
2971
  if (!this.callbacks)
2869
2972
  return;
2870
- for (var i = 0; i < this.callbacks.length; i++) {
2871
- this.callbacks[i](sender, options);
2973
+ var callbacks = [].concat(this.callbacks);
2974
+ for (var i = 0; i < callbacks.length; i++) {
2975
+ callbacks[i](sender, options);
2872
2976
  if (!this.callbacks)
2873
2977
  return;
2874
2978
  }
@@ -5606,6 +5710,7 @@ var defaultV2Css = {
5606
5710
  rowMultiple: "sd-row--multiple",
5607
5711
  rowCompact: "sd-row--compact",
5608
5712
  rowFadeIn: "sd-row--fade-in",
5713
+ rowDelayedFadeIn: "sd-row--delayed-fade-in",
5609
5714
  rowFadeOut: "sd-row--fade-out",
5610
5715
  pageRow: "sd-page__row",
5611
5716
  question: {
@@ -5665,6 +5770,7 @@ var defaultV2Css = {
5665
5770
  disabled: "sd-question--disabled",
5666
5771
  readOnly: "sd-question--readonly",
5667
5772
  preview: "sd-question--preview",
5773
+ noPointerEventsMode: "sd-question--no-pointer-events",
5668
5774
  errorsContainer: "sd-element__erbox sd-question__erbox",
5669
5775
  errorsContainerTop: "sd-element__erbox--above-element sd-question__erbox--above-question",
5670
5776
  errorsContainerBottom: "sd-question__erbox--below-question"
@@ -6119,13 +6225,13 @@ var defaultV2Css = {
6119
6225
  removeButtonIconId: "icon-clear",
6120
6226
  removeFile: "sd-hidden",
6121
6227
  removeFileSvg: "",
6122
- removeFileSvgIconId: "icon-delete",
6228
+ removeFileSvgIconId: "icon-close_16x16",
6123
6229
  wrapper: "sd-file__wrapper",
6124
6230
  defaultImage: "sd-file__default-image",
6125
6231
  defaultImageIconId: "icon-defaultfile",
6126
6232
  leftIconId: "icon-arrowleft",
6127
6233
  rightIconId: "icon-arrowright",
6128
- 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",
6129
6235
  dragAreaPlaceholder: "sd-file__drag-area-placeholder",
6130
6236
  imageWrapper: "sd-file__image-wrapper",
6131
6237
  imageWrapperDefaultImage: "sd-file__image-wrapper--default-image",
@@ -7686,10 +7792,11 @@ var DragDropMatrixRows = /** @class */ (function (_super) {
7686
7792
  "use strict";
7687
7793
  __webpack_require__.r(__webpack_exports__);
7688
7794
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingChoices", function() { return DragDropRankingChoices; });
7689
- /* harmony import */ var _choices__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./choices */ "./src/dragdrop/choices.ts");
7690
- /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
7691
- /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/devices */ "./src/utils/devices.ts");
7692
- /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
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");
7693
7800
  var __extends = (undefined && undefined.__extends) || (function () {
7694
7801
  var extendStatics = function (d, b) {
7695
7802
  extendStatics = Object.setPrototypeOf ||
@@ -7709,6 +7816,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
7709
7816
 
7710
7817
 
7711
7818
 
7819
+
7712
7820
  var DragDropRankingChoices = /** @class */ (function (_super) {
7713
7821
  __extends(DragDropRankingChoices, _super);
7714
7822
  function DragDropRankingChoices() {
@@ -7718,6 +7826,16 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7718
7826
  var node = _this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item");
7719
7827
  node.style.cursor = "grabbing";
7720
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
+ };
7721
7839
  _this.doBanDropHere = function () {
7722
7840
  if (_this.isDragOverRootNode) {
7723
7841
  _this.allowDropHere = true;
@@ -7736,7 +7854,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7736
7854
  configurable: true
7737
7855
  });
7738
7856
  DragDropRankingChoices.prototype.createDraggedElementShortcut = function (text, draggedElementNode, event) {
7739
- var draggedElementShortcut = _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomDocumentHelper"].createElement("div");
7857
+ var draggedElementShortcut = _global_variables_utils__WEBPACK_IMPORTED_MODULE_4__["DomDocumentHelper"].createElement("div");
7740
7858
  if (!draggedElementShortcut)
7741
7859
  return;
7742
7860
  draggedElementShortcut.className = this.shortcutClass + " sv-ranking-shortcut";
@@ -7754,9 +7872,9 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7754
7872
  };
7755
7873
  Object.defineProperty(DragDropRankingChoices.prototype, "shortcutClass", {
7756
7874
  get: function () {
7757
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_1__["CssClassBuilder"]()
7875
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
7758
7876
  .append(this.parentElement.cssClasses.root)
7759
- .append(this.parentElement.cssClasses.rootMobileMod, _utils_devices__WEBPACK_IMPORTED_MODULE_2__["IsMobile"])
7877
+ .append(this.parentElement.cssClasses.rootMobileMod, _utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsMobile"])
7760
7878
  .toString();
7761
7879
  },
7762
7880
  enumerable: false,
@@ -7776,52 +7894,49 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7776
7894
  };
7777
7895
  DragDropRankingChoices.prototype.isDropTargetValid = function (dropTarget, dropTargetNode) {
7778
7896
  var choices = this.parentElement.rankingChoices;
7779
- var dropTargetIndex = choices.indexOf(this.dropTarget);
7780
- var draggedElementIndex = choices.indexOf(this.draggedElement);
7781
- if (draggedElementIndex > dropTargetIndex && dropTargetNode.classList.contains("sv-dragdrop-moveup")) {
7782
- this.parentElement.dropTargetNodeMove = null;
7783
- return false;
7784
- }
7785
- if (draggedElementIndex < dropTargetIndex && dropTargetNode.classList.contains("sv-dragdrop-movedown")) {
7786
- this.parentElement.dropTargetNodeMove = null;
7787
- return false;
7788
- }
7789
7897
  if (choices.indexOf(dropTarget) === -1)
7790
7898
  // shouldn't allow to drop on "adorners" (selectall, none, other)
7791
7899
  return false;
7792
7900
  return true;
7793
7901
  };
7794
- DragDropRankingChoices.prototype.calculateIsBottom = function (clientY) {
7795
- var choices = this.parentElement.rankingChoices;
7796
- return (choices.indexOf(this.dropTarget) - choices.indexOf(this.draggedElement) >
7797
- 0);
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);
7798
7908
  };
7799
- DragDropRankingChoices.prototype.afterDragOver = function (dropTargetNode) {
7800
- var choices = this.parentElement.rankingChoices;
7801
- var dropTargetIndex = choices.indexOf(this.dropTarget);
7802
- var draggedElementIndex = choices.indexOf(this.draggedElement);
7803
- choices.splice(draggedElementIndex, 1);
7804
- choices.splice(dropTargetIndex, 0, this.draggedElement);
7805
- this.parentElement.setPropertyValue("rankingChoices", choices);
7806
- //return;
7807
- this.updateDraggedElementShortcut(dropTargetIndex + 1);
7808
- if (draggedElementIndex !== dropTargetIndex) {
7809
- dropTargetNode.classList.remove("sv-dragdrop-moveup");
7810
- dropTargetNode.classList.remove("sv-dragdrop-movedown");
7811
- 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;
7812
7915
  }
7813
- if (draggedElementIndex > dropTargetIndex) {
7814
- this.parentElement.dropTargetNodeMove = "down";
7916
+ else if (fromChoicesArray == toChoicesArray) {
7917
+ if (!this.isBottom && fromIndex < toIndex)
7918
+ toIndex--;
7919
+ if (this.isBottom && fromIndex > toIndex)
7920
+ toIndex++;
7815
7921
  }
7816
- if (draggedElementIndex < dropTargetIndex) {
7817
- this.parentElement.dropTargetNodeMove = "up";
7922
+ else if (fromChoicesArray != toChoicesArray) {
7923
+ if (this.isBottom)
7924
+ toIndex++;
7818
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);
7819
7931
  };
7820
7932
  DragDropRankingChoices.prototype.updateDraggedElementShortcut = function (newIndex) {
7821
- var newIndexText = newIndex !== null ? newIndex + "" : "";
7822
- // TODO should avoid direct DOM manipulation, do through the frameworks instead
7823
- var indexNode = this.domAdapter.draggedElementShortcut.querySelector(".sv-ranking-item__index");
7824
- indexNode.innerText = newIndexText;
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
+ }
7825
7940
  };
7826
7941
  DragDropRankingChoices.prototype.ghostPositionChanged = function () {
7827
7942
  this.parentElement.currentDropTarget = this.draggedElement;
@@ -7839,7 +7954,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7839
7954
  _super.prototype.clear.call(this);
7840
7955
  };
7841
7956
  return DragDropRankingChoices;
7842
- }(_choices__WEBPACK_IMPORTED_MODULE_0__["DragDropChoices"]));
7957
+ }(_choices__WEBPACK_IMPORTED_MODULE_1__["DragDropChoices"]));
7843
7958
 
7844
7959
 
7845
7960
 
@@ -7855,8 +7970,7 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7855
7970
  "use strict";
7856
7971
  __webpack_require__.r(__webpack_exports__);
7857
7972
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropRankingSelectToRank", function() { return DragDropRankingSelectToRank; });
7858
- /* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../itemvalue */ "./src/itemvalue.ts");
7859
- /* 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");
7860
7974
  var __extends = (undefined && undefined.__extends) || (function () {
7861
7975
  var extendStatics = function (d, b) {
7862
7976
  extendStatics = Object.setPrototypeOf ||
@@ -7873,7 +7987,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
7873
7987
  };
7874
7988
  })();
7875
7989
 
7876
-
7877
7990
  var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7878
7991
  __extends(DragDropRankingSelectToRank, _super);
7879
7992
  function DragDropRankingSelectToRank() {
@@ -7890,19 +8003,6 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7890
8003
  rankingChoices.splice(fromIndex, 1);
7891
8004
  _this.updateChoices(questionModel, rankingChoices);
7892
8005
  };
7893
- _this.reorderRankedItem = function (questionModel, fromIndex, toIndex, dropTargetNode) {
7894
- var rankingChoices = questionModel.rankingChoices;
7895
- var item = rankingChoices[fromIndex];
7896
- if (fromIndex == toIndex)
7897
- return;
7898
- questionModel.isValueSetByUser = true;
7899
- rankingChoices.splice(fromIndex, 1);
7900
- rankingChoices.splice(toIndex, 0, item);
7901
- questionModel.setPropertyValue("rankingChoices", rankingChoices);
7902
- if (dropTargetNode) {
7903
- _this.doUIEffects(dropTargetNode, fromIndex, toIndex);
7904
- }
7905
- };
7906
8006
  return _this;
7907
8007
  }
7908
8008
  DragDropRankingSelectToRank.prototype.findDropTargetNodeByDragOverNode = function (dragOverNode) {
@@ -7959,50 +8059,6 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7959
8059
  var _a = this.getIndixies(questionModel, fromChoicesArray, toChoicesArray), fromIndex = _a.fromIndex, toIndex = _a.toIndex;
7960
8060
  rankFunction(questionModel, fromIndex, toIndex, dropTargetNode);
7961
8061
  };
7962
- DragDropRankingSelectToRank.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
7963
- var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
7964
- var toIndex = toChoicesArray.indexOf(this.dropTarget);
7965
- if (toIndex === -1) {
7966
- var length_1 = model.value.length;
7967
- toIndex = length_1;
7968
- }
7969
- else if (fromChoicesArray == toChoicesArray) {
7970
- if (!this.isBottom && fromIndex < toIndex)
7971
- toIndex--;
7972
- if (this.isBottom && fromIndex > toIndex)
7973
- toIndex++;
7974
- }
7975
- else if (fromChoicesArray != toChoicesArray) {
7976
- if (this.isBottom)
7977
- toIndex++;
7978
- }
7979
- return { fromIndex: fromIndex, toIndex: toIndex };
7980
- };
7981
- DragDropRankingSelectToRank.prototype.calculateIsBottom = function (clientY, dropTargetNode) {
7982
- if (this.dropTarget instanceof _itemvalue__WEBPACK_IMPORTED_MODULE_0__["ItemValue"] && this.draggedElement !== this.dropTarget) {
7983
- var rect = dropTargetNode.getBoundingClientRect();
7984
- return clientY >= rect.y + rect.height / 2;
7985
- }
7986
- return _super.prototype.calculateIsBottom.call(this, clientY);
7987
- };
7988
- DragDropRankingSelectToRank.prototype.doUIEffects = function (dropTargetNode, fromIndex, toIndex) {
7989
- var questionModel = this.parentElement;
7990
- var isDropToEmptyRankedContainer = this.dropTarget === "to-container" && questionModel.isEmpty();
7991
- var isNeedToShowIndexAtShortcut = !this.isDropTargetUnranked || isDropToEmptyRankedContainer;
7992
- var shortcutIndex = isNeedToShowIndexAtShortcut ? toIndex + 1 : null;
7993
- this.updateDraggedElementShortcut(shortcutIndex);
7994
- if (fromIndex !== toIndex) {
7995
- dropTargetNode.classList.remove("sv-dragdrop-moveup");
7996
- dropTargetNode.classList.remove("sv-dragdrop-movedown");
7997
- questionModel.dropTargetNodeMove = null;
7998
- }
7999
- if (fromIndex > toIndex) {
8000
- questionModel.dropTargetNodeMove = "down";
8001
- }
8002
- if (fromIndex < toIndex) {
8003
- questionModel.dropTargetNodeMove = "up";
8004
- }
8005
- };
8006
8062
  Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDraggedElementRanked", {
8007
8063
  get: function () {
8008
8064
  return this.parentElement.rankingChoices.indexOf(this.draggedElement) !== -1;
@@ -8026,28 +8082,13 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
8026
8082
  enumerable: false,
8027
8083
  configurable: true
8028
8084
  });
8029
- Object.defineProperty(DragDropRankingSelectToRank.prototype, "isDropTargetUnranked", {
8030
- get: function () {
8031
- return !this.isDropTargetRanked;
8032
- },
8033
- enumerable: false,
8034
- configurable: true
8035
- });
8036
8085
  DragDropRankingSelectToRank.prototype.updateChoices = function (questionModel, rankingChoices) {
8037
8086
  questionModel.isValueSetByUser = true;
8038
8087
  questionModel.rankingChoices = rankingChoices;
8039
8088
  questionModel.updateUnRankingChoices(rankingChoices);
8040
8089
  };
8041
- DragDropRankingSelectToRank.prototype.clear = function () {
8042
- var questionModel = this.parentElement;
8043
- if (!!questionModel) {
8044
- questionModel.rankingChoicesAnimation.cancel();
8045
- questionModel.unRankingChoicesAnimation.cancel();
8046
- }
8047
- _super.prototype.clear.call(this);
8048
- };
8049
8090
  return DragDropRankingSelectToRank;
8050
- }(_ranking_choices__WEBPACK_IMPORTED_MODULE_1__["DragDropRankingChoices"]));
8091
+ }(_ranking_choices__WEBPACK_IMPORTED_MODULE_0__["DragDropRankingChoices"]));
8051
8092
 
8052
8093
 
8053
8094
 
@@ -9857,8 +9898,8 @@ __webpack_require__.r(__webpack_exports__);
9857
9898
 
9858
9899
  var Version;
9859
9900
  var ReleaseDate;
9860
- Version = "" + "1.10.6";
9861
- ReleaseDate = "" + "2024-05-28";
9901
+ Version = "" + "1.11.2";
9902
+ ReleaseDate = "" + "2024-06-11";
9862
9903
  function checkLibraryVersion(ver, libraryName) {
9863
9904
  if (Version != ver) {
9864
9905
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -11049,7 +11090,7 @@ var defaultBootstrapMaterialCss = _plugins_themes_bootstrapmaterial_cssbootstrap
11049
11090
  /*!***************************************!*\
11050
11091
  !*** ./src/entries/react-ui-model.ts ***!
11051
11092
  \***************************************/
11052
- /*! exports provided: Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
11093
+ /*! exports provided: Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, ListItemContent, ListItemGroup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
11053
11094
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
11054
11095
 
11055
11096
  "use strict";
@@ -11109,6 +11150,8 @@ __webpack_require__.r(__webpack_exports__);
11109
11150
 
11110
11151
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItem", function() { return _react_reactquestion_ranking__WEBPACK_IMPORTED_MODULE_12__["SurveyQuestionRankingItem"]; });
11111
11152
 
11153
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItemContent", function() { return _react_reactquestion_ranking__WEBPACK_IMPORTED_MODULE_12__["SurveyQuestionRankingItemContent"]; });
11154
+
11112
11155
  /* harmony import */ var _react_components_rating_rating_item__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../react/components/rating/rating-item */ "./src/react/components/rating/rating-item.tsx");
11113
11156
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RatingItem", function() { return _react_components_rating_rating_item__WEBPACK_IMPORTED_MODULE_13__["RatingItem"]; });
11114
11157
 
@@ -11249,90 +11292,96 @@ __webpack_require__.r(__webpack_exports__);
11249
11292
  /* harmony import */ var _react_components_popup_popup__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../react/components/popup/popup */ "./src/react/components/popup/popup.tsx");
11250
11293
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popup", function() { return _react_components_popup_popup__WEBPACK_IMPORTED_MODULE_54__["Popup"]; });
11251
11294
 
11252
- /* harmony import */ var _react_components_list_list__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../react/components/list/list */ "./src/react/components/list/list.tsx");
11253
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "List", function() { return _react_components_list_list__WEBPACK_IMPORTED_MODULE_55__["List"]; });
11295
+ /* harmony import */ var _react_components_list_list_item_content__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../react/components/list/list-item-content */ "./src/react/components/list/list-item-content.tsx");
11296
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemContent", function() { return _react_components_list_list_item_content__WEBPACK_IMPORTED_MODULE_55__["ListItemContent"]; });
11297
+
11298
+ /* harmony import */ var _react_components_list_list_item_group__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../react/components/list/list-item-group */ "./src/react/components/list/list-item-group.tsx");
11299
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemGroup", function() { return _react_components_list_list_item_group__WEBPACK_IMPORTED_MODULE_56__["ListItemGroup"]; });
11254
11300
 
11255
- /* harmony import */ var _react_components_title_title_actions__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../react/components/title/title-actions */ "./src/react/components/title/title-actions.tsx");
11256
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleActions", function() { return _react_components_title_title_actions__WEBPACK_IMPORTED_MODULE_56__["TitleActions"]; });
11301
+ /* harmony import */ var _react_components_list_list__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../react/components/list/list */ "./src/react/components/list/list.tsx");
11302
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "List", function() { return _react_components_list_list__WEBPACK_IMPORTED_MODULE_57__["List"]; });
11257
11303
 
11258
- /* harmony import */ var _react_components_title_title_element__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../react/components/title/title-element */ "./src/react/components/title/title-element.tsx");
11259
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleElement", function() { return _react_components_title_title_element__WEBPACK_IMPORTED_MODULE_57__["TitleElement"]; });
11304
+ /* harmony import */ var _react_components_title_title_actions__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../react/components/title/title-actions */ "./src/react/components/title/title-actions.tsx");
11305
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleActions", function() { return _react_components_title_title_actions__WEBPACK_IMPORTED_MODULE_58__["TitleActions"]; });
11260
11306
 
11261
- /* harmony import */ var _react_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../react/components/action-bar/action-bar */ "./src/react/components/action-bar/action-bar.tsx");
11262
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyActionBar", function() { return _react_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_58__["SurveyActionBar"]; });
11307
+ /* harmony import */ var _react_components_title_title_element__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../react/components/title/title-element */ "./src/react/components/title/title-element.tsx");
11308
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleElement", function() { return _react_components_title_title_element__WEBPACK_IMPORTED_MODULE_59__["TitleElement"]; });
11263
11309
 
11264
- /* harmony import */ var _react_components_survey_header_logo_image__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../react/components/survey-header/logo-image */ "./src/react/components/survey-header/logo-image.tsx");
11265
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LogoImage", function() { return _react_components_survey_header_logo_image__WEBPACK_IMPORTED_MODULE_59__["LogoImage"]; });
11310
+ /* harmony import */ var _react_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../react/components/action-bar/action-bar */ "./src/react/components/action-bar/action-bar.tsx");
11311
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyActionBar", function() { return _react_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_60__["SurveyActionBar"]; });
11266
11312
 
11267
- /* harmony import */ var _react_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../react/components/survey-header/survey-header */ "./src/react/components/survey-header/survey-header.tsx");
11268
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyHeader", function() { return _react_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_60__["SurveyHeader"]; });
11313
+ /* harmony import */ var _react_components_survey_header_logo_image__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../react/components/survey-header/logo-image */ "./src/react/components/survey-header/logo-image.tsx");
11314
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LogoImage", function() { return _react_components_survey_header_logo_image__WEBPACK_IMPORTED_MODULE_61__["LogoImage"]; });
11269
11315
 
11270
- /* harmony import */ var _react_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../react/components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
11271
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgIcon", function() { return _react_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_61__["SvgIcon"]; });
11316
+ /* harmony import */ var _react_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../react/components/survey-header/survey-header */ "./src/react/components/survey-header/survey-header.tsx");
11317
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyHeader", function() { return _react_components_survey_header_survey_header__WEBPACK_IMPORTED_MODULE_62__["SurveyHeader"]; });
11272
11318
 
11273
- /* harmony import */ var _react_components_matrix_actions_remove_button_remove_button__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../react/components/matrix-actions/remove-button/remove-button */ "./src/react/components/matrix-actions/remove-button/remove-button.tsx");
11274
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicRemoveButton", function() { return _react_components_matrix_actions_remove_button_remove_button__WEBPACK_IMPORTED_MODULE_62__["SurveyQuestionMatrixDynamicRemoveButton"]; });
11319
+ /* harmony import */ var _react_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ../react/components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
11320
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgIcon", function() { return _react_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_63__["SvgIcon"]; });
11275
11321
 
11276
- /* harmony import */ var _react_components_matrix_actions_detail_button_detail_button__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ../react/components/matrix-actions/detail-button/detail-button */ "./src/react/components/matrix-actions/detail-button/detail-button.tsx");
11277
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDetailButton", function() { return _react_components_matrix_actions_detail_button_detail_button__WEBPACK_IMPORTED_MODULE_63__["SurveyQuestionMatrixDetailButton"]; });
11322
+ /* harmony import */ var _react_components_matrix_actions_remove_button_remove_button__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ../react/components/matrix-actions/remove-button/remove-button */ "./src/react/components/matrix-actions/remove-button/remove-button.tsx");
11323
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicRemoveButton", function() { return _react_components_matrix_actions_remove_button_remove_button__WEBPACK_IMPORTED_MODULE_64__["SurveyQuestionMatrixDynamicRemoveButton"]; });
11278
11324
 
11279
- /* harmony import */ var _react_components_matrix_actions_drag_drop_icon_drag_drop_icon__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ../react/components/matrix-actions/drag-drop-icon/drag-drop-icon */ "./src/react/components/matrix-actions/drag-drop-icon/drag-drop-icon.tsx");
11280
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicDragDropIcon", function() { return _react_components_matrix_actions_drag_drop_icon_drag_drop_icon__WEBPACK_IMPORTED_MODULE_64__["SurveyQuestionMatrixDynamicDragDropIcon"]; });
11325
+ /* harmony import */ var _react_components_matrix_actions_detail_button_detail_button__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../react/components/matrix-actions/detail-button/detail-button */ "./src/react/components/matrix-actions/detail-button/detail-button.tsx");
11326
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDetailButton", function() { return _react_components_matrix_actions_detail_button_detail_button__WEBPACK_IMPORTED_MODULE_65__["SurveyQuestionMatrixDetailButton"]; });
11281
11327
 
11282
- /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_add_btn__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-add-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-add-btn.tsx");
11283
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicAddButton", function() { return _react_components_paneldynamic_actions_paneldynamic_add_btn__WEBPACK_IMPORTED_MODULE_65__["SurveyQuestionPanelDynamicAddButton"]; });
11328
+ /* harmony import */ var _react_components_matrix_actions_drag_drop_icon_drag_drop_icon__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../react/components/matrix-actions/drag-drop-icon/drag-drop-icon */ "./src/react/components/matrix-actions/drag-drop-icon/drag-drop-icon.tsx");
11329
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDynamicDragDropIcon", function() { return _react_components_matrix_actions_drag_drop_icon_drag_drop_icon__WEBPACK_IMPORTED_MODULE_66__["SurveyQuestionMatrixDynamicDragDropIcon"]; });
11284
11330
 
11285
- /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_remove_btn__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-remove-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-remove-btn.tsx");
11286
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicRemoveButton", function() { return _react_components_paneldynamic_actions_paneldynamic_remove_btn__WEBPACK_IMPORTED_MODULE_66__["SurveyQuestionPanelDynamicRemoveButton"]; });
11331
+ /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_add_btn__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-add-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-add-btn.tsx");
11332
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicAddButton", function() { return _react_components_paneldynamic_actions_paneldynamic_add_btn__WEBPACK_IMPORTED_MODULE_67__["SurveyQuestionPanelDynamicAddButton"]; });
11287
11333
 
11288
- /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_prev_btn__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-prev-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-prev-btn.tsx");
11289
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicPrevButton", function() { return _react_components_paneldynamic_actions_paneldynamic_prev_btn__WEBPACK_IMPORTED_MODULE_67__["SurveyQuestionPanelDynamicPrevButton"]; });
11334
+ /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_remove_btn__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-remove-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-remove-btn.tsx");
11335
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicRemoveButton", function() { return _react_components_paneldynamic_actions_paneldynamic_remove_btn__WEBPACK_IMPORTED_MODULE_68__["SurveyQuestionPanelDynamicRemoveButton"]; });
11290
11336
 
11291
- /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_next_btn__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-next-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-next-btn.tsx");
11292
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicNextButton", function() { return _react_components_paneldynamic_actions_paneldynamic_next_btn__WEBPACK_IMPORTED_MODULE_68__["SurveyQuestionPanelDynamicNextButton"]; });
11337
+ /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_prev_btn__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-prev-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-prev-btn.tsx");
11338
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicPrevButton", function() { return _react_components_paneldynamic_actions_paneldynamic_prev_btn__WEBPACK_IMPORTED_MODULE_69__["SurveyQuestionPanelDynamicPrevButton"]; });
11293
11339
 
11294
- /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_progress_text__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-progress-text */ "./src/react/components/paneldynamic-actions/paneldynamic-progress-text.tsx");
11295
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicProgressText", function() { return _react_components_paneldynamic_actions_paneldynamic_progress_text__WEBPACK_IMPORTED_MODULE_69__["SurveyQuestionPanelDynamicProgressText"]; });
11340
+ /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_next_btn__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-next-btn */ "./src/react/components/paneldynamic-actions/paneldynamic-next-btn.tsx");
11341
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicNextButton", function() { return _react_components_paneldynamic_actions_paneldynamic_next_btn__WEBPACK_IMPORTED_MODULE_70__["SurveyQuestionPanelDynamicNextButton"]; });
11296
11342
 
11297
- /* harmony import */ var _react_components_survey_actions_survey_nav_button__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ../react/components/survey-actions/survey-nav-button */ "./src/react/components/survey-actions/survey-nav-button.tsx");
11298
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyNavigationButton", function() { return _react_components_survey_actions_survey_nav_button__WEBPACK_IMPORTED_MODULE_70__["SurveyNavigationButton"]; });
11343
+ /* harmony import */ var _react_components_paneldynamic_actions_paneldynamic_progress_text__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ../react/components/paneldynamic-actions/paneldynamic-progress-text */ "./src/react/components/paneldynamic-actions/paneldynamic-progress-text.tsx");
11344
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionPanelDynamicProgressText", function() { return _react_components_paneldynamic_actions_paneldynamic_progress_text__WEBPACK_IMPORTED_MODULE_71__["SurveyQuestionPanelDynamicProgressText"]; });
11299
11345
 
11300
- /* harmony import */ var _react_components_question_error__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ../react/components/question-error */ "./src/react/components/question-error.tsx");
11301
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionErrorComponent", function() { return _react_components_question_error__WEBPACK_IMPORTED_MODULE_71__["QuestionErrorComponent"]; });
11346
+ /* harmony import */ var _react_components_survey_actions_survey_nav_button__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ../react/components/survey-actions/survey-nav-button */ "./src/react/components/survey-actions/survey-nav-button.tsx");
11347
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyNavigationButton", function() { return _react_components_survey_actions_survey_nav_button__WEBPACK_IMPORTED_MODULE_72__["SurveyNavigationButton"]; });
11302
11348
 
11303
- /* harmony import */ var _react_components_matrix_row__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ../react/components/matrix/row */ "./src/react/components/matrix/row.tsx");
11304
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixRow", function() { return _react_components_matrix_row__WEBPACK_IMPORTED_MODULE_72__["MatrixRow"]; });
11349
+ /* harmony import */ var _react_components_question_error__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ../react/components/question-error */ "./src/react/components/question-error.tsx");
11350
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "QuestionErrorComponent", function() { return _react_components_question_error__WEBPACK_IMPORTED_MODULE_73__["QuestionErrorComponent"]; });
11305
11351
 
11306
- /* harmony import */ var _react_components_skeleton__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ../react/components/skeleton */ "./src/react/components/skeleton.tsx");
11307
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Skeleton", function() { return _react_components_skeleton__WEBPACK_IMPORTED_MODULE_73__["Skeleton"]; });
11352
+ /* harmony import */ var _react_components_matrix_row__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../react/components/matrix/row */ "./src/react/components/matrix/row.tsx");
11353
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MatrixRow", function() { return _react_components_matrix_row__WEBPACK_IMPORTED_MODULE_74__["MatrixRow"]; });
11308
11354
 
11309
- /* harmony import */ var _react_components_notifier__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../react/components/notifier */ "./src/react/components/notifier.tsx");
11310
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotifierComponent", function() { return _react_components_notifier__WEBPACK_IMPORTED_MODULE_74__["NotifierComponent"]; });
11355
+ /* harmony import */ var _react_components_skeleton__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../react/components/skeleton */ "./src/react/components/skeleton.tsx");
11356
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Skeleton", function() { return _react_components_skeleton__WEBPACK_IMPORTED_MODULE_75__["Skeleton"]; });
11311
11357
 
11312
- /* harmony import */ var _react_components_components_container__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../react/components/components-container */ "./src/react/components/components-container.tsx");
11313
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentsContainer", function() { return _react_components_components_container__WEBPACK_IMPORTED_MODULE_75__["ComponentsContainer"]; });
11358
+ /* harmony import */ var _react_components_notifier__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../react/components/notifier */ "./src/react/components/notifier.tsx");
11359
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotifierComponent", function() { return _react_components_notifier__WEBPACK_IMPORTED_MODULE_76__["NotifierComponent"]; });
11314
11360
 
11315
- /* harmony import */ var _react_components_character_counter__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../react/components/character-counter */ "./src/react/components/character-counter.tsx");
11316
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CharacterCounterComponent", function() { return _react_components_character_counter__WEBPACK_IMPORTED_MODULE_76__["CharacterCounterComponent"]; });
11361
+ /* harmony import */ var _react_components_components_container__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../react/components/components-container */ "./src/react/components/components-container.tsx");
11362
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ComponentsContainer", function() { return _react_components_components_container__WEBPACK_IMPORTED_MODULE_77__["ComponentsContainer"]; });
11317
11363
 
11318
- /* harmony import */ var _react_components_header__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../react/components/header */ "./src/react/components/header.tsx");
11319
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderMobile", function() { return _react_components_header__WEBPACK_IMPORTED_MODULE_77__["HeaderMobile"]; });
11364
+ /* harmony import */ var _react_components_character_counter__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../react/components/character-counter */ "./src/react/components/character-counter.tsx");
11365
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CharacterCounterComponent", function() { return _react_components_character_counter__WEBPACK_IMPORTED_MODULE_78__["CharacterCounterComponent"]; });
11320
11366
 
11321
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCell", function() { return _react_components_header__WEBPACK_IMPORTED_MODULE_77__["HeaderCell"]; });
11367
+ /* harmony import */ var _react_components_header__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../react/components/header */ "./src/react/components/header.tsx");
11368
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderMobile", function() { return _react_components_header__WEBPACK_IMPORTED_MODULE_79__["HeaderMobile"]; });
11322
11369
 
11323
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Header", function() { return _react_components_header__WEBPACK_IMPORTED_MODULE_77__["Header"]; });
11370
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HeaderCell", function() { return _react_components_header__WEBPACK_IMPORTED_MODULE_79__["HeaderCell"]; });
11324
11371
 
11325
- /* harmony import */ var _react_string_viewer__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../react/string-viewer */ "./src/react/string-viewer.tsx");
11326
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyLocStringViewer", function() { return _react_string_viewer__WEBPACK_IMPORTED_MODULE_78__["SurveyLocStringViewer"]; });
11372
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Header", function() { return _react_components_header__WEBPACK_IMPORTED_MODULE_79__["Header"]; });
11327
11373
 
11328
- /* harmony import */ var _react_string_editor__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../react/string-editor */ "./src/react/string-editor.tsx");
11329
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyLocStringEditor", function() { return _react_string_editor__WEBPACK_IMPORTED_MODULE_79__["SurveyLocStringEditor"]; });
11374
+ /* harmony import */ var _react_string_viewer__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../react/string-viewer */ "./src/react/string-viewer.tsx");
11375
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyLocStringViewer", function() { return _react_string_viewer__WEBPACK_IMPORTED_MODULE_80__["SurveyLocStringViewer"]; });
11330
11376
 
11331
- /* harmony import */ var _react_components_loading_indicator__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../react/components/loading-indicator */ "./src/react/components/loading-indicator.tsx");
11332
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoadingIndicatorComponent", function() { return _react_components_loading_indicator__WEBPACK_IMPORTED_MODULE_80__["LoadingIndicatorComponent"]; });
11377
+ /* harmony import */ var _react_string_editor__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ../react/string-editor */ "./src/react/string-editor.tsx");
11378
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyLocStringEditor", function() { return _react_string_editor__WEBPACK_IMPORTED_MODULE_81__["SurveyLocStringEditor"]; });
11333
11379
 
11334
- /* harmony import */ var _react_svgbundle__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ../react/svgbundle */ "./src/react/svgbundle.tsx");
11335
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgBundleComponent", function() { return _react_svgbundle__WEBPACK_IMPORTED_MODULE_81__["SvgBundleComponent"]; });
11380
+ /* harmony import */ var _react_components_loading_indicator__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ../react/components/loading-indicator */ "./src/react/components/loading-indicator.tsx");
11381
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LoadingIndicatorComponent", function() { return _react_components_loading_indicator__WEBPACK_IMPORTED_MODULE_82__["LoadingIndicatorComponent"]; });
11382
+
11383
+ /* harmony import */ var _react_svgbundle__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ../react/svgbundle */ "./src/react/svgbundle.tsx");
11384
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SvgBundleComponent", function() { return _react_svgbundle__WEBPACK_IMPORTED_MODULE_83__["SvgBundleComponent"]; });
11336
11385
 
11337
11386
  // react
11338
11387
 
@@ -11414,6 +11463,8 @@ __webpack_require__.r(__webpack_exports__);
11414
11463
 
11415
11464
 
11416
11465
 
11466
+
11467
+
11417
11468
 
11418
11469
 
11419
11470
 
@@ -11427,7 +11478,7 @@ __webpack_require__.r(__webpack_exports__);
11427
11478
  /*!******************************!*\
11428
11479
  !*** ./src/entries/react.ts ***!
11429
11480
  \******************************/
11430
- /*! 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, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
11481
+ /*! 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, bootstrapThemeName, bootstrapThemeColors, bootstrapThemeCssRules, bootstrapMaterialThemeName, bootstrapMaterialThemeColors, bootstrapMaterialThemeCssRules, defaultBootstrapCss, defaultBootstrapMaterialCss, Survey, attachKey2click, ReactSurveyElementsWrapper, SurveyNavigationBase, SurveyTimerPanel, SurveyPage, SurveyRow, SurveyPanel, SurveyFlowPanel, SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsCell, ReactSurveyElement, SurveyElementBase, SurveyQuestionElementBase, SurveyQuestionCommentItem, SurveyQuestionComment, SurveyQuestionCheckbox, SurveyQuestionCheckboxItem, SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent, RatingItem, RatingItemStar, RatingItemSmiley, RatingDropdownItem, TagboxFilterString, SurveyQuestionOptionItem, SurveyQuestionDropdownBase, SurveyQuestionDropdown, SurveyQuestionTagboxItem, SurveyQuestionTagbox, SurveyQuestionDropdownSelect, SurveyQuestionMatrix, SurveyQuestionMatrixRow, SurveyQuestionMatrixCell, SurveyQuestionHtml, SurveyQuestionFile, SurveyFileChooseButton, SurveyFilePreview, SurveyQuestionMultipleText, SurveyQuestionRadiogroup, SurveyQuestionRadioItem, SurveyQuestionText, SurveyQuestionBoolean, SurveyQuestionBooleanCheckbox, SurveyQuestionBooleanRadio, SurveyQuestionEmpty, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdown, SurveyQuestionMatrixDynamic, SurveyQuestionMatrixDynamicAddButton, SurveyQuestionPanelDynamic, SurveyProgress, SurveyProgressButtons, SurveyProgressToc, SurveyQuestionRating, SurveyQuestionRatingDropdown, SurveyQuestionExpression, PopupSurvey, SurveyWindow, ReactQuestionFactory, ReactElementFactory, SurveyQuestionImagePicker, SurveyQuestionImage, SurveyQuestionSignaturePad, SurveyQuestionButtonGroup, SurveyQuestionCustom, SurveyQuestionComposite, Popup, ListItemContent, ListItemGroup, List, TitleActions, TitleElement, SurveyActionBar, LogoImage, SurveyHeader, SvgIcon, SurveyQuestionMatrixDynamicRemoveButton, SurveyQuestionMatrixDetailButton, SurveyQuestionMatrixDynamicDragDropIcon, SurveyQuestionPanelDynamicAddButton, SurveyQuestionPanelDynamicRemoveButton, SurveyQuestionPanelDynamicPrevButton, SurveyQuestionPanelDynamicNextButton, SurveyQuestionPanelDynamicProgressText, SurveyNavigationButton, QuestionErrorComponent, MatrixRow, Skeleton, NotifierComponent, ComponentsContainer, CharacterCounterComponent, HeaderMobile, HeaderCell, Header, SurveyLocStringViewer, SurveyLocStringEditor, LoadingIndicatorComponent, SvgBundleComponent */
11431
11482
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
11432
11483
 
11433
11484
  "use strict";
@@ -11952,6 +12003,8 @@ __webpack_require__.r(__webpack_exports__);
11952
12003
 
11953
12004
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItem", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionRankingItem"]; });
11954
12005
 
12006
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItemContent", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["SurveyQuestionRankingItemContent"]; });
12007
+
11955
12008
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RatingItem", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["RatingItem"]; });
11956
12009
 
11957
12010
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RatingItemStar", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["RatingItemStar"]; });
@@ -12050,6 +12103,10 @@ __webpack_require__.r(__webpack_exports__);
12050
12103
 
12051
12104
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Popup", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["Popup"]; });
12052
12105
 
12106
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemContent", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["ListItemContent"]; });
12107
+
12108
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ListItemGroup", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["ListItemGroup"]; });
12109
+
12053
12110
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "List", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["List"]; });
12054
12111
 
12055
12112
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TitleActions", function() { return _react_ui_model__WEBPACK_IMPORTED_MODULE_3__["TitleActions"]; });
@@ -16078,7 +16135,7 @@ var FunctionOperand = /** @class */ (function (_super) {
16078
16135
  return this.evaluateCore(processValue);
16079
16136
  };
16080
16137
  FunctionOperand.prototype.evaluateCore = function (processValue) {
16081
- return _functionsfactory__WEBPACK_IMPORTED_MODULE_1__["FunctionFactory"].Instance.run(this.originalValue, this.parameters.evaluate(processValue), processValue.properties);
16138
+ return _functionsfactory__WEBPACK_IMPORTED_MODULE_1__["FunctionFactory"].Instance.run(this.originalValue, this.parameters.evaluate(processValue), processValue.properties, this.parameters.values);
16082
16139
  };
16083
16140
  FunctionOperand.prototype.toString = function (func) {
16084
16141
  if (func === void 0) { func = undefined; }
@@ -16610,7 +16667,7 @@ var FunctionFactory = /** @class */ (function () {
16610
16667
  }
16611
16668
  return result.sort();
16612
16669
  };
16613
- FunctionFactory.prototype.run = function (name, params, properties) {
16670
+ FunctionFactory.prototype.run = function (name, params, properties, originalParams) {
16614
16671
  if (properties === void 0) { properties = null; }
16615
16672
  var func = this.functionHash[name];
16616
16673
  if (!func) {
@@ -16625,7 +16682,7 @@ var FunctionFactory = /** @class */ (function () {
16625
16682
  classRunner[key] = properties[key];
16626
16683
  }
16627
16684
  }
16628
- return classRunner.func(params);
16685
+ return classRunner.func(params, originalParams);
16629
16686
  };
16630
16687
  FunctionFactory.Instance = new FunctionFactory();
16631
16688
  return FunctionFactory;
@@ -16697,7 +16754,7 @@ function avg(params) {
16697
16754
  return arr.length > 0 ? res / arr.length : 0;
16698
16755
  }
16699
16756
  FunctionFactory.Instance.register("avg", avg);
16700
- function getInArrayParams(params) {
16757
+ function getInArrayParams(params, originalParams) {
16701
16758
  if (params.length < 2 || params.length > 3)
16702
16759
  return null;
16703
16760
  var arr = params[0];
@@ -16708,10 +16765,16 @@ function getInArrayParams(params) {
16708
16765
  var name = params[1];
16709
16766
  if (typeof name !== "string" && !(name instanceof String))
16710
16767
  return null;
16711
- var expression = params.length === 3 ? params[2] : undefined;
16768
+ var expression = params.length > 2 ? params[2] : undefined;
16712
16769
  if (typeof expression !== "string" && !(expression instanceof String)) {
16713
16770
  expression = undefined;
16714
16771
  }
16772
+ if (!expression) {
16773
+ var operand = Array.isArray(originalParams) && originalParams.length > 2 ? originalParams[2] : undefined;
16774
+ if (operand && !!operand.toString()) {
16775
+ expression = operand.toString();
16776
+ }
16777
+ }
16715
16778
  return { data: arr, name: name, expression: expression };
16716
16779
  }
16717
16780
  function convertToNumber(val) {
@@ -16727,9 +16790,9 @@ function processItemInArray(item, name, res, func, needToConvert, condition) {
16727
16790
  var val = needToConvert ? convertToNumber(item[name]) : 1;
16728
16791
  return func(res, val);
16729
16792
  }
16730
- function calcInArray(params, func, needToConvert) {
16793
+ function calcInArray(params, originalParams, func, needToConvert) {
16731
16794
  if (needToConvert === void 0) { needToConvert = true; }
16732
- var v = getInArrayParams(params);
16795
+ var v = getInArrayParams(params, originalParams);
16733
16796
  if (!v)
16734
16797
  return undefined;
16735
16798
  var condition = !!v.expression ? new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](v.expression) : undefined;
@@ -16749,8 +16812,8 @@ function calcInArray(params, func, needToConvert) {
16749
16812
  }
16750
16813
  return res;
16751
16814
  }
16752
- function sumInArray(params) {
16753
- var res = calcInArray(params, function (res, val) {
16815
+ function sumInArray(params, originalParams) {
16816
+ var res = calcInArray(params, originalParams, function (res, val) {
16754
16817
  if (res == undefined)
16755
16818
  res = 0;
16756
16819
  if (val == undefined || val == null)
@@ -16760,8 +16823,8 @@ function sumInArray(params) {
16760
16823
  return res !== undefined ? res : 0;
16761
16824
  }
16762
16825
  FunctionFactory.Instance.register("sumInArray", sumInArray);
16763
- function minInArray(params) {
16764
- return calcInArray(params, function (res, val) {
16826
+ function minInArray(params, originalParams) {
16827
+ return calcInArray(params, originalParams, function (res, val) {
16765
16828
  if (res == undefined)
16766
16829
  return val;
16767
16830
  if (val == undefined || val == null)
@@ -16770,8 +16833,8 @@ function minInArray(params) {
16770
16833
  });
16771
16834
  }
16772
16835
  FunctionFactory.Instance.register("minInArray", minInArray);
16773
- function maxInArray(params) {
16774
- return calcInArray(params, function (res, val) {
16836
+ function maxInArray(params, originalParams) {
16837
+ return calcInArray(params, originalParams, function (res, val) {
16775
16838
  if (res == undefined)
16776
16839
  return val;
16777
16840
  if (val == undefined || val == null)
@@ -16780,8 +16843,8 @@ function maxInArray(params) {
16780
16843
  });
16781
16844
  }
16782
16845
  FunctionFactory.Instance.register("maxInArray", maxInArray);
16783
- function countInArray(params) {
16784
- var res = calcInArray(params, function (res, val) {
16846
+ function countInArray(params, originalParams) {
16847
+ var res = calcInArray(params, originalParams, function (res, val) {
16785
16848
  if (res == undefined)
16786
16849
  res = 0;
16787
16850
  if (val == undefined || val == null)
@@ -16791,11 +16854,11 @@ function countInArray(params) {
16791
16854
  return res !== undefined ? res : 0;
16792
16855
  }
16793
16856
  FunctionFactory.Instance.register("countInArray", countInArray);
16794
- function avgInArray(params) {
16795
- var count = countInArray(params);
16857
+ function avgInArray(params, originalParams) {
16858
+ var count = countInArray(params, originalParams);
16796
16859
  if (count == 0)
16797
16860
  return 0;
16798
- return sumInArray(params) / count;
16861
+ return sumInArray(params, originalParams) / count;
16799
16862
  }
16800
16863
  FunctionFactory.Instance.register("avgInArray", avgInArray);
16801
16864
  function iif(params) {
@@ -16812,23 +16875,31 @@ function getDate(params) {
16812
16875
  return new Date(params[0]);
16813
16876
  }
16814
16877
  FunctionFactory.Instance.register("getDate", getDate);
16878
+ function dateDiffMonths(date1Param, date2Param, type) {
16879
+ if (type === "days")
16880
+ return diffDays([date1Param, date2Param]);
16881
+ var date1 = !!date1Param ? new Date(date1Param) : new Date();
16882
+ var date2 = !!date2Param ? new Date(date2Param) : new Date();
16883
+ var age = date2.getFullYear() - date1.getFullYear();
16884
+ type = type || "years";
16885
+ var ageInMonths = age * 12 + date2.getMonth() - date1.getMonth();
16886
+ if (date2.getDate() < date1.getDate()) {
16887
+ ageInMonths -= 1;
16888
+ }
16889
+ return type === "months" ? ageInMonths : ~~(ageInMonths / 12);
16890
+ }
16815
16891
  function age(params) {
16816
- if (!params && params.length < 1)
16817
- return null;
16818
- if (!params[0])
16892
+ if (!Array.isArray(params) || params.length < 1 || !params[0])
16819
16893
  return null;
16820
- var birthDate = new Date(params[0]);
16821
- var today = new Date();
16822
- var age = today.getFullYear() - birthDate.getFullYear();
16823
- if (age > 0) {
16824
- var m = today.getMonth() - birthDate.getMonth();
16825
- if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
16826
- age -= 1;
16827
- }
16828
- }
16829
- return age;
16894
+ return dateDiffMonths(params[0], undefined, (params.length > 1 ? params[1] : "") || "years");
16830
16895
  }
16831
16896
  FunctionFactory.Instance.register("age", age);
16897
+ function dateDiff(params) {
16898
+ if (!Array.isArray(params) || params.length < 2 || !params[0] || !params[1])
16899
+ return null;
16900
+ return dateDiffMonths(params[0], params[1], (params.length > 2 ? params[2] : "") || "days");
16901
+ }
16902
+ FunctionFactory.Instance.register("dateDiff", dateDiff);
16832
16903
  function isContainerReadyCore(container) {
16833
16904
  if (!container)
16834
16905
  return false;
@@ -18043,6 +18114,7 @@ var map = {
18043
18114
  "./full-screen_16x16.svg": "./src/images/full-screen_16x16.svg",
18044
18115
  "./loading.svg": "./src/images/loading.svg",
18045
18116
  "./minimize_16x16.svg": "./src/images/minimize_16x16.svg",
18117
+ "./next_16x16.svg": "./src/images/next_16x16.svg",
18046
18118
  "./no-image.svg": "./src/images/no-image.svg",
18047
18119
  "./ranking-arrows.svg": "./src/images/ranking-arrows.svg",
18048
18120
  "./ranking-dash.svg": "./src/images/ranking-dash.svg",
@@ -18527,6 +18599,17 @@ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\
18527
18599
 
18528
18600
  /***/ }),
18529
18601
 
18602
+ /***/ "./src/images/next_16x16.svg":
18603
+ /*!***********************************!*\
18604
+ !*** ./src/images/next_16x16.svg ***!
18605
+ \***********************************/
18606
+ /*! no static exports found */
18607
+ /***/ (function(module, exports) {
18608
+
18609
+ 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>"
18610
+
18611
+ /***/ }),
18612
+
18530
18613
  /***/ "./src/images/no-image.svg":
18531
18614
  /*!*********************************!*\
18532
18615
  !*** ./src/images/no-image.svg ***!
@@ -21435,8 +21518,10 @@ var defaultListCss = {
21435
21518
  itemWithIcon: "sv-list__item--with-icon",
21436
21519
  itemDisabled: "sv-list__item--disabled",
21437
21520
  itemFocused: "sv-list__item--focused",
21521
+ itemHovered: "sv-list__item--hovered",
21438
21522
  itemTextWrap: "sv-list__item-text--wrap",
21439
21523
  itemIcon: "sv-list__item-icon",
21524
+ itemMarkerIcon: "sv-list-item__marker-icon",
21440
21525
  itemSeparator: "sv-list__item-separator",
21441
21526
  itemBody: "sv-list__item-body",
21442
21527
  itemsContainer: "sv-list",
@@ -21462,10 +21547,17 @@ var ListModel = /** @class */ (function (_super) {
21462
21547
  if (_this.allowSelection) {
21463
21548
  _this.selectedItem = itemValue;
21464
21549
  }
21550
+ var action = itemValue.action;
21551
+ if (!!action) {
21552
+ action(itemValue);
21553
+ }
21465
21554
  if (!!_this.onSelectionChanged) {
21466
21555
  _this.onSelectionChanged(itemValue);
21467
21556
  }
21468
21557
  };
21558
+ _this.onItemHover = function (itemValue) {
21559
+ _this.mouseOverHandler(itemValue);
21560
+ };
21469
21561
  _this.isItemDisabled = function (itemValue) {
21470
21562
  return itemValue.enabled !== undefined && !itemValue.enabled;
21471
21563
  };
@@ -21488,6 +21580,7 @@ var ListModel = /** @class */ (function (_super) {
21488
21580
  .append(_this.cssClasses.itemDisabled, _this.isItemDisabled(itemValue))
21489
21581
  .append(_this.cssClasses.itemFocused, _this.isItemFocused(itemValue))
21490
21582
  .append(_this.cssClasses.itemSelected, _this.isItemSelected(itemValue))
21583
+ .append(_this.cssClasses.itemHovered, itemValue.isHovered)
21491
21584
  .append(_this.cssClasses.itemTextWrap, _this.textWrapEnabled)
21492
21585
  .append(itemValue.css)
21493
21586
  .toString();
@@ -21533,6 +21626,26 @@ var ListModel = /** @class */ (function (_super) {
21533
21626
  ListModel.prototype.isItemVisible = function (item) {
21534
21627
  return item.visible && (!this.shouldProcessFilter || this.hasText(item, this.filterString));
21535
21628
  };
21629
+ ListModel.prototype.getRenderedActions = function () {
21630
+ var actions = _super.prototype.getRenderedActions.call(this);
21631
+ if (this.filterString) {
21632
+ var newActions_1 = [];
21633
+ actions.forEach(function (action) {
21634
+ newActions_1.push(action);
21635
+ if (action.items) {
21636
+ action.items.forEach(function (item) {
21637
+ var a = new _actions_action__WEBPACK_IMPORTED_MODULE_2__["Action"](item);
21638
+ if (!a.iconName) {
21639
+ a.iconName = action.iconName;
21640
+ }
21641
+ newActions_1.push(a);
21642
+ });
21643
+ }
21644
+ });
21645
+ return newActions_1;
21646
+ }
21647
+ return actions;
21648
+ };
21536
21649
  Object.defineProperty(ListModel.prototype, "visibleItems", {
21537
21650
  get: function () {
21538
21651
  var _this = this;
@@ -21593,6 +21706,14 @@ var ListModel = /** @class */ (function (_super) {
21593
21706
  ListModel.prototype.getDefaultCssClasses = function () {
21594
21707
  return defaultListCss;
21595
21708
  };
21709
+ ListModel.prototype.popupAfterShowCallback = function (itemValue) {
21710
+ this.addScrollEventListener(function () {
21711
+ itemValue.hidePopup();
21712
+ });
21713
+ };
21714
+ ListModel.prototype.onItemLeave = function (itemValue) {
21715
+ itemValue.hidePopupDelayed(this.subItemsHideDelay);
21716
+ };
21596
21717
  ListModel.prototype.areSameItems = function (item1, item2) {
21597
21718
  if (!!this.areSameItemsCallback)
21598
21719
  return this.areSameItemsCallback(item1, item2);
@@ -32516,7 +32637,7 @@ var PageModel = /** @class */ (function (_super) {
32516
32637
  configurable: true
32517
32638
  });
32518
32639
  PageModel.prototype.calcCssClasses = function (css) {
32519
- var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "", rowFadeOutActive: "" };
32640
+ var classes = { page: {}, error: {}, pageTitle: "", pageDescription: "", row: "", rowMultiple: "", pageRow: "", rowCompact: "", rowFadeIn: "", rowFadeOut: "", rowDelayedFadeIn: "" };
32520
32641
  this.copyCssClasses(classes.page, css.page);
32521
32642
  this.copyCssClasses(classes.error, css.error);
32522
32643
  if (!!css.pageTitle) {
@@ -32540,12 +32661,12 @@ var PageModel = /** @class */ (function (_super) {
32540
32661
  if (!!css.rowFadeIn) {
32541
32662
  classes.rowFadeIn = css.rowFadeIn;
32542
32663
  }
32664
+ if (!!css.rowDelayedFadeIn) {
32665
+ classes.rowDelayedFadeIn = css.rowDelayedFadeIn;
32666
+ }
32543
32667
  if (!!css.rowFadeOut) {
32544
32668
  classes.rowFadeOut = css.rowFadeOut;
32545
32669
  }
32546
- if (!!css.rowFadeOutActive) {
32547
- classes.rowFadeOutActive = css.rowFadeOutActive;
32548
- }
32549
32670
  if (this.survey) {
32550
32671
  this.survey.updatePageCssClasses(this, classes);
32551
32672
  }
@@ -32822,8 +32943,8 @@ var QuestionRowModel = /** @class */ (function (_super) {
32822
32943
  _this._scrollableParent = undefined;
32823
32944
  _this._updateVisibility = undefined;
32824
32945
  _this.visibleElementsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getVisibleElementsAnimationOptions(), function (value) {
32946
+ _this.setWidth(value);
32825
32947
  _this.setPropertyValue("visibleElements", value);
32826
- _this.setWidth();
32827
32948
  }, function () { return _this.visibleElements; });
32828
32949
  _this.idValue = QuestionRowModel.getRowId();
32829
32950
  _this.visible = panel.areInvisibleElementsShowing;
@@ -32912,7 +33033,9 @@ var QuestionRowModel = /** @class */ (function (_super) {
32912
33033
  el.style.setProperty("--animation-width", Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["getElementWidth"])(el) + "px");
32913
33034
  };
32914
33035
  return {
33036
+ getRerenderEvent: function () { return _this.onElementRerendered; },
32915
33037
  isAnimationEnabled: function () { return _this.animationAllowed; },
33038
+ allowSyncRemovalAddition: false,
32916
33039
  getAnimatedElement: function (element) { return element.getWrapperElement(); },
32917
33040
  getLeaveOptions: function (element) {
32918
33041
  var surveyElement = element;
@@ -32992,12 +33115,12 @@ var QuestionRowModel = /** @class */ (function (_super) {
32992
33115
  enumerable: false,
32993
33116
  configurable: true
32994
33117
  });
32995
- QuestionRowModel.prototype.setWidth = function () {
33118
+ QuestionRowModel.prototype.setWidth = function (visibleElement) {
32996
33119
  var _a;
32997
- var visCount = this.visibleElements.length;
33120
+ var visCount = visibleElement.length;
32998
33121
  if (visCount == 0)
32999
33122
  return;
33000
- var isSingleInRow = this.visibleElements.length === 1;
33123
+ var isSingleInRow = visibleElement.length === 1;
33001
33124
  var counter = 0;
33002
33125
  var preSetWidthElements = [];
33003
33126
  for (var i = 0; i < this.elements.length; i++) {
@@ -33128,6 +33251,7 @@ var PanelModelBase = /** @class */ (function (_super) {
33128
33251
  el.style.setProperty("--animation-height", el.offsetHeight + "px");
33129
33252
  };
33130
33253
  return {
33254
+ getRerenderEvent: function () { return _this.onElementRerendered; },
33131
33255
  isAnimationEnabled: function () { return _this.animationAllowed; },
33132
33256
  getAnimatedElement: function (row) { return row.getRootElement(); },
33133
33257
  getLeaveOptions: function (_) {
@@ -33135,9 +33259,10 @@ var PanelModelBase = /** @class */ (function (_super) {
33135
33259
  onBeforeRunAnimation: beforeRunAnimation
33136
33260
  };
33137
33261
  },
33138
- getEnterOptions: function (_) {
33262
+ getEnterOptions: function (_, animationInfo) {
33263
+ var cssClasses = _this.cssClasses;
33139
33264
  return {
33140
- cssClass: _this.cssClasses.rowFadeIn,
33265
+ cssClass: new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(cssClasses.rowFadeIn).append(cssClasses.rowDelayedFadeIn, animationInfo.isDeletingRunning).toString(),
33141
33266
  onBeforeRunAnimation: beforeRunAnimation
33142
33267
  };
33143
33268
  }
@@ -33401,7 +33526,7 @@ var PanelModelBase = /** @class */ (function (_super) {
33401
33526
  configurable: true
33402
33527
  });
33403
33528
  PanelModelBase.prototype.calcCssClasses = function (css) {
33404
- var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "", rowFadeOutActive: "", rowMultiple: "", pageRow: "", rowCompact: "" };
33529
+ var classes = { panel: {}, error: {}, row: "", rowFadeIn: "", rowFadeOut: "", rowDelayedFadeIn: "", rowMultiple: "", pageRow: "", rowCompact: "" };
33405
33530
  this.copyCssClasses(classes.panel, css.panel);
33406
33531
  this.copyCssClasses(classes.error, css.error);
33407
33532
  if (!!css.pageRow) {
@@ -33419,8 +33544,8 @@ var PanelModelBase = /** @class */ (function (_super) {
33419
33544
  if (!!css.rowFadeOut) {
33420
33545
  classes.rowFadeOut = css.rowFadeOut;
33421
33546
  }
33422
- if (!!css.rowFadeOutActive) {
33423
- classes.rowFadeOutActive = css.rowFadeOutActive;
33547
+ if (!!css.rowDelayedFadeIn) {
33548
+ classes.rowDelayedFadeIn = css.rowDelayedFadeIn;
33424
33549
  }
33425
33550
  if (!!css.rowMultiple) {
33426
33551
  classes.rowMultiple = css.rowMultiple;
@@ -33740,16 +33865,13 @@ var PanelModelBase = /** @class */ (function (_super) {
33740
33865
  ? rec
33741
33866
  : {
33742
33867
  fireCallback: fireCallback,
33743
- focuseOnFirstError: focusOnFirstError,
33868
+ focusOnFirstError: focusOnFirstError,
33744
33869
  firstErrorQuestion: null,
33745
33870
  result: false,
33746
33871
  };
33747
33872
  if (rec.result !== true)
33748
33873
  rec.result = false;
33749
33874
  this.hasErrorsCore(rec);
33750
- if (rec.focuseOnFirstError && rec.firstErrorQuestion) {
33751
- rec.firstErrorQuestion.focus(true);
33752
- }
33753
33875
  return !rec.result;
33754
33876
  };
33755
33877
  PanelModelBase.prototype.validateContainerOnly = function () {
@@ -33794,13 +33916,14 @@ var PanelModelBase = /** @class */ (function (_super) {
33794
33916
  }
33795
33917
  rec.result = true;
33796
33918
  errors.push(new _error__WEBPACK_IMPORTED_MODULE_6__["OneAnswerRequiredError"](this.requiredErrorText, this));
33797
- if (rec.focuseOnFirstError && !rec.firstErrorQuestion) {
33919
+ if (rec.focusOnFirstError && !rec.firstErrorQuestion) {
33798
33920
  rec.firstErrorQuestion = visQuestions[0];
33799
33921
  }
33800
33922
  };
33801
33923
  PanelModelBase.prototype.hasErrorsCore = function (rec) {
33802
33924
  var elements = this.elements;
33803
33925
  var element = null;
33926
+ var firstErroredEl = null;
33804
33927
  for (var i = 0; i < elements.length; i++) {
33805
33928
  element = elements[i];
33806
33929
  if (!element.isVisible)
@@ -33811,6 +33934,9 @@ var PanelModelBase = /** @class */ (function (_super) {
33811
33934
  else {
33812
33935
  var question = element;
33813
33936
  if (!question.validate(rec.fireCallback, rec)) {
33937
+ if (!firstErroredEl) {
33938
+ firstErroredEl = question;
33939
+ }
33814
33940
  if (!rec.firstErrorQuestion) {
33815
33941
  rec.firstErrorQuestion = question;
33816
33942
  }
@@ -33820,6 +33946,20 @@ var PanelModelBase = /** @class */ (function (_super) {
33820
33946
  }
33821
33947
  this.hasErrorsInPanels(rec);
33822
33948
  this.updateContainsErrors();
33949
+ if (!firstErroredEl && this.errors.length > 0) {
33950
+ firstErroredEl = this.getFirstQuestionToFocus(false, true);
33951
+ if (!rec.firstErrorQuestion) {
33952
+ rec.firstErrorQuestion = firstErroredEl;
33953
+ }
33954
+ }
33955
+ if (rec.fireCallback && firstErroredEl) {
33956
+ if (firstErroredEl === rec.firstErrorQuestion && rec.focusOnFirstError) {
33957
+ firstErroredEl.focus(true);
33958
+ }
33959
+ else {
33960
+ firstErroredEl.expandAllParents();
33961
+ }
33962
+ }
33823
33963
  };
33824
33964
  PanelModelBase.prototype.getContainsErrors = function () {
33825
33965
  var res = _super.prototype.getContainsErrors.call(this);
@@ -34332,21 +34472,10 @@ var PanelModelBase = /** @class */ (function (_super) {
34332
34472
  }
34333
34473
  };
34334
34474
  PanelModelBase.prototype.notifyStateChanged = function (prevState) {
34335
- var _this = this;
34336
34475
  _super.prototype.notifyStateChanged.call(this, prevState);
34337
34476
  if (this.isCollapsed) {
34338
34477
  this.questions.forEach(function (q) { return q.onHidingContent(); });
34339
34478
  }
34340
- if (this.survey != null && !this.isLoadingFromJson && this.isExpanded && prevState === "collapsed") {
34341
- var q_1 = this.getFirstQuestionToFocus(false);
34342
- if (!!q_1) {
34343
- setTimeout(function () {
34344
- if (!_this.isDisposed && !!_this.survey) {
34345
- _this.survey.scrollElementToTop(q_1, q_1, null, q_1.inputId, false);
34346
- }
34347
- }, 15);
34348
- }
34349
- }
34350
34479
  };
34351
34480
  Object.defineProperty(PanelModelBase.prototype, "isVisible", {
34352
34481
  /**
@@ -34943,12 +35072,6 @@ var PanelModel = /** @class */ (function (_super) {
34943
35072
  this.survey.panelVisibilityChanged(this, this.isVisible);
34944
35073
  }
34945
35074
  };
34946
- PanelModel.prototype.hasErrorsCore = function (rec) {
34947
- _super.prototype.hasErrorsCore.call(this, rec);
34948
- if (this.isCollapsed && rec.result && rec.fireCallback) {
34949
- this.expand();
34950
- }
34951
- };
34952
35075
  PanelModel.prototype.getRenderedTitle = function (str) {
34953
35076
  if (!str) {
34954
35077
  if (this.isCollapsed || this.isExpanded)
@@ -35132,6 +35255,19 @@ var PanelModel = /** @class */ (function (_super) {
35132
35255
  enumerable: false,
35133
35256
  configurable: true
35134
35257
  });
35258
+ PanelModel.prototype.onElementExpanded = function (elementIsRendered) {
35259
+ var _this = this;
35260
+ if (this.survey != null && !this.isLoadingFromJson) {
35261
+ var q_1 = this.getFirstQuestionToFocus(false);
35262
+ if (!!q_1) {
35263
+ setTimeout(function () {
35264
+ if (!_this.isDisposed && !!_this.survey) {
35265
+ _this.survey.scrollElementToTop(q_1, q_1, null, q_1.inputId, false, { behavior: "smooth" });
35266
+ }
35267
+ }, elementIsRendered ? 0 : 15);
35268
+ }
35269
+ }
35270
+ };
35135
35271
  PanelModel.prototype.getCssRoot = function (cssClasses) {
35136
35272
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
35137
35273
  .append(_super.prototype.getCssRoot.call(this, cssClasses))
@@ -36632,9 +36768,10 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
36632
36768
 
36633
36769
  var PopupDropdownViewModel = /** @class */ (function (_super) {
36634
36770
  __extends(PopupDropdownViewModel, _super);
36635
- function PopupDropdownViewModel(model, targetElement) {
36771
+ function PopupDropdownViewModel(model, targetElement, areaElement) {
36636
36772
  var _this = _super.call(this, model) || this;
36637
36773
  _this.targetElement = targetElement;
36774
+ _this.areaElement = areaElement;
36638
36775
  _this.scrollEventCallBack = function (event) {
36639
36776
  if (_this.isOverlay && _utils_devices__WEBPACK_IMPORTED_MODULE_3__["IsTouch"]) {
36640
36777
  event.stopPropagation();
@@ -36672,11 +36809,24 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
36672
36809
  var width = Math.min(windowWidth, windowHeight);
36673
36810
  this.isTablet = width >= PopupDropdownViewModel.tabletSizeBreakpoint;
36674
36811
  };
36812
+ PopupDropdownViewModel.prototype.getAvailableAreaRect = function () {
36813
+ if (this.areaElement) {
36814
+ var areaRect = this.areaElement.getBoundingClientRect();
36815
+ return new _utils_popup__WEBPACK_IMPORTED_MODULE_1__["Rect"](areaRect.x, areaRect.y, areaRect.width, areaRect.height);
36816
+ }
36817
+ 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());
36818
+ };
36819
+ PopupDropdownViewModel.prototype.getTargetElementRect = function () {
36820
+ var rect = this.targetElement.getBoundingClientRect();
36821
+ var areaRect = this.getAvailableAreaRect();
36822
+ return new _utils_popup__WEBPACK_IMPORTED_MODULE_1__["Rect"](rect.left - areaRect.left, rect.top - areaRect.top, rect.width, rect.height);
36823
+ };
36675
36824
  PopupDropdownViewModel.prototype._updatePosition = function () {
36676
36825
  var _a, _b, _c;
36677
36826
  if (!this.targetElement)
36678
36827
  return;
36679
- var targetElementRect = this.targetElement.getBoundingClientRect();
36828
+ var targetElementRect = this.getTargetElementRect();
36829
+ var area = this.getAvailableAreaRect();
36680
36830
  var popupContainer = (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.containerSelector);
36681
36831
  if (!popupContainer)
36682
36832
  return;
@@ -36693,12 +36843,13 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
36693
36843
  if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].isAvailable()) {
36694
36844
  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];
36695
36845
  height = Math.ceil(Math.min.apply(Math, heightValues.filter(function (each) { return typeof each === "number"; })));
36696
- verticalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalPosition(targetElementRect, height, this.model.verticalPosition, this.model.showPointer, _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerHeight());
36846
+ verticalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateVerticalPosition(targetElementRect, height, this.model.horizontalPosition, this.model.verticalPosition, area.height);
36847
+ actualHorizontalPosition = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].updateHorizontalPosition(targetElementRect, width, this.model.horizontalPosition, area.width);
36697
36848
  }
36698
36849
  this.popupDirection = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePopupDirection(verticalPosition, actualHorizontalPosition);
36699
- var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.showHeader, this.model.positionMode);
36850
+ var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.model.positionMode);
36700
36851
  if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].isAvailable()) {
36701
- var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height, _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerHeight(), verticalPosition);
36852
+ var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height, area.height, verticalPosition, this.model.canShrink);
36702
36853
  if (!!newVerticalDimensions) {
36703
36854
  this.height = newVerticalDimensions.height + "px";
36704
36855
  pos.top = newVerticalDimensions.top;
@@ -36720,6 +36871,8 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
36720
36871
  pos.top -= rect.top;
36721
36872
  pos.left -= rect.left;
36722
36873
  }
36874
+ pos.left += area.left;
36875
+ pos.top += area.top;
36723
36876
  this.left = pos.left + "px";
36724
36877
  this.top = pos.top + "px";
36725
36878
  if (this.showHeader) {
@@ -36757,10 +36910,11 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
36757
36910
  PopupDropdownViewModel.prototype.getPopupHeaderTemplate = function () {
36758
36911
  return "popup-pointer";
36759
36912
  };
36760
- PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot, targetElement) {
36913
+ PopupDropdownViewModel.prototype.setComponentElement = function (componentRoot, targetElement, areaElement) {
36761
36914
  _super.prototype.setComponentElement.call(this, componentRoot);
36762
36915
  if (!!componentRoot && !!componentRoot.parentElement && !this.isModal) {
36763
36916
  this.targetElement = targetElement || componentRoot.parentElement;
36917
+ this.areaElement = areaElement;
36764
36918
  }
36765
36919
  };
36766
36920
  PopupDropdownViewModel.prototype.resetComponentElement = function () {
@@ -36918,6 +37072,7 @@ var PopupModalViewModel = /** @class */ (function (_super) {
36918
37072
  PopupModalViewModel.prototype.createFooterActionBar = function () {
36919
37073
  var _this = this;
36920
37074
  _super.prototype.createFooterActionBar.call(this);
37075
+ this.footerToolbar.containerCss = "sv-footer-action-bar";
36921
37076
  this.footerToolbarValue.addAction({
36922
37077
  id: "apply",
36923
37078
  visibleIndex: 20,
@@ -37574,7 +37729,11 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
37574
37729
  this.model.onHiding();
37575
37730
  };
37576
37731
  PopupBaseViewModel.prototype.getLeaveOptions = function () {
37577
- return { cssClass: "sv-popup--animate-leave" };
37732
+ return { cssClass: "sv-popup--animate-leave", onBeforeRunAnimation: function (el) {
37733
+ el.setAttribute("inert", "");
37734
+ },
37735
+ onAfterRunAnimation: function (el) { return el.removeAttribute("inert"); }
37736
+ };
37578
37737
  };
37579
37738
  PopupBaseViewModel.prototype.getEnterOptions = function () {
37580
37739
  return { cssClass: "sv-popup--animate-enter" };
@@ -37585,6 +37744,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
37585
37744
  PopupBaseViewModel.prototype.isAnimationEnabled = function () {
37586
37745
  return this.model.displayMode !== "overlay" && _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].animationEnabled;
37587
37746
  };
37747
+ PopupBaseViewModel.prototype.getRerenderEvent = function () { return this.onElementRerendered; };
37588
37748
  PopupBaseViewModel.prototype.getAnimationContainer = function () {
37589
37749
  var _a;
37590
37750
  return (_a = this.container) === null || _a === void 0 ? void 0 : _a.querySelector(this.fixedPopupContainer);
@@ -37869,7 +38029,7 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
37869
38029
  Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.popupMountContainer).appendChild(container);
37870
38030
  }
37871
38031
  };
37872
- PopupBaseViewModel.prototype.setComponentElement = function (componentRoot, targetElement) {
38032
+ PopupBaseViewModel.prototype.setComponentElement = function (componentRoot, targetElement, areaElement) {
37873
38033
  if (!!componentRoot) {
37874
38034
  this.containerElement = componentRoot;
37875
38035
  }
@@ -38049,6 +38209,9 @@ var PopupModel = /** @class */ (function (_super) {
38049
38209
  __decorate([
38050
38210
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
38051
38211
  ], PopupModel.prototype, "isModal", void 0);
38212
+ __decorate([
38213
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
38214
+ ], PopupModel.prototype, "canShrink", void 0);
38052
38215
  __decorate([
38053
38216
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: true })
38054
38217
  ], PopupModel.prototype, "isFocusedContent", void 0);
@@ -39523,6 +39686,7 @@ var Question = /** @class */ (function (_super) {
39523
39686
  .append(cssClasses.hasErrorBottom, hasError && this.getErrorLocation() == "bottom")
39524
39687
  .append(cssClasses.small, !this.width)
39525
39688
  .append(cssClasses.answered, this.isAnswered)
39689
+ .append(cssClasses.noPointerEventsMode, this.isReadOnlyAttr)
39526
39690
  .toString();
39527
39691
  };
39528
39692
  Object.defineProperty(Question.prototype, "cssHeader", {
@@ -39765,7 +39929,7 @@ var Question = /** @class */ (function (_super) {
39765
39929
  Question.prototype.focuscore = function (onError, scrollIfVisible) {
39766
39930
  if (onError === void 0) { onError = false; }
39767
39931
  if (!!this.survey) {
39768
- this.expandAllParents(this);
39932
+ this.expandAllParents();
39769
39933
  this.survey.scrollElementToTop(this, this, null, this.id, scrollIfVisible);
39770
39934
  }
39771
39935
  var id = !onError
@@ -39775,14 +39939,17 @@ var Question = /** @class */ (function (_super) {
39775
39939
  this.fireCallback(this.focusCallback);
39776
39940
  }
39777
39941
  };
39778
- Question.prototype.expandAllParents = function (element) {
39942
+ Question.prototype.expandAllParents = function () {
39943
+ this.expandAllParentsCore(this);
39944
+ };
39945
+ Question.prototype.expandAllParentsCore = function (element) {
39779
39946
  if (!element)
39780
39947
  return;
39781
39948
  if (element.isCollapsed) {
39782
39949
  element.expand();
39783
39950
  }
39784
- this.expandAllParents(element.parent);
39785
- this.expandAllParents(element.parentQuestion);
39951
+ this.expandAllParentsCore(element.parent);
39952
+ this.expandAllParentsCore(element.parentQuestion);
39786
39953
  };
39787
39954
  Question.prototype.focusIn = function () {
39788
39955
  if (!this.survey || this.isDisposed || this.isContainer)
@@ -39991,6 +40158,20 @@ var Question = /** @class */ (function (_super) {
39991
40158
  enumerable: false,
39992
40159
  configurable: true
39993
40160
  });
40161
+ Object.defineProperty(Question.prototype, "isReadOnlyAttr", {
40162
+ get: function () {
40163
+ return this.isReadOnly;
40164
+ },
40165
+ enumerable: false,
40166
+ configurable: true
40167
+ });
40168
+ Object.defineProperty(Question.prototype, "isDisabledAttr", {
40169
+ get: function () {
40170
+ return this.isDesignModeV2;
40171
+ },
40172
+ enumerable: false,
40173
+ configurable: true
40174
+ });
39994
40175
  Question.prototype.onReadOnlyChanged = function () {
39995
40176
  this.setPropertyValue("isInputReadOnly", this.isInputReadOnly);
39996
40177
  _super.prototype.onReadOnlyChanged.call(this);
@@ -40606,6 +40787,13 @@ var Question = /** @class */ (function (_super) {
40606
40787
  return;
40607
40788
  this.setDefaultValue();
40608
40789
  };
40790
+ Object.defineProperty(Question.prototype, "isValueDefault", {
40791
+ get: function () {
40792
+ return !this.isEmpty() && (this.isTwoValueEquals(this.defaultValue, this.value) || !this.isValueChangedDirectly && !!this.defaultValueExpression);
40793
+ },
40794
+ enumerable: false,
40795
+ configurable: true
40796
+ });
40609
40797
  Object.defineProperty(Question.prototype, "isClearValueOnHidden", {
40610
40798
  get: function () {
40611
40799
  var clearIf = this.getClearIfInvisible();
@@ -40682,9 +40870,9 @@ var Question = /** @class */ (function (_super) {
40682
40870
  };
40683
40871
  }
40684
40872
  if (!values)
40685
- values = this.data.getFilteredValues();
40873
+ values = this.defaultValueExpression ? this.data.getFilteredValues() : {};
40686
40874
  if (!properties)
40687
- properties = this.data.getFilteredProperties();
40875
+ properties = this.defaultValueExpression ? this.data.getFilteredProperties() : {};
40688
40876
  if (!!runner && runner.canRun) {
40689
40877
  runner.onRunComplete = function (res) {
40690
40878
  if (res == undefined)
@@ -41034,13 +41222,9 @@ var Question = /** @class */ (function (_super) {
41034
41222
  Question.prototype.isTextValue = function () {
41035
41223
  return false;
41036
41224
  };
41037
- Object.defineProperty(Question.prototype, "isSurveyInputTextUpdate", {
41038
- get: function () {
41039
- return !!this.survey ? this.survey.isUpdateValueTextOnTyping : false;
41040
- },
41041
- enumerable: false,
41042
- configurable: true
41043
- });
41225
+ Question.prototype.getIsInputTextUpdate = function () {
41226
+ return !!this.survey ? this.survey.isUpdateValueTextOnTyping : false;
41227
+ };
41044
41228
  Object.defineProperty(Question.prototype, "requireStrictCompare", {
41045
41229
  get: function () { return false; },
41046
41230
  enumerable: false,
@@ -41051,7 +41235,7 @@ var Question = /** @class */ (function (_super) {
41051
41235
  };
41052
41236
  Object.defineProperty(Question.prototype, "isInputTextUpdate", {
41053
41237
  get: function () {
41054
- return this.isSurveyInputTextUpdate && this.isTextValue();
41238
+ return this.getIsInputTextUpdate() && this.isTextValue();
41055
41239
  },
41056
41240
  enumerable: false,
41057
41241
  configurable: true
@@ -41091,7 +41275,7 @@ var Question = /** @class */ (function (_super) {
41091
41275
  };
41092
41276
  Question.prototype.setCommentIntoData = function (newValue) {
41093
41277
  if (this.data != null) {
41094
- this.data.setComment(this.getValueName(), newValue, this.isSurveyInputTextUpdate ? "text" : false);
41278
+ this.data.setComment(this.getValueName(), newValue, this.getIsInputTextUpdate() ? "text" : false);
41095
41279
  }
41096
41280
  };
41097
41281
  Question.prototype.getValidName = function (name) {
@@ -42097,6 +42281,15 @@ var QuestionSelectBase = /** @class */ (function (_super) {
42097
42281
  _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.choicesFromUrl);
42098
42282
  _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.visibleChoices);
42099
42283
  }
42284
+ if (this.isUsingCarryForward) {
42285
+ _itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"].locStrsChanged(this.visibleChoices);
42286
+ }
42287
+ };
42288
+ QuestionSelectBase.prototype.updatePrevOtherErrorValue = function (val) {
42289
+ var oldVal = this.otherValue;
42290
+ if (val !== oldVal) {
42291
+ this.prevOtherErrorValue = oldVal;
42292
+ }
42100
42293
  };
42101
42294
  Object.defineProperty(QuestionSelectBase.prototype, "otherValue", {
42102
42295
  get: function () {
@@ -42105,6 +42298,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
42105
42298
  return this.otherValueCore;
42106
42299
  },
42107
42300
  set: function (val) {
42301
+ this.updatePrevOtherErrorValue(val);
42108
42302
  if (!this.showCommentArea) {
42109
42303
  this.comment = val;
42110
42304
  }
@@ -42557,6 +42751,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
42557
42751
  this.value = val ? this.otherItem.value : undefined;
42558
42752
  };
42559
42753
  QuestionSelectBase.prototype.setQuestionComment = function (newValue) {
42754
+ this.updatePrevOtherErrorValue(newValue);
42560
42755
  if (this.showCommentArea) {
42561
42756
  _super.prototype.setQuestionComment.call(this, newValue);
42562
42757
  return;
@@ -42601,6 +42796,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
42601
42796
  return this.getPropertyValue("renderedValue", null);
42602
42797
  },
42603
42798
  set: function (val) {
42799
+ if (this.isReadOnlyAttr)
42800
+ return;
42604
42801
  this.setPropertyValue("renderedValue", val);
42605
42802
  var val = this.rendredValueToData(val);
42606
42803
  if (!this.isTwoValueEquals(val, this.value)) {
@@ -43236,6 +43433,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
43236
43433
  return questionPlainData;
43237
43434
  };
43238
43435
  QuestionSelectBase.prototype.getDisplayValueCore = function (keysAsText, value) {
43436
+ if (!this.useDisplayValuesInDynamicTexts)
43437
+ return value;
43239
43438
  return this.getChoicesDisplayValue(this.visibleChoices, value);
43240
43439
  };
43241
43440
  QuestionSelectBase.prototype.getDisplayValueEmpty = function () {
@@ -43462,7 +43661,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
43462
43661
  QuestionSelectBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
43463
43662
  var _this = this;
43464
43663
  _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
43465
- if (!this.hasOther || !this.isOtherSelected || this.otherValue)
43664
+ if (!this.hasOther || !this.isOtherSelected || this.otherValue
43665
+ || isOnValueChanged && !this.prevOtherErrorValue)
43466
43666
  return;
43467
43667
  var otherEmptyError = new _error__WEBPACK_IMPORTED_MODULE_5__["OtherEmptyError"](this.otherErrorText, this);
43468
43668
  otherEmptyError.onUpdateErrorTextCallback = function (err) { err.text = _this.otherErrorText; };
@@ -44059,7 +44259,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
44059
44259
  configurable: true
44060
44260
  });
44061
44261
  QuestionSelectBase.prototype.getItemEnabled = function (item) {
44062
- return !this.isInputReadOnly && item.isEnabled;
44262
+ return !this.isDisabledAttr && item.isEnabled;
44063
44263
  };
44064
44264
  QuestionSelectBase.prototype.afterRender = function (el) {
44065
44265
  _super.prototype.afterRender.call(this, el);
@@ -44441,7 +44641,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
44441
44641
  this.value = val == true ? this.getValueTrue() : this.getValueFalse();
44442
44642
  this.booleanValueRendered = val;
44443
44643
  }
44444
- this.updateThumbMargin();
44445
44644
  };
44446
44645
  Object.defineProperty(QuestionBooleanModel.prototype, "defaultValue", {
44447
44646
  get: function () {
@@ -44646,6 +44845,15 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
44646
44845
  .append(this.cssClasses.labelFalse, !this.isIndeterminate && checked === this.swapOrder)
44647
44846
  .toString();
44648
44847
  };
44848
+ QuestionBooleanModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
44849
+ if (clearData === void 0) { clearData = false; }
44850
+ _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
44851
+ this.updateThumbMargin();
44852
+ };
44853
+ QuestionBooleanModel.prototype.onValueChanged = function () {
44854
+ _super.prototype.onValueChanged.call(this);
44855
+ this.updateThumbMargin();
44856
+ };
44649
44857
  Object.defineProperty(QuestionBooleanModel.prototype, "svgIcon", {
44650
44858
  get: function () {
44651
44859
  if (this.booleanValue && this.cssClasses.svgIconCheckedId)
@@ -45265,6 +45473,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
45265
45473
  this.renderedValue = val;
45266
45474
  };
45267
45475
  QuestionCheckboxModel.prototype.clickItemHandler = function (item, checked) {
45476
+ if (this.isReadOnlyAttr)
45477
+ return;
45268
45478
  if (item === this.selectAllItem) {
45269
45479
  if (checked === true || checked === false) {
45270
45480
  this.isAllSelected = checked;
@@ -47149,6 +47359,9 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
47149
47359
  this.contentPanel.getValue() : this.getValueForContentPanel(this.value);
47150
47360
  if (!val)
47151
47361
  val = {};
47362
+ if (!val.getType) {
47363
+ val = _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].getUnbindValue(val);
47364
+ }
47152
47365
  if (this.isValueEmpty(newValue) && !this.isEditingSurveyElement) {
47153
47366
  delete val[name];
47154
47367
  }
@@ -48538,7 +48751,16 @@ var QuestionFileModel = /** @class */ (function (_super) {
48538
48751
  }
48539
48752
  _this.clearFilesCore();
48540
48753
  };
48754
+ _this.doDownloadFileFromContainer = function (event) {
48755
+ event.stopPropagation();
48756
+ var currentTarget = event.currentTarget;
48757
+ if (currentTarget && currentTarget.getElementsByTagName) {
48758
+ var link = currentTarget.getElementsByTagName("a")[0];
48759
+ link === null || link === void 0 ? void 0 : link.click();
48760
+ }
48761
+ };
48541
48762
  _this.doDownloadFile = function (event, data) {
48763
+ event.stopPropagation();
48542
48764
  if (Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["detectIEOrEdge"])()) {
48543
48765
  event.preventDefault();
48544
48766
  Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["loadFileFromBase64"])(data.content, data.name);
@@ -49453,8 +49675,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
49453
49675
  }
49454
49676
  this.clear();
49455
49677
  };
49456
- QuestionFileModel.prototype.doRemoveFile = function (data) {
49678
+ QuestionFileModel.prototype.doRemoveFile = function (data, event) {
49457
49679
  var _this = this;
49680
+ event.stopPropagation();
49458
49681
  if (this.needConfirmRemoveFile) {
49459
49682
  Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(this.getConfirmRemoveMessage(data.name), function () { _this.removeFileCore(data); }, undefined, this.getLocale(), this.survey.rootElement);
49460
49683
  return;
@@ -50824,6 +51047,16 @@ var MatrixRowModel = /** @class */ (function (_super) {
50824
51047
  enumerable: false,
50825
51048
  configurable: true
50826
51049
  });
51050
+ Object.defineProperty(MatrixRowModel.prototype, "isReadOnlyAttr", {
51051
+ get: function () { return this.data.isReadOnlyAttr; },
51052
+ enumerable: false,
51053
+ configurable: true
51054
+ });
51055
+ Object.defineProperty(MatrixRowModel.prototype, "isDisabledAttr", {
51056
+ get: function () { return !this.item.enabled || this.data.isDisabledAttr; },
51057
+ enumerable: false,
51058
+ configurable: true
51059
+ });
50827
51060
  Object.defineProperty(MatrixRowModel.prototype, "rowTextClasses", {
50828
51061
  get: function () {
50829
51062
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(this.data.cssClasses.rowTextCell).toString();
@@ -51662,6 +51895,7 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
51662
51895
  __extends(QuestionMatrixDropdownModel, _super);
51663
51896
  function QuestionMatrixDropdownModel(name) {
51664
51897
  var _this = _super.call(this, name) || this;
51898
+ _this.defaultValuesInRows = {};
51665
51899
  _this.createLocalizableString("totalText", _this, true);
51666
51900
  _this.registerPropertyChangedHandlers(["rows"], function () {
51667
51901
  _this.clearGeneratedRows();
@@ -51784,6 +52018,29 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
51784
52018
  _super.prototype.clearValueIfInvisibleCore.call(this, reason);
51785
52019
  this.clearInvisibleValuesInRows();
51786
52020
  };
52021
+ QuestionMatrixDropdownModel.prototype.clearGeneratedRows = function () {
52022
+ var _this = this;
52023
+ if (!this.generatedVisibleRows)
52024
+ return;
52025
+ if (!this.isDisposed) {
52026
+ this.generatedVisibleRows.forEach(function (row) {
52027
+ _this.defaultValuesInRows[row.rowName] = row.getNamesWithDefaultValues();
52028
+ });
52029
+ }
52030
+ _super.prototype.clearGeneratedRows.call(this);
52031
+ };
52032
+ QuestionMatrixDropdownModel.prototype.getRowValueForCreation = function (val, rowValue) {
52033
+ var res = val[rowValue];
52034
+ if (!res)
52035
+ return res;
52036
+ var names = this.defaultValuesInRows[rowValue];
52037
+ if (!Array.isArray(names) || names.length === 0)
52038
+ return res;
52039
+ names.forEach(function (name) {
52040
+ delete res[name];
52041
+ });
52042
+ return res;
52043
+ };
51787
52044
  QuestionMatrixDropdownModel.prototype.generateRows = function () {
51788
52045
  var result = new Array();
51789
52046
  var rows = !!this.filteredRows ? this.filteredRows : this.rows;
@@ -51793,9 +52050,10 @@ var QuestionMatrixDropdownModel = /** @class */ (function (_super) {
51793
52050
  if (!val)
51794
52051
  val = {};
51795
52052
  for (var i = 0; i < rows.length; i++) {
51796
- if (this.isValueEmpty(rows[i].value))
52053
+ var row = rows[i];
52054
+ if (this.isValueEmpty(row.value))
51797
52055
  continue;
51798
- result.push(this.createMatrixRow(rows[i], val[rows[i].value]));
52056
+ result.push(this.createMatrixRow(row, this.getRowValueForCreation(val, row.value)));
51799
52057
  }
51800
52058
  return result;
51801
52059
  };
@@ -52256,18 +52514,22 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
52256
52514
  }
52257
52515
  }
52258
52516
  res.row = this.getAllValues();
52517
+ this.applyRowVariablesToValues(res, this.rowIndex);
52259
52518
  return res;
52260
52519
  };
52261
52520
  MatrixDropdownRowModelBase.prototype.getFilteredProperties = function () {
52262
52521
  return { survey: this.getSurvey(), row: this };
52263
52522
  };
52523
+ MatrixDropdownRowModelBase.prototype.applyRowVariablesToValues = function (res, rowIndex) {
52524
+ res[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
52525
+ res[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
52526
+ };
52264
52527
  MatrixDropdownRowModelBase.prototype.runCondition = function (values, properties) {
52265
52528
  if (!!this.data) {
52266
52529
  values[MatrixDropdownRowModelBase.OwnerVariableName] = this.data.value;
52267
52530
  }
52268
52531
  var rowIndex = this.rowIndex;
52269
- values[MatrixDropdownRowModelBase.IndexVariableName] = rowIndex;
52270
- values[MatrixDropdownRowModelBase.RowValueVariableName] = this.rowName;
52532
+ this.applyRowVariablesToValues(values, rowIndex);
52271
52533
  var newProps = _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].createCopy(properties);
52272
52534
  newProps[MatrixDropdownRowModelBase.RowVariableName] = this;
52273
52535
  var rowValues = rowIndex > 0 ? this.data.getRowValue(this.rowIndex - 1) : this.value;
@@ -52282,6 +52544,15 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
52282
52544
  this.detailPanel.runCondition(values, newProps);
52283
52545
  }
52284
52546
  };
52547
+ MatrixDropdownRowModelBase.prototype.getNamesWithDefaultValues = function () {
52548
+ var res = [];
52549
+ this.questions.forEach(function (q) {
52550
+ if (q.isValueDefault) {
52551
+ res.push(q.getValueName());
52552
+ }
52553
+ });
52554
+ return res;
52555
+ };
52285
52556
  MatrixDropdownRowModelBase.prototype.clearValue = function (keepComment) {
52286
52557
  var questions = this.questions;
52287
52558
  for (var i = 0; i < questions.length; i++) {
@@ -55514,6 +55785,13 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
55514
55785
  json[prop] = _this.jsonObj[prop];
55515
55786
  });
55516
55787
  }
55788
+ if (json["choicesOrder"] === "random") {
55789
+ json["choicesOrder"] = "none";
55790
+ var visChoices = this.templateQuestion["visibleChoices"];
55791
+ if (Array.isArray(visChoices)) {
55792
+ json["choices"] = visChoices;
55793
+ }
55794
+ }
55517
55795
  new _jsonobject__WEBPACK_IMPORTED_MODULE_0__["JsonObject"]().toObject(json, question);
55518
55796
  question.isContentElement = this.templateQuestion.isContentElement;
55519
55797
  this.previousChoicesId = undefined;
@@ -55536,8 +55814,12 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
55536
55814
  }
55537
55815
  if (!this.colOwner || this.isLoadingFromJson)
55538
55816
  return;
55539
- if (this.isShowInMultipleColumns && ["visibleChoices", "choices"].indexOf(name) > -1) {
55540
- this.colOwner.onShowInMultipleColumnsChanged(this);
55817
+ if (this.isShowInMultipleColumns) {
55818
+ if (name === "choicesOrder")
55819
+ return;
55820
+ if (["visibleChoices", "choices"].indexOf(name) > -1) {
55821
+ this.colOwner.onShowInMultipleColumnsChanged(this);
55822
+ }
55541
55823
  }
55542
55824
  if (!_jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].hasOriginalProperty(this, name))
55543
55825
  return;
@@ -56017,11 +56299,9 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
56017
56299
  function QuestionMatrixDropdownRenderedTable(matrix) {
56018
56300
  var _this = _super.call(this) || this;
56019
56301
  _this.matrix = matrix;
56020
- _this.renderedRowsChangedCallback = function () { };
56021
56302
  _this._renderedRows = [];
56022
56303
  _this.renderedRowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_8__["AnimationGroup"](_this.getRenderedRowsAnimationOptions(), function (val) {
56023
56304
  _this._renderedRows = val;
56024
- _this.renderedRowsChangedCallback();
56025
56305
  }, function () { return _this._renderedRows; });
56026
56306
  _this.hasActionCellInRowsValues = {};
56027
56307
  _this.build();
@@ -56041,6 +56321,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
56041
56321
  isAnimationEnabled: function () {
56042
56322
  return _this.animationAllowed;
56043
56323
  },
56324
+ getRerenderEvent: function () { return _this.onElementRerendered; },
56044
56325
  getAnimatedElement: function (el) {
56045
56326
  return el.getRootElement();
56046
56327
  },
@@ -56901,7 +57182,6 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
56901
57182
  __decorate([
56902
57183
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])({
56903
57184
  onPush: function (_, i, target) {
56904
- target.renderedRowsChangedCallback();
56905
57185
  target.updateRenderedRows();
56906
57186
  },
56907
57187
  onRemove: function (_, i, target) {
@@ -60051,6 +60331,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
60051
60331
  .toString();
60052
60332
  };
60053
60333
  return {
60334
+ getRerenderEvent: function () { return _this.onElementRerendered; },
60054
60335
  getAnimatedElement: function (panel) {
60055
60336
  var _a, _b;
60056
60337
  if (panel && _this.cssContent) {
@@ -61555,7 +61836,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
61555
61836
  this.setOnCompleteAsyncInPanel(panels[i]);
61556
61837
  }
61557
61838
  for (var i = 0; i < panels.length; i++) {
61558
- var pnlError = panels[i].hasErrors(fireCallback, !!rec && rec.focuseOnFirstError, rec);
61839
+ var pnlError = panels[i].hasErrors(fireCallback, !!rec && rec.focusOnFirstError, rec);
61559
61840
  pnlError = this.isValueDuplicated(panels[i], keyValues, rec, fireCallback) || pnlError;
61560
61841
  if (!this.isRenderModeList && pnlError && !res) {
61561
61842
  this.currentIndex = i;
@@ -62387,6 +62668,8 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
62387
62668
  configurable: true
62388
62669
  });
62389
62670
  QuestionRadiogroupModel.prototype.clickItemHandler = function (item) {
62671
+ if (this.isReadOnlyAttr)
62672
+ return;
62390
62673
  this.renderedValue = item.value;
62391
62674
  };
62392
62675
  QuestionRadiogroupModel.prototype.getDefaultTitleActions = function () {
@@ -62459,6 +62742,7 @@ __webpack_require__.r(__webpack_exports__);
62459
62742
  /* harmony import */ var _src_settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../src/settings */ "./src/settings.ts");
62460
62743
  /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
62461
62744
  /* harmony import */ var _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/dragOrClickHelper */ "./src/utils/dragOrClickHelper.ts");
62745
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
62462
62746
  var __extends = (undefined && undefined.__extends) || (function () {
62463
62747
  var extendStatics = function (d, b) {
62464
62748
  extendStatics = Object.setPrototypeOf ||
@@ -62492,6 +62776,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
62492
62776
 
62493
62777
 
62494
62778
 
62779
+
62495
62780
  /**
62496
62781
  * A class that describes the Ranking question type.
62497
62782
  *
@@ -62511,33 +62796,37 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62511
62796
  if (_this.visibleChoices.length === 1 && !_this.selectToRankEnabled) {
62512
62797
  _this.value = [];
62513
62798
  _this.value.push(_this.visibleChoices[0].value);
62514
- _this.updateRankingChoicesSync();
62799
+ _this.updateRankingChoices();
62515
62800
  return;
62516
62801
  }
62517
62802
  if (_this.isEmpty()) {
62518
- _this.updateRankingChoicesSync();
62803
+ _this.updateRankingChoices();
62519
62804
  return;
62520
62805
  }
62521
62806
  if (_this.selectToRankEnabled) {
62522
- _this.updateRankingChoicesSync();
62807
+ _this.updateRankingChoices();
62523
62808
  return;
62524
62809
  }
62525
62810
  if (_this.visibleChoices.length > _this.value.length)
62526
62811
  _this.addToValueByVisibleChoices();
62527
62812
  if (_this.visibleChoices.length < _this.value.length)
62528
62813
  _this.removeFromValueByVisibleChoices();
62529
- _this.updateRankingChoicesSync();
62814
+ _this.updateRankingChoices();
62530
62815
  };
62531
62816
  _this.localeChanged = function () {
62532
62817
  _super.prototype.localeChanged.call(_this);
62533
62818
  _this.updateRankingChoicesSync();
62534
62819
  };
62535
- _this._rankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimation(true), function (val) {
62536
- _this.setPropertyValue("rankingChoices", val);
62537
- }, function () { return _this.rankingChoices; });
62538
- _this._unRankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimation(false), function (val) {
62539
- _this.setPropertyValue("unRankingChoices", val);
62540
- }, function () { return _this.unRankingChoices; });
62820
+ _this._rankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimationOptions(true), function (val) {
62821
+ _this._renderedRankingChoices = val;
62822
+ }, function () { return _this.renderedRankingChoices; });
62823
+ _this._unRankingChoicesAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_10__["AnimationGroup"](_this.getChoicesAnimationOptions(false), function (val) {
62824
+ _this._renderedUnRankingChoices = val;
62825
+ }, function () { return _this.renderedUnRankingChoices; });
62826
+ _this.rankingChoices = [];
62827
+ _this.unRankingChoices = [];
62828
+ _this._renderedRankingChoices = [];
62829
+ _this._renderedUnRankingChoices = [];
62541
62830
  _this.handlePointerDown = function (event, choice, node) {
62542
62831
  var target = event.target;
62543
62832
  if (!_this.isDragStartNodeValid(target))
@@ -62561,6 +62850,8 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62561
62850
  }
62562
62851
  };
62563
62852
  _this.handleKeydown = function (event, choice) {
62853
+ if (_this.isReadOnlyAttr)
62854
+ return;
62564
62855
  if (!_this.isDesignMode) {
62565
62856
  var key = event.key;
62566
62857
  var index = _this.rankingChoices.indexOf(choice);
@@ -62568,27 +62859,16 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62568
62859
  _this.handleKeydownSelectToRank(event, choice);
62569
62860
  return;
62570
62861
  }
62571
- if (key === "ArrowUp" && index) {
62572
- _this.handleArrowKeys(index, choice, false);
62573
- event.preventDefault();
62574
- }
62575
- if (key === "ArrowDown" && index !== _this.rankingChoices.length - 1) {
62576
- _this.handleArrowKeys(index, choice, true);
62577
- event.preventDefault();
62862
+ if ((key === "ArrowUp" && index) || (key === "ArrowDown" && index !== _this.rankingChoices.length - 1)) {
62863
+ var toIndex = key == "ArrowUp" ? index - 1 : index + 1;
62864
+ _this.dragDropRankingChoices.reorderRankedItem(_this, index, toIndex);
62865
+ _this.setValueAfterKeydown(toIndex, "", true, event);
62578
62866
  }
62579
62867
  }
62580
62868
  };
62581
- _this.handleArrowKeys = function (index, choice, isDown) {
62582
- var delta = isDown ? 1 : -1;
62583
- var choices = _this.rankingChoices;
62584
- choices.splice(index, 1);
62585
- choices.splice(index + delta, 0, choice);
62586
- _this.setValue();
62587
- setTimeout(function () {
62588
- _this.focusItem(index + delta);
62589
- }, 1);
62590
- };
62591
62869
  _this.focusItem = function (index, container) {
62870
+ if (!_this.domNode)
62871
+ return;
62592
62872
  if (_this.selectToRankEnabled && container) {
62593
62873
  var containerSelector = "[data-ranking='" + container + "']";
62594
62874
  var itemsNodes = _this.domNode.querySelectorAll(containerSelector + " " + "." + _this.cssClasses.item);
@@ -62602,16 +62882,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62602
62882
  _this.isValueSetByUser = false;
62603
62883
  _this.setValue = function () {
62604
62884
  var value = [];
62605
- _this.rankingChoicesAnimation.cancel();
62606
- _this.unRankingChoicesAnimation.cancel();
62607
62885
  _this.rankingChoices.forEach(function (choice) {
62608
62886
  value.push(choice.value);
62609
62887
  });
62610
62888
  _this.value = value;
62611
62889
  _this.isValueSetByUser = true;
62612
62890
  };
62613
- _this.createNewArray("rankingChoices");
62614
- _this.createNewArray("unRankingChoices");
62615
62891
  _this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
62616
62892
  _this.clearValue(true);
62617
62893
  _this.setDragDropRankingChoices();
@@ -62661,15 +62937,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62661
62937
  return true;
62662
62938
  };
62663
62939
  QuestionRankingModel.prototype.getItemClassCore = function (item, options) {
62664
- var itemIndex = this.rankingChoices.indexOf(item);
62665
- var unrankedItemIndex = this.unRankingChoices.indexOf(item);
62666
- var dropTargetIndex = this.rankingChoices.indexOf(this.currentDropTarget);
62667
- var isDrop = (this.selectToRankEnabled && itemIndex > -1 && unrankedItemIndex > -1) || this.currentDropTarget === item;
62668
62940
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
62669
62941
  .append(_super.prototype.getItemClassCore.call(this, item, options))
62670
- .append(this.cssClasses.itemGhostMod, isDrop)
62671
- .append("sv-dragdrop-movedown", itemIndex === dropTargetIndex + 1 && this.dropTargetNodeMove === "down")
62672
- .append("sv-dragdrop-moveup", itemIndex === dropTargetIndex - 1 && this.dropTargetNodeMove === "up")
62942
+ .append(this.cssClasses.itemGhostMod, this.currentDropTarget === item)
62673
62943
  .toString();
62674
62944
  };
62675
62945
  QuestionRankingModel.prototype.getContainerClasses = function (containerType) {
@@ -62677,10 +62947,10 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62677
62947
  var isToContainer = containerType === "to";
62678
62948
  var isFromContainer = containerType === "from";
62679
62949
  if (isToContainer) {
62680
- isEmpty = this.rankingChoices.length === 0;
62950
+ isEmpty = this.renderedRankingChoices.length === 0;
62681
62951
  }
62682
62952
  else if (isFromContainer) {
62683
- isEmpty = this.unRankingChoices.length === 0;
62953
+ isEmpty = this.renderedUnRankingChoices.length === 0;
62684
62954
  }
62685
62955
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
62686
62956
  .append(this.cssClasses.container)
@@ -62741,7 +63011,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62741
63011
  _super.prototype.onSurveyValueChanged.call(this, newValue);
62742
63012
  if (this.isLoadingFromJson)
62743
63013
  return;
62744
- this.updateRankingChoicesSync();
63014
+ this.updateRankingChoices();
63015
+ };
63016
+ QuestionRankingModel.prototype.onSurveyLoad = function () {
63017
+ this.blockAnimations();
63018
+ _super.prototype.onSurveyLoad.call(this);
63019
+ this.releaseAnimations();
62745
63020
  };
62746
63021
  QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
62747
63022
  var newValue = this.value.slice();
@@ -62762,19 +63037,32 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62762
63037
  }
62763
63038
  this.value = newValue;
62764
63039
  };
62765
- QuestionRankingModel.prototype.getChoicesAnimation = function (isRankingChoices) {
63040
+ QuestionRankingModel.prototype.getChoicesAnimationOptions = function (isRankingChoices) {
62766
63041
  var _this = this;
62767
63042
  return {
62768
- isAnimationEnabled: function () { return _this.animationAllowed; },
63043
+ getKey: function (item) {
63044
+ return item.value;
63045
+ },
63046
+ getRerenderEvent: function () {
63047
+ return _this.onElementRerendered;
63048
+ },
63049
+ isAnimationEnabled: function () { return _this.animationAllowed && !_this.isDesignMode && _this.isVisible && !!_this.domNode; },
63050
+ getReorderOptions: function (item, movedForward) {
63051
+ var cssClass = "";
63052
+ if (item !== _this.currentDropTarget) {
63053
+ cssClass = movedForward ? "sv-dragdrop-movedown" : "sv-dragdrop-moveup";
63054
+ }
63055
+ return { cssClass: cssClass };
63056
+ },
62769
63057
  getLeaveOptions: function (item) {
62770
- var choices = isRankingChoices ? _this.rankingChoices : _this.unRankingChoices;
63058
+ var choices = isRankingChoices ? _this.renderedRankingChoices : _this.renderedUnRankingChoices;
62771
63059
  if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
62772
63060
  return { cssClass: "sv-ranking-item--animate-item-removing-empty" };
62773
63061
  }
62774
63062
  return { cssClass: "sv-ranking-item--animate-item-removing" };
62775
63063
  },
62776
63064
  getEnterOptions: function (item) {
62777
- var choices = isRankingChoices ? _this.rankingChoices : _this.unRankingChoices;
63065
+ var choices = isRankingChoices ? _this.renderedRankingChoices : _this.renderedUnRankingChoices;
62778
63066
  if (_this.renderedSelectToRankAreasLayout == "vertical" && choices.length == 1 && choices.indexOf(item) >= 0) {
62779
63067
  return { cssClass: "sv-ranking-item--animate-item-adding-empty" };
62780
63068
  }
@@ -62782,9 +63070,20 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62782
63070
  },
62783
63071
  getAnimatedElement: function (item) {
62784
63072
  var _a;
62785
- var containerSelector = isRankingChoices ? ".sv-ranking__container--to" : ".sv-ranking__container--from";
62786
- return (_a = _this.getWrapperElement()) === null || _a === void 0 ? void 0 : _a.querySelector(containerSelector + " .sv-ranking-item--ghost");
62787
- }
63073
+ var cssClasses = _this.cssClasses;
63074
+ var containerSelector = "";
63075
+ if (_this.selectToRankEnabled) {
63076
+ if (!isRankingChoices && cssClasses.containerFromMode) {
63077
+ containerSelector = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_12__["classesToSelector"])(cssClasses.containerFromMode);
63078
+ }
63079
+ else if (isRankingChoices && cssClasses.containerToMode) {
63080
+ containerSelector = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_12__["classesToSelector"])(cssClasses.containerToMode);
63081
+ }
63082
+ }
63083
+ var index = isRankingChoices ? _this.renderedRankingChoices.indexOf(item) : _this.renderedUnRankingChoices.indexOf(item);
63084
+ return (_a = _this.domNode) === null || _a === void 0 ? void 0 : _a.querySelector(containerSelector + " [data-sv-drop-target-ranking-item='" + index + "']");
63085
+ },
63086
+ allowSyncRemovalAddition: true
62788
63087
  };
62789
63088
  };
62790
63089
  Object.defineProperty(QuestionRankingModel.prototype, "rankingChoicesAnimation", {
@@ -62801,26 +63100,32 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62801
63100
  enumerable: false,
62802
63101
  configurable: true
62803
63102
  });
62804
- Object.defineProperty(QuestionRankingModel.prototype, "rankingChoices", {
63103
+ Object.defineProperty(QuestionRankingModel.prototype, "renderedRankingChoices", {
62805
63104
  get: function () {
62806
- return this.getPropertyValue("rankingChoices", []);
63105
+ return this._renderedRankingChoices;
62807
63106
  },
62808
63107
  set: function (val) {
62809
- this._rankingChoicesAnimation.sync(val);
63108
+ this.rankingChoicesAnimation.sync(val);
62810
63109
  },
62811
63110
  enumerable: false,
62812
63111
  configurable: true
62813
63112
  });
62814
- Object.defineProperty(QuestionRankingModel.prototype, "unRankingChoices", {
63113
+ Object.defineProperty(QuestionRankingModel.prototype, "renderedUnRankingChoices", {
62815
63114
  get: function () {
62816
- return this.getPropertyValue("unRankingChoices", []);
63115
+ return this._renderedUnRankingChoices;
62817
63116
  },
62818
63117
  set: function (val) {
62819
- this._unRankingChoicesAnimation.sync(val);
63118
+ this.unRankingChoicesAnimation.sync(val);
62820
63119
  },
62821
63120
  enumerable: false,
62822
63121
  configurable: true
62823
63122
  });
63123
+ QuestionRankingModel.prototype.updateRenderedRankingChoices = function () {
63124
+ this.renderedRankingChoices = this.rankingChoices;
63125
+ };
63126
+ QuestionRankingModel.prototype.updateRenderedUnRankingChoices = function () {
63127
+ this.renderedUnRankingChoices = this.unRankingChoices;
63128
+ };
62824
63129
  QuestionRankingModel.prototype.updateRankingChoices = function (forceUpdate) {
62825
63130
  var _this = this;
62826
63131
  if (forceUpdate === void 0) { forceUpdate = false; }
@@ -62835,9 +63140,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62835
63140
  // return;
62836
63141
  // }
62837
63142
  if (forceUpdate)
62838
- this.setPropertyValue("rankingChoices", []);
63143
+ this.rankingChoices = [];
62839
63144
  if (this.isEmpty()) {
62840
- this.setPropertyValue("rankingChoices", this.visibleChoices);
63145
+ this.rankingChoices = this.visibleChoices;
62841
63146
  return;
62842
63147
  }
62843
63148
  this.value.forEach(function (valueItem) {
@@ -62846,7 +63151,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62846
63151
  newRankingChoices.push(choice);
62847
63152
  });
62848
63153
  });
62849
- this.setPropertyValue("rankingChoices", newRankingChoices);
63154
+ this.rankingChoices = newRankingChoices;
62850
63155
  };
62851
63156
  QuestionRankingModel.prototype.updateUnRankingChoices = function (newRankingChoices) {
62852
63157
  var unRankingChoices = [];
@@ -62926,6 +63231,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62926
63231
  };
62927
63232
  //cross framework destroy
62928
63233
  QuestionRankingModel.prototype.beforeDestroyQuestionElement = function (el) {
63234
+ this.domNode = undefined;
62929
63235
  _super.prototype.beforeDestroyQuestionElement.call(this, el);
62930
63236
  };
62931
63237
  QuestionRankingModel.prototype.supportSelectAll = function () { return false; };
@@ -62954,20 +63260,16 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62954
63260
  if (!this.checkMaxSelectedChoicesUnreached() || !this.canStartDragDueItemEnabled(movedElement))
62955
63261
  return;
62956
63262
  toIndex = this.value.length;
62957
- this.blockAnimations();
62958
63263
  dnd.selectToRank(this, fromIndex, toIndex);
62959
- this.releaseAnimations();
62960
- this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus);
63264
+ this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus, event);
62961
63265
  return;
62962
63266
  }
62963
63267
  if (!isMovedElementRanked)
62964
63268
  return;
62965
63269
  if (key === " ") {
62966
- this.blockAnimations();
62967
63270
  dnd.unselectFromRank(this, fromIndex);
62968
- this.releaseAnimations();
62969
63271
  toIndex = this.unRankingChoices.indexOf(movedElement); //'this.' leads to actual array after the 'unselectFromRank' method
62970
- this.setValueAfterKeydown(toIndex, "from-container", isNeedFocus);
63272
+ this.setValueAfterKeydown(toIndex, "from-container", isNeedFocus, event);
62971
63273
  return;
62972
63274
  }
62973
63275
  var delta = key === "ArrowUp" ? -1 : (key === "ArrowDown" ? 1 : 0);
@@ -62977,9 +63279,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
62977
63279
  if (toIndex < 0 || toIndex >= rankingChoices.length)
62978
63280
  return;
62979
63281
  dnd.reorderRankedItem(this, fromIndex, toIndex);
62980
- this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus);
63282
+ this.setValueAfterKeydown(toIndex, "to-container", isNeedFocus, event);
62981
63283
  };
62982
- QuestionRankingModel.prototype.setValueAfterKeydown = function (index, container, isNeedFocus) {
63284
+ QuestionRankingModel.prototype.setValueAfterKeydown = function (index, container, isNeedFocus, event) {
62983
63285
  var _this = this;
62984
63286
  if (isNeedFocus === void 0) { isNeedFocus = true; }
62985
63287
  this.setValue();
@@ -63019,6 +63321,19 @@ var QuestionRankingModel = /** @class */ (function (_super) {
63019
63321
  enumerable: false,
63020
63322
  configurable: true
63021
63323
  });
63324
+ Object.defineProperty(QuestionRankingModel.prototype, "itemContentComponent", {
63325
+ /**
63326
+ * The name of a component used to render items.
63327
+ */
63328
+ get: function () {
63329
+ return this.getPropertyValue("itemContentComponent", "sv-ranking-item-content");
63330
+ },
63331
+ set: function (value) {
63332
+ this.setPropertyValue("itemContentComponent", value);
63333
+ },
63334
+ enumerable: false,
63335
+ configurable: true
63336
+ });
63022
63337
  Object.defineProperty(QuestionRankingModel.prototype, "selectToRankEnabled", {
63023
63338
  /**
63024
63339
  * Specifies whether users can select choices they want to rank.
@@ -63108,11 +63423,27 @@ var QuestionRankingModel = /** @class */ (function (_super) {
63108
63423
  configurable: true
63109
63424
  });
63110
63425
  __decorate([
63111
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: null })
63112
- ], QuestionRankingModel.prototype, "currentDropTarget", void 0);
63426
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])({
63427
+ onSet: function (val, target) { return target.updateRenderedRankingChoices(); },
63428
+ onRemove: function (_, _i, target) { return target.updateRenderedRankingChoices(); },
63429
+ onPush: function (_, _i, target) { return target.updateRenderedRankingChoices(); },
63430
+ })
63431
+ ], QuestionRankingModel.prototype, "rankingChoices", void 0);
63432
+ __decorate([
63433
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])({ onSet: function (val, target) { return target.updateRenderedUnRankingChoices(); },
63434
+ onRemove: function (_, _i, target) { return target.updateRenderedUnRankingChoices(); },
63435
+ onPush: function (_, _i, target) { return target.updateRenderedUnRankingChoices(); },
63436
+ })
63437
+ ], QuestionRankingModel.prototype, "unRankingChoices", void 0);
63438
+ __decorate([
63439
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])()
63440
+ ], QuestionRankingModel.prototype, "_renderedRankingChoices", void 0);
63441
+ __decorate([
63442
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["propertyArray"])()
63443
+ ], QuestionRankingModel.prototype, "_renderedUnRankingChoices", void 0);
63113
63444
  __decorate([
63114
63445
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: null })
63115
- ], QuestionRankingModel.prototype, "dropTargetNodeMove", void 0);
63446
+ ], QuestionRankingModel.prototype, "currentDropTarget", void 0);
63116
63447
  __decorate([
63117
63448
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: true })
63118
63449
  ], QuestionRankingModel.prototype, "carryForwardStartUnranked", void 0);
@@ -63195,7 +63526,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("ranking", [
63195
63526
  dependsOn: "selectToRankEnabled", visibleIf: function (obj) {
63196
63527
  return !!obj.selectToRankEnabled;
63197
63528
  }, isSerializable: true },
63198
- { name: "itemComponent", visible: false, default: "" }
63529
+ { name: "itemComponent", visible: false, default: "" },
63530
+ { name: "itemContentComponent", visible: false, default: "sv-ranking-item-content" },
63199
63531
  ], function () {
63200
63532
  return new QuestionRankingModel("");
63201
63533
  }, "checkbox");
@@ -63838,6 +64170,8 @@ var QuestionRatingModel = /** @class */ (function (_super) {
63838
64170
  return !isNaN(val) ? parseFloat(val) : val;
63839
64171
  };
63840
64172
  QuestionRatingModel.prototype.setValueFromClick = function (value) {
64173
+ if (this.isReadOnlyAttr)
64174
+ return;
63841
64175
  if (this.value === parseFloat(value)) {
63842
64176
  this.clearValue(true);
63843
64177
  }
@@ -65899,8 +66233,11 @@ var QuestionTextModel = /** @class */ (function (_super) {
65899
66233
  enumerable: false,
65900
66234
  configurable: true
65901
66235
  });
66236
+ QuestionTextModel.prototype.getIsInputTextUpdate = function () {
66237
+ return this.maskTypeIsEmpty ? _super.prototype.getIsInputTextUpdate.call(this) : false;
66238
+ };
65902
66239
  QuestionTextModel.prototype.supportGoNextPageAutomatic = function () {
65903
- return !this.isSurveyInputTextUpdate &&
66240
+ return !this.getIsInputTextUpdate() &&
65904
66241
  ["date", "datetime-local"].indexOf(this.inputType) < 0;
65905
66242
  };
65906
66243
  QuestionTextModel.prototype.supportGoNextPageError = function () {
@@ -66374,15 +66711,11 @@ var QuestionTextBase = /** @class */ (function (_super) {
66374
66711
  enumerable: false,
66375
66712
  configurable: true
66376
66713
  });
66377
- Object.defineProperty(QuestionTextBase.prototype, "isSurveyInputTextUpdate", {
66378
- get: function () {
66379
- if (this.textUpdateMode == "default")
66380
- return !!this.survey ? this.survey.isUpdateValueTextOnTyping : false;
66381
- return this.textUpdateMode == "onTyping";
66382
- },
66383
- enumerable: false,
66384
- configurable: true
66385
- });
66714
+ QuestionTextBase.prototype.getIsInputTextUpdate = function () {
66715
+ if (this.textUpdateMode == "default")
66716
+ return _super.prototype.getIsInputTextUpdate.call(this);
66717
+ return this.textUpdateMode == "onTyping";
66718
+ };
66386
66719
  Object.defineProperty(QuestionTextBase.prototype, "renderedPlaceholder", {
66387
66720
  get: function () {
66388
66721
  return this.getPropertyValue("renderedPlaceholder");
@@ -66521,8 +66854,9 @@ var QuestionFactory = /** @class */ (function () {
66521
66854
  enumerable: false,
66522
66855
  configurable: true
66523
66856
  });
66524
- QuestionFactory.prototype.registerQuestion = function (questionType, questionCreator) {
66525
- ElementFactory.Instance.registerElement(questionType, questionCreator);
66857
+ QuestionFactory.prototype.registerQuestion = function (questionType, questionCreator, showInToolbox) {
66858
+ if (showInToolbox === void 0) { showInToolbox = true; }
66859
+ ElementFactory.Instance.registerElement(questionType, questionCreator, showInToolbox);
66526
66860
  };
66527
66861
  QuestionFactory.prototype.registerCustomQuestion = function (questionType) {
66528
66862
  ElementFactory.Instance.registerCustomQuestion(questionType);
@@ -66548,18 +66882,20 @@ var ElementFactory = /** @class */ (function () {
66548
66882
  function ElementFactory() {
66549
66883
  var _this = this;
66550
66884
  this.creatorHash = {};
66551
- this.registerCustomQuestion = function (questionType) {
66885
+ this.registerCustomQuestion = function (questionType, showInToolbox) {
66886
+ if (showInToolbox === void 0) { showInToolbox = true; }
66552
66887
  var creator = function (name) {
66553
66888
  var el = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(questionType);
66554
66889
  if (!!el)
66555
66890
  el.name = name;
66556
66891
  return el;
66557
66892
  };
66558
- _this.registerElement(questionType, creator);
66893
+ _this.registerElement(questionType, creator, showInToolbox);
66559
66894
  };
66560
66895
  }
66561
- ElementFactory.prototype.registerElement = function (elementType, elementCreator) {
66562
- this.creatorHash[elementType] = elementCreator;
66896
+ ElementFactory.prototype.registerElement = function (elementType, elementCreator, showInToolbox) {
66897
+ if (showInToolbox === void 0) { showInToolbox = true; }
66898
+ this.creatorHash[elementType] = { showInToolbox: showInToolbox, creator: elementCreator };
66563
66899
  };
66564
66900
  ElementFactory.prototype.clear = function () {
66565
66901
  this.creatorHash = {};
@@ -66571,22 +66907,30 @@ var ElementFactory = /** @class */ (function () {
66571
66907
  _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].removeClass(elementType);
66572
66908
  }
66573
66909
  };
66910
+ ElementFactory.prototype.getAllToolboxTypes = function () {
66911
+ return this.getAllTypesCore(true);
66912
+ };
66574
66913
  ElementFactory.prototype.getAllTypes = function () {
66575
- var result = new Array();
66576
- for (var key in this.creatorHash) {
66577
- result.push(key);
66578
- }
66579
- return result.sort();
66914
+ return this.getAllTypesCore(false);
66580
66915
  };
66581
66916
  ElementFactory.prototype.createElement = function (elementType, name) {
66582
- var creator = this.creatorHash[elementType];
66583
- if (!!creator)
66584
- return creator(name);
66917
+ var item = this.creatorHash[elementType];
66918
+ if (!!item && !!item.creator)
66919
+ return item.creator(name);
66585
66920
  var compJSON = _question_custom__WEBPACK_IMPORTED_MODULE_2__["ComponentCollection"].Instance.getCustomQuestionByName(elementType);
66586
66921
  if (!!compJSON)
66587
66922
  return _question_custom__WEBPACK_IMPORTED_MODULE_2__["ComponentCollection"].Instance.createQuestion(name, compJSON);
66588
66923
  return null;
66589
66924
  };
66925
+ ElementFactory.prototype.getAllTypesCore = function (showInToolboxOnly) {
66926
+ var result = new Array();
66927
+ for (var key in this.creatorHash) {
66928
+ if (!showInToolboxOnly || this.creatorHash[key].showInToolbox) {
66929
+ result.push(key);
66930
+ }
66931
+ }
66932
+ return result.sort();
66933
+ };
66590
66934
  ElementFactory.Instance = new ElementFactory();
66591
66935
  return ElementFactory;
66592
66936
  }());
@@ -66771,7 +67115,7 @@ var SurveyQuestionBooleanCheckbox = /** @class */ (function (_super) {
66771
67115
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: cssClasses.checkboxLabel },
66772
67116
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
66773
67117
  ? ""
66774
- : this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
67118
+ : this.question.booleanValue, id: this.question.inputId, className: cssClasses.controlCheckbox, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
66775
67119
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.checkboxMaterialDecorator },
66776
67120
  this.question.svgIcon ?
66777
67121
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: cssClasses.checkboxItemDecorator },
@@ -66839,7 +67183,7 @@ var SurveyQuestionBooleanRadio = /** @class */ (function (_super) {
66839
67183
  var cssClasses = this.question.cssClasses;
66840
67184
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { role: "presentation", className: this.question.getRadioItemClass(cssClasses, value) },
66841
67185
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: cssClasses.radioLabel },
66842
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "radio", name: this.question.name, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.booleanValueRendered, disabled: this.question.isInputReadOnly, className: cssClasses.itemRadioControl, onChange: this.handleOnChange }),
67186
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "radio", name: this.question.name, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.booleanValueRendered, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: cssClasses.itemRadioControl, onChange: this.handleOnChange }),
66843
67187
  this.question.cssClasses.materialRadioDecorator ?
66844
67188
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
66845
67189
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: cssClasses.itemRadioDecorator },
@@ -66964,7 +67308,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
66964
67308
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: itemClass, onClick: this.handleOnClick },
66965
67309
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
66966
67310
  ? ""
66967
- : this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
67311
+ : this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.booleanValue || false, onChange: this.handleOnChange, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
66968
67312
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, _this.question.swapOrder); } },
66969
67313
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(this.question.swapOrder) }, this.renderLocString(this.question.locLabelLeft))),
66970
67314
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
@@ -67620,11 +67964,11 @@ var SurveyFilePreview = /** @class */ (function (_super) {
67620
67964
  var previews = this.question.previewValue.map(function (val, index) {
67621
67965
  if (!val)
67622
67966
  return null;
67623
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.previewItem, style: { display: _this.question.isPreviewVisible(index) ? undefined : "none" } },
67967
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.previewItem, onClick: function (event) { return _this.question.doDownloadFileFromContainer(event); }, style: { display: _this.question.isPreviewVisible(index) ? undefined : "none" } },
67624
67968
  _this.renderFileSign(_this.question.cssClasses.fileSign, val),
67625
67969
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getImageWrapperCss(val) },
67626
67970
  _this.question.canPreviewImage(val) ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("img", { src: val.content, style: { height: _this.question.imageHeight, width: _this.question.imageWidth }, alt: "File preview" })) : (_this.question.cssClasses.defaultImage ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { iconName: _this.question.cssClasses.defaultImageIconId, size: "auto", className: _this.question.cssClasses.defaultImage })) : null),
67627
- val.name && !_this.question.isReadOnly ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getRemoveButtonCss(), onClick: function () { return _this.question.doRemoveFile(val); } },
67971
+ val.name && !_this.question.isReadOnly ? (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getRemoveButtonCss(), onClick: function (event) { return _this.question.doRemoveFile(val, event); } },
67628
67972
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: _this.question.cssClasses.removeFile }, _this.question.removeFileCaption),
67629
67973
  (_this.question.cssClasses.removeFileSvgIconId) ?
67630
67974
  (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { title: _this.question.removeFileCaption, iconName: _this.question.cssClasses.removeFileSvgIconId, size: "auto", className: _this.question.cssClasses.removeFileSvg })) : null)) : null),
@@ -67781,6 +68125,166 @@ _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.re
67781
68125
  });
67782
68126
 
67783
68127
 
68128
+ /***/ }),
68129
+
68130
+ /***/ "./src/react/components/list/list-item-content.tsx":
68131
+ /*!*********************************************************!*\
68132
+ !*** ./src/react/components/list/list-item-content.tsx ***!
68133
+ \*********************************************************/
68134
+ /*! exports provided: ListItemContent */
68135
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
68136
+
68137
+ "use strict";
68138
+ __webpack_require__.r(__webpack_exports__);
68139
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListItemContent", function() { return ListItemContent; });
68140
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
68141
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
68142
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
68143
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
68144
+ /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
68145
+ var __extends = (undefined && undefined.__extends) || (function () {
68146
+ var extendStatics = function (d, b) {
68147
+ extendStatics = Object.setPrototypeOf ||
68148
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
68149
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
68150
+ return extendStatics(d, b);
68151
+ };
68152
+ return function (d, b) {
68153
+ if (typeof b !== "function" && b !== null)
68154
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
68155
+ extendStatics(d, b);
68156
+ function __() { this.constructor = d; }
68157
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
68158
+ };
68159
+ })();
68160
+
68161
+
68162
+
68163
+
68164
+ var ListItemContent = /** @class */ (function (_super) {
68165
+ __extends(ListItemContent, _super);
68166
+ function ListItemContent() {
68167
+ return _super !== null && _super.apply(this, arguments) || this;
68168
+ }
68169
+ Object.defineProperty(ListItemContent.prototype, "model", {
68170
+ get: function () {
68171
+ return this.props.model;
68172
+ },
68173
+ enumerable: false,
68174
+ configurable: true
68175
+ });
68176
+ Object.defineProperty(ListItemContent.prototype, "item", {
68177
+ get: function () {
68178
+ return this.props.item;
68179
+ },
68180
+ enumerable: false,
68181
+ configurable: true
68182
+ });
68183
+ ListItemContent.prototype.getStateElement = function () {
68184
+ return this.item;
68185
+ };
68186
+ ListItemContent.prototype.render = function () {
68187
+ if (!this.item)
68188
+ return null;
68189
+ var content = [];
68190
+ var text = this.renderLocString(this.item.locTitle, undefined, "locString");
68191
+ if (this.item.iconName) {
68192
+ var icon = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { key: "icon", className: this.model.cssClasses.itemIcon, iconName: this.item.iconName, size: this.item.iconSize, "aria-label": this.item.title });
68193
+ content.push(icon);
68194
+ content.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: "text" }, text));
68195
+ }
68196
+ else {
68197
+ content.push(text);
68198
+ }
68199
+ if (this.item.markerIconName) {
68200
+ var icon = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { key: "marker", className: this.item.cssClasses.itemMarkerIcon, iconName: this.item.markerIconName, size: this.item.markerIconSize });
68201
+ content.push(icon);
68202
+ }
68203
+ return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, content);
68204
+ };
68205
+ return ListItemContent;
68206
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
68207
+
68208
+ _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("sv-list-item-content", function (props) {
68209
+ return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ListItemContent, props);
68210
+ });
68211
+
68212
+
68213
+ /***/ }),
68214
+
68215
+ /***/ "./src/react/components/list/list-item-group.tsx":
68216
+ /*!*******************************************************!*\
68217
+ !*** ./src/react/components/list/list-item-group.tsx ***!
68218
+ \*******************************************************/
68219
+ /*! exports provided: ListItemGroup */
68220
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
68221
+
68222
+ "use strict";
68223
+ __webpack_require__.r(__webpack_exports__);
68224
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ListItemGroup", function() { return ListItemGroup; });
68225
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
68226
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
68227
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
68228
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
68229
+ /* harmony import */ var _popup_popup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../popup/popup */ "./src/react/components/popup/popup.tsx");
68230
+ var __extends = (undefined && undefined.__extends) || (function () {
68231
+ var extendStatics = function (d, b) {
68232
+ extendStatics = Object.setPrototypeOf ||
68233
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
68234
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
68235
+ return extendStatics(d, b);
68236
+ };
68237
+ return function (d, b) {
68238
+ if (typeof b !== "function" && b !== null)
68239
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
68240
+ extendStatics(d, b);
68241
+ function __() { this.constructor = d; }
68242
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
68243
+ };
68244
+ })();
68245
+
68246
+
68247
+
68248
+
68249
+ var ListItemGroup = /** @class */ (function (_super) {
68250
+ __extends(ListItemGroup, _super);
68251
+ function ListItemGroup() {
68252
+ return _super !== null && _super.apply(this, arguments) || this;
68253
+ }
68254
+ Object.defineProperty(ListItemGroup.prototype, "model", {
68255
+ get: function () {
68256
+ return this.props.model;
68257
+ },
68258
+ enumerable: false,
68259
+ configurable: true
68260
+ });
68261
+ Object.defineProperty(ListItemGroup.prototype, "item", {
68262
+ get: function () {
68263
+ return this.props.item;
68264
+ },
68265
+ enumerable: false,
68266
+ configurable: true
68267
+ });
68268
+ ListItemGroup.prototype.getStateElement = function () {
68269
+ return this.item;
68270
+ };
68271
+ ListItemGroup.prototype.render = function () {
68272
+ var _a;
68273
+ if (!this.item)
68274
+ return null;
68275
+ var newElement = _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement("sv-list-item-content", { item: this.item, key: "content" + this.item.id, model: this.model });
68276
+ return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null,
68277
+ newElement,
68278
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_popup_popup__WEBPACK_IMPORTED_MODULE_3__["Popup"], { model: (_a = this.item) === null || _a === void 0 ? void 0 : _a.popupModel }));
68279
+ };
68280
+ return ListItemGroup;
68281
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
68282
+
68283
+ _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.registerElement("sv-list-item-group", function (props) {
68284
+ return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ListItemGroup, props);
68285
+ });
68286
+
68287
+
67784
68288
  /***/ }),
67785
68289
 
67786
68290
  /***/ "./src/react/components/list/list-item.tsx":
@@ -67798,7 +68302,6 @@ __webpack_require__.r(__webpack_exports__);
67798
68302
  /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../element-factory */ "./src/react/element-factory.tsx");
67799
68303
  /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../reactquestion_element */ "./src/react/reactquestion_element.tsx");
67800
68304
  /* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../reactSurvey */ "./src/react/reactSurvey.tsx");
67801
- /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
67802
68305
  var __extends = (undefined && undefined.__extends) || (function () {
67803
68306
  var extendStatics = function (d, b) {
67804
68307
  extendStatics = Object.setPrototypeOf ||
@@ -67818,7 +68321,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
67818
68321
 
67819
68322
 
67820
68323
 
67821
-
67822
68324
  var ListItem = /** @class */ (function (_super) {
67823
68325
  __extends(ListItem, _super);
67824
68326
  function ListItem() {
@@ -67853,25 +68355,9 @@ var ListItem = /** @class */ (function (_super) {
67853
68355
  paddingInlineStart: this.model.getItemIndent(this.item)
67854
68356
  };
67855
68357
  var className = this.model.getItemClass(this.item);
67856
- var content = [];
67857
- if (!this.item.component) {
67858
- var text = this.renderLocString(this.item.locTitle, undefined, "locString");
67859
- if (this.item.iconName) {
67860
- var icon = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { key: 1, className: this.model.cssClasses.itemIcon, iconName: this.item.iconName, size: this.item.iconSize, "aria-label": this.item.title });
67861
- content.push(icon);
67862
- content.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: 2 }, text));
67863
- }
67864
- else {
67865
- content.push(text);
67866
- }
67867
- }
67868
- else {
67869
- var newElement = _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(this.item.component, { item: this.item, key: this.item.id });
67870
- if (!!newElement) {
67871
- content.push(newElement);
67872
- }
67873
- }
67874
- var contentWrap = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText }, content);
68358
+ var itemContent = this.item.component || "sv-list-item-content";
68359
+ var newElement = _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(itemContent, { item: this.item, key: this.item.id, model: this.model });
68360
+ var contentWrap = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { style: contentWrapStyle, className: this.model.cssClasses.itemBody, title: this.item.locTitle.calculatedText, onMouseOver: function (event) { _this.model.onItemHover(_this.item); }, onMouseLeave: function (event) { _this.model.onItemLeave(_this.item); } }, newElement);
67875
68361
  var separator = this.item.needSeparator ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.itemSeparator }) : null;
67876
68362
  var isVisible = this.model.isItemVisible(this.item);
67877
68363
  var style = {
@@ -68841,7 +69327,7 @@ var Popup = /** @class */ (function (_super) {
68841
69327
  };
68842
69328
  Popup.prototype.setTargetElement = function () {
68843
69329
  var container = this.containerRef.current;
68844
- this.popup.setComponentElement(container, this.props.getTarget ? this.props.getTarget(container) : undefined);
69330
+ this.popup.setComponentElement(container, this.props.getTarget ? this.props.getTarget(container) : undefined, this.props.getArea ? this.props.getArea(container) : undefined);
68845
69331
  };
68846
69332
  Popup.prototype.componentDidMount = function () {
68847
69333
  _super.prototype.componentDidMount.call(this);
@@ -69170,7 +69656,7 @@ var RatingItemSmiley = /** @class */ (function (_super) {
69170
69656
  RatingItemSmiley.prototype.render = function () {
69171
69657
  var _this = this;
69172
69658
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, style: this.question.getItemStyle(this.item.itemValue, this.item.highlight), className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
69173
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
69659
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
69174
69660
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue), title: this.item.text })));
69175
69661
  };
69176
69662
  return RatingItemSmiley;
@@ -69225,7 +69711,7 @@ var RatingItemStar = /** @class */ (function (_super) {
69225
69711
  RatingItemStar.prototype.render = function () {
69226
69712
  var _this = this;
69227
69713
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); } },
69228
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
69714
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
69229
69715
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon, title: this.item.text }),
69230
69716
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__["SvgIcon"], { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt, title: this.item.text })));
69231
69717
  };
@@ -69317,7 +69803,7 @@ var RatingItem = /** @class */ (function (_super) {
69317
69803
  RatingItem.prototype.render = function () {
69318
69804
  var itemText = this.renderLocString(this.item.locText);
69319
69805
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
69320
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.isDisplayMode, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
69806
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
69321
69807
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText }, itemText)));
69322
69808
  };
69323
69809
  RatingItem.prototype.componentDidMount = function () {
@@ -70089,7 +70575,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
70089
70575
  var text = (this.question.selectedItemLocText) ? this.renderLocString(this.question.selectedItemLocText) : "";
70090
70576
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
70091
70577
  // @ts-ignore
70092
- selectElement = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), disabled: true },
70578
+ selectElement = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, tabIndex: this.question.isDisabledAttr ? undefined : 0, className: this.question.getControlClass() },
70093
70579
  text,
70094
70580
  this.renderReadOnlyElement());
70095
70581
  }
@@ -70123,7 +70609,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
70123
70609
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { id: this.question.inputId, className: this.question.getControlClass(), tabIndex: dropdownListModel.noTabIndex ? undefined : 0,
70124
70610
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
70125
70611
  // @ts-ignore
70126
- disabled: this.question.isInputReadOnly, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
70612
+ disabled: this.question.isDisabledAttr, required: this.question.isRequired, onKeyDown: this.keyhandler, onBlur: this.blur, role: this.question.ariaRole, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant },
70127
70613
  dropdownListModel.showHintPrefix ?
70128
70614
  (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.hintPrefix },
70129
70615
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringPrefix))) : null,
@@ -70133,7 +70619,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
70133
70619
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { style: { visibility: "hidden" }, "data-bind": "text: model.filterString" }, dropdownListModel.inputStringRendered),
70134
70620
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, dropdownListModel.hintStringSuffix))) : null,
70135
70621
  valueElement,
70136
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isInputReadOnly, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
70622
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "text", autoComplete: "off", id: this.question.getInputId(), ref: function (element) { return (_this.inputElement = element); }, className: this.question.cssClasses.filterStringInput, role: dropdownListModel.filterStringEnabled ? this.question.ariaRole : undefined, "aria-expanded": this.question.ariaExpanded === null ? undefined : this.question.ariaExpanded === "true", "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-controls": dropdownListModel.listElementId, "aria-activedescendant": dropdownListModel.ariaActivedescendant, placeholder: dropdownListModel.placeholderRendered, readOnly: dropdownListModel.filterReadOnly ? true : undefined, tabIndex: dropdownListModel.noTabIndex ? undefined : -1, disabled: this.question.isDisabledAttr, inputMode: dropdownListModel.inputMode, onChange: function (e) { onInputChange(e); }, onBlur: this.blur, onFocus: this.focus })),
70137
70623
  this.createClearButton()));
70138
70624
  };
70139
70625
  SurveyQuestionDropdownBase.prototype.createClearButton = function () {
@@ -70979,6 +71465,8 @@ var SurveyQuestionImagePickerItem = /** @class */ (function (_super) {
70979
71465
  configurable: true
70980
71466
  });
70981
71467
  SurveyQuestionImagePickerItem.prototype.handleOnChange = function (event) {
71468
+ if (this.question.isReadOnlyAttr)
71469
+ return;
70982
71470
  if (this.question.multiSelect) {
70983
71471
  if (event.target.checked) {
70984
71472
  this.question.value = this.question.value.concat(event.target.value);
@@ -71025,7 +71513,7 @@ var SurveyQuestionImagePickerItem = /** @class */ (function (_super) {
71025
71513
  }
71026
71514
  var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass },
71027
71515
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: cssClasses.label },
71028
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
71516
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: cssClasses.itemControl, id: this.question.getItemId(item), type: this.question.inputType, name: this.question.questionName, checked: isChecked, value: item.value, disabled: !this.question.getItemEnabled(item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage }),
71029
71517
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.itemDecorator },
71030
71518
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.imageContainer },
71031
71519
  !!this.question.cssClasses.checkedItemDecorator ?
@@ -73084,7 +73572,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
73084
73572
  var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.controlLabel }, this.renderLocString(this.item.locText, this.textStyle)) : null;
73085
73573
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
73086
73574
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: labelClass },
73087
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), checked: isChecked, onChange: this.handleOnChange }),
73575
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { className: this.cssClasses.itemControl, type: "checkbox", role: "option", name: this.question.name + this.item.id, value: this.item.value, id: id, style: this.inputStyle, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange }),
73088
73576
  this.cssClasses.materialDecorator ?
73089
73577
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
73090
73578
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
@@ -73169,7 +73657,7 @@ var SurveyQuestionComment = /** @class */ (function (_super) {
73169
73657
  }
73170
73658
  var counter = !!this.question.getMaxLength() ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_character_counter__WEBPACK_IMPORTED_MODULE_4__["CharacterCounterComponent"], { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter })) : null;
73171
73659
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
73172
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.question.inputId, className: this.question.className, disabled: this.question.isInputReadOnly, readOnly: this.question.isInputReadOnly, ref: function (textarea) { return (_this.setControl(textarea)); }, maxLength: this.question.getMaxLength(), placeholder: placeholder, onBlur: onBlur, onInput: onInput, onKeyDown: function (event) { _this.question.onKeyDown(event); }, cols: this.question.cols, rows: this.question.rows, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, style: { resize: this.question.resizeStyle } }),
73660
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("textarea", { id: this.question.inputId, className: this.question.className, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, ref: function (textarea) { return (_this.setControl(textarea)); }, maxLength: this.question.getMaxLength(), placeholder: placeholder, onBlur: onBlur, onInput: onInput, onKeyDown: function (event) { _this.question.onKeyDown(event); }, cols: this.question.cols, rows: this.question.rows, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage, style: { resize: this.question.resizeStyle } }),
73173
73661
  counter));
73174
73662
  };
73175
73663
  return SurveyQuestionComment;
@@ -73469,6 +73957,9 @@ var SurveyElementBase = /** @class */ (function (_super) {
73469
73957
  };
73470
73958
  SurveyElementBase.prototype.componentDidUpdate = function (prevProps, prevState) {
73471
73959
  this.makeBaseElementsReact();
73960
+ this.getStateElements().forEach(function (el) {
73961
+ el.afterRerender();
73962
+ });
73472
73963
  };
73473
73964
  SurveyElementBase.prototype.allowComponentUpdate = function () {
73474
73965
  this._allowComponentUpdate = true;
@@ -73540,12 +74031,14 @@ var SurveyElementBase = /** @class */ (function (_super) {
73540
74031
  SurveyElementBase.prototype.makeBaseElementsReact = function () {
73541
74032
  var els = this.getStateElements();
73542
74033
  for (var i = 0; i < els.length; i++) {
74034
+ els[i].enableOnElementRenderedEvent();
73543
74035
  this.makeBaseElementReact(els[i]);
73544
74036
  }
73545
74037
  };
73546
74038
  SurveyElementBase.prototype.unMakeBaseElementsReact = function () {
73547
74039
  var els = this.getStateElements();
73548
74040
  for (var i = 0; i < els.length; i++) {
74041
+ els[i].disableOnElementRenderedEvent();
73549
74042
  this.unMakeBaseElementReact(els[i]);
73550
74043
  }
73551
74044
  };
@@ -73997,9 +74490,19 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
73997
74490
  var clearButton = this.question.showRemoveButton ? this.renderClearButton(this.question.cssClasses.removeButton) : null;
73998
74491
  var clearButtonBottom = this.question.showRemoveButtonBottom ? this.renderClearButton(this.question.cssClasses.removeButtonBottom) : null;
73999
74492
  var fileNavigator = this.question.fileNavigatorVisible ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: this.question.fileNavigator })) : null;
74000
- var fileInput = (this.isDisplayMode ?
74001
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, multiple: this.question.allowMultiple, placeholder: this.question.title, accept: this.question.acceptedTypes }) : this.question.hasFileUI ?
74002
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, tabIndex: -1, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, multiple: this.question.allowMultiple, title: this.question.inputTitle, accept: this.question.acceptedTypes, capture: this.question.renderCapture }) : null);
74493
+ var fileInput;
74494
+ if (this.question.isReadOnlyAttr) {
74495
+ fileInput = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { readOnly: true, type: "file", className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, multiple: this.question.allowMultiple, placeholder: this.question.title, accept: this.question.acceptedTypes });
74496
+ }
74497
+ else if (this.question.isDisabledAttr) {
74498
+ fileInput = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { disabled: true, type: "file", className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, multiple: this.question.allowMultiple, placeholder: this.question.title, accept: this.question.acceptedTypes });
74499
+ }
74500
+ else if (this.question.hasFileUI) {
74501
+ fileInput = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { type: "file", disabled: this.isDisplayMode, tabIndex: -1, className: !this.isDisplayMode ? this.question.cssClasses.fileInput : this.question.getReadOnlyFileCss(), id: this.question.inputId, ref: function (input) { return (_this.setControl(input)); }, style: !this.isDisplayMode ? {} : { color: "transparent" }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-errormessage": this.question.ariaErrormessage, multiple: this.question.allowMultiple, title: this.question.inputTitle, accept: this.question.acceptedTypes, capture: this.question.renderCapture });
74502
+ }
74503
+ else {
74504
+ fileInput = null;
74505
+ }
74003
74506
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.fileRootCss },
74004
74507
  fileInput,
74005
74508
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.dragArea, onDrop: this.question.onDrop, onDragOver: this.question.onDragOver, onDragLeave: this.question.onDragLeave, onDragEnter: this.question.onDragEnter },
@@ -74391,7 +74894,7 @@ var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
74391
74894
  mobileSpan));
74392
74895
  };
74393
74896
  SurveyQuestionMatrixCell.prototype.renderInput = function (inputId, isChecked) {
74394
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isReadOnly, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }));
74897
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isDisabledAttr, readOnly: this.row.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }));
74395
74898
  };
74396
74899
  return SurveyQuestionMatrixCell;
74397
74900
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
@@ -74502,71 +75005,39 @@ var __extends = (undefined && undefined.__extends) || (function () {
74502
75005
 
74503
75006
 
74504
75007
 
74505
- var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
74506
- __extends(SurveyQuestionMatrixDropdownBase, _super);
74507
- function SurveyQuestionMatrixDropdownBase(props) {
74508
- var _this = _super.call(this, props) || this;
74509
- //Create rendered table in contructor and not on rendering
74510
- var table = _this.question.renderedTable;
74511
- _this.state = _this.getState();
74512
- return _this;
75008
+ var SurveyQuestionMatrixTable = /** @class */ (function (_super) {
75009
+ __extends(SurveyQuestionMatrixTable, _super);
75010
+ function SurveyQuestionMatrixTable() {
75011
+ return _super !== null && _super.apply(this, arguments) || this;
74513
75012
  }
74514
- Object.defineProperty(SurveyQuestionMatrixDropdownBase.prototype, "question", {
75013
+ Object.defineProperty(SurveyQuestionMatrixTable.prototype, "question", {
74515
75014
  get: function () {
74516
- return this.questionBase;
75015
+ return this.props.question;
74517
75016
  },
74518
75017
  enumerable: false,
74519
75018
  configurable: true
74520
75019
  });
74521
- SurveyQuestionMatrixDropdownBase.prototype.getState = function (prevState) {
74522
- if (prevState === void 0) { prevState = null; }
74523
- return { rowCounter: !prevState ? 0 : prevState.rowCounter + 1 };
74524
- };
74525
- SurveyQuestionMatrixDropdownBase.prototype.updateStateOnCallback = function () {
74526
- if (this.isRendering)
74527
- return;
74528
- this.setState(this.getState(this.state));
74529
- };
74530
- SurveyQuestionMatrixDropdownBase.prototype.componentDidMount = function () {
74531
- var _this = this;
74532
- _super.prototype.componentDidMount.call(this);
74533
- this.question.visibleRowsChangedCallback = function () {
74534
- _this.updateStateOnCallback();
74535
- };
74536
- this.question.onRenderedTableResetCallback = function () {
74537
- _this.question.renderedTable.renderedRowsChangedCallback = function () {
74538
- _this.updateStateOnCallback();
74539
- };
74540
- _this.updateStateOnCallback();
74541
- };
74542
- this.question.renderedTable.renderedRowsChangedCallback = function () {
74543
- _this.updateStateOnCallback();
74544
- };
74545
- };
74546
- SurveyQuestionMatrixDropdownBase.prototype.componentWillUnmount = function () {
74547
- _super.prototype.componentWillUnmount.call(this);
74548
- this.question.visibleRowsChangedCallback = function () { };
74549
- this.question.onRenderedTableResetCallback = function () { };
74550
- this.question.renderedTable.renderedRowsChangedCallback = function () { };
75020
+ Object.defineProperty(SurveyQuestionMatrixTable.prototype, "creator", {
75021
+ get: function () {
75022
+ return this.props.creator;
75023
+ },
75024
+ enumerable: false,
75025
+ configurable: true
75026
+ });
75027
+ Object.defineProperty(SurveyQuestionMatrixTable.prototype, "table", {
75028
+ get: function () {
75029
+ return this.question.renderedTable;
75030
+ },
75031
+ enumerable: false,
75032
+ configurable: true
75033
+ });
75034
+ SurveyQuestionMatrixTable.prototype.getStateElement = function () {
75035
+ return this.table;
74551
75036
  };
74552
- SurveyQuestionMatrixDropdownBase.prototype.renderElement = function () {
74553
- return this.renderTableDiv();
75037
+ SurveyQuestionMatrixTable.prototype.wrapCell = function (cell, element, reason) {
75038
+ return this.props.wrapCell(cell, element, reason);
74554
75039
  };
74555
- SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
74556
- var _this = this;
74557
- var header = this.renderHeader();
74558
- var footers = this.renderFooter();
74559
- var rows = this.renderRows();
74560
- var divStyle = this.question.showHorizontalScroll
74561
- ? { overflowX: "scroll" }
74562
- : {};
74563
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: divStyle, className: this.question.cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
74564
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("table", { className: this.question.getTableCss() },
74565
- header,
74566
- rows,
74567
- footers)));
74568
- };
74569
- SurveyQuestionMatrixDropdownBase.prototype.renderHeader = function () {
75040
+ SurveyQuestionMatrixTable.prototype.renderHeader = function () {
74570
75041
  var table = this.question.renderedTable;
74571
75042
  if (!table.showHeader)
74572
75043
  return null;
@@ -74594,14 +75065,14 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
74594
75065
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("thead", null,
74595
75066
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", null, headers)));
74596
75067
  };
74597
- SurveyQuestionMatrixDropdownBase.prototype.renderFooter = function () {
75068
+ SurveyQuestionMatrixTable.prototype.renderFooter = function () {
74598
75069
  var table = this.question.renderedTable;
74599
75070
  if (!table.showFooter)
74600
75071
  return null;
74601
75072
  var row = this.renderRow("footer", table.footerRow, this.question.cssClasses, "row-footer");
74602
75073
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tfoot", null, row);
74603
75074
  };
74604
- SurveyQuestionMatrixDropdownBase.prototype.renderRows = function () {
75075
+ SurveyQuestionMatrixTable.prototype.renderRows = function () {
74605
75076
  var cssClasses = this.question.cssClasses;
74606
75077
  var rows = [];
74607
75078
  var renderedRows = this.question.renderedTable.renderedRows;
@@ -74610,7 +75081,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
74610
75081
  }
74611
75082
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tbody", null, rows);
74612
75083
  };
74613
- SurveyQuestionMatrixDropdownBase.prototype.renderRow = function (keyValue, row, cssClasses, reason) {
75084
+ SurveyQuestionMatrixTable.prototype.renderRow = function (keyValue, row, cssClasses, reason) {
74614
75085
  var matrixrow = [];
74615
75086
  var cells = row.cells;
74616
75087
  for (var i = 0; i < cells.length; i++) {
@@ -74619,7 +75090,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
74619
75090
  var key = "row" + keyValue;
74620
75091
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], { key: key }, (reason == "row-footer") ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", null, matrixrow) : react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_matrix_row__WEBPACK_IMPORTED_MODULE_7__["MatrixRow"], { model: row, parentMatrix: this.question }, matrixrow)));
74621
75092
  };
74622
- SurveyQuestionMatrixDropdownBase.prototype.renderCell = function (cell, index, cssClasses, reason) {
75093
+ SurveyQuestionMatrixTable.prototype.renderCell = function (cell, index, cssClasses, reason) {
74623
75094
  var key = "cell" + index;
74624
75095
  if (cell.hasQuestion) {
74625
75096
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixDropdownCell, { key: key, cssClasses: cssClasses, cell: cell, creator: this.creator, reason: reason }));
@@ -74639,7 +75110,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
74639
75110
  }
74640
75111
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { className: cell.className, key: key, style: cellStyle, colSpan: cell.colSpans, "data-responsive-title": cell.headers, title: cell.getTitle() }, cellContent));
74641
75112
  };
74642
- SurveyQuestionMatrixDropdownBase.prototype.renderCellContent = function (cell, reason, cssClasses) {
75113
+ SurveyQuestionMatrixTable.prototype.renderCellContent = function (cell, reason, cssClasses) {
74643
75114
  var cellContent = null;
74644
75115
  var cellStyle = null;
74645
75116
  if (!!cell.width || !!cell.minWidth) {
@@ -74681,6 +75152,64 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
74681
75152
  var readyCell = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, cellContent));
74682
75153
  return this.wrapCell(cell, readyCell, reason);
74683
75154
  };
75155
+ SurveyQuestionMatrixTable.prototype.renderElement = function () {
75156
+ var header = this.renderHeader();
75157
+ var footers = this.renderFooter();
75158
+ var rows = this.renderRows();
75159
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("table", { className: this.question.getTableCss() },
75160
+ header,
75161
+ rows,
75162
+ footers));
75163
+ };
75164
+ return SurveyQuestionMatrixTable;
75165
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElementBase"]));
75166
+ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
75167
+ __extends(SurveyQuestionMatrixDropdownBase, _super);
75168
+ function SurveyQuestionMatrixDropdownBase(props) {
75169
+ var _this = _super.call(this, props) || this;
75170
+ //Create rendered table in contructor and not on rendering
75171
+ var table = _this.question.renderedTable;
75172
+ _this.state = _this.getState();
75173
+ return _this;
75174
+ }
75175
+ Object.defineProperty(SurveyQuestionMatrixDropdownBase.prototype, "question", {
75176
+ get: function () {
75177
+ return this.questionBase;
75178
+ },
75179
+ enumerable: false,
75180
+ configurable: true
75181
+ });
75182
+ SurveyQuestionMatrixDropdownBase.prototype.getState = function (prevState) {
75183
+ if (prevState === void 0) { prevState = null; }
75184
+ return { rowCounter: !prevState ? 0 : prevState.rowCounter + 1 };
75185
+ };
75186
+ SurveyQuestionMatrixDropdownBase.prototype.updateStateOnCallback = function () {
75187
+ if (this.isRendering)
75188
+ return;
75189
+ this.setState(this.getState(this.state));
75190
+ };
75191
+ SurveyQuestionMatrixDropdownBase.prototype.componentDidMount = function () {
75192
+ var _this = this;
75193
+ _super.prototype.componentDidMount.call(this);
75194
+ this.question.onRenderedTableResetCallback = function () {
75195
+ _this.updateStateOnCallback();
75196
+ };
75197
+ };
75198
+ SurveyQuestionMatrixDropdownBase.prototype.componentWillUnmount = function () {
75199
+ _super.prototype.componentWillUnmount.call(this);
75200
+ this.question.onRenderedTableResetCallback = function () { };
75201
+ };
75202
+ SurveyQuestionMatrixDropdownBase.prototype.renderElement = function () {
75203
+ return this.renderTableDiv();
75204
+ };
75205
+ SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
75206
+ var _this = this;
75207
+ var divStyle = this.question.showHorizontalScroll
75208
+ ? { overflowX: "scroll" }
75209
+ : {};
75210
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: divStyle, className: this.question.cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
75211
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: function (cell, element, reason) { return _this.wrapCell(cell, element, reason); } })));
75212
+ };
74684
75213
  return SurveyQuestionMatrixDropdownBase;
74685
75214
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyQuestionElementBase"]));
74686
75215
 
@@ -75555,7 +76084,7 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
75555
76084
  var itemLabel = !this.hideCaption ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: controlLabelClass }, this.renderLocString(this.item.locText, this.textStyle)) : null;
75556
76085
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass, role: "presentation" },
75557
76086
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { onMouseDown: this.handleOnMouseDown, className: labelClass },
75558
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), onChange: this.handleOnChange }),
76087
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { "aria-errormessage": this.question.ariaErrormessage, className: this.cssClasses.itemControl, id: this.question.getItemId(this.item), type: "radio", name: this.question.questionName, checked: this.isChecked, value: this.item.value, disabled: !this.question.getItemEnabled(this.item), readOnly: this.question.isReadOnlyAttr, onChange: this.handleOnChange }),
75559
76088
  this.cssClasses.materialDecorator ?
75560
76089
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
75561
76090
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.cssClasses.itemDecorator },
@@ -75581,18 +76110,20 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_3__["ReactQuestionFactory"].Inst
75581
76110
  /*!*********************************************!*\
75582
76111
  !*** ./src/react/reactquestion_ranking.tsx ***!
75583
76112
  \*********************************************/
75584
- /*! exports provided: SurveyQuestionRanking, SurveyQuestionRankingItem */
76113
+ /*! exports provided: SurveyQuestionRanking, SurveyQuestionRankingItem, SurveyQuestionRankingItemContent */
75585
76114
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
75586
76115
 
75587
76116
  "use strict";
75588
76117
  __webpack_require__.r(__webpack_exports__);
75589
76118
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRanking", function() { return SurveyQuestionRanking; });
75590
76119
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItem", function() { return SurveyQuestionRankingItem; });
76120
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionRankingItemContent", function() { return SurveyQuestionRankingItemContent; });
75591
76121
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
75592
76122
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
75593
76123
  /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
75594
76124
  /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
75595
76125
  /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/react/reactsurveymodel.tsx");
76126
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
75596
76127
  var __extends = (undefined && undefined.__extends) || (function () {
75597
76128
  var extendStatics = function (d, b) {
75598
76129
  extendStatics = Object.setPrototypeOf ||
@@ -75612,6 +76143,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
75612
76143
 
75613
76144
 
75614
76145
 
76146
+
75615
76147
  var SurveyQuestionRanking = /** @class */ (function (_super) {
75616
76148
  __extends(SurveyQuestionRanking, _super);
75617
76149
  function SurveyQuestionRanking() {
@@ -75633,15 +76165,15 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
75633
76165
  var unrankedItem = true;
75634
76166
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.rootClass, ref: function (root) { return (_this.setControl(root)); } },
75635
76167
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getContainerClasses("from"), "data-ranking": "from-container" },
75636
- this.getItems(this.question.unRankingChoices, unrankedItem),
75637
- this.question.unRankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder },
76168
+ this.getItems(this.question.renderedUnRankingChoices, unrankedItem),
76169
+ this.question.renderedUnRankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder },
75638
76170
  " ",
75639
76171
  this.renderLocString(this.question.locSelectToRankEmptyRankedAreaText),
75640
76172
  " ") : null),
75641
76173
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containersDivider }),
75642
76174
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getContainerClasses("to"), "data-ranking": "to-container" },
75643
76175
  this.getItems(),
75644
- this.question.rankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder },
76176
+ this.question.renderedRankingChoices.length === 0 ? react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.containerPlaceholder },
75645
76177
  " ",
75646
76178
  this.renderLocString(this.question.locSelectToRankEmptyUnrankedAreaText),
75647
76179
  " ") : null)));
@@ -75649,7 +76181,7 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
75649
76181
  };
75650
76182
  SurveyQuestionRanking.prototype.getItems = function (choices, unrankedItem) {
75651
76183
  var _this = this;
75652
- if (choices === void 0) { choices = this.question.rankingChoices; }
76184
+ if (choices === void 0) { choices = this.question.renderedRankingChoices; }
75653
76185
  var items = [];
75654
76186
  var _loop_1 = function (i) {
75655
76187
  var item = choices[i];
@@ -75782,6 +76314,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
75782
76314
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.dashSvgIcon })));
75783
76315
  };
75784
76316
  SurveyQuestionRankingItem.prototype.renderElement = function () {
76317
+ var itemContentComponent = _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.createElement(this.question.itemContentComponent, { item: this.item, cssClasses: this.cssClasses });
75785
76318
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, "data-sv-drop-target-ranking-item": this.index },
75786
76319
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: -1, style: { outline: "none" } },
75787
76320
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.itemGhostNode }),
@@ -75792,11 +76325,39 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
75792
76325
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: this.question.getIconFocusCss() },
75793
76326
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.arrowsSvgIcon }))),
75794
76327
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getItemIndexClasses(this.item) }, (!this.unrankedItem && this.indexText) ? this.indexText : this.renderEmptyIcon()),
75795
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.controlLabel }, this.text)))));
76328
+ itemContentComponent))));
75796
76329
  };
75797
76330
  return SurveyQuestionRankingItem;
75798
76331
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
75799
76332
 
76333
+ var SurveyQuestionRankingItemContent = /** @class */ (function (_super) {
76334
+ __extends(SurveyQuestionRankingItemContent, _super);
76335
+ function SurveyQuestionRankingItemContent() {
76336
+ return _super !== null && _super.apply(this, arguments) || this;
76337
+ }
76338
+ Object.defineProperty(SurveyQuestionRankingItemContent.prototype, "item", {
76339
+ get: function () {
76340
+ return this.props.item;
76341
+ },
76342
+ enumerable: false,
76343
+ configurable: true
76344
+ });
76345
+ Object.defineProperty(SurveyQuestionRankingItemContent.prototype, "cssClasses", {
76346
+ get: function () {
76347
+ return this.props.cssClasses;
76348
+ },
76349
+ enumerable: false,
76350
+ configurable: true
76351
+ });
76352
+ SurveyQuestionRankingItemContent.prototype.renderElement = function () {
76353
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.controlLabel }, _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElementBase"].renderLocString(this.item.locText));
76354
+ };
76355
+ return SurveyQuestionRankingItemContent;
76356
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
76357
+
76358
+ _element_factory__WEBPACK_IMPORTED_MODULE_4__["ReactElementFactory"].Instance.registerElement("sv-ranking-item-content", function (props) {
76359
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItemContent, props);
76360
+ });
75800
76361
  _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Instance.registerQuestion("ranking", function (props) {
75801
76362
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRanking, props);
75802
76363
  });
@@ -76027,7 +76588,9 @@ var SurveyQuestionText = /** @class */ (function (_super) {
76027
76588
  }
76028
76589
  var counter = !!this.question.getMaxLength() ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_character_counter__WEBPACK_IMPORTED_MODULE_3__["CharacterCounterComponent"], { counter: this.question.characterCounter, remainingCharacterCounter: this.question.cssClasses.remainingCharacterCounter })) : null;
76029
76590
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
76030
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: inputClass, type: this.question.inputType,
76591
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: this.question.inputId,
76592
+ // disabled={this.isDisplayMode}
76593
+ disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: inputClass, type: this.question.inputType,
76031
76594
  //ref={this.controlRef}
76032
76595
  ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: this.question.onBlur, onFocus: this.question.onFocus, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-describedby": this.question.a11y_input_ariaDescribedBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }),
76033
76596
  counter));
@@ -78366,12 +78929,12 @@ var SurveyElement = /** @class */ (function (_super) {
78366
78929
  }
78367
78930
  return info;
78368
78931
  };
78369
- SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible) {
78932
+ SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible, scrollIntoViewOptions) {
78370
78933
  var root = _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].environment.root;
78371
78934
  if (!elementId || typeof root === "undefined")
78372
78935
  return false;
78373
78936
  var el = root.getElementById(elementId);
78374
- return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible);
78937
+ return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions);
78375
78938
  };
78376
78939
  SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions) {
78377
78940
  if (!el || !el.scrollIntoView)
@@ -79462,6 +80025,8 @@ var SurveyElement = /** @class */ (function (_super) {
79462
80025
  enumerable: false,
79463
80026
  configurable: true
79464
80027
  });
80028
+ SurveyElement.prototype.onElementExpanded = function (elementIsRendered) {
80029
+ };
79465
80030
  SurveyElement.prototype.getExpandCollapseAnimationOptions = function () {
79466
80031
  var _this = this;
79467
80032
  var beforeRunAnimation = function (el) {
@@ -79472,12 +80037,16 @@ var SurveyElement = /** @class */ (function (_super) {
79472
80037
  _this.isAnimatingCollapseExpand = false;
79473
80038
  };
79474
80039
  return {
80040
+ getRerenderEvent: function () { return _this.onElementRerendered; },
79475
80041
  getEnterOptions: function () {
79476
80042
  var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
79477
80043
  return {
79478
80044
  cssClass: cssClasses.contentFadeIn,
79479
80045
  onBeforeRunAnimation: beforeRunAnimation,
79480
- onAfterRunAnimation: afterRunAnimation,
80046
+ onAfterRunAnimation: function (el) {
80047
+ afterRunAnimation(el);
80048
+ _this.onElementExpanded(true);
80049
+ },
79481
80050
  };
79482
80051
  },
79483
80052
  getLeaveOptions: function () {
@@ -79498,15 +80067,26 @@ var SurveyElement = /** @class */ (function (_super) {
79498
80067
  }
79499
80068
  return undefined;
79500
80069
  },
79501
- isAnimationEnabled: function () { return _this.animationAllowed && !_this.isDesignMode; }
80070
+ isAnimationEnabled: function () { return _this.isExpandCollapseAnimationEnabled; }
79502
80071
  };
79503
80072
  };
80073
+ Object.defineProperty(SurveyElement.prototype, "isExpandCollapseAnimationEnabled", {
80074
+ get: function () {
80075
+ return this.animationAllowed && !this.isDesignMode;
80076
+ },
80077
+ enumerable: false,
80078
+ configurable: true
80079
+ });
79504
80080
  Object.defineProperty(SurveyElement.prototype, "renderedIsExpanded", {
79505
80081
  get: function () {
79506
80082
  return !!this._renderedIsExpanded;
79507
80083
  },
79508
80084
  set: function (val) {
80085
+ var oldValue = this._renderedIsExpanded;
79509
80086
  this.animationCollapsed.sync(val);
80087
+ if (!this.isExpandCollapseAnimationEnabled && !oldValue && this.renderedIsExpanded) {
80088
+ this.onElementExpanded(false);
80089
+ }
79510
80090
  },
79511
80091
  enumerable: false,
79512
80092
  configurable: true
@@ -80388,6 +80968,8 @@ var SurveyModel = /** @class */ (function (_super) {
80388
80968
  * An event that is raised after the visibility of a popup is changed. This event can be raised for [Single-](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) and [Multi-Select Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) questions and [Rating](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) questions [rendered as drop-down menus](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#displayMode).
80389
80969
  */
80390
80970
  _this.onPopupVisibleChanged = _this.addEvent();
80971
+ _this.onElementWrapperComponentName = _this.addEvent();
80972
+ _this.onElementWrapperComponentData = _this.addEvent();
80391
80973
  /**
80392
80974
  * A list of errors in a survey JSON schema.
80393
80975
  * @see ensureUniqueNames
@@ -80607,10 +81189,12 @@ var SurveyModel = /** @class */ (function (_super) {
80607
81189
  component: "sv-progress-requiredquestions",
80608
81190
  data: _this
80609
81191
  });
81192
+ var tocModel = new _surveyToc__WEBPACK_IMPORTED_MODULE_24__["TOCModel"](_this);
80610
81193
  _this.addLayoutElement({
80611
81194
  id: "toc-navigation",
80612
81195
  component: "sv-navigation-toc",
80613
- data: new _surveyToc__WEBPACK_IMPORTED_MODULE_24__["TOCModel"](_this)
81196
+ data: tocModel,
81197
+ processResponsiveness: function (width) { return tocModel.updateStickyTOCSize(_this.rootElement); }
80614
81198
  });
80615
81199
  _this.layoutElements.push({
80616
81200
  id: "buttons-navigation",
@@ -84015,7 +84599,7 @@ var SurveyModel = /** @class */ (function (_super) {
84015
84599
  }
84016
84600
  var visPages = this.visiblePages;
84017
84601
  var res = true;
84018
- var rec = { fireCallback: fireCallback, focuseOnFirstError: focusOnFirstError, firstErrorQuestion: null, result: false };
84602
+ var rec = { fireCallback: fireCallback, focusOnFirstError: focusOnFirstError, firstErrorQuestion: null, result: false };
84019
84603
  for (var i = 0; i < visPages.length; i++) {
84020
84604
  if (!visPages[i].validate(fireCallback, focusOnFirstError, rec)) {
84021
84605
  res = false;
@@ -85354,7 +85938,7 @@ var SurveyModel = /** @class */ (function (_super) {
85354
85938
  this.onGetMatrixRowActions.fire(this, options);
85355
85939
  return options.actions;
85356
85940
  };
85357
- SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible) {
85941
+ SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible, scrollIntoViewOptions) {
85358
85942
  var options = {
85359
85943
  element: element,
85360
85944
  question: question,
@@ -85364,7 +85948,7 @@ var SurveyModel = /** @class */ (function (_super) {
85364
85948
  };
85365
85949
  this.onScrollingElementToTop.fire(this, options);
85366
85950
  if (!options.cancel) {
85367
- _survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].ScrollElementToTop(options.elementId, scrollIfVisible);
85951
+ _survey_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElement"].ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions);
85368
85952
  }
85369
85953
  };
85370
85954
  /**
@@ -87647,32 +88231,45 @@ var SurveyModel = /** @class */ (function (_super) {
87647
88231
  }
87648
88232
  }
87649
88233
  };
88234
+ SurveyModel.prototype.elementWrapperComponentNameCore = function (componentName, element, wrapperName, reason, item) {
88235
+ if (this.onElementWrapperComponentName.isEmpty)
88236
+ return componentName;
88237
+ var options = { componentName: componentName, element: element, wrapperName: wrapperName, reason: reason, item: item };
88238
+ this.onElementWrapperComponentName.fire(this, options);
88239
+ return options.componentName;
88240
+ };
88241
+ SurveyModel.prototype.elementWrapperDataCore = function (data, element, wrapperName, reason, item) {
88242
+ if (this.onElementWrapperComponentData.isEmpty)
88243
+ return data;
88244
+ var options = { data: data, element: element, wrapperName: wrapperName, reason: reason, item: item };
88245
+ this.onElementWrapperComponentData.fire(this, options);
88246
+ return options.data;
88247
+ };
87650
88248
  SurveyModel.prototype.getElementWrapperComponentName = function (element, reason) {
87651
- if (reason === "logo-image") {
87652
- return "sv-logo-image";
87653
- }
87654
- return SurveyModel.TemplateRendererComponentName;
88249
+ var res = reason === "logo-image" ? "sv-logo-image" : SurveyModel.TemplateRendererComponentName;
88250
+ return this.elementWrapperComponentNameCore(res, element, "component", reason);
87655
88251
  };
87656
88252
  SurveyModel.prototype.getQuestionContentWrapperComponentName = function (element) {
87657
- return SurveyModel.TemplateRendererComponentName;
88253
+ return this.elementWrapperComponentNameCore(SurveyModel.TemplateRendererComponentName, element, "content-component");
87658
88254
  };
87659
88255
  SurveyModel.prototype.getRowWrapperComponentName = function (row) {
87660
- return SurveyModel.TemplateRendererComponentName;
88256
+ return this.elementWrapperComponentNameCore(SurveyModel.TemplateRendererComponentName, row, "row");
88257
+ };
88258
+ SurveyModel.prototype.getItemValueWrapperComponentName = function (item, question) {
88259
+ return this.elementWrapperComponentNameCore(SurveyModel.TemplateRendererComponentName, question, "itemvalue", undefined, item);
87661
88260
  };
87662
88261
  SurveyModel.prototype.getElementWrapperComponentData = function (element, reason) {
87663
- return element;
88262
+ return this.elementWrapperDataCore(element, element, "component", reason);
87664
88263
  };
87665
88264
  SurveyModel.prototype.getRowWrapperComponentData = function (row) {
87666
- return row;
87667
- };
87668
- SurveyModel.prototype.getItemValueWrapperComponentName = function (item, question) {
87669
- return SurveyModel.TemplateRendererComponentName;
88265
+ return this.elementWrapperDataCore(row, row, "row");
87670
88266
  };
87671
88267
  SurveyModel.prototype.getItemValueWrapperComponentData = function (item, question) {
87672
- return item;
88268
+ return this.elementWrapperDataCore(item, question, "itemvalue", undefined, item);
87673
88269
  };
87674
88270
  SurveyModel.prototype.getMatrixCellTemplateData = function (cell) {
87675
- return cell.question;
88271
+ var res = cell.question;
88272
+ return this.elementWrapperDataCore(res, res, "cell");
87676
88273
  };
87677
88274
  SurveyModel.prototype.searchText = function (text) {
87678
88275
  if (!!text)
@@ -88816,10 +89413,15 @@ function createTOCListModel(survey, onAction) {
88816
89413
  }
88817
89414
  function getTocRootCss(survey, isMobile) {
88818
89415
  if (isMobile === void 0) { isMobile = false; }
89416
+ var rootCss = TOCModel.RootStyle;
88819
89417
  if (isMobile) {
88820
- return "sv_progress-toc sv_progress-toc--mobile";
89418
+ return rootCss + " " + TOCModel.RootStyle + "--mobile";
89419
+ }
89420
+ rootCss += (" " + TOCModel.RootStyle + "--" + (survey.tocLocation || "").toLowerCase());
89421
+ if (TOCModel.StickyPosition) {
89422
+ rootCss += " " + TOCModel.RootStyle + "--sticky";
88821
89423
  }
88822
- return "sv_progress-toc" + (" sv_progress-toc--" + (survey.tocLocation || "").toLowerCase());
89424
+ return rootCss;
88823
89425
  }
88824
89426
  var TOCModel = /** @class */ (function () {
88825
89427
  function TOCModel(survey) {
@@ -88833,7 +89435,37 @@ var TOCModel = /** @class */ (function () {
88833
89435
  this.popupModel = new _popup__WEBPACK_IMPORTED_MODULE_5__["PopupModel"]("sv-list", { model: this.listModel });
88834
89436
  this.popupModel.overlayDisplayMode = "overlay";
88835
89437
  this.popupModel.displayMode = new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.isMobile ? "overlay" : "popup"; });
89438
+ if (TOCModel.StickyPosition) {
89439
+ survey.onAfterRenderSurvey.add(function (s, o) { return _this.initStickyTOCSubscriptions(o.htmlElement); });
89440
+ this.initStickyTOCSubscriptions(survey.rootElement);
89441
+ }
88836
89442
  }
89443
+ TOCModel.prototype.initStickyTOCSubscriptions = function (rootElement) {
89444
+ var _this = this;
89445
+ if (TOCModel.StickyPosition && !!rootElement) {
89446
+ rootElement.addEventListener("scroll", function (event) {
89447
+ _this.updateStickyTOCSize(rootElement);
89448
+ });
89449
+ this.updateStickyTOCSize(rootElement);
89450
+ }
89451
+ };
89452
+ TOCModel.prototype.updateStickyTOCSize = function (rootElement) {
89453
+ if (!rootElement) {
89454
+ return;
89455
+ }
89456
+ var tocRootElement = rootElement.querySelector("." + TOCModel.RootStyle);
89457
+ if (!!tocRootElement) {
89458
+ tocRootElement.style.height = "";
89459
+ if (!this.isMobile && TOCModel.StickyPosition && !!rootElement) {
89460
+ var rootHeight = rootElement.getBoundingClientRect().height;
89461
+ var titleSelector = this.survey.headerView === "advanced" ? ".sv-header" : ".sv_custom_header+div div." + (this.survey.css.title || "sd-title");
89462
+ var titleElement = rootElement.querySelector(titleSelector);
89463
+ var titleElementHeight = titleElement ? titleElement.getBoundingClientRect().height : 0;
89464
+ var scrollCompensationHeight = rootElement.scrollTop > titleElementHeight ? 0 : titleElementHeight - rootElement.scrollTop;
89465
+ tocRootElement.style.height = (rootHeight - scrollCompensationHeight - 2) + "px";
89466
+ }
89467
+ }
89468
+ };
88837
89469
  Object.defineProperty(TOCModel.prototype, "isMobile", {
88838
89470
  get: function () {
88839
89471
  return this.survey.isMobile;
@@ -88852,6 +89484,8 @@ var TOCModel = /** @class */ (function () {
88852
89484
  this.popupModel.dispose();
88853
89485
  this.listModel.dispose();
88854
89486
  };
89487
+ TOCModel.RootStyle = "sv_progress-toc";
89488
+ TOCModel.StickyPosition = true;
88855
89489
  return TOCModel;
88856
89490
  }());
88857
89491
 
@@ -89962,8 +90596,9 @@ __webpack_require__.r(__webpack_exports__);
89962
90596
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return AnimationBoolean; });
89963
90597
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return AnimationGroup; });
89964
90598
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationTab", function() { return AnimationTab; });
89965
- /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
89966
- /* harmony import */ var _taskmanager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./taskmanager */ "./src/utils/taskmanager.ts");
90599
+ /* harmony import */ var _taskmanager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./taskmanager */ "./src/utils/taskmanager.ts");
90600
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./src/utils/utils.ts");
90601
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
89967
90602
  var __extends = (undefined && undefined.__extends) || (function () {
89968
90603
  var extendStatics = function (d, b) {
89969
90604
  extendStatics = Object.setPrototypeOf ||
@@ -89981,6 +90616,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
89981
90616
  })();
89982
90617
 
89983
90618
 
90619
+
89984
90620
  var AnimationUtils = /** @class */ (function () {
89985
90621
  function AnimationUtils() {
89986
90622
  this.cancelQueue = [];
@@ -90024,7 +90660,7 @@ var AnimationUtils = /** @class */ (function () {
90024
90660
  var animationsCount = this.getAnimationsCount(element);
90025
90661
  var onEndCallback = function (isCancel) {
90026
90662
  if (isCancel === void 0) { isCancel = true; }
90027
- options.onAfterRunAnimation && options.onAfterRunAnimation(element);
90663
+ _this.afterAnimationRun(element, options);
90028
90664
  callback(isCancel);
90029
90665
  clearTimeout(cancelTimeout);
90030
90666
  _this.removeCancelCallback(onEndCallback);
@@ -90043,9 +90679,15 @@ var AnimationUtils = /** @class */ (function () {
90043
90679
  }, this.getAnimationDuration(element) + 10);
90044
90680
  }
90045
90681
  else {
90682
+ this.afterAnimationRun(element, options);
90046
90683
  callback(true);
90047
90684
  }
90048
90685
  };
90686
+ AnimationUtils.prototype.afterAnimationRun = function (element, options) {
90687
+ if (element && options) {
90688
+ options.onAfterRunAnimation && options.onAfterRunAnimation(element);
90689
+ }
90690
+ };
90049
90691
  AnimationUtils.prototype.beforeAnimationRun = function (element, options) {
90050
90692
  if (element && options) {
90051
90693
  options.onBeforeRunAnimation && options.onBeforeRunAnimation(element);
@@ -90055,7 +90697,7 @@ var AnimationUtils = /** @class */ (function () {
90055
90697
  return options.cssClass.replace(/\s+$/, "").split(/\s+/);
90056
90698
  };
90057
90699
  AnimationUtils.prototype.runAnimation = function (element, options, callback) {
90058
- if (element && options.cssClass) {
90700
+ if (element && (options === null || options === void 0 ? void 0 : options.cssClass)) {
90059
90701
  this.reflow(element);
90060
90702
  this.getCssClasses(options).forEach(function (cssClass) {
90061
90703
  element.classList.add(cssClass);
@@ -90073,30 +90715,24 @@ var AnimationUtils = /** @class */ (function () {
90073
90715
  });
90074
90716
  }
90075
90717
  };
90076
- AnimationUtils.prototype.onNextRender = function (callback, runEarly, isCancel) {
90718
+ AnimationUtils.prototype.onNextRender = function (callback, isCancel) {
90077
90719
  var _this = this;
90078
90720
  if (isCancel === void 0) { isCancel = false; }
90079
- if (!isCancel && _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].isAvailable()) {
90721
+ if (!isCancel && _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].isAvailable()) {
90080
90722
  var cancelCallback_1 = function () {
90081
- callback();
90723
+ callback(true);
90082
90724
  cancelAnimationFrame(latestRAF_1);
90083
90725
  };
90084
- var latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
90085
- if (runEarly && runEarly()) {
90086
- callback();
90726
+ var latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].requestAnimationFrame(function () {
90727
+ latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].requestAnimationFrame(function () {
90728
+ callback(false);
90087
90729
  _this.removeCancelCallback(cancelCallback_1);
90088
- }
90089
- else {
90090
- latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
90091
- callback();
90092
- _this.removeCancelCallback(cancelCallback_1);
90093
- });
90094
- }
90730
+ });
90095
90731
  });
90096
90732
  this.addCancelCallback(cancelCallback_1);
90097
90733
  }
90098
90734
  else {
90099
- callback();
90735
+ callback(true);
90100
90736
  }
90101
90737
  };
90102
90738
  AnimationUtils.prototype.cancel = function () {
@@ -90114,25 +90750,23 @@ var AnimationPropertyUtils = /** @class */ (function (_super) {
90114
90750
  }
90115
90751
  AnimationPropertyUtils.prototype.onEnter = function (options) {
90116
90752
  var _this = this;
90117
- this.onNextRender(function () {
90118
- var htmlElement = options.getAnimatedElement();
90119
- var enterOptions = options.getEnterOptions();
90120
- _this.beforeAnimationRun(htmlElement, enterOptions);
90121
- _this.runAnimation(htmlElement, enterOptions, function () {
90122
- _this.clearHtmlElement(htmlElement, enterOptions);
90123
- });
90124
- }, function () { return !!options.getAnimatedElement(); });
90753
+ var htmlElement = options.getAnimatedElement();
90754
+ var enterOptions = options.getEnterOptions ? options.getEnterOptions() : {};
90755
+ this.beforeAnimationRun(htmlElement, enterOptions);
90756
+ this.runAnimation(htmlElement, enterOptions, function () {
90757
+ _this.clearHtmlElement(htmlElement, enterOptions);
90758
+ });
90125
90759
  };
90126
90760
  AnimationPropertyUtils.prototype.onLeave = function (options, callback) {
90127
90761
  var _this = this;
90128
90762
  var htmlElement = options.getAnimatedElement();
90129
- var leaveOptions = options.getLeaveOptions();
90763
+ var leaveOptions = options.getLeaveOptions ? options.getLeaveOptions() : {};
90130
90764
  this.beforeAnimationRun(htmlElement, leaveOptions);
90131
90765
  this.runAnimation(htmlElement, leaveOptions, function (isCancel) {
90132
90766
  callback();
90133
90767
  _this.onNextRender(function () {
90134
90768
  _this.clearHtmlElement(htmlElement, leaveOptions);
90135
- }, undefined, isCancel);
90769
+ }, isCancel);
90136
90770
  });
90137
90771
  };
90138
90772
  return AnimationPropertyUtils;
@@ -90143,40 +90777,54 @@ var AnimationGroupUtils = /** @class */ (function (_super) {
90143
90777
  function AnimationGroupUtils() {
90144
90778
  return _super !== null && _super.apply(this, arguments) || this;
90145
90779
  }
90146
- AnimationGroupUtils.prototype.runGroupAnimation = function (options, addedElements, removedElements, callback) {
90780
+ AnimationGroupUtils.prototype.runGroupAnimation = function (options, addedItems, removedItems, reorderedItems, callback) {
90147
90781
  var _this = this;
90148
- this.onNextRender(function () {
90149
- var addedHtmlElements = addedElements.map(function (el) { return options.getAnimatedElement(el); });
90150
- var enterOptions = addedElements.map(function (el) { return options.getEnterOptions(el); });
90151
- var removedHtmlElements = removedElements.map(function (el) { return options.getAnimatedElement(el); });
90152
- var leaveOptions = removedElements.map(function (el) { return options.getLeaveOptions(el); });
90153
- addedElements.forEach(function (_, i) {
90154
- _this.beforeAnimationRun(addedHtmlElements[i], enterOptions[i]);
90155
- });
90156
- removedElements.forEach(function (_, i) {
90157
- _this.beforeAnimationRun(removedHtmlElements[i], leaveOptions[i]);
90158
- });
90159
- var counter = addedElements.length + removedElements.length;
90160
- var onAnimationEndCallback = function (isCancel) {
90161
- if (--counter <= 0) {
90162
- callback && callback();
90163
- _this.onNextRender(function () {
90164
- addedElements.forEach(function (_, i) {
90165
- _this.clearHtmlElement(addedHtmlElements[i], enterOptions[i]);
90166
- });
90167
- removedElements.forEach(function (_, i) {
90168
- _this.clearHtmlElement(removedHtmlElements[i], leaveOptions[i]);
90169
- });
90170
- }, undefined, isCancel);
90171
- }
90172
- };
90173
- addedElements.forEach(function (_, i) {
90174
- _this.runAnimation(addedHtmlElements[i], enterOptions[i], onAnimationEndCallback);
90175
- });
90176
- removedElements.forEach(function (_, i) {
90177
- _this.runAnimation(removedHtmlElements[i], leaveOptions[i], onAnimationEndCallback);
90178
- });
90179
- }, function () { return addedElements.length == 0 || addedElements.some(function (el) { return !!options.getAnimatedElement(el); }); });
90782
+ var info = {
90783
+ isAddingRunning: addedItems.length > 0,
90784
+ isDeletingRunning: removedItems.length > 0,
90785
+ isReorderingRunning: reorderedItems.length > 0
90786
+ };
90787
+ var addedHtmlElements = addedItems.map(function (el) { return options.getAnimatedElement(el); });
90788
+ var enterOptions = addedItems.map(function (el) { return options.getEnterOptions ? options.getEnterOptions(el, info) : {}; });
90789
+ var removedHtmlElements = removedItems.map(function (el) { return options.getAnimatedElement(el); });
90790
+ var leaveOptions = removedItems.map(function (el) { return options.getLeaveOptions ? options.getLeaveOptions(el, info) : {}; });
90791
+ var reorderedHtmlElements = reorderedItems.map(function (el) { return options.getAnimatedElement(el.item); });
90792
+ var reorderedOptions = reorderedItems.map(function (el) { return options.getReorderOptions ? options.getReorderOptions(el.item, el.movedForward, info) : {}; });
90793
+ addedItems.forEach(function (_, i) {
90794
+ _this.beforeAnimationRun(addedHtmlElements[i], enterOptions[i]);
90795
+ });
90796
+ removedItems.forEach(function (_, i) {
90797
+ _this.beforeAnimationRun(removedHtmlElements[i], leaveOptions[i]);
90798
+ });
90799
+ reorderedItems.forEach(function (_, i) {
90800
+ _this.beforeAnimationRun(reorderedHtmlElements[i], reorderedOptions[i]);
90801
+ });
90802
+ var counter = addedItems.length + removedItems.length + reorderedHtmlElements.length;
90803
+ var onAnimationEndCallback = function (isCancel) {
90804
+ if (--counter <= 0) {
90805
+ callback && callback();
90806
+ _this.onNextRender(function () {
90807
+ addedItems.forEach(function (_, i) {
90808
+ _this.clearHtmlElement(addedHtmlElements[i], enterOptions[i]);
90809
+ });
90810
+ removedItems.forEach(function (_, i) {
90811
+ _this.clearHtmlElement(removedHtmlElements[i], leaveOptions[i]);
90812
+ });
90813
+ reorderedItems.forEach(function (_, i) {
90814
+ _this.clearHtmlElement(reorderedHtmlElements[i], reorderedOptions[i]);
90815
+ });
90816
+ }, isCancel);
90817
+ }
90818
+ };
90819
+ addedItems.forEach(function (_, i) {
90820
+ _this.runAnimation(addedHtmlElements[i], enterOptions[i], onAnimationEndCallback);
90821
+ });
90822
+ removedItems.forEach(function (_, i) {
90823
+ _this.runAnimation(removedHtmlElements[i], leaveOptions[i], onAnimationEndCallback);
90824
+ });
90825
+ reorderedItems.forEach(function (_, i) {
90826
+ _this.runAnimation(reorderedHtmlElements[i], reorderedOptions[i], onAnimationEndCallback);
90827
+ });
90180
90828
  };
90181
90829
  return AnimationGroupUtils;
90182
90830
  }(AnimationUtils));
@@ -90187,11 +90835,51 @@ var AnimationProperty = /** @class */ (function () {
90187
90835
  this.animationOptions = animationOptions;
90188
90836
  this.update = update;
90189
90837
  this.getCurrentValue = getCurrentValue;
90190
- this._debouncedSync = Object(_taskmanager__WEBPACK_IMPORTED_MODULE_1__["debounce"])(function (newValue) {
90838
+ this._debouncedSync = Object(_taskmanager__WEBPACK_IMPORTED_MODULE_0__["debounce"])(function (newValue) {
90191
90839
  _this.animation.cancel();
90192
- _this._sync(newValue);
90840
+ try {
90841
+ _this._sync(newValue);
90842
+ }
90843
+ catch (_a) {
90844
+ _this.update(newValue);
90845
+ }
90193
90846
  });
90194
90847
  }
90848
+ AnimationProperty.prototype.onNextRender = function (callback, onCancel) {
90849
+ var _this = this;
90850
+ var rerenderEvent = this.animationOptions.getRerenderEvent();
90851
+ if (!rerenderEvent) {
90852
+ if (_global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].isAvailable()) {
90853
+ var raf_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_2__["DomWindowHelper"].requestAnimationFrame(function () {
90854
+ callback();
90855
+ _this.cancelCallback = undefined;
90856
+ });
90857
+ this.cancelCallback = function () {
90858
+ onCancel && onCancel();
90859
+ cancelAnimationFrame(raf_1);
90860
+ _this.cancelCallback = undefined;
90861
+ };
90862
+ }
90863
+ else {
90864
+ throw new Error("Can't get next render");
90865
+ }
90866
+ }
90867
+ else {
90868
+ var clear_1 = function () {
90869
+ rerenderEvent.remove(nextRenderCallback_1);
90870
+ _this.cancelCallback = undefined;
90871
+ };
90872
+ var nextRenderCallback_1 = function () {
90873
+ callback();
90874
+ clear_1();
90875
+ };
90876
+ this.cancelCallback = function () {
90877
+ onCancel && onCancel();
90878
+ clear_1();
90879
+ };
90880
+ rerenderEvent.add(nextRenderCallback_1);
90881
+ }
90882
+ };
90195
90883
  AnimationProperty.prototype.sync = function (newValue) {
90196
90884
  if (this.animationOptions.isAnimationEnabled()) {
90197
90885
  this._debouncedSync.run(newValue);
@@ -90202,8 +90890,9 @@ var AnimationProperty = /** @class */ (function () {
90202
90890
  }
90203
90891
  };
90204
90892
  AnimationProperty.prototype.cancel = function () {
90205
- this.animation.cancel();
90206
90893
  this._debouncedSync.cancel();
90894
+ this.cancelCallback && this.cancelCallback();
90895
+ this.animation.cancel();
90207
90896
  };
90208
90897
  return AnimationProperty;
90209
90898
  }());
@@ -90219,8 +90908,10 @@ var AnimationBoolean = /** @class */ (function (_super) {
90219
90908
  var _this = this;
90220
90909
  if (newValue !== this.getCurrentValue()) {
90221
90910
  if (newValue) {
90911
+ this.onNextRender(function () {
90912
+ _this.animation.onEnter(_this.animationOptions);
90913
+ });
90222
90914
  this.update(newValue);
90223
- this.animation.onEnter(this.animationOptions);
90224
90915
  }
90225
90916
  else {
90226
90917
  this.animation.onLeave(this.animationOptions, function () {
@@ -90244,15 +90935,34 @@ var AnimationGroup = /** @class */ (function (_super) {
90244
90935
  }
90245
90936
  AnimationGroup.prototype._sync = function (newValue) {
90246
90937
  var _this = this;
90938
+ var _a, _b;
90247
90939
  var oldValue = this.getCurrentValue();
90248
- var itemsToAdd = newValue.filter(function (el) { return oldValue.indexOf(el) < 0; });
90249
- var deletedItems = oldValue.filter(function (el) { return newValue.indexOf(el) < 0; });
90250
- if (itemsToAdd.length == 0 && (deletedItems === null || deletedItems === void 0 ? void 0 : deletedItems.length) > 0) {
90251
- this.animation.runGroupAnimation(this.animationOptions, [], deletedItems, function () { return _this.update(newValue); });
90940
+ var allowSyncRemovalAddition = (_a = this.animationOptions.allowSyncRemovalAddition) !== null && _a !== void 0 ? _a : true;
90941
+ 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;
90942
+ if (!allowSyncRemovalAddition && (reorderedItems.length > 0 || addedItems.length > 0)) {
90943
+ deletedItems = [];
90944
+ mergedItems = newValue;
90945
+ }
90946
+ var runAnimationCallback = function () {
90947
+ _this.animation.runGroupAnimation(_this.animationOptions, addedItems, deletedItems, reorderedItems, function () {
90948
+ if (deletedItems.length > 0) {
90949
+ _this.update(newValue);
90950
+ }
90951
+ });
90952
+ };
90953
+ if ([addedItems, deletedItems, reorderedItems].some(function (arr) { return arr.length > 0; })) {
90954
+ if (deletedItems.length <= 0 || reorderedItems.length > 0 || addedItems.length > 0) {
90955
+ this.onNextRender(runAnimationCallback, function () {
90956
+ _this.update(newValue);
90957
+ });
90958
+ this.update(mergedItems);
90959
+ }
90960
+ else {
90961
+ runAnimationCallback();
90962
+ }
90252
90963
  }
90253
90964
  else {
90254
90965
  this.update(newValue);
90255
- this.animation.runGroupAnimation(this.animationOptions, itemsToAdd, []);
90256
90966
  }
90257
90967
  };
90258
90968
  return AnimationGroup;
@@ -90271,10 +90981,12 @@ var AnimationTab = /** @class */ (function (_super) {
90271
90981
  var oldValue = [].concat(this.getCurrentValue());
90272
90982
  if (oldValue[0] !== newValue[0]) {
90273
90983
  var tempValue = !!this.mergeValues ? this.mergeValues(newValue, oldValue) : [].concat(oldValue, newValue);
90984
+ this.onNextRender(function () {
90985
+ _this.animation.runGroupAnimation(_this.animationOptions, newValue, oldValue, [], function () {
90986
+ _this.update(newValue);
90987
+ });
90988
+ }, function () { return _this.update(newValue); });
90274
90989
  this.update(tempValue, true);
90275
- this.animation.runGroupAnimation(this.animationOptions, newValue, oldValue, function () {
90276
- _this.update(newValue);
90277
- });
90278
90990
  }
90279
90991
  else {
90280
90992
  this.update(newValue);
@@ -90668,16 +91380,55 @@ var DragOrClickHelper = /** @class */ (function () {
90668
91380
  /*!****************************!*\
90669
91381
  !*** ./src/utils/popup.ts ***!
90670
91382
  \****************************/
90671
- /*! exports provided: PopupUtils */
91383
+ /*! exports provided: Rect, PopupUtils */
90672
91384
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
90673
91385
 
90674
91386
  "use strict";
90675
91387
  __webpack_require__.r(__webpack_exports__);
91388
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rect", function() { return Rect; });
90676
91389
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupUtils", function() { return PopupUtils; });
91390
+ var Rect = /** @class */ (function () {
91391
+ function Rect(x, y, width, height) {
91392
+ this.x = x;
91393
+ this.y = y;
91394
+ this.width = width;
91395
+ this.height = height;
91396
+ }
91397
+ Object.defineProperty(Rect.prototype, "left", {
91398
+ get: function () {
91399
+ return this.x;
91400
+ },
91401
+ enumerable: false,
91402
+ configurable: true
91403
+ });
91404
+ Object.defineProperty(Rect.prototype, "top", {
91405
+ get: function () {
91406
+ return this.y;
91407
+ },
91408
+ enumerable: false,
91409
+ configurable: true
91410
+ });
91411
+ Object.defineProperty(Rect.prototype, "right", {
91412
+ get: function () {
91413
+ return this.x + this.width;
91414
+ },
91415
+ enumerable: false,
91416
+ configurable: true
91417
+ });
91418
+ Object.defineProperty(Rect.prototype, "bottom", {
91419
+ get: function () {
91420
+ return this.y + this.height;
91421
+ },
91422
+ enumerable: false,
91423
+ configurable: true
91424
+ });
91425
+ return Rect;
91426
+ }());
91427
+
90677
91428
  var PopupUtils = /** @class */ (function () {
90678
91429
  function PopupUtils() {
90679
91430
  }
90680
- PopupUtils.calculatePosition = function (targetRect, height, width, verticalPosition, horizontalPosition, showPointer, positionMode) {
91431
+ PopupUtils.calculatePosition = function (targetRect, height, width, verticalPosition, horizontalPosition, positionMode) {
90681
91432
  if (positionMode === void 0) { positionMode = "flex"; }
90682
91433
  var currentLeft = targetRect.left;
90683
91434
  var currentTop = targetRect.top;
@@ -90695,29 +91446,33 @@ var PopupUtils = /** @class */ (function () {
90695
91446
  currentTop = targetRect.top - height;
90696
91447
  else
90697
91448
  currentTop = targetRect.bottom;
90698
- if (showPointer) {
90699
- if (horizontalPosition != "center" && verticalPosition != "middle") {
90700
- if (verticalPosition == "top") {
90701
- currentTop = currentTop + targetRect.height;
90702
- }
90703
- else {
90704
- currentTop = currentTop - targetRect.height;
90705
- }
91449
+ if (horizontalPosition != "center" && verticalPosition != "middle") {
91450
+ if (verticalPosition == "top") {
91451
+ currentTop = currentTop + targetRect.height;
91452
+ }
91453
+ else {
91454
+ currentTop = currentTop - targetRect.height;
90706
91455
  }
90707
91456
  }
90708
91457
  return { left: Math.round(currentLeft), top: Math.round(currentTop) };
90709
91458
  };
90710
- PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition) {
91459
+ PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition, canShrink) {
91460
+ if (canShrink === void 0) { canShrink = true; }
90711
91461
  var result;
91462
+ var maxHeight = windowHeight - PopupUtils.bottomIndent;
90712
91463
  if (verticalPosition === "top") {
90713
91464
  result = { height: height, top: top };
90714
91465
  }
90715
91466
  if (top < 0) {
90716
- result = { height: height + top, top: 0 };
91467
+ result = { height: canShrink ? height + top : height, top: 0 };
90717
91468
  }
90718
91469
  else if (height + top > windowHeight) {
90719
- var newHeight = Math.min(height, windowHeight - top - PopupUtils.bottomIndent);
90720
- result = { height: newHeight, top: top };
91470
+ var newHeight = Math.min(height, maxHeight - top);
91471
+ result = { height: canShrink ? newHeight : height, top: canShrink ? top : top - (height - newHeight) };
91472
+ }
91473
+ if (result) {
91474
+ result.height = Math.min(result.height, maxHeight);
91475
+ result.top = Math.max(result.top, 0);
90721
91476
  }
90722
91477
  return result;
90723
91478
  };
@@ -90758,18 +91513,15 @@ var PopupUtils = /** @class */ (function () {
90758
91513
  }
90759
91514
  return { width: newWidth - margins.left - margins.right, left: newLeft };
90760
91515
  };
90761
- PopupUtils.updateVerticalPosition = function (targetRect, height, verticalPosition, showPointer, windowHeight) {
90762
- var deltaTop = height - (targetRect.top + (showPointer ? targetRect.height : 0));
90763
- var deltaBottom = height +
90764
- targetRect.bottom -
90765
- (showPointer ? targetRect.height : 0) -
90766
- windowHeight;
91516
+ PopupUtils.updateVerticalPosition = function (targetRect, height, horizontalPosition, verticalPosition, windowHeight) {
91517
+ if (verticalPosition === "middle")
91518
+ return verticalPosition;
91519
+ var deltaTop = height - (targetRect.top + (horizontalPosition !== "center" ? targetRect.height : 0));
91520
+ var deltaBottom = height + targetRect.bottom - (horizontalPosition !== "center" ? targetRect.height : 0) - windowHeight;
90767
91521
  if (deltaTop > 0 && deltaBottom <= 0 && verticalPosition == "top") {
90768
91522
  verticalPosition = "bottom";
90769
91523
  }
90770
- else if (deltaBottom > 0 &&
90771
- deltaTop <= 0 &&
90772
- verticalPosition == "bottom") {
91524
+ else if (deltaBottom > 0 && deltaTop <= 0 && verticalPosition == "bottom") {
90773
91525
  verticalPosition = "top";
90774
91526
  }
90775
91527
  else if (deltaBottom > 0 && deltaTop > 0) {
@@ -90777,6 +91529,22 @@ var PopupUtils = /** @class */ (function () {
90777
91529
  }
90778
91530
  return verticalPosition;
90779
91531
  };
91532
+ PopupUtils.updateHorizontalPosition = function (targetRect, width, horizontalPosition, windowWidth) {
91533
+ if (horizontalPosition === "center")
91534
+ return horizontalPosition;
91535
+ var deltaLeft = width - targetRect.left;
91536
+ var deltaRight = width + targetRect.right - windowWidth;
91537
+ if (deltaLeft > 0 && deltaRight <= 0 && horizontalPosition == "left") {
91538
+ horizontalPosition = "right";
91539
+ }
91540
+ else if (deltaRight > 0 && deltaLeft <= 0 && horizontalPosition == "right") {
91541
+ horizontalPosition = "left";
91542
+ }
91543
+ else if (deltaRight > 0 && deltaLeft > 0) {
91544
+ horizontalPosition = deltaLeft < deltaRight ? "left" : "right";
91545
+ }
91546
+ return horizontalPosition;
91547
+ };
90780
91548
  PopupUtils.calculatePopupDirection = function (verticalPosition, horizontalPosition) {
90781
91549
  var popupDirection;
90782
91550
  if (horizontalPosition == "center" && verticalPosition != "middle") {
@@ -91141,7 +91909,7 @@ function debounce(func) {
91141
91909
  /*!****************************!*\
91142
91910
  !*** ./src/utils/utils.ts ***!
91143
91911
  \****************************/
91144
- /*! 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 */
91912
+ /*! 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 */
91145
91913
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
91146
91914
 
91147
91915
  "use strict";
@@ -91156,6 +91924,7 @@ __webpack_require__.r(__webpack_exports__);
91156
91924
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
91157
91925
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
91158
91926
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
91927
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareArrays", function() { return compareArrays; });
91159
91928
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
91160
91929
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
91161
91930
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
@@ -91476,6 +92245,8 @@ function preventDefaults(event) {
91476
92245
  event.stopPropagation();
91477
92246
  }
91478
92247
  function classesToSelector(str) {
92248
+ if (!str)
92249
+ return str;
91479
92250
  var re = /\s*?([\w-]+)\s*?/g;
91480
92251
  return str.replace(re, ".$1");
91481
92252
  }
@@ -91624,6 +92395,100 @@ function chooseFiles(input, callback) {
91624
92395
  };
91625
92396
  input.click();
91626
92397
  }
92398
+ function compareArrays(oldValue, newValue, getKey) {
92399
+ var oldItemsMap = new Map();
92400
+ var newItemsMap = new Map();
92401
+ var commonItemsInNewMap = new Map();
92402
+ var commonItemsInOldMap = new Map();
92403
+ oldValue.forEach(function (item) {
92404
+ var itemKey = getKey(item);
92405
+ if (!oldItemsMap.has(itemKey)) {
92406
+ oldItemsMap.set(getKey(item), item);
92407
+ }
92408
+ else {
92409
+ //if keys are set incorrectly do not process comparing
92410
+ throw new Error("keys must be unique");
92411
+ }
92412
+ });
92413
+ newValue.forEach(function (item) {
92414
+ var itemKey = getKey(item);
92415
+ if (!newItemsMap.has(itemKey)) {
92416
+ newItemsMap.set(itemKey, item);
92417
+ }
92418
+ else {
92419
+ //if keys are set incorrectly do not process comparing
92420
+ throw new Error("keys must be unique");
92421
+ }
92422
+ });
92423
+ var addedItems = [];
92424
+ var deletedItems = [];
92425
+ //calculating addedItems and items that exist in both arrays
92426
+ newItemsMap.forEach(function (item, key) {
92427
+ if (!oldItemsMap.has(key)) {
92428
+ addedItems.push(item);
92429
+ }
92430
+ else {
92431
+ commonItemsInNewMap.set(key, commonItemsInNewMap.size);
92432
+ }
92433
+ });
92434
+ //calculating deletedItems and items that exist in both arrays
92435
+ oldItemsMap.forEach(function (item, key) {
92436
+ if (!newItemsMap.has(key)) {
92437
+ deletedItems.push(item);
92438
+ }
92439
+ else {
92440
+ commonItemsInOldMap.set(key, commonItemsInOldMap.size);
92441
+ }
92442
+ });
92443
+ //calculating reordered items
92444
+ var reorderedItems = [];
92445
+ commonItemsInNewMap.forEach(function (index, key) {
92446
+ var oldIndex = commonItemsInOldMap.get(key);
92447
+ var item = newItemsMap.get(key);
92448
+ if (oldIndex !== index)
92449
+ reorderedItems.push({ item: item, movedForward: oldIndex < index });
92450
+ });
92451
+ //calculating merged array if multiple operations are applied at once
92452
+ var oldItemsWithCorrectOrder = new Array(oldValue.length);
92453
+ var commonItemsIndex = 0;
92454
+ var commonItemsKeysOrder = Array.from(commonItemsInNewMap.keys());
92455
+ oldValue.forEach(function (item, index) {
92456
+ if (commonItemsInNewMap.has(getKey(item))) {
92457
+ oldItemsWithCorrectOrder[index] = newItemsMap.get(commonItemsKeysOrder[commonItemsIndex]);
92458
+ commonItemsIndex++;
92459
+ }
92460
+ else {
92461
+ oldItemsWithCorrectOrder[index] = item;
92462
+ }
92463
+ });
92464
+ var valuesToInsertBeforeKey = new Map();
92465
+ var tempValuesArray = [];
92466
+ oldItemsWithCorrectOrder.forEach(function (item) {
92467
+ var itemKey = getKey(item);
92468
+ if (newItemsMap.has(itemKey)) {
92469
+ if (tempValuesArray.length > 0) {
92470
+ valuesToInsertBeforeKey.set(itemKey, tempValuesArray);
92471
+ tempValuesArray = [];
92472
+ }
92473
+ }
92474
+ else {
92475
+ tempValuesArray.push(item);
92476
+ }
92477
+ });
92478
+ var mergedItems = new Array();
92479
+ newItemsMap.forEach(function (item, key) {
92480
+ if (valuesToInsertBeforeKey.has(key)) {
92481
+ valuesToInsertBeforeKey.get(key).forEach(function (item) {
92482
+ mergedItems.push(item);
92483
+ });
92484
+ }
92485
+ mergedItems.push(item);
92486
+ });
92487
+ tempValuesArray.forEach(function (item) {
92488
+ mergedItems.push(item);
92489
+ });
92490
+ return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
92491
+ }
91627
92492
 
91628
92493
 
91629
92494