@alauda/ui 6.4.8-beta.13 → 6.4.8-beta.15

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.
@@ -9090,27 +9090,45 @@ class TableScrollableDirective extends CdkScrollable$1 {
9090
9090
  super(el, scrollDispatcher, ngZone, dir);
9091
9091
  this.el = el;
9092
9092
  this.table = table;
9093
- this.scrollShadow$$ = new BehaviorSubject(true);
9093
+ this._scrollable = true;
9094
+ this.scrollable$$ = new BehaviorSubject(this._scrollable);
9094
9095
  this.destroy$$ = new Subject();
9095
9096
  this.SCROLL_BEFORE_END_CLASS = true;
9096
9097
  this.SHADOW_CLASS = true;
9097
9098
  }
9098
- set auiTableScrollable(scrollShadow) {
9099
- this.scrollShadow$$.next(coerceAttrBoolean(scrollShadow));
9099
+ set scrollable(scrollable) {
9100
+ this._scrollable = coerceAttrBoolean(scrollable);
9101
+ this.scrollable$$.next(this._scrollable);
9102
+ }
9103
+ get scrollable() {
9104
+ return this._scrollable;
9100
9105
  }
9101
9106
  get containerEl() {
9102
9107
  return this.el.nativeElement;
9103
9108
  }
9109
+ ngOnInit() {
9110
+ if (this.scrollable) {
9111
+ this.scrollDispatcher.register(this);
9112
+ }
9113
+ }
9104
9114
  ngAfterViewInit() {
9105
- requestAnimationFrame(() => {
9106
- this.viewMutation();
9107
- });
9115
+ this.viewMutation();
9116
+ }
9117
+ ngOnDestroy() {
9118
+ super.ngOnDestroy();
9119
+ this.destroy$$.next();
9120
+ this.destroy$$.complete();
9108
9121
  }
9109
9122
  viewMutation() {
9110
- this.scrollShadow$$
9111
- .pipe(switchMap(scrollShadow => scrollShadow
9112
- ? merge(observeResizeOn(this.containerEl), fromEvent(this.containerEl, 'scroll')).pipe(startWith(null))
9113
- : NEVER))
9123
+ this.scrollable$$
9124
+ .pipe(switchMap(scrollable => {
9125
+ if (scrollable) {
9126
+ this.scrollDispatcher.register(this);
9127
+ return merge(observeResizeOn(this.containerEl), fromEvent(this.containerEl, 'scroll')).pipe(startWith(null));
9128
+ }
9129
+ this.scrollDispatcher.deregister(this);
9130
+ return NEVER;
9131
+ }))
9114
9132
  .pipe(takeUntil(this.destroy$$))
9115
9133
  .subscribe(() => {
9116
9134
  this.mutateVerticalScroll();
@@ -9136,14 +9154,9 @@ class TableScrollableDirective extends CdkScrollable$1 {
9136
9154
  placeClassList(classList, condition, className) {
9137
9155
  classList[condition ? 'add' : 'remove'](className);
9138
9156
  }
9139
- ngOnDestroy() {
9140
- super.ngOnDestroy();
9141
- this.destroy$$.next();
9142
- this.destroy$$.complete();
9143
- }
9144
9157
  }
9145
9158
  TableScrollableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TableScrollableDirective, deps: [{ token: i0.ElementRef }, { token: i1$1.ScrollDispatcher }, { token: i0.NgZone }, { token: TableComponent, host: true }, { token: i2$3.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
9146
- TableScrollableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: TableScrollableDirective, selector: "[auiTableScrollable]", inputs: { auiTableScrollable: "auiTableScrollable" }, host: { properties: { "class.aui-table__scroll-shadow--before-end": "this.SCROLL_BEFORE_END_CLASS", "class.aui-table__scroll-shadow": "this.SHADOW_CLASS" } }, providers: [
9159
+ TableScrollableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.8", type: TableScrollableDirective, selector: "[auiTableScrollable]", inputs: { scrollable: ["auiTableScrollable", "scrollable"] }, host: { properties: { "class.aui-table__scroll-shadow--before-end": "this.SCROLL_BEFORE_END_CLASS", "class.aui-table__scroll-shadow": "this.SHADOW_CLASS" } }, providers: [
9147
9160
  { provide: CdkScrollable$1, useExisting: TableScrollableDirective },
9148
9161
  ], usesInheritance: true, ngImport: i0 });
9149
9162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: TableScrollableDirective, decorators: [{
@@ -9158,8 +9171,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.8", ngImpor
9158
9171
  type: Host
9159
9172
  }] }, { type: i2$3.Directionality, decorators: [{
9160
9173
  type: Optional
9161
- }] }]; }, propDecorators: { auiTableScrollable: [{
9162
- type: Input
9174
+ }] }]; }, propDecorators: { scrollable: [{
9175
+ type: Input,
9176
+ args: ['auiTableScrollable']
9163
9177
  }], SCROLL_BEFORE_END_CLASS: [{
9164
9178
  type: HostBinding,
9165
9179
  args: [`class.${SCROLL_BEFORE_END_CLASS}`]