@worktile/theia 15.0.11 → 15.0.13

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.
@@ -26,12 +26,10 @@ import * as i8 from 'ngx-tethys/tooltip';
26
26
  import { ThyTooltipModule } from 'ngx-tethys/tooltip';
27
27
  import * as i8$1 from 'ngx-tethys/divider';
28
28
  import { ThyDividerComponent, ThyDividerModule } from 'ngx-tethys/divider';
29
- import * as i2$2 from '@angular/cdk/scrolling';
30
- import { CdkScrollable, ScrollingModule } from '@angular/cdk/scrolling';
31
29
  import { mixinUnsubscribe, MixinBase, ScrollToService } from 'ngx-tethys/core';
32
30
  import { isKeyHotkey, isHotkey } from 'is-hotkey';
33
31
  import { Subject, fromEvent, timer, combineLatest, Observable, BehaviorSubject, merge, ReplaySubject } from 'rxjs';
34
- import { takeUntil, debounceTime, take, delay, map as map$1, skip, filter, startWith, distinctUntilChanged, share, mapTo, pairwise } from 'rxjs/operators';
32
+ import { takeUntil, debounceTime, take, delay, map as map$1, filter, startWith, distinctUntilChanged, skip, share, mapTo, pairwise } from 'rxjs/operators';
35
33
  import * as i5 from 'ngx-tethys/input';
36
34
  import { ThyInputModule } from 'ngx-tethys/input';
37
35
  import * as i10 from 'ngx-tethys/empty';
@@ -64,6 +62,8 @@ import * as i7$1 from 'ngx-tethys/input-number';
64
62
  import { ThyInputNumberModule } from 'ngx-tethys/input-number';
65
63
  import { coerceCssPixelValue } from '@angular/cdk/coercion';
66
64
  import { PortalInjector, ComponentPortal } from '@angular/cdk/portal';
65
+ import * as i2$2 from '@angular/cdk/scrolling';
66
+ import { ScrollingModule } from '@angular/cdk/scrolling';
67
67
  import { ThyAutocompleteModule } from 'ngx-tethys/autocomplete';
68
68
  import { ThyAvatarModule } from 'ngx-tethys/avatar';
69
69
  import { ThyDialogModule } from 'ngx-tethys/dialog';
@@ -217,6 +217,11 @@ var Indents;
217
217
  Indents["indentRight"] = "indent-right";
218
218
  Indents["indentLeft"] = "indent-left";
219
219
  })(Indents || (Indents = {}));
220
+ var ScrollDirection;
221
+ (function (ScrollDirection) {
222
+ ScrollDirection[ScrollDirection["X"] = 0] = "X";
223
+ ScrollDirection[ScrollDirection["Y"] = 1] = "Y";
224
+ })(ScrollDirection || (ScrollDirection = {}));
220
225
  var MarkTypes;
221
226
  (function (MarkTypes) {
222
227
  MarkTypes["bold"] = "bold";
@@ -3147,6 +3152,7 @@ class TheContextService {
3147
3152
  this.containerScrolled$ = new Subject();
3148
3153
  this.uploadingStatus$ = new Subject();
3149
3154
  this.containerResized$ = new Subject();
3155
+ this.windowResized$ = new Subject();
3150
3156
  this.ngZone.runOutsideAngular(() => {
3151
3157
  this.onMouseUp$ = fromEvent(window, `mouseup`).pipe(takeUntil(this.destroy$));
3152
3158
  this.onMouseMove$ = fromEvent(window, `mousemove`).pipe(takeUntil(this.destroy$));
@@ -3157,6 +3163,7 @@ class TheContextService {
3157
3163
  this.options = options;
3158
3164
  this.rebindContainerScroll();
3159
3165
  this.bindContainerResize();
3166
+ this.bindWindowResize();
3160
3167
  }
3161
3168
  rebindContainerScroll() {
3162
3169
  var _a, _b, _c, _d;
@@ -3166,16 +3173,33 @@ class TheContextService {
3166
3173
  this.options.nativeElement.querySelector((_d = this.options.theOptions) === null || _d === void 0 ? void 0 : _d.scrollContainer);
3167
3174
  if (containerElement) {
3168
3175
  this.ngZone.runOutsideAngular(() => {
3176
+ let previousContainerScroll = { x: 0, y: 0 };
3169
3177
  this.scrollSubscription = fromEvent(containerElement, 'scroll').subscribe(event => {
3170
- this.containerScrolled$.next(event);
3178
+ const entires = { event, direction: ScrollDirection.Y };
3179
+ const target = event.target;
3180
+ const [x, y] = [target.scrollLeft, target.scrollTop];
3181
+ if (x !== previousContainerScroll.x) {
3182
+ entires.direction = ScrollDirection.X;
3183
+ }
3184
+ if (y !== previousContainerScroll.y) {
3185
+ entires.direction = ScrollDirection.Y;
3186
+ }
3187
+ previousContainerScroll = { x, y };
3188
+ this.containerScrolled$.next(entires);
3171
3189
  });
3172
3190
  });
3173
3191
  }
3174
3192
  }
3175
3193
  }
3176
3194
  bindContainerResize() {
3177
- let previousContainerRect = this.options.nativeElement.getBoundingClientRect();
3178
- this.resizeObserver = new ResizeObserver(entires => {
3195
+ this.containerResizeObserver = this.elementResize(this.options.nativeElement, this.containerResized$);
3196
+ }
3197
+ bindWindowResize() {
3198
+ this.windowResizeObserver = this.elementResize(document.documentElement, this.windowResized$);
3199
+ }
3200
+ elementResize(element, subject) {
3201
+ let previousContainerRect = element.getBoundingClientRect();
3202
+ const resizeObserver = new ResizeObserver(entires => {
3179
3203
  const currentRect = entires[0].contentRect;
3180
3204
  const result = { entry: entires[0], widthChanged: false, heightChanged: false };
3181
3205
  if (currentRect.width !== previousContainerRect.width) {
@@ -3185,9 +3209,10 @@ class TheContextService {
3185
3209
  result.heightChanged = true;
3186
3210
  }
3187
3211
  previousContainerRect = currentRect;
3188
- this.containerResized$.next(result);
3212
+ subject.next(result);
3189
3213
  });
3190
- return this.resizeObserver.observe(this.options.nativeElement);
3214
+ resizeObserver.observe(element);
3215
+ return resizeObserver;
3191
3216
  }
3192
3217
  getOptions() {
3193
3218
  if (!this.options.width) {
@@ -3217,12 +3242,14 @@ class TheContextService {
3217
3242
  this.uploadingFiles.splice(this.uploadingFiles.findIndex(item => item.url === file.url), 1);
3218
3243
  }
3219
3244
  ngOnDestroy() {
3220
- var _a, _b, _c;
3245
+ var _a, _b, _c, _d, _e, _f;
3221
3246
  this.uploadingStatus$.complete();
3222
3247
  (_a = this.containerScrolled$) === null || _a === void 0 ? void 0 : _a.complete();
3223
3248
  (_b = this.containerResized$) === null || _b === void 0 ? void 0 : _b.complete();
3224
- this.resizeObserver.disconnect();
3225
- (_c = this.scrollSubscription) === null || _c === void 0 ? void 0 : _c.unsubscribe();
3249
+ (_c = this.containerResizeObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
3250
+ (_d = this.windowResized$) === null || _d === void 0 ? void 0 : _d.complete();
3251
+ (_e = this.windowResizeObserver) === null || _e === void 0 ? void 0 : _e.disconnect();
3252
+ (_f = this.scrollSubscription) === null || _f === void 0 ? void 0 : _f.unsubscribe();
3226
3253
  this.destroy$.next();
3227
3254
  this.destroy$.complete();
3228
3255
  }
@@ -3398,7 +3425,7 @@ const TABLE_INSERT_MASK$1 = 19;
3398
3425
  const TABLE_BORDER$1 = 1;
3399
3426
  const TABLE_PADDING$1 = 8;
3400
3427
  const TABLE_CONTROL = 11;
3401
- const TABLE_NUMBER_COLUMN = 45;
3428
+ const TABLE_NUMBER_COLUMN = 44;
3402
3429
  const TableWithStickyRowClass = 'the-table-with-sticky-row';
3403
3430
  var FullscreenState;
3404
3431
  (function (FullscreenState) {
@@ -10722,7 +10749,7 @@ const PaintFormatEditor = {
10722
10749
  const element = EDITOR_TO_ELEMENT.get(editor);
10723
10750
  element.classList.add('pointer-paint');
10724
10751
  contextService.onMouseUp$
10725
- .pipe(skip(1), filter(event => element.contains(event.target)), take(1))
10752
+ .pipe(filter(event => element.contains(event.target)), take(1))
10726
10753
  .subscribe((event) => {
10727
10754
  if (contextService.paintFormatStatus.isActive) {
10728
10755
  PaintFormatEditor.formatBrush(editor);
@@ -12530,10 +12557,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
12530
12557
  }] });
12531
12558
 
12532
12559
  /**
12533
- * 设置标题行网格列
12560
+ * 获取标题行网格列宽值
12534
12561
  * @param editor
12535
12562
  * @param headerRow 标题行
12536
- * @param cellRow
12563
+ * @param cellsWidth
12537
12564
  * @returns string
12538
12565
  */
12539
12566
  const getGridColumns = (headerRow, cellsWidth) => {
@@ -12768,6 +12795,12 @@ class TheTableComponent extends TheBaseElementComponent {
12768
12795
  this.destroy$ = new Subject();
12769
12796
  this.rowControls = [];
12770
12797
  this.colControls = [];
12798
+ this.getColControlButtonWidth = () => {
12799
+ var _a;
12800
+ let result = 0;
12801
+ result += ((_a = this.element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn) ? TABLE_NUMBER_COLUMN : 0;
12802
+ return result;
12803
+ };
12771
12804
  }
12772
12805
  get columns() {
12773
12806
  return this.element && this.element.columns;
@@ -12799,6 +12832,7 @@ class TheTableComponent extends TheBaseElementComponent {
12799
12832
  this.useRowControls();
12800
12833
  this.setHeaderCellStyle();
12801
12834
  this.setHeaderRowShadow();
12835
+ this.setHeaderRowLeftStyle();
12802
12836
  this.cdr.markForCheck();
12803
12837
  });
12804
12838
  this.getIsInTable();
@@ -12888,32 +12922,42 @@ class TheTableComponent extends TheBaseElementComponent {
12888
12922
  this.cdr.markForCheck();
12889
12923
  }
12890
12924
  this.setHeaderCellStyle();
12925
+ const { left } = this.nativeElement.getBoundingClientRect();
12926
+ this.tableRectLeft = left;
12891
12927
  this.subscribeScrollContainerScroll();
12892
12928
  this.contextService.containerResized$.pipe(takeUntil(this.destroy$)).subscribe(result => {
12893
12929
  if (result.widthChanged) {
12894
- this.setHeaderRowStyle();
12930
+ this.setGridColumnsStyle();
12931
+ this.setStickyRowStyle();
12895
12932
  this.bindTableScrollingShadow();
12896
12933
  }
12897
12934
  });
12935
+ this.contextService.windowResized$.pipe(takeUntil(this.destroy$)).subscribe(result => {
12936
+ if (result.widthChanged) {
12937
+ this.setHeaderRowShadow();
12938
+ this.setHeaderRowLeftStyle();
12939
+ }
12940
+ });
12898
12941
  }));
12899
12942
  }
12900
12943
  /* 给标题行的左/右加阴影 */
12901
12944
  setHeaderRowShadow() {
12902
12945
  // 固定标题行遮盖
12903
- this.tableWrapper.nativeElement.style.zIndex = this.isStickyTop ? '3' : '0';
12904
- const headerRowRightShadow = this.headerRowRightShadow.nativeElement;
12905
- const headerRowLeftShadow = this.headerRowLeftShadow.nativeElement;
12946
+ this.renderer.setStyle(this.tableWrapper.nativeElement, 'z-index', this.isStickyTop ? '3' : '0');
12906
12947
  if (this.isLeftShadow || this.isRightShadow) {
12907
12948
  let { height, top } = this.calcHeaderRowShadow();
12908
- let { left, width } = this.tableWrapper.nativeElement.getBoundingClientRect();
12909
- if (this.isRightShadow) {
12910
- headerRowRightShadow.style.height = height + 'px';
12911
- headerRowRightShadow.style.top = top + 'px';
12912
- headerRowRightShadow.style.left = left + width - 8 + 'px';
12949
+ let { left, width } = this.nativeElement.getBoundingClientRect();
12950
+ if (this.isRightShadow && this.headerRowRightShadow) {
12951
+ const headerRowRightShadow = this.headerRowRightShadow.nativeElement;
12952
+ this.renderer.setStyle(headerRowRightShadow, 'height', `${height}px`);
12953
+ this.renderer.setStyle(headerRowRightShadow, 'top', `${top}px`);
12954
+ this.renderer.setStyle(headerRowRightShadow, 'left', `${left + width - 8}px`);
12913
12955
  }
12914
- if (this.isLeftShadow) {
12915
- headerRowLeftShadow.style.height = height + 'px';
12916
- headerRowLeftShadow.style.top = top + 'px';
12956
+ if (this.isLeftShadow && this.headerRowLeftShadow) {
12957
+ const headerRowLeftShadow = this.headerRowLeftShadow.nativeElement;
12958
+ this.renderer.setStyle(headerRowLeftShadow, 'height', `${height}px`);
12959
+ this.renderer.setStyle(headerRowLeftShadow, 'top', `${top}px`);
12960
+ this.renderer.setStyle(headerRowLeftShadow, 'left', `${left + this.getColControlButtonWidth()}px`);
12917
12961
  }
12918
12962
  }
12919
12963
  }
@@ -12933,21 +12977,29 @@ class TheTableComponent extends TheBaseElementComponent {
12933
12977
  subscribeScrollContainerScroll() {
12934
12978
  this.ngZone.runOutsideAngular(() => {
12935
12979
  this.contextService.containerScrolled$
12936
- .pipe(takeUntil(this.destroy$), map$1(event => {
12980
+ .pipe(takeUntil(this.destroy$), map$1(entires => {
12937
12981
  var _a;
12938
- this.scrollContainerTop = event.target.getBoundingClientRect().top;
12939
- const clientRect = this.theTableElement.nativeElement.getBoundingClientRect();
12940
- const headerTopHeight = this.isInTable ? -19 : 11;
12941
- const headerRowHeight = (_a = this.calculateRowControls()[0]) === null || _a === void 0 ? void 0 : _a.height;
12942
- const top = clientRect.top + headerTopHeight;
12943
- this.isStickyTop =
12944
- top <= this.scrollContainerTop + 8 &&
12945
- clientRect.bottom - this.scrollContainerTop >= headerRowHeight &&
12946
- this.freezeRowPipe.transform(this.element, this.headerRow, this.tablePluginOptions);
12947
- // 标题行内容超过固定高度时移除冻结
12948
- if (this.isStickyTop) {
12949
- const maxHeaderRowHeight = (24 + 8) * 11; // 超出 11 行,取消冻结
12950
- this.isStickyTop = headerRowHeight <= maxHeaderRowHeight;
12982
+ const { event, direction } = entires;
12983
+ if (direction === ScrollDirection.X) {
12984
+ const { left } = this.nativeElement.getBoundingClientRect();
12985
+ this.isScrollX = this.tableRectLeft !== left;
12986
+ this.setHeaderRowLeftStyle();
12987
+ }
12988
+ if (direction === ScrollDirection.Y) {
12989
+ this.scrollContainerTop = event.target.getBoundingClientRect().top;
12990
+ const clientRect = this.theTableElement.nativeElement.getBoundingClientRect();
12991
+ const headerTopHeight = this.isInTable ? -19 : 11;
12992
+ const headerRowHeight = (_a = this.calculateRowControls()[0]) === null || _a === void 0 ? void 0 : _a.height;
12993
+ const top = clientRect.top + headerTopHeight;
12994
+ this.isStickyTop =
12995
+ top <= this.scrollContainerTop + 8 &&
12996
+ clientRect.bottom - this.scrollContainerTop >= headerRowHeight &&
12997
+ this.freezeRowPipe.transform(this.element, this.headerRow, this.tablePluginOptions);
12998
+ // 标题行内容超过固定高度时移除冻结
12999
+ if (this.isStickyTop) {
13000
+ const maxHeaderRowHeight = (24 + 8) * 11; // 超出 11 行,取消冻结
13001
+ this.isStickyTop = headerRowHeight <= maxHeaderRowHeight;
13002
+ }
12951
13003
  }
12952
13004
  return this.isStickyTop;
12953
13005
  }), distinctUntilChanged())
@@ -13012,6 +13064,7 @@ class TheTableComponent extends TheBaseElementComponent {
13012
13064
  this.setGridColumnsStyle();
13013
13065
  this.setStickyRowStyle();
13014
13066
  this.setHeaderRowShadow();
13067
+ this.setHeaderRowLeftStyle();
13015
13068
  }
13016
13069
  setGridColumnsStyle() {
13017
13070
  var _a, _b;
@@ -13031,7 +13084,7 @@ class TheTableComponent extends TheBaseElementComponent {
13031
13084
  }
13032
13085
  }
13033
13086
  setStickyRowStyle() {
13034
- var _a, _b;
13087
+ var _a, _b, _c;
13035
13088
  const colControl = this.columnControlsWrapper.nativeElement;
13036
13089
  const headerRow = this.nativeElement.querySelector('tbody tr');
13037
13090
  const rowControlInner = this.rowControlsInner.nativeElement;
@@ -13053,6 +13106,7 @@ class TheTableComponent extends TheBaseElementComponent {
13053
13106
  const tablePaddingTop = headerRowHeight + 11; // 标题行高 + ctrl btn(11px)高度
13054
13107
  this.renderer.setStyle(this.theTableElement.nativeElement, 'padding-top', tablePaddingTop + 'px');
13055
13108
  this.renderer.setStyle(rowControlInner, 'padding-top', tablePaddingTop + 'px');
13109
+ this.renderer.setStyle(this.tableRowControlsWrapper.nativeElement, 'z-index', '4');
13056
13110
  }
13057
13111
  else {
13058
13112
  this.renderer.removeClass(this.nativeElement, TableWithStickyRowClass);
@@ -13061,18 +13115,23 @@ class TheTableComponent extends TheBaseElementComponent {
13061
13115
  });
13062
13116
  this.renderer.setStyle(this.theTableElement.nativeElement, 'padding-top', null);
13063
13117
  this.renderer.setStyle(rowControlInner, 'padding-top', null);
13118
+ this.renderer.setStyle(this.tableRowControlsWrapper.nativeElement, 'z-index', '1');
13064
13119
  }
13065
- // setTimeout: 需要等待 rowControls dom 中渲染完毕后才能获取到 rowControlButton
13066
- if (this.initialized) {
13067
- this.setRowControlButtonStyle(numberedColumn);
13120
+ const rowControlButton = (_c = this.rowControlsButtonWrapper.first) === null || _c === void 0 ? void 0 : _c.nativeElement;
13121
+ if (this.initialized && rowControlButton) {
13122
+ this.setRowControlButtonStyle(rowControlButton);
13068
13123
  }
13069
13124
  else {
13070
- setTimeout(() => this.setRowControlButtonStyle(numberedColumn));
13125
+ // setTimeout 需要等待 rowControls 在 dom 中渲染完毕后才能获取到 rowControlButton
13126
+ setTimeout(() => this.setRowControlButtonStyle(rowControlButton));
13071
13127
  }
13072
13128
  }
13073
- setRowControlButtonStyle(numberedColumn) {
13074
- var _a;
13075
- const rowControlButton = (_a = this.rowControlsButtonWrapper.first) === null || _a === void 0 ? void 0 : _a.nativeElement;
13129
+ setRowControlButtonStyle(rowControlButton) {
13130
+ var _a, _b;
13131
+ const numberedColumn = (_a = this.element.options) === null || _a === void 0 ? void 0 : _a.numberedColumn;
13132
+ if (!rowControlButton) {
13133
+ rowControlButton = (_b = this.rowControlsButtonWrapper.first) === null || _b === void 0 ? void 0 : _b.nativeElement;
13134
+ }
13076
13135
  if (this.isStickyTop) {
13077
13136
  if ((this.isInTable || numberedColumn) && rowControlButton) {
13078
13137
  this.renderer.setStyle(rowControlButton, 'top', this.scrollContainerTop + 'px');
@@ -13269,9 +13328,16 @@ class TheTableComponent extends TheBaseElementComponent {
13269
13328
  }
13270
13329
  getDefaultCellWidth() {
13271
13330
  const tr = this.element.children[0];
13272
- const tableWidth = AngularEditor.toDOMNode(this.editor, tr).getBoundingClientRect().width;
13331
+ let width = this.elementRef.nativeElement.getBoundingClientRect().width;
13332
+ if (this.rowControlsInner) {
13333
+ width -= this.rowControlsInner.nativeElement.getBoundingClientRect().width;
13334
+ if (this.isCollapsedAndNonReadonly) {
13335
+ // 聚焦之后会向左偏移一个 control(-11),见 .the-table-row-controls-wrapper
13336
+ width += TABLE_CONTROL;
13337
+ }
13338
+ }
13273
13339
  return tr.children.map(cell => {
13274
- return Number((tableWidth / tr.children.length).toFixed(2));
13340
+ return Number((width / tr.children.length).toFixed(2));
13275
13341
  });
13276
13342
  }
13277
13343
  initializeColumns() {
@@ -13439,7 +13505,7 @@ class TheTableComponent extends TheBaseElementComponent {
13439
13505
  const stickyRows = this.elementRef.nativeElement.querySelectorAll('.the-sticky-row');
13440
13506
  const setStickyRowPointerEvents = (pointerEventsStyle) => {
13441
13507
  for (const stiRow of stickyRows) {
13442
- stiRow.style.pointerEvents = pointerEventsStyle;
13508
+ this.renderer.setStyle(stiRow, 'pointer-events', pointerEventsStyle);
13443
13509
  }
13444
13510
  };
13445
13511
  let timer;
@@ -13475,6 +13541,28 @@ class TheTableComponent extends TheBaseElementComponent {
13475
13541
  }
13476
13542
  }
13477
13543
  }
13544
+ setHeaderRowLeftStyle() {
13545
+ var _a;
13546
+ const stickyRows = this.elementRef.nativeElement.querySelectorAll('.the-sticky-row');
13547
+ const cornerControl = this.cornerControl.nativeElement;
13548
+ const rowControl = (_a = this.rowControlsButtonWrapper.first) === null || _a === void 0 ? void 0 : _a.nativeElement;
13549
+ const stickyElements = [...stickyRows, cornerControl, rowControl];
13550
+ const { left } = this.nativeElement.getBoundingClientRect();
13551
+ const buffer = this.isInTable ? -TABLE_CONTROL : 0;
13552
+ if (this.isStickyTop && this.isScrollX) {
13553
+ this.setHeaderRowShadow();
13554
+ stickyRows.forEach((element) => {
13555
+ this.renderer.setStyle(element, 'left', `${left + this.getColControlButtonWidth()}px`);
13556
+ });
13557
+ this.renderer.setStyle(cornerControl, 'left', `${left + buffer}px`);
13558
+ rowControl && this.renderer.setStyle(rowControl, 'left', `${left + buffer}px`);
13559
+ }
13560
+ else {
13561
+ stickyElements.forEach((element) => {
13562
+ element && this.renderer.setStyle(element, 'left', null);
13563
+ });
13564
+ }
13565
+ }
13478
13566
  trackByFnRowControls(index) {
13479
13567
  return index;
13480
13568
  }
@@ -13500,7 +13588,7 @@ TheTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
13500
13588
  provide: THE_TABLE_COMPONENT_TOKEN,
13501
13589
  useExisting: TheTableComponent
13502
13590
  }
13503
- ], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: ElementRef, static: true }, { propertyName: "columnControlsWrapper", first: true, predicate: ["columnControlsWrapper"], descendants: true, read: ElementRef }, { propertyName: "cornerControl", first: true, predicate: ["cornerControl"], descendants: true, read: ElementRef }, { propertyName: "rowControlsInner", first: true, predicate: ["rowControlsInner"], descendants: true, read: ElementRef }, { propertyName: "headerRowLeftShadow", first: true, predicate: ["headerRowLeftShadow"], descendants: true, read: ElementRef }, { propertyName: "headerRowRightShadow", first: true, predicate: ["headerRowRightShadow"], descendants: true, read: ElementRef }, { propertyName: "colgroup", first: true, predicate: ["colgroup"], descendants: true, read: ElementRef }, { propertyName: "rowControlsButtonWrapper", predicate: ["rowControlsButtonWrapper"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"the-table-container\" theColumnResize>\n <div class=\"the-table-row-controls-wrapper\">\n <div\n class=\"the-table-corner-controls the-sticky-corner-controls\"\n #cornerControl\n [ngClass]=\"{\n visible: !readonly && (isInTable || tableStore.isRightClicking),\n 'control-active': isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\" *ngIf=\"!headerRow\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\" *ngIf=\"!element.options?.headerColumn\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\" #rowControlsInner>\n <div\n class=\"the-table-row-controls-button-wrap\"\n #rowControlsButtonWrapper\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && (isInTable || tableStore.isRightClicking) && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ headerRow && i === 0 ? '' : headerRow ? i : i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable>\n <colgroup #colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper the-sticky-row\" #columnControlsWrapper>\n <th\n #colControl\n class=\"the-table-col-controls\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable || tableStore.isRightClicking\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n <div class=\"header-row-shadow header-row-left-shadow\" #headerRowLeftShadow contenteditable=\"false\"></div>\n <div class=\"header-row-shadow header-row-right-shadow\" #headerRowRightShadow contenteditable=\"false\"></div>\n </table>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { kind: "component", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore", "parentElement"] }] });
13591
+ ], viewQueries: [{ propertyName: "tableWrapper", first: true, predicate: ["tableWrapper"], descendants: true, read: ElementRef, static: true }, { propertyName: "theTableElement", first: true, predicate: ["theTable"], descendants: true, read: ElementRef, static: true }, { propertyName: "tbodyElement", first: true, predicate: ["tbody"], descendants: true, read: ElementRef, static: true }, { propertyName: "tableRowControlsWrapper", first: true, predicate: ["tableRowControlsWrapper"], descendants: true, read: ElementRef }, { propertyName: "columnControlsWrapper", first: true, predicate: ["columnControlsWrapper"], descendants: true, read: ElementRef }, { propertyName: "cornerControl", first: true, predicate: ["cornerControl"], descendants: true, read: ElementRef }, { propertyName: "rowControlsInner", first: true, predicate: ["rowControlsInner"], descendants: true, read: ElementRef }, { propertyName: "headerRowLeftShadow", first: true, predicate: ["headerRowLeftShadow"], descendants: true, read: ElementRef }, { propertyName: "headerRowRightShadow", first: true, predicate: ["headerRowRightShadow"], descendants: true, read: ElementRef }, { propertyName: "colgroup", first: true, predicate: ["colgroup"], descendants: true, read: ElementRef }, { propertyName: "rowControlsButtonWrapper", predicate: ["rowControlsButtonWrapper"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"the-table-container\" theColumnResize>\n <div class=\"the-table-row-controls-wrapper\" #tableRowControlsWrapper>\n <div\n class=\"the-table-corner-controls the-sticky-corner-controls\"\n #cornerControl\n [ngClass]=\"{\n visible: !readonly && (isInTable || tableStore.isRightClicking),\n 'control-active': isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\" *ngIf=\"!headerRow\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\" *ngIf=\"!element.options?.headerColumn\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\" #rowControlsInner>\n <div\n class=\"the-table-row-controls-button-wrap\"\n #rowControlsButtonWrapper\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && (isInTable || tableStore.isRightClicking) && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ headerRow && i === 0 ? '' : headerRow ? i : i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable>\n <colgroup #colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper the-sticky-row\" #columnControlsWrapper>\n <th\n #colControl\n class=\"the-table-col-controls\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable || tableStore.isRightClicking\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n <div\n class=\"header-row-shadow header-row-left-shadow\"\n #headerRowLeftShadow\n contenteditable=\"false\"\n *ngIf=\"!element.options?.headerColumn\"\n ></div>\n <div class=\"header-row-shadow header-row-right-shadow\" #headerRowRightShadow contenteditable=\"false\"></div>\n </table>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i1.SlateChildrenComponent, selector: "slate-children", inputs: ["children", "context", "viewContext"] }, { kind: "directive", type: TheColumnResizeDirective, selector: "div[theColumnResize]" }, { kind: "component", type: TheInsertMarkComponent, selector: "the-table-insert-mark", inputs: ["type", "at", "tableStore", "parentElement"] }] });
13504
13592
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheTableComponent, decorators: [{
13505
13593
  type: Component,
13506
13594
  args: [{ selector: 'the-table, [theTable]', providers: [
@@ -13520,7 +13608,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
13520
13608
  '[class.the-table-with-sticky-column]': 'freezeColumnPipe.transform(element, tablePluginOptions)',
13521
13609
  '[class.the-numberd-table]': 'element?.options?.numberedColumn',
13522
13610
  '[class.the-table-selection-hide]': 'tableStore.isCellSelecting || tableStore.isRightClicking'
13523
- }, template: "<div class=\"the-table-container\" theColumnResize>\n <div class=\"the-table-row-controls-wrapper\">\n <div\n class=\"the-table-corner-controls the-sticky-corner-controls\"\n #cornerControl\n [ngClass]=\"{\n visible: !readonly && (isInTable || tableStore.isRightClicking),\n 'control-active': isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\" *ngIf=\"!headerRow\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\" *ngIf=\"!element.options?.headerColumn\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\" #rowControlsInner>\n <div\n class=\"the-table-row-controls-button-wrap\"\n #rowControlsButtonWrapper\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && (isInTable || tableStore.isRightClicking) && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ headerRow && i === 0 ? '' : headerRow ? i : i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable>\n <colgroup #colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper the-sticky-row\" #columnControlsWrapper>\n <th\n #colControl\n class=\"the-table-col-controls\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable || tableStore.isRightClicking\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n <div class=\"header-row-shadow header-row-left-shadow\" #headerRowLeftShadow contenteditable=\"false\"></div>\n <div class=\"header-row-shadow header-row-right-shadow\" #headerRowRightShadow contenteditable=\"false\"></div>\n </table>\n </div>\n</div>\n" }]
13611
+ }, template: "<div class=\"the-table-container\" theColumnResize>\n <div class=\"the-table-row-controls-wrapper\" #tableRowControlsWrapper>\n <div\n class=\"the-table-corner-controls the-sticky-corner-controls\"\n #cornerControl\n [ngClass]=\"{\n visible: !readonly && (isInTable || tableStore.isRightClicking),\n 'control-active': isSelectedAllCell,\n dangerous: tableStore.isSelectedTable && tableStore.dangerousCells.length > 0\n }\"\n >\n <div class=\"the-table-corner-button\" (mousedown)=\"onSelectTable($event)\"></div>\n <div class=\"the-table-corner-controls-insert-row-marker\" *ngIf=\"!headerRow\">\n <the-table-insert-mark type=\"row\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n <div class=\"the-table-corner-controls-insert-column-marker\" *ngIf=\"!element.options?.headerColumn\">\n <the-table-insert-mark type=\"column\" [at]=\"0\" [tableStore]=\"tableStore\"></the-table-insert-mark>\n </div>\n </div>\n <div class=\"the-table-row-controls\">\n <div class=\"the-table-row-controls-inner\" #rowControlsInner>\n <div\n class=\"the-table-row-controls-button-wrap\"\n #rowControlsButtonWrapper\n *ngFor=\"let control of rowControls; let i = index; trackBy: trackByFnRowControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedRowsIndex.includes(control.rowIndex),\n dangerous: tableStore.dangerousRowsIndex.includes(control.rowIndex) && tableStore.dangerousCells.length > 0\n }\"\n >\n <ng-container *ngIf=\"!readonly && (isInTable || tableStore.isRightClicking) && !element?.options?.numberedColumn\">\n <button\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n type=\"button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n class=\"the-table-row-controls-button the-table-controls-button\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"element?.options?.numberedColumn\">\n <div\n [contentEditable]=\"false\"\n contenteditable=\"false\"\n (mousedown)=\"onRowMousedown($event, control.rowIndex)\"\n class=\"the-table-numbered-controls-button\"\n [ngStyle]=\"{ height: control.height + 1 + 'px' }\"\n >\n <p class=\"row-number d-flex align-items-center\">{{ headerRow && i === 0 ? '' : headerRow ? i : i + 1 }}</p>\n </div>\n </ng-container>\n <the-table-insert-mark type=\"row\" [at]=\"control.rowIndex + 1\" [tableStore]=\"tableStore\"> </the-table-insert-mark>\n </div>\n </div>\n </div>\n </div>\n <div class=\"the-table-wrapper\" #tableWrapper [ngClass]=\"{ 'the-table-numbered': element?.options?.numberedColumn }\">\n <table class=\"the-table\" #theTable>\n <colgroup #colgroup *ngIf=\"columns\">\n <col *ngFor=\"let col of columns\" [ngStyle]=\"{ width: col.width + 'px' }\" />\n </colgroup>\n <thead>\n <tr class=\"the-table-col-controls-wrapper the-sticky-row\" #columnControlsWrapper>\n <th\n #colControl\n class=\"the-table-col-controls\"\n *ngFor=\"let control of colControls; let i = index; trackBy: trackByFnColControls\"\n [ngClass]=\"{\n 'control-active': tableStore.selectedColumnsIndex.includes(i),\n dangerous: tableStore.dangerousColumnsIndex.includes(i) && tableStore.dangerousCells.length > 0\n }\"\n (mousedown)=\"onColMousedown($event, i)\"\n >\n <the-table-insert-mark\n *ngIf=\"isInTable || tableStore.isRightClicking\"\n type=\"column\"\n [at]=\"i + 1\"\n [tableStore]=\"tableStore\"\n [parentElement]=\"colControl\"\n >\n </the-table-insert-mark>\n </th>\n </tr>\n </thead>\n <tbody #tbody>\n <slate-children [children]=\"children\" [context]=\"childrenContext\" [viewContext]=\"viewContext\"> </slate-children>\n </tbody>\n <div\n class=\"header-row-shadow header-row-left-shadow\"\n #headerRowLeftShadow\n contenteditable=\"false\"\n *ngIf=\"!element.options?.headerColumn\"\n ></div>\n <div class=\"header-row-shadow header-row-right-shadow\" #headerRowRightShadow contenteditable=\"false\"></div>\n </table>\n </div>\n</div>\n" }]
13524
13612
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: TableCellEventDispatcher }, { type: ColumnResizeNotifierSource }, { type: TableStore }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: TableService }, { type: TheTableContextMenuService }, { type: TableFreezeColumnPipe }, { type: TableFreezeRowPipe }, { type: i0.Renderer2 }, { type: TheContextService }]; }, propDecorators: { tableWrapper: [{
13525
13613
  type: ViewChild,
13526
13614
  args: ['tableWrapper', { read: ElementRef, static: true }]
@@ -13530,6 +13618,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
13530
13618
  }], tbodyElement: [{
13531
13619
  type: ViewChild,
13532
13620
  args: ['tbody', { read: ElementRef, static: true }]
13621
+ }], tableRowControlsWrapper: [{
13622
+ type: ViewChild,
13623
+ args: ['tableRowControlsWrapper', { read: ElementRef, static: false }]
13533
13624
  }], columnControlsWrapper: [{
13534
13625
  type: ViewChild,
13535
13626
  args: ['columnControlsWrapper', { read: ElementRef, static: false }]
@@ -14051,16 +14142,18 @@ class TheTdComponent extends TheBaseElementComponent {
14051
14142
  return this.tableComponent.theTableElement.nativeElement;
14052
14143
  }
14053
14144
  get scrollableElementTop() {
14054
- const cdkscrollable = this.elementRef.nativeElement.closest('[cdkscrollable]');
14055
- if (cdkscrollable) {
14056
- return cdkscrollable.getBoundingClientRect().top;
14145
+ var _a;
14146
+ const containerElement = this.elementRef.nativeElement.closest(((_a = this.editor.options) === null || _a === void 0 ? void 0 : _a.scrollContainer) || DEFAULT_SCROLL_CONTAINER);
14147
+ if (containerElement) {
14148
+ return containerElement.getBoundingClientRect().top;
14057
14149
  }
14058
14150
  return -window.scrollY;
14059
14151
  }
14060
14152
  get scrollableElementBottom() {
14061
- const cdkscrollable = this.elementRef.nativeElement.closest('[cdkscrollable]');
14062
- if (cdkscrollable) {
14063
- return cdkscrollable.getBoundingClientRect().bottom;
14153
+ var _a;
14154
+ const containerElement = this.elementRef.nativeElement.closest(((_a = this.editor.options) === null || _a === void 0 ? void 0 : _a.scrollContainer) || DEFAULT_SCROLL_CONTAINER);
14155
+ if (containerElement) {
14156
+ return containerElement.getBoundingClientRect().bottom;
14064
14157
  }
14065
14158
  return -window.scrollY;
14066
14159
  }
@@ -15801,7 +15894,6 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15801
15894
  }
15802
15895
  ngOnInit() {
15803
15896
  this.initialize();
15804
- this.initCdkScroll();
15805
15897
  initializeDefaultMenuIcons(this.iconRegistry);
15806
15898
  this.theContextService.uploadingStatus$.subscribe(isUploading => {
15807
15899
  if (isUploading) {
@@ -15834,9 +15926,6 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15834
15926
  ngOnDestroy() {
15835
15927
  super.ngOnDestroy();
15836
15928
  THE_EDITOR_PREVIOUS_SELECTION.delete(this.editor);
15837
- if (this.cdkScrollable) {
15838
- this.cdkScrollable.ngOnDestroy();
15839
- }
15840
15929
  }
15841
15930
  initialize() {
15842
15931
  var _a, _b;
@@ -15867,13 +15956,6 @@ class TheEditorComponent extends mixinUnsubscribe(MixinBase) {
15867
15956
  this.visibleQuickInsertPlus = false;
15868
15957
  }
15869
15958
  }
15870
- initCdkScroll() {
15871
- if (this.maxHeight) {
15872
- this.cdkScrollable = new CdkScrollable(this.theEditableContainer, this.scrollDispatcher, this.ngZone);
15873
- this.cdkScrollable.ngOnInit();
15874
- this.theEditableContainer.nativeElement.setAttribute('cdkScrollable', '');
15875
- }
15876
- }
15877
15959
  initializeOptions() {
15878
15960
  if (!this.theOptions) {
15879
15961
  this.theOptions = {
@@ -16359,5 +16441,5 @@ const withTestPlugin = (plugins, initValue) => {
16359
16441
  * Generated bundle index. Do not edit.
16360
16442
  */
16361
16443
 
16362
- export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BackgroundColors, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, Colors, ColumnResizeNotifierSource, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QuickInsertEditor, STANDARD_HEADING_TYPES, SpecialBackgroundColor, SpecialTextColor, TAB_SPACE, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_UPLOAD_SERVICE_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TheBaseElementComponent, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, buildPluginMenu, buildPluginMenuItemMap, coercePixelsFromCssValue, combinePlugins, copyNode, copyNodeForSafari, createEmptyParagraph, createMentionPlugin, createPluginFactory, createToolbar, createVerticalAlignPlugin, dataDeserialize, dataSerializing, deleteElementKey, extractFragment, filterTextFormat, flattenDeepPlugins, getColsTotalWidth, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getStartBlock, getToolbarClass, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, internalPlugins, isCleanEmptyParagraph, isDirectionKeydown, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, reSelection, recursionNodes, refocus, scrollIntoView, setEditorUUID, useElementStyle, withMention, withTestPlugin, withTheia };
16444
+ export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BackgroundColors, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, COMPONENTS, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, Colors, ColumnResizeNotifierSource, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PLUGIN_COMPONENTS, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QuickInsertEditor, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, SpecialTextColor, TAB_SPACE, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_INLINE_TOOLBAR_TYPES, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_UPLOAD_SERVICE_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TheBaseElementComponent, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheContextService, TheDataMode, TheDefaultElementComponent, TheEditor, TheEditorComponent, TheEditorModule, TheImageComponent, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheToolbarComponent, TheToolbarDropdownComponent, TheToolbarGroupComponent, TheToolbarGroupToken, TheToolbarItemComponent, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, buildPluginMenu, buildPluginMenuItemMap, coercePixelsFromCssValue, combinePlugins, copyNode, copyNodeForSafari, createEmptyParagraph, createMentionPlugin, createPluginFactory, createToolbar, createVerticalAlignPlugin, dataDeserialize, dataSerializing, deleteElementKey, extractFragment, filterTextFormat, flattenDeepPlugins, getColsTotalWidth, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getStartBlock, getToolbarClass, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, internalPlugins, isCleanEmptyParagraph, isDirectionKeydown, isPureEmptyParagraph, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, plainToTheia, pluginsByKey, reSelection, recursionNodes, refocus, scrollIntoView, setEditorUUID, useElementStyle, withMention, withTestPlugin, withTheia };
16363
16445
  //# sourceMappingURL=worktile-theia.mjs.map