@coolon/angular-ui-powerups 16.1.0-alpha.245 → 16.1.0-alpha.246
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/esm2022/lib/components/tables/footer/footer-row-model.mjs +17 -2
- package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +9 -4
- package/fesm2022/coolon-angular-ui-powerups.mjs +24 -4
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/footer/footer-row-model.d.ts +13 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from "@angular/cdk/overlay";
|
|
2
2
|
import { ComponentPortal } from "@angular/cdk/portal";
|
|
3
|
+
import { ValueModel } from "@coolon/pectin";
|
|
3
4
|
declare class RowClass {
|
|
4
5
|
readonly className: string;
|
|
5
6
|
readonly matches: () => boolean;
|
|
@@ -46,11 +47,23 @@ export interface ResolvedFooterRow {
|
|
|
46
47
|
readonly defIds: string[];
|
|
47
48
|
readonly cells: ResolvedFooterCell[];
|
|
48
49
|
readonly rowClasses: string;
|
|
50
|
+
/** Live visibility gate set via {@link FooterRowModel.visibleWhile}; undefined ⇒ always visible. */
|
|
51
|
+
readonly visible$?: ValueModel<boolean | undefined>;
|
|
49
52
|
}
|
|
50
53
|
export declare abstract class FooterRowModel {
|
|
51
54
|
protected readonly _rowClasses: RowClass[];
|
|
55
|
+
protected _visible$?: ValueModel<boolean | undefined>;
|
|
56
|
+
/** The row's live visibility gate, if one was set via {@link visibleWhile}. */
|
|
57
|
+
get visible$(): ValueModel<boolean | undefined> | undefined;
|
|
52
58
|
noPadding(): this;
|
|
53
59
|
addClass(className: string, condition?: () => boolean): this;
|
|
60
|
+
/**
|
|
61
|
+
* Reactively hide the whole footer row while `model` is falsey (the `<tr>` is `display:none`'d).
|
|
62
|
+
* Unlike {@link addClass}'s `condition` — evaluated once when the row is resolved against the
|
|
63
|
+
* visible columns — this is live: the table re-renders when the model changes. Use it to gate a
|
|
64
|
+
* footer command row on a permission/state so a hidden command doesn't leave an empty row behind.
|
|
65
|
+
*/
|
|
66
|
+
visibleWhile(model: ValueModel<boolean | undefined>): this;
|
|
54
67
|
}
|
|
55
68
|
export declare namespace FooterRowModel {
|
|
56
69
|
class Impl extends FooterRowModel {
|