@coolon/angular-ui-powerups 16.1.0-alpha.321 → 16.1.0-alpha.323
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/cards/card-container/card-container.component.mjs +1 -1
- package/esm2022/lib/components/commands/command/command.component.mjs +1 -1
- package/esm2022/lib/components/forms/number-input/number-input.component.mjs +1 -1
- package/esm2022/lib/components/forms/search-input/search-input.component.mjs +1 -1
- package/esm2022/lib/components/tables/abstract-table-model.mjs +2 -2
- package/esm2022/lib/components/tables/filter/table-filter-model.mjs +2 -2
- package/esm2022/lib/components/tables/footer/footer-row-model.mjs +2 -2
- package/esm2022/lib/components/tables/paginator/paginator.component.mjs +1 -1
- package/esm2022/lib/components/tables/table/table.component.mjs +24 -4
- package/esm2022/lib/components/tables/tree-table/tree-expansion-model.mjs +2 -2
- package/esm2022/lib/directives/command.directive.mjs +48 -3
- package/esm2022/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +1 -1
- package/esm2022/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.mjs +1 -1
- package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-editor-model.mjs +2 -2
- package/esm2022/lib/place/components/list-place-nav/list-place-nav.component.mjs +1 -1
- package/esm2022/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.mjs +2 -2
- package/fesm2022/coolon-angular-ui-powerups.mjs +78 -13
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/abstract-table-model.d.ts +4 -2
- package/lib/components/tables/filter/table-filter-model.d.ts +4 -2
- package/lib/components/tables/footer/footer-row-model.d.ts +4 -2
- package/lib/components/tables/table/table.component.d.ts +16 -1
- package/lib/components/tables/tree-table/tree-expansion-model.d.ts +4 -2
- package/lib/directives/command.directive.d.ts +21 -1
- package/lib/interaction/components/editors/inline-string-editor/inline-editor-model.d.ts +4 -2
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from '@angular/cdk/overlay';
|
|
2
2
|
import { Injector } from '@angular/core';
|
|
3
|
-
import { BooleanValueModelChain, Constructable, DelegatingListModel, DependsOnOptions, Disposable, GarbageCollector, HasValue, ListModel, SelectionModel, Types, ValueModel } from '@coolon/pectin';
|
|
3
|
+
import { BooleanValueModelChain, Constructable, DelegatingListModel, DependsOnOptions, Disposable, GarbageCollector, HasValue, ListModel, OneTimeBinding, SelectionModel, Types, ValueModel } from '@coolon/pectin';
|
|
4
4
|
import { ColumnManager } from './column/column-manager';
|
|
5
5
|
import type { CellRendererOptions, ColumnModel, OnComponentInit } from './column/column-model';
|
|
6
6
|
import type { ColumnOrderManager } from './column/column-order-manager';
|
|
@@ -16,7 +16,9 @@ import type { CellRenderer } from './renderer/cell-renderer';
|
|
|
16
16
|
import type { MenuBuilder } from './renderer/table-action-column/menu-builder';
|
|
17
17
|
import { TableActionColumnComponent } from './renderer/table-action-column/table-action-column.component';
|
|
18
18
|
import type { TableCustomMoreMenuPopupComponent } from './renderer/table-custom-more-menu/table-custom-more-menu-popup.component';
|
|
19
|
-
export declare abstract class AbstractTableModel<Row extends object> extends GarbageCollector {
|
|
19
|
+
export declare abstract class AbstractTableModel<Row extends object> extends GarbageCollector implements OneTimeBinding {
|
|
20
|
+
/** A proxied table model is a one-time binding: it cannot be read before its input is set. */
|
|
21
|
+
readonly [OneTimeBinding.brand]: true;
|
|
20
22
|
protected readonly _dataSource$: DelegatingListModel<Row>;
|
|
21
23
|
protected readonly _filteredRows$: DelegatingListModel<Row>;
|
|
22
24
|
protected readonly _visibleRows$: DelegatingListModel<Row>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Disposable, DisposedWith, GarbageCollector, ListModel, Predicate, ValueModel } from "@coolon/pectin";
|
|
1
|
+
import { Disposable, DisposedWith, GarbageCollector, ListModel, OneTimeBinding, Predicate, ValueModel } from "@coolon/pectin";
|
|
2
2
|
import type { TextSearchPredicate } from "./text-search-predicate";
|
|
3
|
-
export declare class TableFilterModel<Row> extends GarbageCollector {
|
|
3
|
+
export declare class TableFilterModel<Row> extends GarbageCollector implements OneTimeBinding {
|
|
4
|
+
/** A proxied table filter model is a one-time binding: it cannot be read before its input is set. */
|
|
5
|
+
readonly [OneTimeBinding.brand]: true;
|
|
4
6
|
private readonly _source$;
|
|
5
7
|
private readonly _rowPredicate$;
|
|
6
8
|
private readonly _searchText$;
|
|
@@ -1,6 +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
|
+
import { OneTimeBinding, ValueModel } from "@coolon/pectin";
|
|
4
4
|
declare class RowClass {
|
|
5
5
|
readonly className: string;
|
|
6
6
|
readonly matches: () => boolean;
|
|
@@ -50,7 +50,9 @@ export interface ResolvedFooterRow {
|
|
|
50
50
|
/** Live visibility gate set via {@link FooterRowModel.visibleWhile}; undefined ⇒ always visible. */
|
|
51
51
|
readonly visible$?: ValueModel<boolean | undefined>;
|
|
52
52
|
}
|
|
53
|
-
export declare abstract class FooterRowModel {
|
|
53
|
+
export declare abstract class FooterRowModel implements OneTimeBinding {
|
|
54
|
+
/** A proxied footer row model is a one-time binding: it cannot be read before its input is set. */
|
|
55
|
+
readonly [OneTimeBinding.brand]: true;
|
|
54
56
|
protected readonly _rowClasses: RowClass[];
|
|
55
57
|
protected _visible$?: ValueModel<boolean | undefined>;
|
|
56
58
|
/** The row's live visibility gate, if one was set via {@link visibleWhile}. */
|
|
@@ -32,6 +32,14 @@ import * as i0 from "@angular/core";
|
|
|
32
32
|
* </div>
|
|
33
33
|
* </aup-table>
|
|
34
34
|
*
|
|
35
|
+
* Nothing to show
|
|
36
|
+
* @example
|
|
37
|
+
* <aup-table [tableModel]="heroTableModel" [filterModel]="heroFilterModel">
|
|
38
|
+
* <aup-empty-state slot="empty"><p>No hero matches the search.</p></aup-empty-state>
|
|
39
|
+
* </aup-table>
|
|
40
|
+
* Content in the empty slot takes the body's place, header included, while the filters leave no row.
|
|
41
|
+
* The footer stays. A table with nothing in the slot shows its header over an empty body, as before.
|
|
42
|
+
*
|
|
35
43
|
* Styling
|
|
36
44
|
* @example
|
|
37
45
|
* // global settings
|
|
@@ -70,6 +78,7 @@ export declare class TableComponent<Row extends object> extends AbstractTableCom
|
|
|
70
78
|
accessor tableModel: TableModel<Row>;
|
|
71
79
|
accessor filterModel: TableFilterModel<Row>;
|
|
72
80
|
tableBody: TableBodyComponent<Row>;
|
|
81
|
+
private readonly emptyContent;
|
|
73
82
|
/**
|
|
74
83
|
* Set to true to scroll mode to classic or virtual (default). Virtual scrolll performs better for large data sets but clamps the row height. Classic scroll
|
|
75
84
|
* renders all rows but allows row heights to grow.
|
|
@@ -82,9 +91,15 @@ export declare class TableComponent<Row extends object> extends AbstractTableCom
|
|
|
82
91
|
constructor(injector: Injector);
|
|
83
92
|
ngOnInit(): void;
|
|
84
93
|
protected getModel(): AbstractTableModel<Row>;
|
|
94
|
+
/**
|
|
95
|
+
* True while the filters leave no row and the host gave content for the empty slot. A host that
|
|
96
|
+
* projects the slot behind an *ngIf adds or removes it at any time, so the slot is checked on each
|
|
97
|
+
* read rather than once.
|
|
98
|
+
*/
|
|
99
|
+
protected get showsEmptyContent(): boolean;
|
|
85
100
|
footerContentChanged($event: unknown): void;
|
|
86
101
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
|
|
87
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "aup-table", never, { "tableModel": { "alias": "tableModel"; "required": false; }; "filterModel": { "alias": "filterModel"; "required": false; }; "scrollMode$": { "alias": "scrollMode$"; "required": false; }; "scrollMode": { "alias": "scrollMode"; "required": false; }; }, {}, never, ["[footer], [slot=footer]"], false, never>;
|
|
102
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "aup-table", never, { "tableModel": { "alias": "tableModel"; "required": false; }; "filterModel": { "alias": "filterModel"; "required": false; }; "scrollMode$": { "alias": "scrollMode$"; "required": false; }; "scrollMode": { "alias": "scrollMode"; "required": false; }; }, {}, never, ["[empty], [slot=empty]", "[footer], [slot=footer]"], false, never>;
|
|
88
103
|
}
|
|
89
104
|
export declare namespace TableComponent {
|
|
90
105
|
type ScrollMode = Omit<TableBodyComponent.ScrollMode, 'none'>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { Disposable, DisposedWith, GarbageCollector, ListModel } from '@coolon/pectin';
|
|
2
|
-
export declare class TreeExpansionModel<T> extends GarbageCollector {
|
|
1
|
+
import { Disposable, DisposedWith, GarbageCollector, ListModel, OneTimeBinding } from '@coolon/pectin';
|
|
2
|
+
export declare class TreeExpansionModel<T> extends GarbageCollector implements OneTimeBinding {
|
|
3
|
+
/** A proxied tree expansion model is a one-time binding: it cannot be read before its input is set. */
|
|
4
|
+
readonly [OneTimeBinding.brand]: true;
|
|
3
5
|
private readonly _source$;
|
|
4
6
|
private readonly collapsedIds;
|
|
5
7
|
private readonly _isExpandedPredicate$;
|
|
@@ -3,11 +3,24 @@ import { MatButton } from '@angular/material/button';
|
|
|
3
3
|
import { MatMenu, MatMenuItem } from '@angular/material/menu';
|
|
4
4
|
import { Command, GarbageCollector, UnaryCommand } from '@coolon/pectin';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Binds an element to a command:
|
|
8
|
+
*
|
|
9
|
+
* 1. A click runs the command, with [commandParameter] for a UnaryCommand.
|
|
10
|
+
* 2. The element is disabled while the command is, Material buttons and menu items included.
|
|
11
|
+
* 3. The element is hidden while the command is invisible, as `aup-command` hides itself, so a
|
|
12
|
+
* `visibleWhile` gate hides the element without an `*ngIf` of its own. [hideWhenInvisible] false
|
|
13
|
+
* keeps it shown.
|
|
14
|
+
* 4. A click is kept from the element's ancestors, except a menu item's, whose menu closes on it.
|
|
15
|
+
*/
|
|
6
16
|
export declare class CommandDirective<P = any> extends GarbageCollector implements OnInit, OnDestroy, AfterViewInit {
|
|
7
17
|
private elementRef;
|
|
8
18
|
private readonly changeDetector;
|
|
9
19
|
private _command;
|
|
10
20
|
private _commandEnabled;
|
|
21
|
+
private _commandVisible;
|
|
22
|
+
/** The element's own inline display, put back when the command shows again. */
|
|
23
|
+
private displayWhenVisible?;
|
|
11
24
|
private matControl;
|
|
12
25
|
private isInPopupMenu;
|
|
13
26
|
set pectinCommand(command: Command<any> | UnaryCommand<P>);
|
|
@@ -17,12 +30,19 @@ export declare class CommandDirective<P = any> extends GarbageCollector implemen
|
|
|
17
30
|
set commandParameter(value: P);
|
|
18
31
|
get commandParameter(): P;
|
|
19
32
|
preventDefault: boolean;
|
|
33
|
+
/** False to keep the element shown, though disabled, while its command is invisible. */
|
|
34
|
+
hideWhenInvisible: boolean;
|
|
20
35
|
constructor(elementRef: ElementRef, changeDetector: ChangeDetectorRef, matButton: MatButton, matMenuItem: MatMenuItem, matMenu?: MatMenu);
|
|
21
36
|
ngOnInit(): void;
|
|
37
|
+
/**
|
|
38
|
+
* Hides the element with an inline `display: none`, which a component's own `display` rule cannot
|
|
39
|
+
* override as it can the `hidden` attribute.
|
|
40
|
+
*/
|
|
41
|
+
updateVisibleState(visible: boolean): void;
|
|
22
42
|
ngAfterViewInit(): void;
|
|
23
43
|
updateEnabledState(enabled: boolean): void;
|
|
24
44
|
ngOnDestroy(): void;
|
|
25
45
|
notifyClick($event: Event): void;
|
|
26
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<CommandDirective<any>, [null, null, { optional: true; host: true; }, { optional: true; host: true; }, { optional: true; }]>;
|
|
27
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CommandDirective<any>, "[pectinCommand]", never, { "pectinCommand": { "alias": "pectinCommand"; "required": false; }; "commandParameter": { "alias": "commandParameter"; "required": false; }; "preventDefault": { "alias": "preventDefault"; "required": false; }; }, {}, never, never, false, never>;
|
|
47
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CommandDirective<any>, "[pectinCommand]", never, { "pectinCommand": { "alias": "pectinCommand"; "required": false; }; "commandParameter": { "alias": "commandParameter"; "required": false; }; "preventDefault": { "alias": "preventDefault"; "required": false; }; "hideWhenInvisible": { "alias": "hideWhenInvisible"; "required": false; }; }, {}, never, never, false, never>;
|
|
28
48
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { GarbageCollector, ListModel, MutableValueModel, Validator, ValueModel } from '@coolon/pectin';
|
|
1
|
+
import { GarbageCollector, ListModel, MutableValueModel, OneTimeBinding, Validator, ValueModel } from '@coolon/pectin';
|
|
2
2
|
import type { HasValidators } from '@coolon/pectin';
|
|
3
3
|
import type { EditContext } from '../edit-context';
|
|
4
|
-
export declare class InlineEditorModel<T> extends GarbageCollector {
|
|
4
|
+
export declare class InlineEditorModel<T> extends GarbageCollector implements OneTimeBinding {
|
|
5
5
|
readonly valueModel: ValueModel<T>;
|
|
6
6
|
readonly saveCallback: InlineEditorModel.SaveCallback<T>;
|
|
7
|
+
/** A proxied inline editor model is a one-time binding: it cannot be read before its input is set. */
|
|
8
|
+
readonly [OneTimeBinding.brand]: true;
|
|
7
9
|
readonly editing: MutableValueModel<boolean>;
|
|
8
10
|
private readonly _validators;
|
|
9
11
|
private _editingEnabled;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coolon/angular-ui-powerups",
|
|
3
|
-
"version": "16.1.0-alpha.
|
|
3
|
+
"version": "16.1.0-alpha.323",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/animations": "^16.2.9",
|
|
6
6
|
"@angular/common": "^16.2.9",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@angular/platform-browser-dynamic": "^16.2.9",
|
|
13
13
|
"@angular/material-moment-adapter": "^16.2.10",
|
|
14
14
|
"@angular/router": "^16.2.9",
|
|
15
|
-
"@coolon/pectin": "^5.0.0-alpha.
|
|
15
|
+
"@coolon/pectin": "^5.0.0-alpha.147",
|
|
16
16
|
"fast-typescript-memoize": "^1.1.1",
|
|
17
17
|
"lodash-es": "^4.17.21",
|
|
18
18
|
"marked": "4.0.10",
|