@table-bro/angular-material 0.0.0-stage → 1.2.0
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/LICENSE +21 -0
- package/README.md +195 -2
- package/THIRD_PARTY_NOTICES.md +69 -0
- package/dist/table-bro.material.min.css +1 -0
- package/fesm2022/table-bro-angular-material.mjs +2142 -0
- package/fesm2022/table-bro-angular-material.mjs.map +1 -0
- package/package.json +65 -3
- package/styles/_table-bro.api.scss +3 -0
- package/styles/_table-bro.material.api.scss +5 -0
- package/styles/mixins/_text-ellipsis.scss +5 -0
- package/styles/mixins/_visually-hidden.scss +14 -0
- package/styles/skin/angular-material/_themes.scss +29 -0
- package/styles/skin/angular-material/_variables.scss +81 -0
- package/styles/skin/angular-material/components/_shadows.scss +7 -0
- package/styles/skin/angular-material/table-bro/_filter-drawer.scss +111 -0
- package/styles/skin/angular-material/table-bro/_paginator.scss +12 -0
- package/styles/skin/angular-material/table-bro/_progress-bar.scss +7 -0
- package/styles/skin/angular-material/table-bro/_slide-toggle.scss +5 -0
- package/styles/skin/angular-material/table-bro/_sort-header.scss +12 -0
- package/styles/skin/angular-material/table-bro/_table.scss +68 -0
- package/styles/skin/angular-material/table-bro/_text-ellipsis.scss +8 -0
- package/styles/skin/angular-material/table-bro/_toolbar-search.scss +27 -0
- package/styles/skin/angular-material/table-bro/_toolbar.scss +14 -0
- package/styles/skin/shared/_variables.scss +94 -0
- package/styles/skin/shared/mixins/_custom-properties.scss +39 -0
- package/styles/skin/shared/mixins/_progress-bar.scss +27 -0
- package/styles/skin/shared/mixins/_shared.scss +79 -0
- package/styles/skin/shared/mixins/_skin-colors.scss +64 -0
- package/styles/skin/shared/mixins/_slide-toggle.scss +5 -0
- package/styles/skin/shared/mixins/_sort-header.scss +11 -0
- package/styles/skin/shared/mixins/_toolbar.scss +61 -0
- package/styles/skin/shared/table-bro/_details.scss +11 -0
- package/styles/skin/shared/table-bro/_filter-drawer.scss +62 -0
- package/styles/skin/shared/table-bro/_shadows.scss +19 -0
- package/styles/skin/shared/table-bro/_state.scss +38 -0
- package/styles/skin/shared/table-bro/_table.scss +70 -0
- package/styles/skin/shared/table-bro/_text-ellipsis.scss +14 -0
- package/styles/table-bro.material.scss +80 -0
- package/types/table-bro-angular-material.d.ts +523 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// The Angular Material skin: @use prints its CSS. The variables and mixins of the skin without the CSS: table-bro.material.api
|
|
2
|
+
@forward "./table-bro.material.api";
|
|
3
|
+
@use "./skin/angular-material/variables" as *;
|
|
4
|
+
@use "sass:meta";
|
|
5
|
+
|
|
6
|
+
/* Mixins */
|
|
7
|
+
@use "./skin/shared/mixins/custom-properties" as *;
|
|
8
|
+
@use "./skin/shared/mixins/shared" as *;
|
|
9
|
+
|
|
10
|
+
@use "./skin/shared/table-bro/details" as shared-details;
|
|
11
|
+
@use "./skin/shared/table-bro/filter-drawer" as shared-filter-drawer;
|
|
12
|
+
@use "./skin/shared/table-bro/shadows" as shared-shadows;
|
|
13
|
+
@use "./skin/shared/table-bro/state" as shared-state;
|
|
14
|
+
@use "./skin/shared/table-bro/table" as shared-table;
|
|
15
|
+
@use "./skin/shared/table-bro/text-ellipsis" as shared-text-ellipsis;
|
|
16
|
+
@use "./skin/angular-material/components/shadows" as mat-shadows;
|
|
17
|
+
@use "./skin/angular-material/table-bro/filter-drawer" as mat-filter-drawer;
|
|
18
|
+
@use "./skin/angular-material/table-bro/paginator" as mat-paginator;
|
|
19
|
+
@use "./skin/angular-material/table-bro/progress-bar" as mat-progress-bar;
|
|
20
|
+
@use "./skin/angular-material/table-bro/slide-toggle" as mat-slide-toggle;
|
|
21
|
+
@use "./skin/angular-material/table-bro/sort-header" as mat-sort-header;
|
|
22
|
+
@use "./skin/angular-material/table-bro/table" as mat-table;
|
|
23
|
+
@use "./skin/angular-material/table-bro/text-ellipsis" as mat-text-ellipsis;
|
|
24
|
+
@use "./skin/angular-material/table-bro/toolbar" as mat-toolbar;
|
|
25
|
+
@use "./skin/angular-material/table-bro/toolbar-search" as mat-toolbar-search;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/* Shared */
|
|
29
|
+
#{$bro-skin} {
|
|
30
|
+
@include shared-details.styles;
|
|
31
|
+
@include shared-filter-drawer.styles;
|
|
32
|
+
@include shared-shadows.styles;
|
|
33
|
+
@include shared-state.styles;
|
|
34
|
+
@include shared-table.styles;
|
|
35
|
+
@include shared-text-ellipsis.styles;
|
|
36
|
+
|
|
37
|
+
// The tags of the skin in a cell
|
|
38
|
+
@include bro-cell-items('bro-mat-tags .mdc-evolution-chip-set__chips', 'mat-chip', '.mdc-evolution-chip__text-label');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
/* Angular Material components */
|
|
43
|
+
#{$bro-skin} {
|
|
44
|
+
@include mat-shadows.styles;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Angular Material extensions */
|
|
48
|
+
// No Angular Material extensions yet
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/* Table-bro extensions */
|
|
52
|
+
#{$bro-skin} {
|
|
53
|
+
@include mat-filter-drawer.styles;
|
|
54
|
+
@include mat-paginator.styles;
|
|
55
|
+
@include mat-progress-bar.styles;
|
|
56
|
+
@include mat-slide-toggle.styles;
|
|
57
|
+
@include mat-sort-header.styles;
|
|
58
|
+
@include mat-table.styles;
|
|
59
|
+
@include mat-text-ellipsis.styles;
|
|
60
|
+
@include mat-toolbar.styles;
|
|
61
|
+
@include mat-toolbar-search.styles;
|
|
62
|
+
}
|
|
63
|
+
@include meta.load-css("./skin/angular-material/themes");
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
#{$bro-skin} {
|
|
67
|
+
@include bro-table-shadow-container();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/* The sizes and timings for the table script; :where() lets a plain table-bro selector override them */
|
|
72
|
+
:where(#{$bro-skin}) {
|
|
73
|
+
@include bro-skin-custom-properties();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* A prerendered table (data-bro-prerender of prerenderTableBro) takes them in the critical CSS of its page too, as
|
|
77
|
+
Beasties writes it: it drops a selector of :where() alone, which nothing is left of without the pseudo-class */
|
|
78
|
+
table-bro:where([data-bro-prerender]#{$bro-skin}) {
|
|
79
|
+
@include bro-skin-custom-properties();
|
|
80
|
+
}
|
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { EnvironmentProviders, Type } from "@angular/core";
|
|
3
|
+
import { BroActionDetail, BroButton, BroCol, BroColDataType, BroColSort, BroConfig, BroDropdown, BroEmptyState, BroFilters, BroQuery, BroResolvedConfig, BroRow, BroUserTheme } from "@table-bro/core";
|
|
4
|
+
import { Sort, SortDirection, SortHeaderArrowPosition } from "@angular/material/sort";
|
|
5
|
+
import { MatDrawerMode } from "@angular/material/sidenav";
|
|
6
|
+
import { BroServerFacade } from "@table-bro/angular";
|
|
7
|
+
export declare const matSkinConfig: {
|
|
8
|
+
css: {
|
|
9
|
+
table: {
|
|
10
|
+
className: string;
|
|
11
|
+
thead: {
|
|
12
|
+
tr: {
|
|
13
|
+
className: string;
|
|
14
|
+
th: {
|
|
15
|
+
className: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
tbody: {
|
|
20
|
+
tr: {
|
|
21
|
+
className: string;
|
|
22
|
+
td: {
|
|
23
|
+
className: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
shadow: {
|
|
29
|
+
className: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
components: {
|
|
33
|
+
button: {
|
|
34
|
+
selector: string;
|
|
35
|
+
iconSelector: string;
|
|
36
|
+
beforeRender: (element: Element, value: string) => void;
|
|
37
|
+
};
|
|
38
|
+
filterDrawer: {};
|
|
39
|
+
fontIcon: {
|
|
40
|
+
html: (materialIcon: string) => string;
|
|
41
|
+
};
|
|
42
|
+
paginator: {
|
|
43
|
+
selector: string;
|
|
44
|
+
inputsAsProperties: true;
|
|
45
|
+
recreateOnReplaceRows: true;
|
|
46
|
+
};
|
|
47
|
+
progressBar: {
|
|
48
|
+
selector: string;
|
|
49
|
+
};
|
|
50
|
+
sortHeader: {
|
|
51
|
+
selector: string;
|
|
52
|
+
titleAsContent: true;
|
|
53
|
+
contentSelector: string;
|
|
54
|
+
};
|
|
55
|
+
state: {
|
|
56
|
+
fontIcon: true;
|
|
57
|
+
states: {
|
|
58
|
+
loading: [string, string];
|
|
59
|
+
'no-data': [string, string];
|
|
60
|
+
'not-found': [string, string];
|
|
61
|
+
fail: [string, string];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
switch: {
|
|
65
|
+
selector: string;
|
|
66
|
+
};
|
|
67
|
+
textEllipsis: {
|
|
68
|
+
selector: string;
|
|
69
|
+
};
|
|
70
|
+
toolbar: {
|
|
71
|
+
selector: string;
|
|
72
|
+
};
|
|
73
|
+
toolbarMain: {
|
|
74
|
+
selector: string;
|
|
75
|
+
};
|
|
76
|
+
toolbarSearch: {
|
|
77
|
+
beforeRender: (backButton: Element, clearButton: Element) => void;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
/** The button of the skin, the element bro-mat-button with the properties of BroButton. */
|
|
82
|
+
export declare class BroMaterialButtonComponent {
|
|
83
|
+
readonly buttonClassName: import("@angular/core").InputSignal<string | null | undefined>;
|
|
84
|
+
readonly buttonTitle: import("@angular/core").InputSignal<string>;
|
|
85
|
+
readonly eventType: import("@angular/core").InputSignal<string>;
|
|
86
|
+
readonly icon: import("@angular/core").InputSignal<string | undefined>;
|
|
87
|
+
/** The name of a button without a title: the table gives it as the attribute label, not aria-label on the element. */
|
|
88
|
+
readonly label: import("@angular/core").InputSignal<string | undefined>;
|
|
89
|
+
readonly action: import("@angular/core").OutputEmitterRef<string>;
|
|
90
|
+
onClickButton(): void;
|
|
91
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BroMaterialButtonComponent, never>;
|
|
92
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BroMaterialButtonComponent, "ng-component", never, {
|
|
93
|
+
"buttonClassName": {
|
|
94
|
+
"alias": "button-class";
|
|
95
|
+
"required": false;
|
|
96
|
+
"isSignal": true;
|
|
97
|
+
};
|
|
98
|
+
"buttonTitle": {
|
|
99
|
+
"alias": "button-title";
|
|
100
|
+
"required": false;
|
|
101
|
+
"isSignal": true;
|
|
102
|
+
};
|
|
103
|
+
"eventType": {
|
|
104
|
+
"alias": "event-type";
|
|
105
|
+
"required": false;
|
|
106
|
+
"isSignal": true;
|
|
107
|
+
};
|
|
108
|
+
"icon": {
|
|
109
|
+
"alias": "icon";
|
|
110
|
+
"required": false;
|
|
111
|
+
"isSignal": true;
|
|
112
|
+
};
|
|
113
|
+
"label": {
|
|
114
|
+
"alias": "label";
|
|
115
|
+
"required": false;
|
|
116
|
+
"isSignal": true;
|
|
117
|
+
};
|
|
118
|
+
}, {
|
|
119
|
+
"action": "action";
|
|
120
|
+
}, never, never, true, never>;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* A switch of a boolean of a cell. A change sends the action of the attribute name in the output action, which the
|
|
124
|
+
* table turns into bro-action with the column and the row (event: 'action' of the column); the title of the column
|
|
125
|
+
* names the switch for screen readers.
|
|
126
|
+
*/
|
|
127
|
+
export declare class BroMaterialSlideToggleComponent<T extends object = BroRow> {
|
|
128
|
+
readonly col: import("@angular/core").InputSignal<BroCol<T> | undefined>;
|
|
129
|
+
readonly row: import("@angular/core").InputSignal<T | undefined>;
|
|
130
|
+
/** The action of a change. */
|
|
131
|
+
readonly name: import("@angular/core").InputSignal<string | undefined>;
|
|
132
|
+
readonly action: import("@angular/core").OutputEmitterRef<string>;
|
|
133
|
+
/** The value of the field of the column in the row. */
|
|
134
|
+
readonly checked: import("@angular/core").Signal<boolean>;
|
|
135
|
+
onChange(): void;
|
|
136
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BroMaterialSlideToggleComponent<any>, never>;
|
|
137
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BroMaterialSlideToggleComponent<any>, "ng-component", never, {
|
|
138
|
+
"col": {
|
|
139
|
+
"alias": "col";
|
|
140
|
+
"required": false;
|
|
141
|
+
"isSignal": true;
|
|
142
|
+
};
|
|
143
|
+
"row": {
|
|
144
|
+
"alias": "row";
|
|
145
|
+
"required": false;
|
|
146
|
+
"isSignal": true;
|
|
147
|
+
};
|
|
148
|
+
"name": {
|
|
149
|
+
"alias": "name";
|
|
150
|
+
"required": false;
|
|
151
|
+
"isSignal": true;
|
|
152
|
+
};
|
|
153
|
+
}, {
|
|
154
|
+
"action": "action";
|
|
155
|
+
}, never, never, true, never>;
|
|
156
|
+
}
|
|
157
|
+
/** The sort header of a column, the element bro-mat-sort-header with the properties of BroSortHeader. */
|
|
158
|
+
export declare class BroMaterialSortHeaderComponent {
|
|
159
|
+
/** The active sort of the table: a sort of another column resets the arrow of this header. */
|
|
160
|
+
readonly activeSort: import("@angular/core").InputSignal<BroColSort<import("@table-bro/core").BroRow> | undefined>;
|
|
161
|
+
readonly arrowPosition: import("@angular/core").InputSignal<SortHeaderArrowPosition>;
|
|
162
|
+
readonly dataType: import("@angular/core").InputSignal<BroColDataType | undefined>;
|
|
163
|
+
readonly headerTitle: import("@angular/core").InputSignal<string>;
|
|
164
|
+
readonly sortId: import("@angular/core").InputSignal<string>;
|
|
165
|
+
readonly tooltip: import("@angular/core").InputSignal<string>;
|
|
166
|
+
/** The key of the column, or an own one of the header. */
|
|
167
|
+
readonly id: import("@angular/core").Signal<string>;
|
|
168
|
+
readonly matSortDirection: import("@angular/core").WritableSignal<SortDirection>;
|
|
169
|
+
private readonly elementRef;
|
|
170
|
+
private readonly sortHeader;
|
|
171
|
+
private sortedDirection;
|
|
172
|
+
constructor();
|
|
173
|
+
onSort(event: Sort): void;
|
|
174
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BroMaterialSortHeaderComponent, never>;
|
|
175
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BroMaterialSortHeaderComponent, "ng-component", never, {
|
|
176
|
+
"activeSort": {
|
|
177
|
+
"alias": "activeSort";
|
|
178
|
+
"required": false;
|
|
179
|
+
"isSignal": true;
|
|
180
|
+
};
|
|
181
|
+
"arrowPosition": {
|
|
182
|
+
"alias": "arrow-position";
|
|
183
|
+
"required": false;
|
|
184
|
+
"isSignal": true;
|
|
185
|
+
};
|
|
186
|
+
"dataType": {
|
|
187
|
+
"alias": "data-type";
|
|
188
|
+
"required": false;
|
|
189
|
+
"isSignal": true;
|
|
190
|
+
};
|
|
191
|
+
"headerTitle": {
|
|
192
|
+
"alias": "header-title";
|
|
193
|
+
"required": false;
|
|
194
|
+
"isSignal": true;
|
|
195
|
+
};
|
|
196
|
+
"sortId": {
|
|
197
|
+
"alias": "sort-id";
|
|
198
|
+
"required": false;
|
|
199
|
+
"isSignal": true;
|
|
200
|
+
};
|
|
201
|
+
"tooltip": {
|
|
202
|
+
"alias": "tooltip";
|
|
203
|
+
"required": false;
|
|
204
|
+
"isSignal": true;
|
|
205
|
+
};
|
|
206
|
+
}, {}, never, ["*"], true, never>;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The texts of the tags of the skin mat, which withTags({texts}) sets and the application changes at any time, as when
|
|
210
|
+
* the language of the page changes: the chips in the DOM take them at once.
|
|
211
|
+
*/
|
|
212
|
+
export declare class TableBroMatTagsTexts {
|
|
213
|
+
/** The text of a cell of tags without items; without it the tags take the deprecated texts.noItems of the table, or No data. */
|
|
214
|
+
readonly empty: import("@angular/core").WritableSignal<string | undefined>;
|
|
215
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableBroMatTagsTexts, never>;
|
|
216
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
217
|
+
}
|
|
218
|
+
/** The tags of a cell: the items of the field of the column, as the chips of Material. */
|
|
219
|
+
export declare class BroMaterialTagsComponent {
|
|
220
|
+
readonly col: import("@angular/core").InputSignal<BroCol<BroRow> | undefined>;
|
|
221
|
+
readonly row: import("@angular/core").InputSignal<BroRow | undefined>;
|
|
222
|
+
/** The config of the table, which the table gives the elements of its cells: the text of a cell without items. */
|
|
223
|
+
readonly config: import("@angular/core").InputSignal<BroResolvedConfig | undefined>;
|
|
224
|
+
/** The items of the field of the column in the row. */
|
|
225
|
+
readonly chipList: import("@angular/core").Signal<string[]>;
|
|
226
|
+
private readonly elementRef;
|
|
227
|
+
private readonly texts;
|
|
228
|
+
/** Stops fitting the chips into the line when the component goes. */
|
|
229
|
+
private readonly fitting;
|
|
230
|
+
constructor();
|
|
231
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BroMaterialTagsComponent, never>;
|
|
232
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BroMaterialTagsComponent, "ng-component", never, {
|
|
233
|
+
"col": {
|
|
234
|
+
"alias": "col";
|
|
235
|
+
"required": false;
|
|
236
|
+
"isSignal": true;
|
|
237
|
+
};
|
|
238
|
+
"row": {
|
|
239
|
+
"alias": "row";
|
|
240
|
+
"required": false;
|
|
241
|
+
"isSignal": true;
|
|
242
|
+
};
|
|
243
|
+
"config": {
|
|
244
|
+
"alias": "config";
|
|
245
|
+
"required": false;
|
|
246
|
+
"isSignal": true;
|
|
247
|
+
};
|
|
248
|
+
}, {}, never, never, true, never>;
|
|
249
|
+
}
|
|
250
|
+
/** A value wider than its column, with the whole value in a tooltip: the element bro-mat-text-ellipsis of BroTextEllipsis. */
|
|
251
|
+
export declare class BroMaterialTextEllipsisComponent {
|
|
252
|
+
/** The column of the cell: with html: true the value is markup. */
|
|
253
|
+
readonly col: import("@angular/core").InputSignal<BroCol<import("@table-bro/core").BroRow> | undefined>;
|
|
254
|
+
readonly containerClassName: import("@angular/core").InputSignal<string | null>;
|
|
255
|
+
readonly value: import("@angular/core").InputSignal<string>;
|
|
256
|
+
/** The text of the value: the text of the markup of an HTML value. */
|
|
257
|
+
readonly tooltip: import("@angular/core").Signal<string>;
|
|
258
|
+
readonly tableCellTextEllipsisContainer: string;
|
|
259
|
+
readonly tableCellTextEllipsis: string;
|
|
260
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BroMaterialTextEllipsisComponent, never>;
|
|
261
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BroMaterialTextEllipsisComponent, "ng-component", never, {
|
|
262
|
+
"col": {
|
|
263
|
+
"alias": "col";
|
|
264
|
+
"required": false;
|
|
265
|
+
"isSignal": true;
|
|
266
|
+
};
|
|
267
|
+
"containerClassName": {
|
|
268
|
+
"alias": "container-class";
|
|
269
|
+
"required": false;
|
|
270
|
+
"isSignal": true;
|
|
271
|
+
};
|
|
272
|
+
"value": {
|
|
273
|
+
"alias": "value";
|
|
274
|
+
"required": false;
|
|
275
|
+
"isSignal": true;
|
|
276
|
+
};
|
|
277
|
+
}, {}, never, never, true, never>;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* The table with the filter drawer of the mat skin: mat-drawer-container with <table-bro-ng> in its content and the filters
|
|
281
|
+
* of the application, the content of this component, in mat-drawer. It takes the inputs and gives the outputs
|
|
282
|
+
* of <table-bro-ng>. The Filters button of the table toolbar opens the drawer, any other button of the page calls toggle().
|
|
283
|
+
* Material opens the drawer and narrows the table in the side mode; the card of the skin in the drawer grows
|
|
284
|
+
* from its right edge. A table that would get narrower than its minimum width next to the drawer keeps its width:
|
|
285
|
+
* the drawer lies over it in the mode over, with the scrim of Material, as the modal side sheet of Material 3.
|
|
286
|
+
*/
|
|
287
|
+
export declare class TableBroFilterDrawerContainerNg<MODEL extends object> implements BroServerFacade<MODEL> {
|
|
288
|
+
cols: import("@angular/core").InputSignal<BroCol<MODEL>[]>;
|
|
289
|
+
rows: import("@angular/core").InputSignal<MODEL[] | null | undefined>;
|
|
290
|
+
conf: import("@angular/core").InputSignal<BroConfig<MODEL>>;
|
|
291
|
+
total: import("@angular/core").InputSignal<number | undefined>;
|
|
292
|
+
rowsToAppend: import("@angular/core").InputSignal<MODEL[] | undefined>;
|
|
293
|
+
loading: import("@angular/core").InputSignal<boolean>;
|
|
294
|
+
failed: import("@angular/core").InputSignal<boolean>;
|
|
295
|
+
filter: import("@angular/core").InputSignal<BroFilters<MODEL> | undefined>;
|
|
296
|
+
emptyState: import("@angular/core").InputSignal<BroEmptyState | undefined>;
|
|
297
|
+
tableId: import("@angular/core").InputSignal<string | undefined>;
|
|
298
|
+
theme: import("@angular/core").InputSignal<BroUserTheme | null | undefined>;
|
|
299
|
+
action: import("@angular/core").OutputEmitterRef<BroActionDetail<MODEL>>;
|
|
300
|
+
query: import("@angular/core").OutputEmitterRef<BroQuery<MODEL, object>>;
|
|
301
|
+
/** Whether the drawer is opened; [(opened)] binds it both ways. */
|
|
302
|
+
opened: import("@angular/core").ModelSignal<boolean>;
|
|
303
|
+
/**
|
|
304
|
+
* The mode of mat-drawer: side, by default, narrows the content, and the drawer lies over a table that would get
|
|
305
|
+
* narrower than its minimum width; over lies over the table always, with the scrim of Material; push as in Material.
|
|
306
|
+
*/
|
|
307
|
+
mode: import("@angular/core").InputSignal<MatDrawerMode>;
|
|
308
|
+
/** The drawer lies over a table that would not keep its minimum width next to it. */
|
|
309
|
+
protected over: import("@angular/core").WritableSignal<boolean>;
|
|
310
|
+
protected drawerMode: import("@angular/core").Signal<MatDrawerMode>;
|
|
311
|
+
/** With shadows the table lets them into its margins and takes the full width; the card has the shadow too. */
|
|
312
|
+
protected shadowsEnabled: import("@angular/core").Signal<boolean>;
|
|
313
|
+
/** The class of the shadow of the skin config, as the card of the drawer of the core takes it. */
|
|
314
|
+
protected shadowClassName: import("@angular/core").Signal<string>;
|
|
315
|
+
/** The texts of the config of the table: the title of the drawer and the name of its close button. */
|
|
316
|
+
protected texts: import("@angular/core").Signal<import("@table-bro/core").BroTexts>;
|
|
317
|
+
/** The host of the table has the class of the dark theme: the container takes it too, as the drawer of the core does. */
|
|
318
|
+
protected dark: import("@angular/core").WritableSignal<boolean>;
|
|
319
|
+
/** The host of the table has the class of its own light theme: the container stays light under a dark ancestor too. */
|
|
320
|
+
protected light: import("@angular/core").WritableSignal<boolean>;
|
|
321
|
+
private focusMonitor;
|
|
322
|
+
private host;
|
|
323
|
+
private inputModality;
|
|
324
|
+
private container;
|
|
325
|
+
private content;
|
|
326
|
+
private drawer;
|
|
327
|
+
private drawerElement;
|
|
328
|
+
/** The last click in the component: while the page dispatches it, the control that it reached sends its action. */
|
|
329
|
+
private lastClick;
|
|
330
|
+
/** The button that opened the drawer, as the Filters button of the table: the focus goes back to it. */
|
|
331
|
+
private opener;
|
|
332
|
+
constructor();
|
|
333
|
+
toggle(): void;
|
|
334
|
+
/** The Filters button of the table toolbar opens the drawer; every action goes on to the page. */
|
|
335
|
+
protected onTableAction(event: BroActionDetail<MODEL>): void;
|
|
336
|
+
/**
|
|
337
|
+
* Opens or closes the drawer and narrows the content in the same frame. Material narrows it on transitionrun
|
|
338
|
+
* of the drawer, a frame later, so the space between the table and the card would change while they move.
|
|
339
|
+
*/
|
|
340
|
+
protected setOpened(opened: boolean): void;
|
|
341
|
+
/**
|
|
342
|
+
* A click on the scrim of the mode over: Material closes the drawer right after it tells it, and gives the focus to the
|
|
343
|
+
* element that had it before the drawer opened, in Safari the page; then the focus goes back to the button.
|
|
344
|
+
*/
|
|
345
|
+
protected onBackdropClick(): void;
|
|
346
|
+
/**
|
|
347
|
+
* The focus in the closing drawer goes back to the button that opened it, as from the drawer of the core: Material keeps
|
|
348
|
+
* it in the drawer of the side mode. A click that closes the drawer gives back also the focus that Safari, which focuses
|
|
349
|
+
* no button by a click, lost to the page; a later start of the closing leaves it to the page, which may have moved it
|
|
350
|
+
* since. The Filters button that opens the drawer takes the focus from the page the same way. The focus comes by
|
|
351
|
+
* the last input, as Material restores it: the button shows no focus after the pointer.
|
|
352
|
+
* @param fromPage - the focus on the page, not in an element, goes back too
|
|
353
|
+
*/
|
|
354
|
+
protected restoreFocus(fromPage: boolean): void;
|
|
355
|
+
/**
|
|
356
|
+
* Moves the opened drawer over the table when the table would get narrower than its minimum width next to it, and
|
|
357
|
+
* back next to it when it fits again: the table takes its new width at once, and the scrim of Material comes or goes
|
|
358
|
+
* by its transition; the drawer keeps its place at the right edge.
|
|
359
|
+
*/
|
|
360
|
+
private fitMode;
|
|
361
|
+
/** The table keeps at least its minimum width next to the opened drawer: the width of the drawer holds its space. */
|
|
362
|
+
private fitsNextToDrawer;
|
|
363
|
+
/**
|
|
364
|
+
* Gives the table at once the width it has at the end of the transition: the drawer has a fixed width, so the columns
|
|
365
|
+
* take their new widths right at the click and come with the table. In the side mode Material narrows the content
|
|
366
|
+
* by the width of the drawer; during a transition the content counts from its margin at this moment.
|
|
367
|
+
*/
|
|
368
|
+
private fitTableColumns;
|
|
369
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableBroFilterDrawerContainerNg<any>, never>;
|
|
370
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableBroFilterDrawerContainerNg<any>, "table-bro-filter-drawer-container-ng", never, {
|
|
371
|
+
"cols": {
|
|
372
|
+
"alias": "cols";
|
|
373
|
+
"required": true;
|
|
374
|
+
"isSignal": true;
|
|
375
|
+
};
|
|
376
|
+
"rows": {
|
|
377
|
+
"alias": "rows";
|
|
378
|
+
"required": true;
|
|
379
|
+
"isSignal": true;
|
|
380
|
+
};
|
|
381
|
+
"conf": {
|
|
382
|
+
"alias": "conf";
|
|
383
|
+
"required": true;
|
|
384
|
+
"isSignal": true;
|
|
385
|
+
};
|
|
386
|
+
"total": {
|
|
387
|
+
"alias": "total";
|
|
388
|
+
"required": false;
|
|
389
|
+
"isSignal": true;
|
|
390
|
+
};
|
|
391
|
+
"rowsToAppend": {
|
|
392
|
+
"alias": "rowsToAppend";
|
|
393
|
+
"required": false;
|
|
394
|
+
"isSignal": true;
|
|
395
|
+
};
|
|
396
|
+
"loading": {
|
|
397
|
+
"alias": "loading";
|
|
398
|
+
"required": false;
|
|
399
|
+
"isSignal": true;
|
|
400
|
+
};
|
|
401
|
+
"failed": {
|
|
402
|
+
"alias": "failed";
|
|
403
|
+
"required": false;
|
|
404
|
+
"isSignal": true;
|
|
405
|
+
};
|
|
406
|
+
"filter": {
|
|
407
|
+
"alias": "filter";
|
|
408
|
+
"required": false;
|
|
409
|
+
"isSignal": true;
|
|
410
|
+
};
|
|
411
|
+
"emptyState": {
|
|
412
|
+
"alias": "emptyState";
|
|
413
|
+
"required": false;
|
|
414
|
+
"isSignal": true;
|
|
415
|
+
};
|
|
416
|
+
"tableId": {
|
|
417
|
+
"alias": "tableId";
|
|
418
|
+
"required": false;
|
|
419
|
+
"isSignal": true;
|
|
420
|
+
};
|
|
421
|
+
"theme": {
|
|
422
|
+
"alias": "theme";
|
|
423
|
+
"required": false;
|
|
424
|
+
"isSignal": true;
|
|
425
|
+
};
|
|
426
|
+
"opened": {
|
|
427
|
+
"alias": "opened";
|
|
428
|
+
"required": false;
|
|
429
|
+
"isSignal": true;
|
|
430
|
+
};
|
|
431
|
+
"mode": {
|
|
432
|
+
"alias": "mode";
|
|
433
|
+
"required": false;
|
|
434
|
+
"isSignal": true;
|
|
435
|
+
};
|
|
436
|
+
}, {
|
|
437
|
+
"action": "action";
|
|
438
|
+
"query": "query";
|
|
439
|
+
"opened": "openedChange";
|
|
440
|
+
}, never, ["*"], true, never>;
|
|
441
|
+
}
|
|
442
|
+
/** The toolbar of a table: its title, its search and the buttons and the menu of the config. */
|
|
443
|
+
export declare class BroMaterialToolbarMainComponent {
|
|
444
|
+
/** The config of the table: the name of the search button. */
|
|
445
|
+
readonly config: import("@angular/core").InputSignal<BroResolvedConfig | undefined>;
|
|
446
|
+
readonly buttons: import("@angular/core").InputSignal<string>;
|
|
447
|
+
readonly title: import("@angular/core").InputSignal<string>;
|
|
448
|
+
readonly action: import("@angular/core").OutputEmitterRef<string>;
|
|
449
|
+
/** The buttons and the one menu of the config. */
|
|
450
|
+
private readonly toolbarButtons;
|
|
451
|
+
readonly mainButtons: import("@angular/core").Signal<BroButton[]>;
|
|
452
|
+
readonly dropdown: import("@angular/core").Signal<BroDropdown | undefined>;
|
|
453
|
+
onClickSearch(): void;
|
|
454
|
+
onClickButton(action: string): void;
|
|
455
|
+
/** The element of the menu sends the value of its item as the detail of its event action. */
|
|
456
|
+
onMenuAction(event: Event): void;
|
|
457
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BroMaterialToolbarMainComponent, never>;
|
|
458
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BroMaterialToolbarMainComponent, "ng-component", never, {
|
|
459
|
+
"config": {
|
|
460
|
+
"alias": "config";
|
|
461
|
+
"required": false;
|
|
462
|
+
"isSignal": true;
|
|
463
|
+
};
|
|
464
|
+
"buttons": {
|
|
465
|
+
"alias": "buttons";
|
|
466
|
+
"required": false;
|
|
467
|
+
"isSignal": true;
|
|
468
|
+
};
|
|
469
|
+
"title": {
|
|
470
|
+
"alias": "title";
|
|
471
|
+
"required": false;
|
|
472
|
+
"isSignal": true;
|
|
473
|
+
};
|
|
474
|
+
}, {
|
|
475
|
+
"action": "bro-toolbar";
|
|
476
|
+
}, never, never, true, never>;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* The menu of the toolbar, the element bro-mat-toolbar-more of withToolbarMenu(): a button with the title of the menu as
|
|
480
|
+
* its name, and the items that send their values.
|
|
481
|
+
*/
|
|
482
|
+
export declare class BroMaterialToolbarMoreComponent {
|
|
483
|
+
readonly dropdown: import("@angular/core").InputSignal<BroDropdown | undefined>;
|
|
484
|
+
readonly action: import("@angular/core").OutputEmitterRef<string>;
|
|
485
|
+
onClickButton(action: string | undefined): void;
|
|
486
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BroMaterialToolbarMoreComponent, never>;
|
|
487
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BroMaterialToolbarMoreComponent, "ng-component", never, {
|
|
488
|
+
"dropdown": {
|
|
489
|
+
"alias": "dropdown";
|
|
490
|
+
"required": false;
|
|
491
|
+
"isSignal": true;
|
|
492
|
+
};
|
|
493
|
+
}, {
|
|
494
|
+
"action": "action";
|
|
495
|
+
}, never, never, true, never>;
|
|
496
|
+
}
|
|
497
|
+
/** An optional element of the skin mat for provideTableBroMatSkin(): its tag and its component. */
|
|
498
|
+
export interface TableBroMatSkinFeature {
|
|
499
|
+
/** The tag of the element and its component. */
|
|
500
|
+
readonly elements: Record<string, Type<unknown>>;
|
|
501
|
+
/** Sets up the element when the application starts, in the injection context of the application. */
|
|
502
|
+
readonly init?: () => void;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Connects the skin mat: registers its config and defines its elements when the application starts. A feature adds
|
|
506
|
+
* an optional element, which only a table with a certain config uses, so a table without it does not carry its code.
|
|
507
|
+
* @param features - the optional elements: withTags(), withSwitch(), withToolbarMenu()
|
|
508
|
+
*/
|
|
509
|
+
export declare function provideTableBroMatSkin(...features: TableBroMatSkinFeature[]): EnvironmentProviders;
|
|
510
|
+
/**
|
|
511
|
+
* The element bro-mat-tags: the items of a column as the chips of Material.
|
|
512
|
+
* @param options - the texts of the tags, as {texts: {empty: 'No tags'}}; TableBroMatTagsTexts changes them later
|
|
513
|
+
* @param options.texts - the texts of the tags
|
|
514
|
+
*/
|
|
515
|
+
export declare function withTags(options?: {
|
|
516
|
+
texts?: {
|
|
517
|
+
empty?: string;
|
|
518
|
+
};
|
|
519
|
+
}): TableBroMatSkinFeature;
|
|
520
|
+
/** The element bro-mat-slide-toggle: a boolean of a column as a slide toggle. */
|
|
521
|
+
export declare function withSwitch(): TableBroMatSkinFeature;
|
|
522
|
+
/** The menu of the toolbar: a button of toolbarMain.buttons with the mode navbar-dropdown. */
|
|
523
|
+
export declare function withToolbarMenu(): TableBroMatSkinFeature;
|