survey-react-ui 1.9.138 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.138
2
+ * surveyjs - Survey JavaScript library v1.10.1
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -188,9 +188,27 @@ var BaseAction = /** @class */ (function (_super) {
188
188
  __extends(BaseAction, _super);
189
189
  function BaseAction() {
190
190
  var _this = _super !== null && _super.apply(this, arguments) || this;
191
+ _this.rendredIdValue = BaseAction.getNextRendredId();
191
192
  _this.iconSize = 24;
192
193
  return _this;
193
194
  }
195
+ BaseAction.getNextRendredId = function () { return BaseAction.renderedId++; };
196
+ Object.defineProperty(BaseAction.prototype, "renderedId", {
197
+ get: function () { return this.rendredIdValue; },
198
+ enumerable: false,
199
+ configurable: true
200
+ });
201
+ Object.defineProperty(BaseAction.prototype, "owner", {
202
+ get: function () { return this.ownerValue; },
203
+ set: function (val) {
204
+ if (val !== this.owner) {
205
+ this.ownerValue = val;
206
+ this.locStrsChanged();
207
+ }
208
+ },
209
+ enumerable: false,
210
+ configurable: true
211
+ });
194
212
  Object.defineProperty(BaseAction.prototype, "visible", {
195
213
  get: function () {
196
214
  return this.getVisible();
@@ -315,6 +333,7 @@ var BaseAction = /** @class */ (function (_super) {
315
333
  }
316
334
  return args.isTrusted;
317
335
  };
336
+ BaseAction.renderedId = 1;
318
337
  __decorate([
319
338
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
320
339
  ], BaseAction.prototype, "tooltip", void 0);
@@ -1267,6 +1286,7 @@ var Base = /** @class */ (function () {
1267
1286
  */
1268
1287
  this.onItemValuePropertyChanged = this.addEvent();
1269
1288
  this.isCreating = true;
1289
+ this.animationAllowedLock = 0;
1270
1290
  this.bindingsValue = new Bindings(this);
1271
1291
  _jsonobject__WEBPACK_IMPORTED_MODULE_2__["CustomPropertiesCollection"].createProperties(this);
1272
1292
  this.onBaseCreating();
@@ -2187,6 +2207,22 @@ var Base = /** @class */ (function () {
2187
2207
  if (includeHidden === void 0) { includeHidden = false; }
2188
2208
  return [];
2189
2209
  };
2210
+ Object.defineProperty(Base.prototype, "animationAllowed", {
2211
+ get: function () {
2212
+ return this.getIsAnimationAllowed();
2213
+ },
2214
+ enumerable: false,
2215
+ configurable: true
2216
+ });
2217
+ Base.prototype.getIsAnimationAllowed = function () {
2218
+ return _settings__WEBPACK_IMPORTED_MODULE_3__["settings"].animationEnabled && this.animationAllowedLock >= 0 && !this.isLoadingFromJson && !this.isDisposed;
2219
+ };
2220
+ Base.prototype.blockAnimations = function () {
2221
+ this.animationAllowedLock--;
2222
+ };
2223
+ Base.prototype.releaseAnimations = function () {
2224
+ this.animationAllowedLock++;
2225
+ };
2190
2226
  Base.currentDependencis = undefined;
2191
2227
  return Base;
2192
2228
  }());
@@ -3589,7 +3625,7 @@ __webpack_require__.r(__webpack_exports__);
3589
3625
 
3590
3626
 
3591
3627
 
3592
- Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.138", "survey-react-ui");
3628
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.10.1", "survey-react-ui");
3593
3629
 
3594
3630
 
3595
3631
  /***/ }),
@@ -11542,7 +11578,7 @@ var englishStrings = {
11542
11578
  uploadingFile: "Your file is uploading. Please wait several seconds and try again.",
11543
11579
  loadingFile: "Loading...",
11544
11580
  chooseFile: "Choose file(s)...",
11545
- noFileChosen: "No file chosen",
11581
+ noFileChosen: "No file selected",
11546
11582
  filePlaceholder: "Drag and drop a file here or click the button below to select a file to upload.",
11547
11583
  confirmDelete: "Are you sure you want to delete this record?",
11548
11584
  keyDuplicationError: "This value should be unique.",
@@ -11561,6 +11597,7 @@ var englishStrings = {
11561
11597
  savingData: "The results are being saved on the server...",
11562
11598
  savingDataError: "An error occurred and we could not save the results.",
11563
11599
  savingDataSuccess: "The results were saved successfully!",
11600
+ savingExceedSize: "Your response exceeds 64KB. Please reduce the size of your file(s) and try again or contact a survey owner.",
11564
11601
  saveAgainButton: "Try again",
11565
11602
  timerMin: "min",
11566
11603
  timerSec: "sec",
@@ -11572,6 +11609,7 @@ var englishStrings = {
11572
11609
  timerLimitSurvey: "You have spent {0} of {1} in total.",
11573
11610
  clearCaption: "Clear",
11574
11611
  signaturePlaceHolder: "Sign here",
11612
+ signaturePlaceHolderReadOnly: "No signature",
11575
11613
  chooseFileCaption: "Select File",
11576
11614
  takePhotoCaption: "Take Photo",
11577
11615
  photoPlaceholder: "Click the button below to take a photo using the camera.",
@@ -11588,7 +11626,7 @@ var englishStrings = {
11588
11626
  filterStringPlaceholder: "Type to search...",
11589
11627
  emptyMessage: "No data to display",
11590
11628
  noEntriesText: "No entries yet.\nClick the button below to add a new entry.",
11591
- noEntriesReadonlyText: "No entries.",
11629
+ noEntriesReadonlyText: "No entries",
11592
11630
  more: "More",
11593
11631
  tagboxDoneButtonCaption: "OK",
11594
11632
  selectToRankEmptyRankedAreaText: "All choices are selected for ranking",
@@ -12697,7 +12735,7 @@ var SurveyFilePreview = /** @class */ (function (_super) {
12697
12735
  var previews = this.question.previewValue.map(function (val, index) {
12698
12736
  if (!val)
12699
12737
  return null;
12700
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { key: _this.question.inputId + "_" + index, className: _this.question.cssClasses.preview, style: { display: _this.question.isPreviewVisible(index) ? undefined : "none" } },
12738
+ 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" } },
12701
12739
  _this.renderFileSign(_this.question.cssClasses.fileSign, val),
12702
12740
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: _this.question.getImageWrapperCss(val) },
12703
12741
  _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),
@@ -12959,7 +12997,7 @@ var ListItem = /** @class */ (function (_super) {
12959
12997
  event.stopPropagation();
12960
12998
  }, onPointerDown: function (event) { return _this.model.onPointerDown(event, _this.item); } },
12961
12999
  separator,
12962
- contentWrap));
13000
+ contentWrap), this.item);
12963
13001
  };
12964
13002
  ListItem.prototype.componentDidMount = function () {
12965
13003
  _super.prototype.componentDidMount.call(this);
@@ -13421,6 +13459,7 @@ var MatrixRow = /** @class */ (function (_super) {
13421
13459
  __extends(MatrixRow, _super);
13422
13460
  function MatrixRow(props) {
13423
13461
  var _this = _super.call(this, props) || this;
13462
+ _this.root = react__WEBPACK_IMPORTED_MODULE_0___default.a.createRef();
13424
13463
  _this.onPointerDownHandler = function (event) {
13425
13464
  _this.parentMatrix.onPointerDown(event.nativeEvent, _this.model.row);
13426
13465
  };
@@ -13443,12 +13482,35 @@ var MatrixRow = /** @class */ (function (_super) {
13443
13482
  MatrixRow.prototype.getStateElement = function () {
13444
13483
  return this.model;
13445
13484
  };
13485
+ MatrixRow.prototype.componentDidMount = function () {
13486
+ _super.prototype.componentDidMount.call(this);
13487
+ if (this.root.current) {
13488
+ this.model.setRootElement(this.root.current);
13489
+ }
13490
+ };
13491
+ MatrixRow.prototype.componentWillUnmount = function () {
13492
+ _super.prototype.componentWillUnmount.call(this);
13493
+ this.model.setRootElement(undefined);
13494
+ };
13495
+ MatrixRow.prototype.shouldComponentUpdate = function (nextProps, nextState) {
13496
+ if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
13497
+ return false;
13498
+ if (nextProps.model !== this.model) {
13499
+ if (nextProps.element) {
13500
+ nextProps.element.setRootElement(this.root.current);
13501
+ }
13502
+ if (this.model) {
13503
+ this.model.setRootElement(undefined);
13504
+ }
13505
+ }
13506
+ return true;
13507
+ };
13446
13508
  MatrixRow.prototype.render = function () {
13447
13509
  var _this = this;
13448
13510
  var model = this.model;
13449
13511
  if (!model.visible)
13450
13512
  return null;
13451
- return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", { className: model.className, "data-sv-drop-target-matrix-row": model.row && model.row.id, onPointerDown: function (event) { return _this.onPointerDownHandler(event); } }, this.props.children));
13513
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("tr", { ref: this.root, className: model.className, "data-sv-drop-target-matrix-row": model.row && model.row.id, onPointerDown: function (event) { return _this.onPointerDownHandler(event); } }, this.props.children));
13452
13514
  };
13453
13515
  return MatrixRow;
13454
13516
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"]));
@@ -13942,7 +14004,6 @@ var PopupContainer = /** @class */ (function (_super) {
13942
14004
  __extends(PopupContainer, _super);
13943
14005
  function PopupContainer(props) {
13944
14006
  var _this = _super.call(this, props) || this;
13945
- _this.prevIsVisible = false;
13946
14007
  _this.handleKeydown = function (event) {
13947
14008
  _this.model.onKeyDown(event);
13948
14009
  };
@@ -13963,10 +14024,9 @@ var PopupContainer = /** @class */ (function (_super) {
13963
14024
  };
13964
14025
  PopupContainer.prototype.componentDidUpdate = function (prevProps, prevState) {
13965
14026
  _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
13966
- if (!this.prevIsVisible && this.model.isVisible) {
14027
+ if (!this.model.isPositionSet && this.model.isVisible) {
13967
14028
  this.model.updateOnShowing();
13968
14029
  }
13969
- this.prevIsVisible = this.model.isVisible;
13970
14030
  };
13971
14031
  PopupContainer.prototype.renderContainer = function (popupBaseViewModel) {
13972
14032
  var _this = this;
@@ -14174,7 +14234,7 @@ var RatingItemSmiley = /** @class */ (function (_super) {
14174
14234
  RatingItemSmiley.prototype.render = function () {
14175
14235
  var _this = this;
14176
14236
  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); } },
14177
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, 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 }),
14237
+ 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 }),
14178
14238
  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 })));
14179
14239
  };
14180
14240
  return RatingItemSmiley;
@@ -14229,7 +14289,7 @@ var RatingItemStar = /** @class */ (function (_super) {
14229
14289
  RatingItemStar.prototype.render = function () {
14230
14290
  var _this = this;
14231
14291
  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); } },
14232
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, 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 }),
14292
+ 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 }),
14233
14293
  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 }),
14234
14294
  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 })));
14235
14295
  };
@@ -14321,7 +14381,7 @@ var RatingItem = /** @class */ (function (_super) {
14321
14381
  RatingItem.prototype.render = function () {
14322
14382
  var itemText = this.renderLocString(this.item.locText);
14323
14383
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
14324
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.name, 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 }),
14384
+ 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 }),
14325
14385
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.itemText }, itemText)));
14326
14386
  };
14327
14387
  RatingItem.prototype.componentDidMount = function () {
@@ -15432,7 +15492,7 @@ var SurveyElementHeader = /** @class */ (function (_super) {
15432
15492
  var description = element.hasDescriptionUnderTitle
15433
15493
  ? _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"].renderQuestionDescription(this.element)
15434
15494
  : null;
15435
- var additionalTitleToolbarElement = !!element.additionalTitleToolbar ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: element.additionalTitleToolbar }) : null;
15495
+ var additionalTitleToolbarElement = element.hasAdditionalTitleToolbar ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_1__["SurveyActionBar"], { model: element.additionalTitleToolbar }) : null;
15436
15496
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: element.cssHeader, onClick: function (e) { return element.clickTitleFunction && element.clickTitleFunction(e.nativeEvent); } },
15437
15497
  title,
15438
15498
  description,
@@ -19626,7 +19686,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
19626
19686
  SurveyQuestionMatrixDropdownBase.prototype.renderRows = function () {
19627
19687
  var cssClasses = this.question.cssClasses;
19628
19688
  var rows = [];
19629
- var renderedRows = this.question.renderedTable.rows;
19689
+ var renderedRows = this.question.renderedTable.renderedRows;
19630
19690
  for (var i = 0; i < renderedRows.length; i++) {
19631
19691
  rows.push(this.renderRow(renderedRows[i].id, renderedRows[i], cssClasses));
19632
19692
  }
@@ -20211,19 +20271,11 @@ var SurveyQuestionPanelDynamic = /** @class */ (function (_super) {
20211
20271
  });
20212
20272
  };
20213
20273
  SurveyQuestionPanelDynamic.prototype.renderElement = function () {
20274
+ var _this = this;
20214
20275
  var panels = [];
20215
- if (this.question.isRenderModeList) {
20216
- for (var i = 0; i < this.question.panels.length; i++) {
20217
- var panel = this.question.panels[i];
20218
- panels.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionPanelDynamicItem, { key: panel.id, element: panel, question: this.question, index: i, cssClasses: this.question.cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
20219
- }
20220
- }
20221
- else {
20222
- if (this.question.currentPanel != null) {
20223
- var panel = this.question.currentPanel;
20224
- panels.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionPanelDynamicItem, { key: this.question.currentIndex, element: panel, question: this.question, index: this.question.currentIndex, cssClasses: this.question.cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
20225
- }
20226
- }
20276
+ this.question.renderedPanels.forEach(function (panel, index) {
20277
+ panels.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionPanelDynamicItem, { key: panel.id, element: panel, question: _this.question, index: index, cssClasses: _this.question.cssClasses, isDisplayMode: _this.isDisplayMode, creator: _this.creator }));
20278
+ });
20227
20279
  var btnAdd = this.question.isRenderModeList && this.question["showLegacyNavigation"]
20228
20280
  ? this.renderAddRowButton()
20229
20281
  : null;
@@ -20233,13 +20285,12 @@ var SurveyQuestionPanelDynamic = /** @class */ (function (_super) {
20233
20285
  var navBottom = this.question.isProgressBottomShowing
20234
20286
  ? this.renderNavigator()
20235
20287
  : null;
20236
- var style = {};
20237
20288
  var navV2 = this.renderNavigatorV2();
20238
20289
  var noEntriesPlaceholder = this.renderPlaceholder();
20239
20290
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.root },
20240
20291
  noEntriesPlaceholder,
20241
20292
  navTop,
20242
- panels,
20293
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.panelsContainer }, panels),
20243
20294
  navBottom,
20244
20295
  btnAdd,
20245
20296
  navV2));
@@ -20688,6 +20739,10 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
20688
20739
  event.persist();
20689
20740
  //event.preventDefault();
20690
20741
  _this.question.handlePointerDown.call(_this.question, event, item, event.currentTarget);
20742
+ }, function (event) {
20743
+ event.persist();
20744
+ //event.preventDefault();
20745
+ _this.question.handlePointerUp.call(_this.question, event, item, event.currentTarget);
20691
20746
  }, this_1.question.cssClasses, this_1.question.getItemClass(item), this_1.question, unrankedItem));
20692
20747
  };
20693
20748
  var this_1 = this;
@@ -20696,13 +20751,13 @@ var SurveyQuestionRanking = /** @class */ (function (_super) {
20696
20751
  }
20697
20752
  return items;
20698
20753
  };
20699
- SurveyQuestionRanking.prototype.renderItem = function (item, i, handleKeydown, handlePointerDown, cssClasses, itemClass, question, unrankedItem) {
20700
- var key = item.value + "-" + i + "-item";
20754
+ SurveyQuestionRanking.prototype.renderItem = function (item, i, handleKeydown, handlePointerDown, handlePointerUp, cssClasses, itemClass, question, unrankedItem) {
20755
+ var key = "id-" + item.renderedId;
20701
20756
  var text = this.renderLocString(item.locText);
20702
20757
  var index = i;
20703
- var indexText = this.question.getNumberByIndex(i);
20758
+ var indexText = this.question.getNumberByIndex(index);
20704
20759
  var tabIndex = this.question.getItemTabIndex(item);
20705
- var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItem, { key: key, text: text, index: index, indexText: indexText, itemTabIndex: tabIndex, handleKeydown: handleKeydown, handlePointerDown: handlePointerDown, cssClasses: cssClasses, itemClass: itemClass, question: question, unrankedItem: unrankedItem, item: item }));
20760
+ var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionRankingItem, { key: item.value, text: text, index: index, indexText: indexText, itemTabIndex: tabIndex, handleKeydown: handleKeydown, handlePointerDown: handlePointerDown, handlePointerUp: handlePointerUp, cssClasses: cssClasses, itemClass: itemClass, question: question, unrankedItem: unrankedItem, item: item }));
20706
20761
  var survey = this.question.survey;
20707
20762
  var wrappedItem = null;
20708
20763
  if (!!survey) {
@@ -20753,6 +20808,13 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
20753
20808
  enumerable: false,
20754
20809
  configurable: true
20755
20810
  });
20811
+ Object.defineProperty(SurveyQuestionRankingItem.prototype, "handlePointerUp", {
20812
+ get: function () {
20813
+ return this.props.handlePointerUp;
20814
+ },
20815
+ enumerable: false,
20816
+ configurable: true
20817
+ });
20756
20818
  Object.defineProperty(SurveyQuestionRankingItem.prototype, "cssClasses", {
20757
20819
  get: function () {
20758
20820
  return this.props.cssClasses;
@@ -20800,7 +20862,7 @@ var SurveyQuestionRankingItem = /** @class */ (function (_super) {
20800
20862
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: this.question.dashSvgIcon })));
20801
20863
  };
20802
20864
  SurveyQuestionRankingItem.prototype.renderElement = function () {
20803
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: this.itemTabIndex, className: this.itemClass, onKeyDown: this.handleKeydown, onPointerDown: this.handlePointerDown, "data-sv-drop-target-ranking-item": this.index },
20865
+ 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 },
20804
20866
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { tabIndex: -1, style: { outline: "none" } },
20805
20867
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.itemGhostNode }),
20806
20868
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.itemContent },
@@ -21452,7 +21514,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
21452
21514
  var loadingIndicator = this.question.showLoadingIndicator ? this.renderLoadingIndicator() : null;
21453
21515
  var clearButton = this.renderCleanButton();
21454
21516
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.root, ref: function (root) { return (_this.setControl(root)); }, style: { width: this.question.renderedCanvasWidth } },
21455
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.placeholder, style: { display: this.question.needShowPlaceholder() ? "" : "none" } }, this.renderLocString(this.question.locPlaceholder)),
21517
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.placeholder, style: { display: this.question.needShowPlaceholder() ? "" : "none" } }, this.renderLocString(this.question.locRenderedPlaceholder)),
21456
21518
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
21457
21519
  this.renderBackgroundImage(),
21458
21520
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex: -1, className: this.question.cssClasses.canvas, onBlur: this.question.onBlur })),
@@ -22902,7 +22964,6 @@ var SurveyElement = /** @class */ (function (_super) {
22902
22964
  }
22903
22965
  }
22904
22966
  }, function () { return _this.renderedIsExpanded; });
22905
- _this.animationAllowedValue = true;
22906
22967
  _this.name = name;
22907
22968
  _this.createNewArray("errors");
22908
22969
  _this.createNewArray("titleActions");
@@ -22938,7 +22999,7 @@ var SurveyElement = /** @class */ (function (_super) {
22938
22999
  var el = root.getElementById(elementId);
22939
23000
  return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible);
22940
23001
  };
22941
- SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible) {
23002
+ SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions) {
22942
23003
  if (!el || !el.scrollIntoView)
22943
23004
  return false;
22944
23005
  var elTop = scrollIfVisible ? -1 : el.getBoundingClientRect().top;
@@ -22957,7 +23018,7 @@ var SurveyElement = /** @class */ (function (_super) {
22957
23018
  }
22958
23019
  }
22959
23020
  if (needScroll) {
22960
- el.scrollIntoView();
23021
+ el.scrollIntoView(scrollIntoViewOptions);
22961
23022
  }
22962
23023
  return needScroll;
22963
23024
  };
@@ -23733,11 +23794,14 @@ var SurveyElement = /** @class */ (function (_super) {
23733
23794
  enumerable: false,
23734
23795
  configurable: true
23735
23796
  });
23797
+ SurveyElement.prototype.canHaveFrameStyles = function () {
23798
+ return (this.parent !== undefined && (!this.hasParent || this.parent && this.parent.showPanelAsPage));
23799
+ };
23736
23800
  SurveyElement.prototype.getHasFrameV2 = function () {
23737
- return this.shouldAddRunnerStyles() && (!this.hasParent);
23801
+ return this.shouldAddRunnerStyles() && this.canHaveFrameStyles();
23738
23802
  };
23739
23803
  SurveyElement.prototype.getIsNested = function () {
23740
- return this.shouldAddRunnerStyles() && (this.hasParent);
23804
+ return this.shouldAddRunnerStyles() && !this.canHaveFrameStyles();
23741
23805
  };
23742
23806
  SurveyElement.prototype.getCssRoot = function (cssClasses) {
23743
23807
  var isExpanadable = !!this.isCollapsed || !!this.isExpanded;
@@ -23938,6 +24002,13 @@ var SurveyElement = /** @class */ (function (_super) {
23938
24002
  this.toggleState();
23939
24003
  }
23940
24004
  };
24005
+ Object.defineProperty(SurveyElement.prototype, "hasAdditionalTitleToolbar", {
24006
+ get: function () {
24007
+ return false;
24008
+ },
24009
+ enumerable: false,
24010
+ configurable: true
24011
+ });
23941
24012
  Object.defineProperty(SurveyElement.prototype, "additionalTitleToolbar", {
23942
24013
  get: function () {
23943
24014
  return this.getAdditionalTitleToolbar();
@@ -23957,9 +24028,38 @@ var SurveyElement = /** @class */ (function (_super) {
23957
24028
  .append(cssClasses.titleExpandable, isExpandable)
23958
24029
  .append(cssClasses.titleExpanded, this.isExpanded)
23959
24030
  .append(cssClasses.titleCollapsed, this.isCollapsed)
23960
- .append(cssClasses.titleDisabled, this.isReadOnly)
24031
+ .append(cssClasses.titleDisabled, this.isDisabledStyle)
24032
+ .append(cssClasses.titleReadOnly, this.isReadOnly)
23961
24033
  .append(cssClasses.titleOnError, this.containsErrors).toString();
23962
24034
  };
24035
+ Object.defineProperty(SurveyElement.prototype, "isDisabledStyle", {
24036
+ get: function () {
24037
+ return this.getIsDisableAndReadOnlyStyles(false)[1];
24038
+ },
24039
+ enumerable: false,
24040
+ configurable: true
24041
+ });
24042
+ Object.defineProperty(SurveyElement.prototype, "isReadOnlyStyle", {
24043
+ get: function () {
24044
+ return this.getIsDisableAndReadOnlyStyles(false)[0];
24045
+ },
24046
+ enumerable: false,
24047
+ configurable: true
24048
+ });
24049
+ SurveyElement.prototype.getIsDisableAndReadOnlyStyles = function (itemReadOnly) {
24050
+ var isPreview = this.isPreviewStyle;
24051
+ var isReadOnly = itemReadOnly || this.isReadOnly;
24052
+ var isReadOnlyStyle = isReadOnly && !isPreview;
24053
+ var isDisableStyle = !this.isDefaultV2Theme && (isReadOnly || isPreview);
24054
+ return [isReadOnlyStyle, isDisableStyle];
24055
+ };
24056
+ Object.defineProperty(SurveyElement.prototype, "isPreviewStyle", {
24057
+ get: function () {
24058
+ return !!this.survey && this.survey.state === "preview";
24059
+ },
24060
+ enumerable: false,
24061
+ configurable: true
24062
+ });
23963
24063
  SurveyElement.prototype.localeChanged = function () {
23964
24064
  _super.prototype.localeChanged.call(this);
23965
24065
  this.updateDescriptionVisibility(this.description);
@@ -24019,12 +24119,12 @@ var SurveyElement = /** @class */ (function (_super) {
24019
24119
  if (cssClasses.content) {
24020
24120
  var selector = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["classesToSelector"])(cssClasses.content);
24021
24121
  if (selector) {
24022
- return (_a = _this.getWrapperElement()) === null || _a === void 0 ? void 0 : _a.querySelector(selector);
24122
+ return (_a = _this.getWrapperElement()) === null || _a === void 0 ? void 0 : _a.querySelector(":scope " + selector);
24023
24123
  }
24024
24124
  }
24025
24125
  return undefined;
24026
24126
  },
24027
- isAnimationEnabled: function () { return _settings__WEBPACK_IMPORTED_MODULE_4__["settings"].animationEnabled && _this.animationAllowed && !_this.isDesignMode; }
24127
+ isAnimationEnabled: function () { return _this.animationAllowed && !_this.isDesignMode; }
24028
24128
  };
24029
24129
  };
24030
24130
  Object.defineProperty(SurveyElement.prototype, "renderedIsExpanded", {
@@ -24037,16 +24137,9 @@ var SurveyElement = /** @class */ (function (_super) {
24037
24137
  enumerable: false,
24038
24138
  configurable: true
24039
24139
  });
24040
- Object.defineProperty(SurveyElement.prototype, "animationAllowed", {
24041
- get: function () {
24042
- return !this.isLoadingFromJson && !this.isDisposed && !!this.survey && this.animationAllowedValue;
24043
- },
24044
- set: function (val) {
24045
- this.animationAllowedValue = val;
24046
- },
24047
- enumerable: false,
24048
- configurable: true
24049
- });
24140
+ SurveyElement.prototype.getIsAnimationAllowed = function () {
24141
+ return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey;
24142
+ };
24050
24143
  SurveyElement.prototype.dispose = function () {
24051
24144
  _super.prototype.dispose.call(this);
24052
24145
  if (this.titleToolbarValue) {
@@ -24195,7 +24288,7 @@ surveyLocalization.localeNames["en"] = "english";
24195
24288
  /*!********************************!*\
24196
24289
  !*** ./src/utils/animation.ts ***!
24197
24290
  \********************************/
24198
- /*! exports provided: AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationBoolean, AnimationGroup */
24291
+ /*! exports provided: AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab */
24199
24292
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
24200
24293
 
24201
24294
  "use strict";
@@ -24203,8 +24296,10 @@ __webpack_require__.r(__webpack_exports__);
24203
24296
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationUtils", function() { return AnimationUtils; });
24204
24297
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationPropertyUtils", function() { return AnimationPropertyUtils; });
24205
24298
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroupUtils", function() { return AnimationGroupUtils; });
24299
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationProperty", function() { return AnimationProperty; });
24206
24300
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationBoolean", function() { return AnimationBoolean; });
24207
24301
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationGroup", function() { return AnimationGroup; });
24302
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationTab", function() { return AnimationTab; });
24208
24303
  /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
24209
24304
  /* harmony import */ var _taskmanager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./taskmanager */ "./src/utils/taskmanager.ts");
24210
24305
  var __extends = (undefined && undefined.__extends) || (function () {
@@ -24233,6 +24328,9 @@ var AnimationUtils = /** @class */ (function () {
24233
24328
  return 0;
24234
24329
  return Number(value.slice(0, -1).replace(",", ".")) * 1000;
24235
24330
  };
24331
+ AnimationUtils.prototype.reflow = function (element) {
24332
+ return element.offsetHeight;
24333
+ };
24236
24334
  AnimationUtils.prototype.getAnimationsCount = function (element) {
24237
24335
  var animationName = "";
24238
24336
  if (getComputedStyle) {
@@ -24250,6 +24348,14 @@ var AnimationUtils = /** @class */ (function () {
24250
24348
  }
24251
24349
  return duration;
24252
24350
  };
24351
+ AnimationUtils.prototype.addCancelCallback = function (callback) {
24352
+ this.cancelQueue.push(callback);
24353
+ };
24354
+ AnimationUtils.prototype.removeCancelCallback = function (callback) {
24355
+ if (this.cancelQueue.indexOf(callback) >= 0) {
24356
+ this.cancelQueue.splice(this.cancelQueue.indexOf(callback), 1);
24357
+ }
24358
+ };
24253
24359
  AnimationUtils.prototype.onAnimationEnd = function (element, callback, options) {
24254
24360
  var _this = this;
24255
24361
  var cancelTimeout;
@@ -24259,7 +24365,7 @@ var AnimationUtils = /** @class */ (function () {
24259
24365
  options.onAfterRunAnimation && options.onAfterRunAnimation(element);
24260
24366
  callback(isCancel);
24261
24367
  clearTimeout(cancelTimeout);
24262
- _this.cancelQueue.splice(_this.cancelQueue.indexOf(onEndCallback), 1);
24368
+ _this.removeCancelCallback(onEndCallback);
24263
24369
  element.removeEventListener("animationend", onAnimationEndCallback);
24264
24370
  };
24265
24371
  var onAnimationEndCallback = function (event) {
@@ -24269,7 +24375,7 @@ var AnimationUtils = /** @class */ (function () {
24269
24375
  };
24270
24376
  if (animationsCount > 0) {
24271
24377
  element.addEventListener("animationend", onAnimationEndCallback);
24272
- this.cancelQueue.push(onEndCallback);
24378
+ this.addCancelCallback(onEndCallback);
24273
24379
  cancelTimeout = setTimeout(function () {
24274
24380
  onEndCallback(false);
24275
24381
  }, this.getAnimationDuration(element) + 10);
@@ -24279,40 +24385,51 @@ var AnimationUtils = /** @class */ (function () {
24279
24385
  }
24280
24386
  };
24281
24387
  AnimationUtils.prototype.beforeAnimationRun = function (element, options) {
24282
- if (element) {
24388
+ if (element && options) {
24283
24389
  options.onBeforeRunAnimation && options.onBeforeRunAnimation(element);
24284
24390
  }
24285
24391
  };
24286
- AnimationUtils.prototype.runLeaveAnimation = function (element, options, callback) {
24392
+ AnimationUtils.prototype.runAnimation = function (element, options, callback) {
24287
24393
  if (element && options.cssClass) {
24394
+ this.reflow(element);
24288
24395
  element.classList.add(options.cssClass);
24289
- var onAnimationEndCallback = function (isCancel) {
24396
+ this.onAnimationEnd(element, callback, options);
24397
+ }
24398
+ else {
24399
+ callback(true);
24400
+ }
24401
+ };
24402
+ AnimationUtils.prototype.clearHtmlElement = function (element, options) {
24403
+ if (element && options.cssClass) {
24404
+ element.classList.remove(options.cssClass);
24405
+ }
24406
+ };
24407
+ AnimationUtils.prototype.onNextRender = function (callback, runEarly, isCancel) {
24408
+ var _this = this;
24409
+ if (isCancel === void 0) { isCancel = false; }
24410
+ if (!isCancel && _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].isAvailable()) {
24411
+ var cancelCallback_1 = function () {
24290
24412
  callback();
24291
- if (isCancel) {
24292
- element.classList.remove(options.cssClass);
24413
+ cancelAnimationFrame(latestRAF_1);
24414
+ };
24415
+ var latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
24416
+ if (runEarly && runEarly()) {
24417
+ callback();
24418
+ _this.removeCancelCallback(cancelCallback_1);
24293
24419
  }
24294
24420
  else {
24295
- _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
24296
- _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
24297
- element.classList.remove(options.cssClass);
24298
- });
24421
+ latestRAF_1 = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
24422
+ callback();
24423
+ _this.removeCancelCallback(cancelCallback_1);
24299
24424
  });
24300
24425
  }
24301
- };
24302
- this.onAnimationEnd(element, onAnimationEndCallback, options);
24426
+ });
24427
+ this.addCancelCallback(cancelCallback_1);
24303
24428
  }
24304
24429
  else {
24305
24430
  callback();
24306
24431
  }
24307
24432
  };
24308
- AnimationUtils.prototype.runEnterAnimation = function (element, options) {
24309
- if (element && options.cssClass) {
24310
- element.classList.add(options.cssClass);
24311
- this.onAnimationEnd(element, function () {
24312
- element.classList.remove(options.cssClass);
24313
- }, options);
24314
- }
24315
- };
24316
24433
  AnimationUtils.prototype.cancel = function () {
24317
24434
  var cancelQueue = [].concat(this.cancelQueue);
24318
24435
  cancelQueue.forEach(function (callback) { return callback(); });
@@ -24326,26 +24443,28 @@ var AnimationPropertyUtils = /** @class */ (function (_super) {
24326
24443
  function AnimationPropertyUtils() {
24327
24444
  return _super !== null && _super.apply(this, arguments) || this;
24328
24445
  }
24329
- AnimationPropertyUtils.prototype.onEnter = function (getElement, options) {
24446
+ AnimationPropertyUtils.prototype.onEnter = function (options) {
24330
24447
  var _this = this;
24331
- var callback = function () {
24332
- var element = getElement();
24333
- _this.beforeAnimationRun(element, options);
24334
- _this.runEnterAnimation(element, options);
24335
- };
24336
- _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
24337
- if (getElement()) {
24338
- callback();
24339
- }
24340
- else {
24341
- _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(callback);
24342
- }
24343
- });
24448
+ this.onNextRender(function () {
24449
+ var htmlElement = options.getAnimatedElement();
24450
+ var enterOptions = options.getEnterOptions();
24451
+ _this.beforeAnimationRun(htmlElement, enterOptions);
24452
+ _this.runAnimation(htmlElement, enterOptions, function () {
24453
+ _this.clearHtmlElement(htmlElement, enterOptions);
24454
+ });
24455
+ }, function () { return !!options.getAnimatedElement(); });
24344
24456
  };
24345
- AnimationPropertyUtils.prototype.onLeave = function (getElement, callback, options) {
24346
- var element = getElement();
24347
- this.beforeAnimationRun(element, options);
24348
- this.runLeaveAnimation(element, options, callback);
24457
+ AnimationPropertyUtils.prototype.onLeave = function (options, callback) {
24458
+ var _this = this;
24459
+ var htmlElement = options.getAnimatedElement();
24460
+ var leaveOptions = options.getLeaveOptions();
24461
+ this.beforeAnimationRun(htmlElement, leaveOptions);
24462
+ this.runAnimation(htmlElement, leaveOptions, function (isCancel) {
24463
+ callback();
24464
+ _this.onNextRender(function () {
24465
+ _this.clearHtmlElement(htmlElement, leaveOptions);
24466
+ }, undefined, isCancel);
24467
+ });
24349
24468
  };
24350
24469
  return AnimationPropertyUtils;
24351
24470
  }(AnimationUtils));
@@ -24355,41 +24474,40 @@ var AnimationGroupUtils = /** @class */ (function (_super) {
24355
24474
  function AnimationGroupUtils() {
24356
24475
  return _super !== null && _super.apply(this, arguments) || this;
24357
24476
  }
24358
- AnimationGroupUtils.prototype.onEnter = function (getElement, getOptions, elements) {
24477
+ AnimationGroupUtils.prototype.runGroupAnimation = function (options, addedElements, removedElements, callback) {
24359
24478
  var _this = this;
24360
- if (elements.length == 0)
24361
- return;
24362
- _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(function () {
24363
- var callback = function () {
24364
- elements.forEach(function (el) {
24365
- _this.beforeAnimationRun(getElement(el), getOptions(el));
24366
- });
24367
- elements.forEach(function (el) {
24368
- _this.runEnterAnimation(getElement(el), getOptions(el));
24369
- });
24479
+ this.onNextRender(function () {
24480
+ var addedHtmlElements = addedElements.map(function (el) { return options.getAnimatedElement(el); });
24481
+ var enterOptions = addedElements.map(function (el) { return options.getEnterOptions(el); });
24482
+ var removedHtmlElements = removedElements.map(function (el) { return options.getAnimatedElement(el); });
24483
+ var leaveOptions = removedElements.map(function (el) { return options.getLeaveOptions(el); });
24484
+ addedElements.forEach(function (_, i) {
24485
+ _this.beforeAnimationRun(addedHtmlElements[i], enterOptions[i]);
24486
+ });
24487
+ removedElements.forEach(function (_, i) {
24488
+ _this.beforeAnimationRun(removedHtmlElements[i], leaveOptions[i]);
24489
+ });
24490
+ var counter = addedElements.length + removedElements.length;
24491
+ var onAnimationEndCallback = function (isCancel) {
24492
+ if (--counter <= 0) {
24493
+ callback && callback();
24494
+ _this.onNextRender(function () {
24495
+ addedElements.forEach(function (_, i) {
24496
+ _this.clearHtmlElement(addedHtmlElements[i], enterOptions[i]);
24497
+ });
24498
+ removedElements.forEach(function (_, i) {
24499
+ _this.clearHtmlElement(removedHtmlElements[i], leaveOptions[i]);
24500
+ });
24501
+ }, undefined, isCancel);
24502
+ }
24370
24503
  };
24371
- if (!getElement(elements[0])) {
24372
- _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].requestAnimationFrame(callback);
24373
- }
24374
- else {
24375
- callback();
24376
- }
24377
- });
24378
- };
24379
- AnimationGroupUtils.prototype.onLeave = function (getElement, callback, getOptions, elements) {
24380
- var _this = this;
24381
- elements.forEach(function (el) {
24382
- _this.beforeAnimationRun(getElement(el), getOptions(el));
24383
- });
24384
- var counter = elements.length;
24385
- var onEndCallback = function () {
24386
- if (--counter <= 0) {
24387
- callback();
24388
- }
24389
- };
24390
- elements.forEach(function (el) {
24391
- _this.runLeaveAnimation(getElement(el), getOptions(el), onEndCallback);
24392
- });
24504
+ addedElements.forEach(function (_, i) {
24505
+ _this.runAnimation(addedHtmlElements[i], enterOptions[i], onAnimationEndCallback);
24506
+ });
24507
+ removedElements.forEach(function (_, i) {
24508
+ _this.runAnimation(removedHtmlElements[i], leaveOptions[i], onAnimationEndCallback);
24509
+ });
24510
+ }, function () { return addedElements.length == 0 || addedElements.some(function (el) { return !!options.getAnimatedElement(el); }); });
24393
24511
  };
24394
24512
  return AnimationGroupUtils;
24395
24513
  }(AnimationUtils));
@@ -24410,6 +24528,7 @@ var AnimationProperty = /** @class */ (function () {
24410
24528
  this._debouncedSync.run(newValue);
24411
24529
  }
24412
24530
  else {
24531
+ this.cancel();
24413
24532
  this.update(newValue);
24414
24533
  }
24415
24534
  };
@@ -24419,6 +24538,7 @@ var AnimationProperty = /** @class */ (function () {
24419
24538
  };
24420
24539
  return AnimationProperty;
24421
24540
  }());
24541
+
24422
24542
  var AnimationBoolean = /** @class */ (function (_super) {
24423
24543
  __extends(AnimationBoolean, _super);
24424
24544
  function AnimationBoolean() {
@@ -24431,12 +24551,12 @@ var AnimationBoolean = /** @class */ (function (_super) {
24431
24551
  if (newValue !== this.getCurrentValue()) {
24432
24552
  if (newValue) {
24433
24553
  this.update(newValue);
24434
- this.animation.onEnter(function () { return _this.animationOptions.getAnimatedElement(); }, this.animationOptions.getEnterOptions());
24554
+ this.animation.onEnter(this.animationOptions);
24435
24555
  }
24436
24556
  else {
24437
- this.animation.onLeave(function () { return _this.animationOptions.getAnimatedElement(); }, function () {
24557
+ this.animation.onLeave(this.animationOptions, function () {
24438
24558
  _this.update(newValue);
24439
- }, this.animationOptions.getLeaveOptions());
24559
+ });
24440
24560
  }
24441
24561
  }
24442
24562
  else {
@@ -24458,19 +24578,42 @@ var AnimationGroup = /** @class */ (function (_super) {
24458
24578
  var oldValue = this.getCurrentValue();
24459
24579
  var itemsToAdd = newValue.filter(function (el) { return oldValue.indexOf(el) < 0; });
24460
24580
  var deletedItems = oldValue.filter(function (el) { return newValue.indexOf(el) < 0; });
24461
- this.animation.onEnter(function (el) { return _this.animationOptions.getAnimatedElement(el); }, function (el) { return _this.animationOptions.getEnterOptions(el); }, itemsToAdd);
24462
24581
  if (itemsToAdd.length == 0 && (deletedItems === null || deletedItems === void 0 ? void 0 : deletedItems.length) > 0) {
24463
- this.animation.onLeave(function (el) { return _this.animationOptions.getAnimatedElement(el); }, function () {
24464
- _this.update(newValue);
24465
- }, function (el) { return _this.animationOptions.getLeaveOptions(el); }, deletedItems);
24582
+ this.animation.runGroupAnimation(this.animationOptions, [], deletedItems, function () { return _this.update(newValue); });
24466
24583
  }
24467
24584
  else {
24468
24585
  this.update(newValue);
24586
+ this.animation.runGroupAnimation(this.animationOptions, itemsToAdd, []);
24469
24587
  }
24470
24588
  };
24471
24589
  return AnimationGroup;
24472
24590
  }(AnimationProperty));
24473
24591
 
24592
+ var AnimationTab = /** @class */ (function (_super) {
24593
+ __extends(AnimationTab, _super);
24594
+ function AnimationTab(animationOptions, update, getCurrentValue, mergeValues) {
24595
+ var _this = _super.call(this, animationOptions, update, getCurrentValue) || this;
24596
+ _this.mergeValues = mergeValues;
24597
+ _this.animation = new AnimationGroupUtils();
24598
+ return _this;
24599
+ }
24600
+ AnimationTab.prototype._sync = function (newValue) {
24601
+ var _this = this;
24602
+ var oldValue = [].concat(this.getCurrentValue());
24603
+ if (oldValue[0] !== newValue[0]) {
24604
+ var tempValue = !!this.mergeValues ? this.mergeValues(newValue, oldValue) : [].concat(oldValue, newValue);
24605
+ this.update(tempValue, true);
24606
+ this.animation.runGroupAnimation(this.animationOptions, newValue, oldValue, function () {
24607
+ _this.update(newValue);
24608
+ });
24609
+ }
24610
+ else {
24611
+ this.update(newValue);
24612
+ }
24613
+ };
24614
+ return AnimationTab;
24615
+ }(AnimationProperty));
24616
+
24474
24617
 
24475
24618
 
24476
24619
  /***/ }),