@alauda/ui 6.4.2-beta.2 → 6.4.2-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/table/table-placeholder.directive.mjs +16 -1
- package/esm2020/table/table.component.mjs +3 -7
- package/fesm2015/alauda-ui.mjs +16 -6
- package/fesm2015/alauda-ui.mjs.map +1 -1
- package/fesm2020/alauda-ui.mjs +16 -6
- package/fesm2020/alauda-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/table/table-placeholder.directive.d.ts +6 -1
package/fesm2020/alauda-ui.mjs
CHANGED
|
@@ -8536,6 +8536,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
|
|
|
8536
8536
|
class TablePlaceholderDefDirective {
|
|
8537
8537
|
constructor(templateRef) {
|
|
8538
8538
|
this.templateRef = templateRef;
|
|
8539
|
+
this.visible$$ = new BehaviorSubject(true);
|
|
8540
|
+
this.visible$ = this.visible$$.asObservable().pipe(distinctUntilChanged());
|
|
8541
|
+
}
|
|
8542
|
+
set auiTablePlaceholderDef(show) {
|
|
8543
|
+
this.visible$$.next(!!show);
|
|
8539
8544
|
}
|
|
8540
8545
|
}
|
|
8541
8546
|
TablePlaceholderDefDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TablePlaceholderDefDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -8553,6 +8558,15 @@ class TablePlaceholderOutletDirective {
|
|
|
8553
8558
|
this.viewContainer = viewContainer;
|
|
8554
8559
|
this.elementRef = elementRef;
|
|
8555
8560
|
}
|
|
8561
|
+
register(def, visible) {
|
|
8562
|
+
if (this.def) {
|
|
8563
|
+
this.viewContainer.clear();
|
|
8564
|
+
}
|
|
8565
|
+
if (visible) {
|
|
8566
|
+
this.def = def;
|
|
8567
|
+
this.viewContainer.createEmbeddedView(def.templateRef);
|
|
8568
|
+
}
|
|
8569
|
+
}
|
|
8556
8570
|
}
|
|
8557
8571
|
TablePlaceholderOutletDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: TablePlaceholderOutletDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
8558
8572
|
TablePlaceholderOutletDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.2", type: TablePlaceholderOutletDirective, selector: "[auiTablePlaceholderOutlet]", ngImport: i0 });
|
|
@@ -8576,13 +8590,9 @@ class TableComponent extends CdkTable {
|
|
|
8576
8590
|
this._createPlaceholder();
|
|
8577
8591
|
}
|
|
8578
8592
|
_createPlaceholder() {
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
this._placeholderDef.auiTablePlaceholderDef === false) {
|
|
8582
|
-
return;
|
|
8593
|
+
if (this._placeholderOutlet && this._placeholderDef) {
|
|
8594
|
+
this._placeholderDef.visible$.subscribe(visible => this._placeholderOutlet.register(this._placeholderDef, visible));
|
|
8583
8595
|
}
|
|
8584
|
-
const container = this._placeholderOutlet.viewContainer;
|
|
8585
|
-
container.createEmbeddedView(footerRow.templateRef);
|
|
8586
8596
|
}
|
|
8587
8597
|
_clearPlaceholder() {
|
|
8588
8598
|
this._placeholderOutlet.viewContainer.clear();
|