@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.
Files changed (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +195 -2
  3. package/THIRD_PARTY_NOTICES.md +69 -0
  4. package/dist/table-bro.material.min.css +1 -0
  5. package/fesm2022/table-bro-angular-material.mjs +2142 -0
  6. package/fesm2022/table-bro-angular-material.mjs.map +1 -0
  7. package/package.json +65 -3
  8. package/styles/_table-bro.api.scss +3 -0
  9. package/styles/_table-bro.material.api.scss +5 -0
  10. package/styles/mixins/_text-ellipsis.scss +5 -0
  11. package/styles/mixins/_visually-hidden.scss +14 -0
  12. package/styles/skin/angular-material/_themes.scss +29 -0
  13. package/styles/skin/angular-material/_variables.scss +81 -0
  14. package/styles/skin/angular-material/components/_shadows.scss +7 -0
  15. package/styles/skin/angular-material/table-bro/_filter-drawer.scss +111 -0
  16. package/styles/skin/angular-material/table-bro/_paginator.scss +12 -0
  17. package/styles/skin/angular-material/table-bro/_progress-bar.scss +7 -0
  18. package/styles/skin/angular-material/table-bro/_slide-toggle.scss +5 -0
  19. package/styles/skin/angular-material/table-bro/_sort-header.scss +12 -0
  20. package/styles/skin/angular-material/table-bro/_table.scss +68 -0
  21. package/styles/skin/angular-material/table-bro/_text-ellipsis.scss +8 -0
  22. package/styles/skin/angular-material/table-bro/_toolbar-search.scss +27 -0
  23. package/styles/skin/angular-material/table-bro/_toolbar.scss +14 -0
  24. package/styles/skin/shared/_variables.scss +94 -0
  25. package/styles/skin/shared/mixins/_custom-properties.scss +39 -0
  26. package/styles/skin/shared/mixins/_progress-bar.scss +27 -0
  27. package/styles/skin/shared/mixins/_shared.scss +79 -0
  28. package/styles/skin/shared/mixins/_skin-colors.scss +64 -0
  29. package/styles/skin/shared/mixins/_slide-toggle.scss +5 -0
  30. package/styles/skin/shared/mixins/_sort-header.scss +11 -0
  31. package/styles/skin/shared/mixins/_toolbar.scss +61 -0
  32. package/styles/skin/shared/table-bro/_details.scss +11 -0
  33. package/styles/skin/shared/table-bro/_filter-drawer.scss +62 -0
  34. package/styles/skin/shared/table-bro/_shadows.scss +19 -0
  35. package/styles/skin/shared/table-bro/_state.scss +38 -0
  36. package/styles/skin/shared/table-bro/_table.scss +70 -0
  37. package/styles/skin/shared/table-bro/_text-ellipsis.scss +14 -0
  38. package/styles/table-bro.material.scss +80 -0
  39. package/types/table-bro-angular-material.d.ts +523 -0
@@ -0,0 +1,2142 @@
1
+ import * as i0 from "@angular/core";
2
+ import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, EnvironmentInjector, Injectable, PLATFORM_ID, afterNextRender, computed, effect, inject, input, makeEnvironmentProviders, model, output, provideAppInitializer, signal, viewChild } from "@angular/core";
3
+ import { MatButton, MatIconButton } from "@angular/material/button";
4
+ import { MatIcon } from "@angular/material/icon";
5
+ import { MatSlideToggle } from "@angular/material/slide-toggle";
6
+ import { isPlatformBrowser } from "@angular/common";
7
+ import { MatSort, MatSortHeader } from "@angular/material/sort";
8
+ import { MatTooltip } from "@angular/material/tooltip";
9
+ import { BroHTML, broCellSelectors, dispatchAction, events, fitCellItems, isPrerendered, registerFilterDrawerProperties, registerSkin, resolveTexts } from "@table-bro/core";
10
+ import { MatChip, MatChipSet } from "@angular/material/chips";
11
+ import { FocusMonitor, InputModalityDetector } from "@angular/cdk/a11y";
12
+ import { MatDrawer, MatDrawerContainer, MatDrawerContent } from "@angular/material/sidenav";
13
+ import { MatToolbar } from "@angular/material/toolbar";
14
+ import { TABLE_BRO_ELEMENTS, TableBroNg } from "@table-bro/angular";
15
+ import { MatDivider } from "@angular/material/divider";
16
+ import { MatMenu, MatMenuItem, MatMenuTrigger } from "@angular/material/menu";
17
+ import { createCustomElement } from "@angular/elements";
18
+ import { MatPaginator } from "@angular/material/paginator";
19
+ import { MatProgressBar } from "@angular/material/progress-bar";
20
+ const matSkinConfig = {
21
+ css: {
22
+ table: {
23
+ className: "mat-table",
24
+ thead: { tr: {
25
+ className: "mat-header-row bro-header-row",
26
+ th: { className: "mat-header-cell bro-header-cell" }
27
+ } },
28
+ tbody: { tr: {
29
+ className: "mat-row bro-row",
30
+ td: { className: "mat-cell bro-cell" }
31
+ } }
32
+ },
33
+ shadow: { className: "mat-elevation-z16" }
34
+ },
35
+ components: {
36
+ button: {
37
+ selector: "bro-mat-button",
38
+ iconSelector: ".mat-icon",
39
+ beforeRender: (element, value) => {
40
+ element.setAttribute("button-title", value);
41
+ element.setAttribute("icon", "expand_more");
42
+ }
43
+ },
44
+ filterDrawer: {},
45
+ fontIcon: { html: (materialIcon) => `<span class="material-icons bro-state-icon" aria-hidden="true">${materialIcon}</span>` },
46
+ paginator: {
47
+ selector: "ng-mat-paginator",
48
+ inputsAsProperties: true,
49
+ recreateOnReplaceRows: true
50
+ },
51
+ progressBar: { selector: "ng-mat-progress-bar" },
52
+ sortHeader: {
53
+ selector: "bro-mat-sort-header",
54
+ titleAsContent: true,
55
+ contentSelector: ".mat-sort-header-content"
56
+ },
57
+ state: {
58
+ fontIcon: true,
59
+ states: {
60
+ loading: ["front_loader", "Loading"],
61
+ "no-data": ["heart_broken", "No data"],
62
+ "not-found": ["heart_broken", "No records found"],
63
+ fail: ["smart_toy", "Failed"]
64
+ }
65
+ },
66
+ switch: { selector: "bro-mat-slide-toggle" },
67
+ textEllipsis: { selector: "bro-mat-text-ellipsis" },
68
+ toolbar: { selector: "ng-mat-toolbar" },
69
+ toolbarMain: { selector: "bro-mat-toolbar-main" },
70
+ toolbarSearch: { beforeRender: (backButton, clearButton) => {
71
+ backButton.setAttribute("icon", "arrow_back");
72
+ clearButton.setAttribute("icon", "close");
73
+ } }
74
+ }
75
+ };
76
+ var BroMaterialButtonComponent = class BroMaterialButtonComponent {
77
+ constructor() {
78
+ this.buttonClassName = input(void 0, {
79
+ ...ngDevMode ? { debugName: "buttonClassName" } : /* istanbul ignore next */ {},
80
+ alias: "button-class"
81
+ });
82
+ this.buttonTitle = input("", {
83
+ ...ngDevMode ? { debugName: "buttonTitle" } : /* istanbul ignore next */ {},
84
+ alias: "button-title"
85
+ });
86
+ this.eventType = input("", {
87
+ ...ngDevMode ? { debugName: "eventType" } : /* istanbul ignore next */ {},
88
+ alias: "event-type"
89
+ });
90
+ this.icon = input(...ngDevMode ? [void 0, { debugName: "icon" }] : /* istanbul ignore next */ []);
91
+ this.label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
92
+ this.action = output();
93
+ }
94
+ onClickButton() {
95
+ this.action.emit(this.eventType());
96
+ }
97
+ static {
98
+ this.ɵfac = i0.ɵɵngDeclareFactory({
99
+ minVersion: "12.0.0",
100
+ version: "22.2.2",
101
+ ngImport: i0,
102
+ type: BroMaterialButtonComponent,
103
+ deps: [],
104
+ target: i0.ɵɵFactoryTarget.Component
105
+ });
106
+ }
107
+ static {
108
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
109
+ minVersion: "17.0.0",
110
+ version: "22.2.2",
111
+ type: BroMaterialButtonComponent,
112
+ isStandalone: true,
113
+ selector: "ng-component",
114
+ inputs: {
115
+ buttonClassName: {
116
+ classPropertyName: "buttonClassName",
117
+ publicName: "button-class",
118
+ isSignal: true,
119
+ isRequired: false,
120
+ transformFunction: null
121
+ },
122
+ buttonTitle: {
123
+ classPropertyName: "buttonTitle",
124
+ publicName: "button-title",
125
+ isSignal: true,
126
+ isRequired: false,
127
+ transformFunction: null
128
+ },
129
+ eventType: {
130
+ classPropertyName: "eventType",
131
+ publicName: "event-type",
132
+ isSignal: true,
133
+ isRequired: false,
134
+ transformFunction: null
135
+ },
136
+ icon: {
137
+ classPropertyName: "icon",
138
+ publicName: "icon",
139
+ isSignal: true,
140
+ isRequired: false,
141
+ transformFunction: null
142
+ },
143
+ label: {
144
+ classPropertyName: "label",
145
+ publicName: "label",
146
+ isSignal: true,
147
+ isRequired: false,
148
+ transformFunction: null
149
+ }
150
+ },
151
+ outputs: { action: "action" },
152
+ ngImport: i0,
153
+ template: `
154
+ @if (buttonTitle()) {
155
+ <button matButton
156
+ type="button" [class]="buttonClassName()"
157
+ [attr.aria-label]="label()"
158
+ (click)="onClickButton()">
159
+ @if (icon()) {
160
+ <mat-icon>{{ icon() }}</mat-icon>
161
+ }
162
+ {{ buttonTitle() }}
163
+ </button>
164
+ } @else if (icon()) {
165
+ <button matIconButton
166
+ type="button"
167
+ [class]="buttonClassName()"
168
+ [attr.aria-label]="label()"
169
+ (click)="onClickButton()">
170
+ <mat-icon>{{ icon() }}</mat-icon>
171
+ </button>
172
+ }`,
173
+ isInline: true,
174
+ dependencies: [
175
+ {
176
+ kind: "component",
177
+ type: MatButton,
178
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
179
+ inputs: ["matButton"],
180
+ exportAs: ["matButton", "matAnchor"]
181
+ },
182
+ {
183
+ kind: "component",
184
+ type: MatIcon,
185
+ selector: "mat-icon",
186
+ inputs: [
187
+ "color",
188
+ "inline",
189
+ "svgIcon",
190
+ "fontSet",
191
+ "fontIcon"
192
+ ],
193
+ exportAs: ["matIcon"]
194
+ },
195
+ {
196
+ kind: "component",
197
+ type: MatIconButton,
198
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
199
+ exportAs: ["matButton", "matAnchor"]
200
+ }
201
+ ],
202
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
203
+ });
204
+ }
205
+ };
206
+ i0.ɵɵngDeclareClassMetadata({
207
+ minVersion: "12.0.0",
208
+ version: "22.2.2",
209
+ ngImport: i0,
210
+ type: BroMaterialButtonComponent,
211
+ decorators: [{
212
+ type: Component,
213
+ args: [{
214
+ template: `
215
+ @if (buttonTitle()) {
216
+ <button matButton
217
+ type="button" [class]="buttonClassName()"
218
+ [attr.aria-label]="label()"
219
+ (click)="onClickButton()">
220
+ @if (icon()) {
221
+ <mat-icon>{{ icon() }}</mat-icon>
222
+ }
223
+ {{ buttonTitle() }}
224
+ </button>
225
+ } @else if (icon()) {
226
+ <button matIconButton
227
+ type="button"
228
+ [class]="buttonClassName()"
229
+ [attr.aria-label]="label()"
230
+ (click)="onClickButton()">
231
+ <mat-icon>{{ icon() }}</mat-icon>
232
+ </button>
233
+ }`,
234
+ changeDetection: ChangeDetectionStrategy.OnPush,
235
+ imports: [
236
+ MatButton,
237
+ MatIcon,
238
+ MatIconButton
239
+ ]
240
+ }]
241
+ }],
242
+ propDecorators: {
243
+ buttonClassName: [{
244
+ type: i0.Input,
245
+ args: [{
246
+ isSignal: true,
247
+ alias: "button-class",
248
+ required: false
249
+ }]
250
+ }],
251
+ buttonTitle: [{
252
+ type: i0.Input,
253
+ args: [{
254
+ isSignal: true,
255
+ alias: "button-title",
256
+ required: false
257
+ }]
258
+ }],
259
+ eventType: [{
260
+ type: i0.Input,
261
+ args: [{
262
+ isSignal: true,
263
+ alias: "event-type",
264
+ required: false
265
+ }]
266
+ }],
267
+ icon: [{
268
+ type: i0.Input,
269
+ args: [{
270
+ isSignal: true,
271
+ alias: "icon",
272
+ required: false
273
+ }]
274
+ }],
275
+ label: [{
276
+ type: i0.Input,
277
+ args: [{
278
+ isSignal: true,
279
+ alias: "label",
280
+ required: false
281
+ }]
282
+ }],
283
+ action: [{
284
+ type: i0.Output,
285
+ args: ["action"]
286
+ }]
287
+ }
288
+ });
289
+ var BroMaterialSlideToggleComponent = class BroMaterialSlideToggleComponent {
290
+ constructor() {
291
+ this.col = input(...ngDevMode ? [void 0, { debugName: "col" }] : /* istanbul ignore next */ []);
292
+ this.row = input(...ngDevMode ? [void 0, { debugName: "row" }] : /* istanbul ignore next */ []);
293
+ this.name = input(...ngDevMode ? [void 0, { debugName: "name" }] : /* istanbul ignore next */ []);
294
+ this.action = output();
295
+ this.checked = computed(() => {
296
+ const name = this.col()?.name;
297
+ return !!(name && this.row()?.[name]);
298
+ }, ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
299
+ }
300
+ onChange() {
301
+ const name = this.name();
302
+ if (name) this.action.emit(name);
303
+ }
304
+ static {
305
+ this.ɵfac = i0.ɵɵngDeclareFactory({
306
+ minVersion: "12.0.0",
307
+ version: "22.2.2",
308
+ ngImport: i0,
309
+ type: BroMaterialSlideToggleComponent,
310
+ deps: [],
311
+ target: i0.ɵɵFactoryTarget.Component
312
+ });
313
+ }
314
+ static {
315
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
316
+ minVersion: "17.1.0",
317
+ version: "22.2.2",
318
+ type: BroMaterialSlideToggleComponent,
319
+ isStandalone: true,
320
+ selector: "ng-component",
321
+ inputs: {
322
+ col: {
323
+ classPropertyName: "col",
324
+ publicName: "col",
325
+ isSignal: true,
326
+ isRequired: false,
327
+ transformFunction: null
328
+ },
329
+ row: {
330
+ classPropertyName: "row",
331
+ publicName: "row",
332
+ isSignal: true,
333
+ isRequired: false,
334
+ transformFunction: null
335
+ },
336
+ name: {
337
+ classPropertyName: "name",
338
+ publicName: "name",
339
+ isSignal: true,
340
+ isRequired: false,
341
+ transformFunction: null
342
+ }
343
+ },
344
+ outputs: { action: "action" },
345
+ ngImport: i0,
346
+ template: `
347
+ <mat-slide-toggle [hideIcon]="true" [checked]="checked()" [aria-label]="col()?.title ?? null" (change)="onChange()"></mat-slide-toggle>`,
348
+ isInline: true,
349
+ dependencies: [{
350
+ kind: "component",
351
+ type: MatSlideToggle,
352
+ selector: "mat-slide-toggle",
353
+ inputs: [
354
+ "name",
355
+ "id",
356
+ "labelPosition",
357
+ "aria-label",
358
+ "aria-labelledby",
359
+ "aria-describedby",
360
+ "required",
361
+ "color",
362
+ "disabled",
363
+ "fullWidth",
364
+ "disableRipple",
365
+ "tabIndex",
366
+ "checked",
367
+ "hideIcon",
368
+ "disabledInteractive"
369
+ ],
370
+ outputs: ["change", "toggleChange"],
371
+ exportAs: ["matSlideToggle"]
372
+ }],
373
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
374
+ });
375
+ }
376
+ };
377
+ i0.ɵɵngDeclareClassMetadata({
378
+ minVersion: "12.0.0",
379
+ version: "22.2.2",
380
+ ngImport: i0,
381
+ type: BroMaterialSlideToggleComponent,
382
+ decorators: [{
383
+ type: Component,
384
+ args: [{
385
+ template: `
386
+ <mat-slide-toggle [hideIcon]="true" [checked]="checked()" [aria-label]="col()?.title ?? null" (change)="onChange()"></mat-slide-toggle>`,
387
+ changeDetection: ChangeDetectionStrategy.OnPush,
388
+ imports: [MatSlideToggle]
389
+ }]
390
+ }],
391
+ propDecorators: {
392
+ col: [{
393
+ type: i0.Input,
394
+ args: [{
395
+ isSignal: true,
396
+ alias: "col",
397
+ required: false
398
+ }]
399
+ }],
400
+ row: [{
401
+ type: i0.Input,
402
+ args: [{
403
+ isSignal: true,
404
+ alias: "row",
405
+ required: false
406
+ }]
407
+ }],
408
+ name: [{
409
+ type: i0.Input,
410
+ args: [{
411
+ isSignal: true,
412
+ alias: "name",
413
+ required: false
414
+ }]
415
+ }],
416
+ action: [{
417
+ type: i0.Output,
418
+ args: ["action"]
419
+ }]
420
+ }
421
+ });
422
+ var BroMaterialSortHeaderComponent = class BroMaterialSortHeaderComponent {
423
+ constructor() {
424
+ this.activeSort = input(...ngDevMode ? [void 0, { debugName: "activeSort" }] : /* istanbul ignore next */ []);
425
+ this.arrowPosition = input("after", {
426
+ ...ngDevMode ? { debugName: "arrowPosition" } : /* istanbul ignore next */ {},
427
+ alias: "arrow-position"
428
+ });
429
+ this.dataType = input(void 0, {
430
+ ...ngDevMode ? { debugName: "dataType" } : /* istanbul ignore next */ {},
431
+ alias: "data-type"
432
+ });
433
+ this.headerTitle = input("", {
434
+ ...ngDevMode ? { debugName: "headerTitle" } : /* istanbul ignore next */ {},
435
+ alias: "header-title"
436
+ });
437
+ this.sortId = input("", {
438
+ ...ngDevMode ? { debugName: "sortId" } : /* istanbul ignore next */ {},
439
+ alias: "sort-id"
440
+ });
441
+ this.tooltip = input("", ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
442
+ this.id = computed(() => this.sortId() || `bro-${Math.random().toString(36).slice(2)}`, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
443
+ this.matSortDirection = signal("", ...ngDevMode ? [{ debugName: "matSortDirection" }] : /* istanbul ignore next */ []);
444
+ this.elementRef = inject(ElementRef);
445
+ this.sortHeader = viewChild(MatSortHeader, {
446
+ ...ngDevMode ? { debugName: "sortHeader" } : /* istanbul ignore next */ {},
447
+ read: ElementRef
448
+ });
449
+ this.sortedDirection = "";
450
+ effect(() => {
451
+ const sort = this.activeSort();
452
+ if (this.sortedDirection !== "" && sort?.sortKey !== this.id()) {
453
+ this.sortedDirection = "";
454
+ this.matSortDirection.set("");
455
+ }
456
+ });
457
+ const browser = isPlatformBrowser(inject(PLATFORM_ID));
458
+ effect((onCleanup) => {
459
+ const header = this.sortHeader()?.nativeElement;
460
+ if (!header) return;
461
+ if (!browser) {
462
+ header.removeAttribute("aria-sort");
463
+ return;
464
+ }
465
+ const observer = new MutationObserver(() => header.removeAttribute("aria-sort"));
466
+ header.removeAttribute("aria-sort");
467
+ observer.observe(header, {
468
+ attributes: true,
469
+ attributeFilter: ["aria-sort"]
470
+ });
471
+ onCleanup(() => observer.disconnect());
472
+ });
473
+ }
474
+ onSort(event) {
475
+ dispatchAction(this.elementRef.nativeElement, events.filtersSortEvent, {
476
+ sortKey: event.active,
477
+ sortDirection: event.direction || void 0
478
+ });
479
+ this.sortedDirection = event.direction;
480
+ this.matSortDirection.set(event.direction);
481
+ }
482
+ static {
483
+ this.ɵfac = i0.ɵɵngDeclareFactory({
484
+ minVersion: "12.0.0",
485
+ version: "22.2.2",
486
+ ngImport: i0,
487
+ type: BroMaterialSortHeaderComponent,
488
+ deps: [],
489
+ target: i0.ɵɵFactoryTarget.Component
490
+ });
491
+ }
492
+ static {
493
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
494
+ minVersion: "17.0.0",
495
+ version: "22.2.2",
496
+ type: BroMaterialSortHeaderComponent,
497
+ isStandalone: true,
498
+ selector: "ng-component",
499
+ inputs: {
500
+ activeSort: {
501
+ classPropertyName: "activeSort",
502
+ publicName: "activeSort",
503
+ isSignal: true,
504
+ isRequired: false,
505
+ transformFunction: null
506
+ },
507
+ arrowPosition: {
508
+ classPropertyName: "arrowPosition",
509
+ publicName: "arrow-position",
510
+ isSignal: true,
511
+ isRequired: false,
512
+ transformFunction: null
513
+ },
514
+ dataType: {
515
+ classPropertyName: "dataType",
516
+ publicName: "data-type",
517
+ isSignal: true,
518
+ isRequired: false,
519
+ transformFunction: null
520
+ },
521
+ headerTitle: {
522
+ classPropertyName: "headerTitle",
523
+ publicName: "header-title",
524
+ isSignal: true,
525
+ isRequired: false,
526
+ transformFunction: null
527
+ },
528
+ sortId: {
529
+ classPropertyName: "sortId",
530
+ publicName: "sort-id",
531
+ isSignal: true,
532
+ isRequired: false,
533
+ transformFunction: null
534
+ },
535
+ tooltip: {
536
+ classPropertyName: "tooltip",
537
+ publicName: "tooltip",
538
+ isSignal: true,
539
+ isRequired: false,
540
+ transformFunction: null
541
+ }
542
+ },
543
+ viewQueries: [{
544
+ propertyName: "sortHeader",
545
+ first: true,
546
+ predicate: MatSortHeader,
547
+ descendants: true,
548
+ read: ElementRef,
549
+ isSignal: true
550
+ }],
551
+ ngImport: i0,
552
+ template: `
553
+ @if (headerTitle()) {
554
+ <div matSort matSortStart="desc"
555
+ [matSortDirection]="matSortDirection()"
556
+ (matSortChange)="onSort($event)">
557
+ <div [mat-sort-header]="id()" matTooltipPosition="right"
558
+ [arrowPosition]="arrowPosition()" [matTooltip]="tooltip()">
559
+ <ng-content></ng-content>
560
+ </div>
561
+ </div>
562
+ }`,
563
+ isInline: true,
564
+ dependencies: [
565
+ {
566
+ kind: "directive",
567
+ type: MatSort,
568
+ selector: "[matSort]",
569
+ inputs: [
570
+ "matSortActive",
571
+ "matSortStart",
572
+ "matSortDirection",
573
+ "matSortDisableClear",
574
+ "matSortDisabled"
575
+ ],
576
+ outputs: ["matSortChange"],
577
+ exportAs: ["matSort"]
578
+ },
579
+ {
580
+ kind: "component",
581
+ type: MatSortHeader,
582
+ selector: "[mat-sort-header]",
583
+ inputs: [
584
+ "mat-sort-header",
585
+ "arrowPosition",
586
+ "start",
587
+ "disabled",
588
+ "sortActionDescription",
589
+ "disableClear"
590
+ ],
591
+ exportAs: ["matSortHeader"]
592
+ },
593
+ {
594
+ kind: "directive",
595
+ type: MatTooltip,
596
+ selector: "[matTooltip]",
597
+ inputs: [
598
+ "matTooltipPosition",
599
+ "matTooltipPositionAtOrigin",
600
+ "matTooltipDisabled",
601
+ "matTooltipShowDelay",
602
+ "matTooltipHideDelay",
603
+ "matTooltipTouchGestures",
604
+ "matTooltip",
605
+ "matTooltipClass"
606
+ ],
607
+ exportAs: ["matTooltip"]
608
+ }
609
+ ],
610
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
611
+ });
612
+ }
613
+ };
614
+ i0.ɵɵngDeclareClassMetadata({
615
+ minVersion: "12.0.0",
616
+ version: "22.2.2",
617
+ ngImport: i0,
618
+ type: BroMaterialSortHeaderComponent,
619
+ decorators: [{
620
+ type: Component,
621
+ args: [{
622
+ template: `
623
+ @if (headerTitle()) {
624
+ <div matSort matSortStart="desc"
625
+ [matSortDirection]="matSortDirection()"
626
+ (matSortChange)="onSort($event)">
627
+ <div [mat-sort-header]="id()" matTooltipPosition="right"
628
+ [arrowPosition]="arrowPosition()" [matTooltip]="tooltip()">
629
+ <ng-content></ng-content>
630
+ </div>
631
+ </div>
632
+ }`,
633
+ changeDetection: ChangeDetectionStrategy.OnPush,
634
+ imports: [
635
+ MatSort,
636
+ MatSortHeader,
637
+ MatTooltip
638
+ ]
639
+ }]
640
+ }],
641
+ ctorParameters: () => [],
642
+ propDecorators: {
643
+ activeSort: [{
644
+ type: i0.Input,
645
+ args: [{
646
+ isSignal: true,
647
+ alias: "activeSort",
648
+ required: false
649
+ }]
650
+ }],
651
+ arrowPosition: [{
652
+ type: i0.Input,
653
+ args: [{
654
+ isSignal: true,
655
+ alias: "arrow-position",
656
+ required: false
657
+ }]
658
+ }],
659
+ dataType: [{
660
+ type: i0.Input,
661
+ args: [{
662
+ isSignal: true,
663
+ alias: "data-type",
664
+ required: false
665
+ }]
666
+ }],
667
+ headerTitle: [{
668
+ type: i0.Input,
669
+ args: [{
670
+ isSignal: true,
671
+ alias: "header-title",
672
+ required: false
673
+ }]
674
+ }],
675
+ sortId: [{
676
+ type: i0.Input,
677
+ args: [{
678
+ isSignal: true,
679
+ alias: "sort-id",
680
+ required: false
681
+ }]
682
+ }],
683
+ tooltip: [{
684
+ type: i0.Input,
685
+ args: [{
686
+ isSignal: true,
687
+ alias: "tooltip",
688
+ required: false
689
+ }]
690
+ }],
691
+ sortHeader: [{
692
+ type: i0.ViewChild,
693
+ args: [i0.forwardRef(() => MatSortHeader), {
694
+ read: ElementRef,
695
+ isSignal: true
696
+ }]
697
+ }]
698
+ }
699
+ });
700
+ var TableBroMatTagsTexts = class TableBroMatTagsTexts {
701
+ constructor() {
702
+ this.empty = signal(void 0, ...ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []);
703
+ }
704
+ static {
705
+ this.ɵfac = i0.ɵɵngDeclareFactory({
706
+ minVersion: "12.0.0",
707
+ version: "22.2.2",
708
+ ngImport: i0,
709
+ type: TableBroMatTagsTexts,
710
+ deps: [],
711
+ target: i0.ɵɵFactoryTarget.Injectable
712
+ });
713
+ }
714
+ static {
715
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
716
+ minVersion: "12.0.0",
717
+ version: "22.2.2",
718
+ ngImport: i0,
719
+ type: TableBroMatTagsTexts,
720
+ providedIn: "root"
721
+ });
722
+ }
723
+ };
724
+ i0.ɵɵngDeclareClassMetadata({
725
+ minVersion: "12.0.0",
726
+ version: "22.2.2",
727
+ ngImport: i0,
728
+ type: TableBroMatTagsTexts,
729
+ decorators: [{
730
+ type: Injectable,
731
+ args: [{ providedIn: "root" }]
732
+ }]
733
+ });
734
+ var BroMaterialTagsComponent = class BroMaterialTagsComponent {
735
+ constructor() {
736
+ this.col = input(...ngDevMode ? [void 0, { debugName: "col" }] : /* istanbul ignore next */ []);
737
+ this.row = input(...ngDevMode ? [void 0, { debugName: "row" }] : /* istanbul ignore next */ []);
738
+ this.config = input(...ngDevMode ? [void 0, { debugName: "config" }] : /* istanbul ignore next */ []);
739
+ this.chipList = computed(() => {
740
+ const name = this.col()?.name;
741
+ const items = name && this.row()?.[name];
742
+ return Array.isArray(items) && items.length ? items : [this.texts.empty() ?? this.config()?.texts.noItems ?? "No data"];
743
+ }, ...ngDevMode ? [{ debugName: "chipList" }] : /* istanbul ignore next */ []);
744
+ this.elementRef = inject(ElementRef);
745
+ this.texts = inject(TableBroMatTagsTexts);
746
+ this.fitting = new AbortController();
747
+ afterNextRender(() => {
748
+ const chips = this.elementRef.nativeElement.querySelector(".mdc-evolution-chip-set__chips");
749
+ if (chips) fitCellItems(chips, this.fitting.signal);
750
+ });
751
+ inject(DestroyRef).onDestroy(() => this.fitting.abort());
752
+ }
753
+ static {
754
+ this.ɵfac = i0.ɵɵngDeclareFactory({
755
+ minVersion: "12.0.0",
756
+ version: "22.2.2",
757
+ ngImport: i0,
758
+ type: BroMaterialTagsComponent,
759
+ deps: [],
760
+ target: i0.ɵɵFactoryTarget.Component
761
+ });
762
+ }
763
+ static {
764
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
765
+ minVersion: "17.0.0",
766
+ version: "22.2.2",
767
+ type: BroMaterialTagsComponent,
768
+ isStandalone: true,
769
+ selector: "ng-component",
770
+ inputs: {
771
+ col: {
772
+ classPropertyName: "col",
773
+ publicName: "col",
774
+ isSignal: true,
775
+ isRequired: false,
776
+ transformFunction: null
777
+ },
778
+ row: {
779
+ classPropertyName: "row",
780
+ publicName: "row",
781
+ isSignal: true,
782
+ isRequired: false,
783
+ transformFunction: null
784
+ },
785
+ config: {
786
+ classPropertyName: "config",
787
+ publicName: "config",
788
+ isSignal: true,
789
+ isRequired: false,
790
+ transformFunction: null
791
+ }
792
+ },
793
+ ngImport: i0,
794
+ template: `
795
+ <mat-chip-set>
796
+ @for (chip of chipList(); track $index) {
797
+ <mat-chip>{{ chip }}</mat-chip>
798
+ }
799
+ </mat-chip-set>`,
800
+ isInline: true,
801
+ dependencies: [{
802
+ kind: "component",
803
+ type: MatChip,
804
+ selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]",
805
+ inputs: [
806
+ "role",
807
+ "id",
808
+ "aria-label",
809
+ "aria-description",
810
+ "value",
811
+ "color",
812
+ "removable",
813
+ "highlighted",
814
+ "disableRipple",
815
+ "disabled"
816
+ ],
817
+ outputs: ["removed", "destroyed"],
818
+ exportAs: ["matChip"]
819
+ }, {
820
+ kind: "component",
821
+ type: MatChipSet,
822
+ selector: "mat-chip-set",
823
+ inputs: [
824
+ "disabled",
825
+ "role",
826
+ "tabIndex"
827
+ ]
828
+ }],
829
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
830
+ });
831
+ }
832
+ };
833
+ i0.ɵɵngDeclareClassMetadata({
834
+ minVersion: "12.0.0",
835
+ version: "22.2.2",
836
+ ngImport: i0,
837
+ type: BroMaterialTagsComponent,
838
+ decorators: [{
839
+ type: Component,
840
+ args: [{
841
+ template: `
842
+ <mat-chip-set>
843
+ @for (chip of chipList(); track $index) {
844
+ <mat-chip>{{ chip }}</mat-chip>
845
+ }
846
+ </mat-chip-set>`,
847
+ changeDetection: ChangeDetectionStrategy.OnPush,
848
+ imports: [MatChip, MatChipSet]
849
+ }]
850
+ }],
851
+ ctorParameters: () => [],
852
+ propDecorators: {
853
+ col: [{
854
+ type: i0.Input,
855
+ args: [{
856
+ isSignal: true,
857
+ alias: "col",
858
+ required: false
859
+ }]
860
+ }],
861
+ row: [{
862
+ type: i0.Input,
863
+ args: [{
864
+ isSignal: true,
865
+ alias: "row",
866
+ required: false
867
+ }]
868
+ }],
869
+ config: [{
870
+ type: i0.Input,
871
+ args: [{
872
+ isSignal: true,
873
+ alias: "config",
874
+ required: false
875
+ }]
876
+ }]
877
+ }
878
+ });
879
+ var BroMaterialTextEllipsisComponent = class BroMaterialTextEllipsisComponent {
880
+ constructor() {
881
+ this.col = input(...ngDevMode ? [void 0, { debugName: "col" }] : /* istanbul ignore next */ []);
882
+ this.containerClassName = input(null, {
883
+ ...ngDevMode ? { debugName: "containerClassName" } : /* istanbul ignore next */ {},
884
+ alias: "container-class"
885
+ });
886
+ this.value = input("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
887
+ this.tooltip = computed(() => this.col()?.html ? BroHTML.text(this.value()) : this.value(), ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
888
+ this.tableCellTextEllipsisContainer = broCellSelectors.ellipsisContainer;
889
+ this.tableCellTextEllipsis = broCellSelectors.ellipsis;
890
+ }
891
+ static {
892
+ this.ɵfac = i0.ɵɵngDeclareFactory({
893
+ minVersion: "12.0.0",
894
+ version: "22.2.2",
895
+ ngImport: i0,
896
+ type: BroMaterialTextEllipsisComponent,
897
+ deps: [],
898
+ target: i0.ɵɵFactoryTarget.Component
899
+ });
900
+ }
901
+ static {
902
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
903
+ minVersion: "17.0.0",
904
+ version: "22.2.2",
905
+ type: BroMaterialTextEllipsisComponent,
906
+ isStandalone: true,
907
+ selector: "ng-component",
908
+ inputs: {
909
+ col: {
910
+ classPropertyName: "col",
911
+ publicName: "col",
912
+ isSignal: true,
913
+ isRequired: false,
914
+ transformFunction: null
915
+ },
916
+ containerClassName: {
917
+ classPropertyName: "containerClassName",
918
+ publicName: "container-class",
919
+ isSignal: true,
920
+ isRequired: false,
921
+ transformFunction: null
922
+ },
923
+ value: {
924
+ classPropertyName: "value",
925
+ publicName: "value",
926
+ isSignal: true,
927
+ isRequired: false,
928
+ transformFunction: null
929
+ }
930
+ },
931
+ ngImport: i0,
932
+ template: `
933
+ <span matTooltipPosition="above"
934
+ class="{{ tableCellTextEllipsisContainer }}{{ containerClassName() ? ' ' + containerClassName() : '' }}"
935
+ [matTooltip]="tooltip()">
936
+ @if (col()?.html) {
937
+ <span class="{{ tableCellTextEllipsis }}" [innerHTML]="value()"></span>
938
+ } @else {
939
+ <span class="{{ tableCellTextEllipsis }}">{{ value() }}</span>
940
+ }
941
+ </span>`,
942
+ isInline: true,
943
+ dependencies: [{
944
+ kind: "directive",
945
+ type: MatTooltip,
946
+ selector: "[matTooltip]",
947
+ inputs: [
948
+ "matTooltipPosition",
949
+ "matTooltipPositionAtOrigin",
950
+ "matTooltipDisabled",
951
+ "matTooltipShowDelay",
952
+ "matTooltipHideDelay",
953
+ "matTooltipTouchGestures",
954
+ "matTooltip",
955
+ "matTooltipClass"
956
+ ],
957
+ exportAs: ["matTooltip"]
958
+ }],
959
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
960
+ });
961
+ }
962
+ };
963
+ i0.ɵɵngDeclareClassMetadata({
964
+ minVersion: "12.0.0",
965
+ version: "22.2.2",
966
+ ngImport: i0,
967
+ type: BroMaterialTextEllipsisComponent,
968
+ decorators: [{
969
+ type: Component,
970
+ args: [{
971
+ template: `
972
+ <span matTooltipPosition="above"
973
+ class="{{ tableCellTextEllipsisContainer }}{{ containerClassName() ? ' ' + containerClassName() : '' }}"
974
+ [matTooltip]="tooltip()">
975
+ @if (col()?.html) {
976
+ <span class="{{ tableCellTextEllipsis }}" [innerHTML]="value()"></span>
977
+ } @else {
978
+ <span class="{{ tableCellTextEllipsis }}">{{ value() }}</span>
979
+ }
980
+ </span>`,
981
+ changeDetection: ChangeDetectionStrategy.OnPush,
982
+ imports: [MatTooltip]
983
+ }]
984
+ }],
985
+ propDecorators: {
986
+ col: [{
987
+ type: i0.Input,
988
+ args: [{
989
+ isSignal: true,
990
+ alias: "col",
991
+ required: false
992
+ }]
993
+ }],
994
+ containerClassName: [{
995
+ type: i0.Input,
996
+ args: [{
997
+ isSignal: true,
998
+ alias: "container-class",
999
+ required: false
1000
+ }]
1001
+ }],
1002
+ value: [{
1003
+ type: i0.Input,
1004
+ args: [{
1005
+ isSignal: true,
1006
+ alias: "value",
1007
+ required: false
1008
+ }]
1009
+ }]
1010
+ }
1011
+ });
1012
+ var TableBroFilterDrawerContainerNg = class TableBroFilterDrawerContainerNg {
1013
+ constructor() {
1014
+ this.cols = input.required(...ngDevMode ? [{ debugName: "cols" }] : /* istanbul ignore next */ []);
1015
+ this.rows = input.required(...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
1016
+ this.conf = input.required(...ngDevMode ? [{ debugName: "conf" }] : /* istanbul ignore next */ []);
1017
+ this.total = input(...ngDevMode ? [void 0, { debugName: "total" }] : /* istanbul ignore next */ []);
1018
+ this.rowsToAppend = input(...ngDevMode ? [void 0, { debugName: "rowsToAppend" }] : /* istanbul ignore next */ []);
1019
+ this.loading = input(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
1020
+ this.failed = input(false, ...ngDevMode ? [{ debugName: "failed" }] : /* istanbul ignore next */ []);
1021
+ this.filter = input(...ngDevMode ? [void 0, { debugName: "filter" }] : /* istanbul ignore next */ []);
1022
+ this.emptyState = input(...ngDevMode ? [void 0, { debugName: "emptyState" }] : /* istanbul ignore next */ []);
1023
+ this.tableId = input(...ngDevMode ? [void 0, { debugName: "tableId" }] : /* istanbul ignore next */ []);
1024
+ this.theme = input(...ngDevMode ? [void 0, { debugName: "theme" }] : /* istanbul ignore next */ []);
1025
+ this.action = output();
1026
+ this.query = output();
1027
+ this.opened = model(false, ...ngDevMode ? [{ debugName: "opened" }] : /* istanbul ignore next */ []);
1028
+ this.mode = input("side", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
1029
+ this.over = signal(false, ...ngDevMode ? [{ debugName: "over" }] : /* istanbul ignore next */ []);
1030
+ this.drawerMode = computed(() => this.over() ? "over" : this.mode(), ...ngDevMode ? [{ debugName: "drawerMode" }] : /* istanbul ignore next */ []);
1031
+ this.shadowsEnabled = computed(() => this.conf().shadowsEnabled !== false, ...ngDevMode ? [{ debugName: "shadowsEnabled" }] : /* istanbul ignore next */ []);
1032
+ this.shadowClassName = computed(() => this.shadowsEnabled() ? matSkinConfig.css.shadow.className : "", ...ngDevMode ? [{ debugName: "shadowClassName" }] : /* istanbul ignore next */ []);
1033
+ this.texts = computed(() => resolveTexts(this.conf().texts), ...ngDevMode ? [{ debugName: "texts" }] : /* istanbul ignore next */ []);
1034
+ this.dark = signal(false, ...ngDevMode ? [{ debugName: "dark" }] : /* istanbul ignore next */ []);
1035
+ this.light = signal(false, ...ngDevMode ? [{ debugName: "light" }] : /* istanbul ignore next */ []);
1036
+ this.focusMonitor = inject(FocusMonitor);
1037
+ this.host = inject(ElementRef);
1038
+ this.inputModality = inject(InputModalityDetector);
1039
+ this.container = viewChild.required(MatDrawerContainer, ...ngDevMode ? [{ debugName: "container" }] : /* istanbul ignore next */ []);
1040
+ this.content = viewChild.required(MatDrawerContent, {
1041
+ ...ngDevMode ? { debugName: "content" } : /* istanbul ignore next */ {},
1042
+ read: ElementRef
1043
+ });
1044
+ this.drawer = viewChild.required(MatDrawer, ...ngDevMode ? [{ debugName: "drawer" }] : /* istanbul ignore next */ []);
1045
+ this.drawerElement = viewChild.required(MatDrawer, {
1046
+ ...ngDevMode ? { debugName: "drawerElement" } : /* istanbul ignore next */ {},
1047
+ read: ElementRef
1048
+ });
1049
+ this.lastClick = null;
1050
+ this.opener = null;
1051
+ const destroyRef = inject(DestroyRef);
1052
+ registerFilterDrawerProperties();
1053
+ afterNextRender(() => {
1054
+ const resizeObserver = new ResizeObserver(() => this.fitMode());
1055
+ resizeObserver.observe(this.host.nativeElement);
1056
+ destroyRef.onDestroy(() => resizeObserver.disconnect());
1057
+ });
1058
+ afterNextRender(() => {
1059
+ this.host.nativeElement.addEventListener("click", (event) => {
1060
+ this.lastClick = event;
1061
+ }, true);
1062
+ });
1063
+ afterNextRender(() => {
1064
+ const table = this.content().nativeElement.querySelector("table-bro");
1065
+ if (!table) return;
1066
+ const readTheme = () => {
1067
+ this.dark.set(table.classList.contains("bro-dark-theme"));
1068
+ this.light.set(table.classList.contains("bro-light-theme"));
1069
+ };
1070
+ const themeObserver = new MutationObserver(readTheme);
1071
+ themeObserver.observe(table, {
1072
+ attributes: true,
1073
+ attributeFilter: ["class"]
1074
+ });
1075
+ destroyRef.onDestroy(() => themeObserver.disconnect());
1076
+ readTheme();
1077
+ });
1078
+ }
1079
+ toggle() {
1080
+ this.setOpened(!this.opened());
1081
+ }
1082
+ onTableAction(event) {
1083
+ if (event.action === events.filtersToggleEvent) {
1084
+ const opener = (this.lastClick && this.lastClick.eventPhase !== Event.NONE ? this.lastClick.target.closest("a[href], button") : null) ?? this.host.nativeElement.ownerDocument.activeElement;
1085
+ this.opener = opener && this.content().nativeElement.contains(opener) ? opener : this.opener;
1086
+ this.toggle();
1087
+ if (this.opened()) this.restoreFocus(true);
1088
+ }
1089
+ this.action.emit(event);
1090
+ }
1091
+ setOpened(opened) {
1092
+ if (opened && this.mode() === "side") {
1093
+ this.over.set(!this.fitsNextToDrawer());
1094
+ this.drawer().mode = this.drawerMode();
1095
+ }
1096
+ this.fitTableColumns(opened);
1097
+ this.opened.set(opened);
1098
+ this.drawer().toggle(opened);
1099
+ this.container().updateContentMargins();
1100
+ if (!opened) this.restoreFocus(true);
1101
+ }
1102
+ onBackdropClick() {
1103
+ queueMicrotask(() => this.restoreFocus(true));
1104
+ }
1105
+ restoreFocus(fromPage) {
1106
+ const focused = this.host.nativeElement.ownerDocument.activeElement;
1107
+ if (this.opener && (this.drawerElement().nativeElement.contains(focused) || fromPage && focused === this.host.nativeElement.ownerDocument.body)) {
1108
+ const origin = this.inputModality.mostRecentModality ?? "program";
1109
+ const options = origin === "mouse" || origin === "touch" ? {
1110
+ preventScroll: true,
1111
+ focusVisible: false
1112
+ } : { preventScroll: true };
1113
+ this.focusMonitor.focusVia(this.opener, origin, options);
1114
+ }
1115
+ }
1116
+ fitMode() {
1117
+ if (!this.opened() || this.mode() !== "side") return;
1118
+ const over = !this.fitsNextToDrawer();
1119
+ if (over === this.over()) return;
1120
+ this.over.set(over);
1121
+ this.drawer().mode = this.drawerMode();
1122
+ this.fitTableColumns(true);
1123
+ this.container().updateContentMargins();
1124
+ }
1125
+ fitsNextToDrawer() {
1126
+ const content = this.content().nativeElement;
1127
+ const table = content.querySelector("table-bro");
1128
+ if (!table) return true;
1129
+ const shadowRoom = this.shadowsEnabled() ? 0 : 2 * parseFloat(getComputedStyle(table).getPropertyValue("--bro-shadow-size"));
1130
+ return content.getBoundingClientRect().width + parseFloat(getComputedStyle(content).marginRight) - shadowRoom - this.drawerElement().nativeElement.offsetWidth >= parseFloat(getComputedStyle(table).getPropertyValue("--bro-table-min-width"));
1131
+ }
1132
+ fitTableColumns(opened) {
1133
+ const content = this.content().nativeElement;
1134
+ const table = content.querySelector("table-bro");
1135
+ if (!table) return;
1136
+ const margin = parseFloat(getComputedStyle(content).marginRight);
1137
+ const targetMargin = opened && this.drawerMode() === "side" ? this.drawerElement().nativeElement.offsetWidth : 0;
1138
+ const shadowRoom = this.shadowsEnabled() ? 0 : 2 * parseFloat(getComputedStyle(table).getPropertyValue("--bro-shadow-size"));
1139
+ dispatchAction(table, events.columnsWidthEvent, content.getBoundingClientRect().width + margin - targetMargin - shadowRoom);
1140
+ }
1141
+ static {
1142
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1143
+ minVersion: "12.0.0",
1144
+ version: "22.2.2",
1145
+ ngImport: i0,
1146
+ type: TableBroFilterDrawerContainerNg,
1147
+ deps: [],
1148
+ target: i0.ɵɵFactoryTarget.Component
1149
+ });
1150
+ }
1151
+ static {
1152
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1153
+ minVersion: "17.2.0",
1154
+ version: "22.2.2",
1155
+ type: TableBroFilterDrawerContainerNg,
1156
+ isStandalone: true,
1157
+ selector: "table-bro-filter-drawer-container-ng",
1158
+ inputs: {
1159
+ cols: {
1160
+ classPropertyName: "cols",
1161
+ publicName: "cols",
1162
+ isSignal: true,
1163
+ isRequired: true,
1164
+ transformFunction: null
1165
+ },
1166
+ rows: {
1167
+ classPropertyName: "rows",
1168
+ publicName: "rows",
1169
+ isSignal: true,
1170
+ isRequired: true,
1171
+ transformFunction: null
1172
+ },
1173
+ conf: {
1174
+ classPropertyName: "conf",
1175
+ publicName: "conf",
1176
+ isSignal: true,
1177
+ isRequired: true,
1178
+ transformFunction: null
1179
+ },
1180
+ total: {
1181
+ classPropertyName: "total",
1182
+ publicName: "total",
1183
+ isSignal: true,
1184
+ isRequired: false,
1185
+ transformFunction: null
1186
+ },
1187
+ rowsToAppend: {
1188
+ classPropertyName: "rowsToAppend",
1189
+ publicName: "rowsToAppend",
1190
+ isSignal: true,
1191
+ isRequired: false,
1192
+ transformFunction: null
1193
+ },
1194
+ loading: {
1195
+ classPropertyName: "loading",
1196
+ publicName: "loading",
1197
+ isSignal: true,
1198
+ isRequired: false,
1199
+ transformFunction: null
1200
+ },
1201
+ failed: {
1202
+ classPropertyName: "failed",
1203
+ publicName: "failed",
1204
+ isSignal: true,
1205
+ isRequired: false,
1206
+ transformFunction: null
1207
+ },
1208
+ filter: {
1209
+ classPropertyName: "filter",
1210
+ publicName: "filter",
1211
+ isSignal: true,
1212
+ isRequired: false,
1213
+ transformFunction: null
1214
+ },
1215
+ emptyState: {
1216
+ classPropertyName: "emptyState",
1217
+ publicName: "emptyState",
1218
+ isSignal: true,
1219
+ isRequired: false,
1220
+ transformFunction: null
1221
+ },
1222
+ tableId: {
1223
+ classPropertyName: "tableId",
1224
+ publicName: "tableId",
1225
+ isSignal: true,
1226
+ isRequired: false,
1227
+ transformFunction: null
1228
+ },
1229
+ theme: {
1230
+ classPropertyName: "theme",
1231
+ publicName: "theme",
1232
+ isSignal: true,
1233
+ isRequired: false,
1234
+ transformFunction: null
1235
+ },
1236
+ opened: {
1237
+ classPropertyName: "opened",
1238
+ publicName: "opened",
1239
+ isSignal: true,
1240
+ isRequired: false,
1241
+ transformFunction: null
1242
+ },
1243
+ mode: {
1244
+ classPropertyName: "mode",
1245
+ publicName: "mode",
1246
+ isSignal: true,
1247
+ isRequired: false,
1248
+ transformFunction: null
1249
+ }
1250
+ },
1251
+ outputs: {
1252
+ action: "action",
1253
+ query: "query",
1254
+ opened: "openedChange"
1255
+ },
1256
+ host: {
1257
+ properties: {
1258
+ "class.bro-dark-theme": "dark()",
1259
+ "class.bro-light-theme": "light()"
1260
+ },
1261
+ classAttribute: "mat"
1262
+ },
1263
+ viewQueries: [
1264
+ {
1265
+ propertyName: "container",
1266
+ first: true,
1267
+ predicate: MatDrawerContainer,
1268
+ descendants: true,
1269
+ isSignal: true
1270
+ },
1271
+ {
1272
+ propertyName: "content",
1273
+ first: true,
1274
+ predicate: MatDrawerContent,
1275
+ descendants: true,
1276
+ read: ElementRef,
1277
+ isSignal: true
1278
+ },
1279
+ {
1280
+ propertyName: "drawer",
1281
+ first: true,
1282
+ predicate: MatDrawer,
1283
+ descendants: true,
1284
+ isSignal: true
1285
+ },
1286
+ {
1287
+ propertyName: "drawerElement",
1288
+ first: true,
1289
+ predicate: MatDrawer,
1290
+ descendants: true,
1291
+ read: ElementRef,
1292
+ isSignal: true
1293
+ }
1294
+ ],
1295
+ ngImport: i0,
1296
+ template: `
1297
+ <mat-drawer-container [class.bro-filter-drawer_no-shadow]="!shadowsEnabled()" (backdropClick)="onBackdropClick()">
1298
+ <mat-drawer-content>
1299
+ <table-bro-ng [class.bro-table-shadow-container]="shadowsEnabled()"
1300
+ [tableId]="tableId()" [cols]="cols()" [rows]="rows()" [conf]="conf()"
1301
+ [total]="total()" [rowsToAppend]="rowsToAppend()" [emptyState]="emptyState()"
1302
+ [loading]="loading()" [failed]="failed()"
1303
+ [filter]="filter()" [theme]="theme()"
1304
+ (action)="onTableAction($event)"
1305
+ (query)="query.emit($event)"></table-bro-ng>
1306
+ </mat-drawer-content>
1307
+
1308
+ <mat-drawer position="end"
1309
+ [class.bro-filter-drawer_no-shadow]="!shadowsEnabled()" [mode]="drawerMode()"
1310
+ [opened]="opened()" (openedChange)="opened.set($event)" (closedStart)="restoreFocus(false)">
1311
+ <div class="bro-filter-drawer-card" [class]="shadowClassName()">
1312
+ <div class="bro-filter-drawer-header">
1313
+ <mat-toolbar>
1314
+ <span class="bro-filter-drawer-title">{{ texts().filters }}</span>
1315
+
1316
+ <button matIconButton class="bro-filter-drawer-close" type="button"
1317
+ [attr.aria-label]="texts().close"
1318
+ (click)="setOpened(false)">
1319
+ <mat-icon>close</mat-icon>
1320
+ </button>
1321
+ </mat-toolbar>
1322
+ </div>
1323
+
1324
+ <div>
1325
+ <ng-content></ng-content>
1326
+ </div>
1327
+ </div>
1328
+ </mat-drawer>
1329
+ </mat-drawer-container>`,
1330
+ isInline: true,
1331
+ styles: [":host{display:block}mat-drawer-container,mat-drawer-content{overflow:visible}.mat-drawer-transition mat-drawer,.mat-drawer-transition mat-drawer-content,.mat-drawer-transition .bro-filter-drawer-card{transition-duration:calc(var(--bro-filter-drawer-duration) * var(--bro-duration-scale));transition-timing-function:cubic-bezier(.4,0,.2,1)}.mat-drawer-transition .bro-filter-drawer-card{transition-property:--bro-filter-drawer-opened}.bro-filter-drawer-header{position:sticky;top:0;z-index:1}\n"],
1332
+ dependencies: [
1333
+ {
1334
+ kind: "component",
1335
+ type: MatDrawer,
1336
+ selector: "mat-drawer",
1337
+ inputs: [
1338
+ "position",
1339
+ "mode",
1340
+ "disableClose",
1341
+ "autoFocus",
1342
+ "opened"
1343
+ ],
1344
+ outputs: [
1345
+ "openedChange",
1346
+ "opened",
1347
+ "openedStart",
1348
+ "closed",
1349
+ "closedStart",
1350
+ "positionChanged"
1351
+ ],
1352
+ exportAs: ["matDrawer"]
1353
+ },
1354
+ {
1355
+ kind: "component",
1356
+ type: MatDrawerContainer,
1357
+ selector: "mat-drawer-container",
1358
+ inputs: ["autosize", "hasBackdrop"],
1359
+ outputs: ["backdropClick"],
1360
+ exportAs: ["matDrawerContainer"]
1361
+ },
1362
+ {
1363
+ kind: "component",
1364
+ type: MatDrawerContent,
1365
+ selector: "mat-drawer-content"
1366
+ },
1367
+ {
1368
+ kind: "component",
1369
+ type: MatIcon,
1370
+ selector: "mat-icon",
1371
+ inputs: [
1372
+ "color",
1373
+ "inline",
1374
+ "svgIcon",
1375
+ "fontSet",
1376
+ "fontIcon"
1377
+ ],
1378
+ exportAs: ["matIcon"]
1379
+ },
1380
+ {
1381
+ kind: "component",
1382
+ type: MatIconButton,
1383
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
1384
+ exportAs: ["matButton", "matAnchor"]
1385
+ },
1386
+ {
1387
+ kind: "component",
1388
+ type: MatToolbar,
1389
+ selector: "mat-toolbar",
1390
+ inputs: ["color"],
1391
+ exportAs: ["matToolbar"]
1392
+ },
1393
+ {
1394
+ kind: "component",
1395
+ type: TableBroNg,
1396
+ selector: "table-bro-ng",
1397
+ inputs: [
1398
+ "cols",
1399
+ "rows",
1400
+ "conf",
1401
+ "total",
1402
+ "rowsToAppend",
1403
+ "loading",
1404
+ "failed",
1405
+ "filter",
1406
+ "emptyState",
1407
+ "tableId",
1408
+ "theme"
1409
+ ],
1410
+ outputs: ["action", "query"]
1411
+ }
1412
+ ],
1413
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1414
+ });
1415
+ }
1416
+ };
1417
+ i0.ɵɵngDeclareClassMetadata({
1418
+ minVersion: "12.0.0",
1419
+ version: "22.2.2",
1420
+ ngImport: i0,
1421
+ type: TableBroFilterDrawerContainerNg,
1422
+ decorators: [{
1423
+ type: Component,
1424
+ args: [{
1425
+ selector: "table-bro-filter-drawer-container-ng",
1426
+ template: `
1427
+ <mat-drawer-container [class.bro-filter-drawer_no-shadow]="!shadowsEnabled()" (backdropClick)="onBackdropClick()">
1428
+ <mat-drawer-content>
1429
+ <table-bro-ng [class.bro-table-shadow-container]="shadowsEnabled()"
1430
+ [tableId]="tableId()" [cols]="cols()" [rows]="rows()" [conf]="conf()"
1431
+ [total]="total()" [rowsToAppend]="rowsToAppend()" [emptyState]="emptyState()"
1432
+ [loading]="loading()" [failed]="failed()"
1433
+ [filter]="filter()" [theme]="theme()"
1434
+ (action)="onTableAction($event)"
1435
+ (query)="query.emit($event)"></table-bro-ng>
1436
+ </mat-drawer-content>
1437
+
1438
+ <mat-drawer position="end"
1439
+ [class.bro-filter-drawer_no-shadow]="!shadowsEnabled()" [mode]="drawerMode()"
1440
+ [opened]="opened()" (openedChange)="opened.set($event)" (closedStart)="restoreFocus(false)">
1441
+ <div class="bro-filter-drawer-card" [class]="shadowClassName()">
1442
+ <div class="bro-filter-drawer-header">
1443
+ <mat-toolbar>
1444
+ <span class="bro-filter-drawer-title">{{ texts().filters }}</span>
1445
+
1446
+ <button matIconButton class="bro-filter-drawer-close" type="button"
1447
+ [attr.aria-label]="texts().close"
1448
+ (click)="setOpened(false)">
1449
+ <mat-icon>close</mat-icon>
1450
+ </button>
1451
+ </mat-toolbar>
1452
+ </div>
1453
+
1454
+ <div>
1455
+ <ng-content></ng-content>
1456
+ </div>
1457
+ </div>
1458
+ </mat-drawer>
1459
+ </mat-drawer-container>`,
1460
+ changeDetection: ChangeDetectionStrategy.OnPush,
1461
+ host: {
1462
+ class: "mat",
1463
+ "[class.bro-dark-theme]": "dark()",
1464
+ "[class.bro-light-theme]": "light()"
1465
+ },
1466
+ imports: [
1467
+ MatDrawer,
1468
+ MatDrawerContainer,
1469
+ MatDrawerContent,
1470
+ MatIcon,
1471
+ MatIconButton,
1472
+ MatToolbar,
1473
+ TableBroNg
1474
+ ],
1475
+ styles: [":host{display:block}mat-drawer-container,mat-drawer-content{overflow:visible}.mat-drawer-transition mat-drawer,.mat-drawer-transition mat-drawer-content,.mat-drawer-transition .bro-filter-drawer-card{transition-duration:calc(var(--bro-filter-drawer-duration) * var(--bro-duration-scale));transition-timing-function:cubic-bezier(.4,0,.2,1)}.mat-drawer-transition .bro-filter-drawer-card{transition-property:--bro-filter-drawer-opened}.bro-filter-drawer-header{position:sticky;top:0;z-index:1}\n"]
1476
+ }]
1477
+ }],
1478
+ ctorParameters: () => [],
1479
+ propDecorators: {
1480
+ cols: [{
1481
+ type: i0.Input,
1482
+ args: [{
1483
+ isSignal: true,
1484
+ alias: "cols",
1485
+ required: true
1486
+ }]
1487
+ }],
1488
+ rows: [{
1489
+ type: i0.Input,
1490
+ args: [{
1491
+ isSignal: true,
1492
+ alias: "rows",
1493
+ required: true
1494
+ }]
1495
+ }],
1496
+ conf: [{
1497
+ type: i0.Input,
1498
+ args: [{
1499
+ isSignal: true,
1500
+ alias: "conf",
1501
+ required: true
1502
+ }]
1503
+ }],
1504
+ total: [{
1505
+ type: i0.Input,
1506
+ args: [{
1507
+ isSignal: true,
1508
+ alias: "total",
1509
+ required: false
1510
+ }]
1511
+ }],
1512
+ rowsToAppend: [{
1513
+ type: i0.Input,
1514
+ args: [{
1515
+ isSignal: true,
1516
+ alias: "rowsToAppend",
1517
+ required: false
1518
+ }]
1519
+ }],
1520
+ loading: [{
1521
+ type: i0.Input,
1522
+ args: [{
1523
+ isSignal: true,
1524
+ alias: "loading",
1525
+ required: false
1526
+ }]
1527
+ }],
1528
+ failed: [{
1529
+ type: i0.Input,
1530
+ args: [{
1531
+ isSignal: true,
1532
+ alias: "failed",
1533
+ required: false
1534
+ }]
1535
+ }],
1536
+ filter: [{
1537
+ type: i0.Input,
1538
+ args: [{
1539
+ isSignal: true,
1540
+ alias: "filter",
1541
+ required: false
1542
+ }]
1543
+ }],
1544
+ emptyState: [{
1545
+ type: i0.Input,
1546
+ args: [{
1547
+ isSignal: true,
1548
+ alias: "emptyState",
1549
+ required: false
1550
+ }]
1551
+ }],
1552
+ tableId: [{
1553
+ type: i0.Input,
1554
+ args: [{
1555
+ isSignal: true,
1556
+ alias: "tableId",
1557
+ required: false
1558
+ }]
1559
+ }],
1560
+ theme: [{
1561
+ type: i0.Input,
1562
+ args: [{
1563
+ isSignal: true,
1564
+ alias: "theme",
1565
+ required: false
1566
+ }]
1567
+ }],
1568
+ action: [{
1569
+ type: i0.Output,
1570
+ args: ["action"]
1571
+ }],
1572
+ query: [{
1573
+ type: i0.Output,
1574
+ args: ["query"]
1575
+ }],
1576
+ opened: [{
1577
+ type: i0.Input,
1578
+ args: [{
1579
+ isSignal: true,
1580
+ alias: "opened",
1581
+ required: false
1582
+ }]
1583
+ }, {
1584
+ type: i0.Output,
1585
+ args: ["openedChange"]
1586
+ }],
1587
+ mode: [{
1588
+ type: i0.Input,
1589
+ args: [{
1590
+ isSignal: true,
1591
+ alias: "mode",
1592
+ required: false
1593
+ }]
1594
+ }],
1595
+ container: [{
1596
+ type: i0.ViewChild,
1597
+ args: [i0.forwardRef(() => MatDrawerContainer), { isSignal: true }]
1598
+ }],
1599
+ content: [{
1600
+ type: i0.ViewChild,
1601
+ args: [i0.forwardRef(() => MatDrawerContent), {
1602
+ read: ElementRef,
1603
+ isSignal: true
1604
+ }]
1605
+ }],
1606
+ drawer: [{
1607
+ type: i0.ViewChild,
1608
+ args: [i0.forwardRef(() => MatDrawer), { isSignal: true }]
1609
+ }],
1610
+ drawerElement: [{
1611
+ type: i0.ViewChild,
1612
+ args: [i0.forwardRef(() => MatDrawer), {
1613
+ read: ElementRef,
1614
+ isSignal: true
1615
+ }]
1616
+ }]
1617
+ }
1618
+ });
1619
+ var BroMaterialToolbarMainComponent = class BroMaterialToolbarMainComponent {
1620
+ constructor() {
1621
+ this.config = input(...ngDevMode ? [void 0, { debugName: "config" }] : /* istanbul ignore next */ []);
1622
+ this.buttons = input("[]", ...ngDevMode ? [{ debugName: "buttons" }] : /* istanbul ignore next */ []);
1623
+ this.title = input("", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
1624
+ this.action = output({ alias: "bro-toolbar" });
1625
+ this.toolbarButtons = computed(() => JSON.parse(this.buttons()), ...ngDevMode ? [{ debugName: "toolbarButtons" }] : /* istanbul ignore next */ []);
1626
+ this.mainButtons = computed(() => this.toolbarButtons().filter((button) => button.mode !== "navbar-dropdown"), ...ngDevMode ? [{ debugName: "mainButtons" }] : /* istanbul ignore next */ []);
1627
+ this.dropdown = computed(() => this.toolbarButtons().find((button) => button.mode === "navbar-dropdown"), ...ngDevMode ? [{ debugName: "dropdown" }] : /* istanbul ignore next */ []);
1628
+ }
1629
+ onClickSearch() {
1630
+ this.action.emit(events.toolbarSearchOpenEvent);
1631
+ }
1632
+ onClickButton(action) {
1633
+ this.action.emit(action);
1634
+ }
1635
+ onMenuAction(event) {
1636
+ this.action.emit(event.detail);
1637
+ }
1638
+ static {
1639
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1640
+ minVersion: "12.0.0",
1641
+ version: "22.2.2",
1642
+ ngImport: i0,
1643
+ type: BroMaterialToolbarMainComponent,
1644
+ deps: [],
1645
+ target: i0.ɵɵFactoryTarget.Component
1646
+ });
1647
+ }
1648
+ static {
1649
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1650
+ minVersion: "17.0.0",
1651
+ version: "22.2.2",
1652
+ type: BroMaterialToolbarMainComponent,
1653
+ isStandalone: true,
1654
+ selector: "ng-component",
1655
+ inputs: {
1656
+ config: {
1657
+ classPropertyName: "config",
1658
+ publicName: "config",
1659
+ isSignal: true,
1660
+ isRequired: false,
1661
+ transformFunction: null
1662
+ },
1663
+ buttons: {
1664
+ classPropertyName: "buttons",
1665
+ publicName: "buttons",
1666
+ isSignal: true,
1667
+ isRequired: false,
1668
+ transformFunction: null
1669
+ },
1670
+ title: {
1671
+ classPropertyName: "title",
1672
+ publicName: "title",
1673
+ isSignal: true,
1674
+ isRequired: false,
1675
+ transformFunction: null
1676
+ }
1677
+ },
1678
+ outputs: { action: "bro-toolbar" },
1679
+ ngImport: i0,
1680
+ template: `
1681
+ <mat-toolbar>
1682
+ <button matIconButton class="bro-toolbar-placeholder"
1683
+ type="button" aria-label="">
1684
+ <mat-icon>menu</mat-icon>
1685
+ </button>
1686
+
1687
+ <span>{{ title() }}</span>
1688
+
1689
+ <span class="bro-toolbar-space"></span>
1690
+
1691
+ <button matIconButton
1692
+ class="bro-toolbar-button-search"
1693
+ type="button" [attr.aria-label]="config()?.texts?.search"
1694
+ (click)="onClickSearch()">
1695
+ <mat-icon>search</mat-icon>
1696
+ </button>
1697
+
1698
+ @for (button of mainButtons(); track $index) {
1699
+ <button matIconButton type="button" matTooltipPosition="above"
1700
+ [matTooltip]="button.buttonTooltip ?? ''"
1701
+ [attr.aria-label]="button.buttonTitle"
1702
+ (click)="onClickButton(button.eventType)">
1703
+ <mat-icon>{{ button.iconHTML }}</mat-icon>
1704
+ </button>
1705
+ }
1706
+
1707
+ <!-- The menu is the element of withToolbarMenu(): a toolbar without a menu does not carry the menu of Material -->
1708
+ @if (dropdown(); as dropdown) {
1709
+ <bro-mat-toolbar-more matTooltipPosition="above"
1710
+ [dropdown]="dropdown" [matTooltip]="dropdown.buttonTooltip ?? ''"
1711
+ (action)="onMenuAction($event)"></bro-mat-toolbar-more>
1712
+ }
1713
+ </mat-toolbar>`,
1714
+ isInline: true,
1715
+ styles: [".bro-toolbar-placeholder{visibility:hidden}.bro-toolbar-space{flex:1 1 auto}\n"],
1716
+ dependencies: [
1717
+ {
1718
+ kind: "component",
1719
+ type: MatIcon,
1720
+ selector: "mat-icon",
1721
+ inputs: [
1722
+ "color",
1723
+ "inline",
1724
+ "svgIcon",
1725
+ "fontSet",
1726
+ "fontIcon"
1727
+ ],
1728
+ exportAs: ["matIcon"]
1729
+ },
1730
+ {
1731
+ kind: "component",
1732
+ type: MatIconButton,
1733
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
1734
+ exportAs: ["matButton", "matAnchor"]
1735
+ },
1736
+ {
1737
+ kind: "component",
1738
+ type: MatToolbar,
1739
+ selector: "mat-toolbar",
1740
+ inputs: ["color"],
1741
+ exportAs: ["matToolbar"]
1742
+ },
1743
+ {
1744
+ kind: "directive",
1745
+ type: MatTooltip,
1746
+ selector: "[matTooltip]",
1747
+ inputs: [
1748
+ "matTooltipPosition",
1749
+ "matTooltipPositionAtOrigin",
1750
+ "matTooltipDisabled",
1751
+ "matTooltipShowDelay",
1752
+ "matTooltipHideDelay",
1753
+ "matTooltipTouchGestures",
1754
+ "matTooltip",
1755
+ "matTooltipClass"
1756
+ ],
1757
+ exportAs: ["matTooltip"]
1758
+ }
1759
+ ],
1760
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1761
+ });
1762
+ }
1763
+ };
1764
+ i0.ɵɵngDeclareClassMetadata({
1765
+ minVersion: "12.0.0",
1766
+ version: "22.2.2",
1767
+ ngImport: i0,
1768
+ type: BroMaterialToolbarMainComponent,
1769
+ decorators: [{
1770
+ type: Component,
1771
+ args: [{
1772
+ template: `
1773
+ <mat-toolbar>
1774
+ <button matIconButton class="bro-toolbar-placeholder"
1775
+ type="button" aria-label="">
1776
+ <mat-icon>menu</mat-icon>
1777
+ </button>
1778
+
1779
+ <span>{{ title() }}</span>
1780
+
1781
+ <span class="bro-toolbar-space"></span>
1782
+
1783
+ <button matIconButton
1784
+ class="bro-toolbar-button-search"
1785
+ type="button" [attr.aria-label]="config()?.texts?.search"
1786
+ (click)="onClickSearch()">
1787
+ <mat-icon>search</mat-icon>
1788
+ </button>
1789
+
1790
+ @for (button of mainButtons(); track $index) {
1791
+ <button matIconButton type="button" matTooltipPosition="above"
1792
+ [matTooltip]="button.buttonTooltip ?? ''"
1793
+ [attr.aria-label]="button.buttonTitle"
1794
+ (click)="onClickButton(button.eventType)">
1795
+ <mat-icon>{{ button.iconHTML }}</mat-icon>
1796
+ </button>
1797
+ }
1798
+
1799
+ <!-- The menu is the element of withToolbarMenu(): a toolbar without a menu does not carry the menu of Material -->
1800
+ @if (dropdown(); as dropdown) {
1801
+ <bro-mat-toolbar-more matTooltipPosition="above"
1802
+ [dropdown]="dropdown" [matTooltip]="dropdown.buttonTooltip ?? ''"
1803
+ (action)="onMenuAction($event)"></bro-mat-toolbar-more>
1804
+ }
1805
+ </mat-toolbar>`,
1806
+ changeDetection: ChangeDetectionStrategy.OnPush,
1807
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
1808
+ imports: [
1809
+ MatIcon,
1810
+ MatIconButton,
1811
+ MatToolbar,
1812
+ MatTooltip
1813
+ ],
1814
+ styles: [".bro-toolbar-placeholder{visibility:hidden}.bro-toolbar-space{flex:1 1 auto}\n"]
1815
+ }]
1816
+ }],
1817
+ propDecorators: {
1818
+ config: [{
1819
+ type: i0.Input,
1820
+ args: [{
1821
+ isSignal: true,
1822
+ alias: "config",
1823
+ required: false
1824
+ }]
1825
+ }],
1826
+ buttons: [{
1827
+ type: i0.Input,
1828
+ args: [{
1829
+ isSignal: true,
1830
+ alias: "buttons",
1831
+ required: false
1832
+ }]
1833
+ }],
1834
+ title: [{
1835
+ type: i0.Input,
1836
+ args: [{
1837
+ isSignal: true,
1838
+ alias: "title",
1839
+ required: false
1840
+ }]
1841
+ }],
1842
+ action: [{
1843
+ type: i0.Output,
1844
+ args: ["bro-toolbar"]
1845
+ }]
1846
+ }
1847
+ });
1848
+ var BroMaterialToolbarMoreComponent = class BroMaterialToolbarMoreComponent {
1849
+ constructor() {
1850
+ this.dropdown = input(...ngDevMode ? [void 0, { debugName: "dropdown" }] : /* istanbul ignore next */ []);
1851
+ this.action = output();
1852
+ }
1853
+ onClickButton(action) {
1854
+ this.action.emit(action);
1855
+ }
1856
+ static {
1857
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1858
+ minVersion: "12.0.0",
1859
+ version: "22.2.2",
1860
+ ngImport: i0,
1861
+ type: BroMaterialToolbarMoreComponent,
1862
+ deps: [],
1863
+ target: i0.ɵɵFactoryTarget.Component
1864
+ });
1865
+ }
1866
+ static {
1867
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1868
+ minVersion: "17.0.0",
1869
+ version: "22.2.2",
1870
+ type: BroMaterialToolbarMoreComponent,
1871
+ isStandalone: true,
1872
+ selector: "ng-component",
1873
+ inputs: { dropdown: {
1874
+ classPropertyName: "dropdown",
1875
+ publicName: "dropdown",
1876
+ isSignal: true,
1877
+ isRequired: false,
1878
+ transformFunction: null
1879
+ } },
1880
+ outputs: { action: "action" },
1881
+ ngImport: i0,
1882
+ template: `
1883
+ @if (dropdown(); as dropdown) {
1884
+ <button matIconButton
1885
+ [attr.aria-label]="dropdown.buttonTitle"
1886
+ [matMenuTriggerFor]="menu">
1887
+ <mat-icon>more_vert</mat-icon>
1888
+ </button>
1889
+
1890
+ <mat-menu #menu="matMenu">
1891
+ @for (option of dropdown.options; track $index) {
1892
+ @if (option.divider) {
1893
+ <mat-divider></mat-divider>
1894
+ } @else {
1895
+ <button mat-menu-item (click)="onClickButton(option.value)">
1896
+ @if (option.iconHTML) {
1897
+ <mat-icon>{{ option.iconHTML }}</mat-icon>
1898
+ }
1899
+ <span>{{ option.title }}</span>
1900
+ </button>
1901
+ }
1902
+ }
1903
+ </mat-menu>
1904
+ }`,
1905
+ isInline: true,
1906
+ dependencies: [
1907
+ {
1908
+ kind: "component",
1909
+ type: MatDivider,
1910
+ selector: "mat-divider",
1911
+ inputs: ["vertical", "inset"]
1912
+ },
1913
+ {
1914
+ kind: "component",
1915
+ type: MatIcon,
1916
+ selector: "mat-icon",
1917
+ inputs: [
1918
+ "color",
1919
+ "inline",
1920
+ "svgIcon",
1921
+ "fontSet",
1922
+ "fontIcon"
1923
+ ],
1924
+ exportAs: ["matIcon"]
1925
+ },
1926
+ {
1927
+ kind: "component",
1928
+ type: MatIconButton,
1929
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
1930
+ exportAs: ["matButton", "matAnchor"]
1931
+ },
1932
+ {
1933
+ kind: "component",
1934
+ type: MatMenu,
1935
+ selector: "mat-menu",
1936
+ inputs: [
1937
+ "backdropClass",
1938
+ "aria-label",
1939
+ "aria-labelledby",
1940
+ "aria-describedby",
1941
+ "xPosition",
1942
+ "yPosition",
1943
+ "overlapTrigger",
1944
+ "hasBackdrop",
1945
+ "class",
1946
+ "classList"
1947
+ ],
1948
+ outputs: ["closed", "close"],
1949
+ exportAs: ["matMenu"]
1950
+ },
1951
+ {
1952
+ kind: "component",
1953
+ type: MatMenuItem,
1954
+ selector: "[mat-menu-item]",
1955
+ inputs: [
1956
+ "role",
1957
+ "disabled",
1958
+ "disabledInteractive",
1959
+ "disableRipple"
1960
+ ],
1961
+ exportAs: ["matMenuItem"]
1962
+ },
1963
+ {
1964
+ kind: "directive",
1965
+ type: MatMenuTrigger,
1966
+ selector: "[mat-menu-trigger-for], [matMenuTriggerFor]",
1967
+ inputs: [
1968
+ "mat-menu-trigger-for",
1969
+ "matMenuTriggerFor",
1970
+ "matMenuTriggerData",
1971
+ "matMenuTriggerRestoreFocus"
1972
+ ],
1973
+ outputs: [
1974
+ "menuOpened",
1975
+ "onMenuOpen",
1976
+ "menuClosed",
1977
+ "onMenuClose"
1978
+ ],
1979
+ exportAs: ["matMenuTrigger"]
1980
+ }
1981
+ ],
1982
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1983
+ });
1984
+ }
1985
+ };
1986
+ i0.ɵɵngDeclareClassMetadata({
1987
+ minVersion: "12.0.0",
1988
+ version: "22.2.2",
1989
+ ngImport: i0,
1990
+ type: BroMaterialToolbarMoreComponent,
1991
+ decorators: [{
1992
+ type: Component,
1993
+ args: [{
1994
+ template: `
1995
+ @if (dropdown(); as dropdown) {
1996
+ <button matIconButton
1997
+ [attr.aria-label]="dropdown.buttonTitle"
1998
+ [matMenuTriggerFor]="menu">
1999
+ <mat-icon>more_vert</mat-icon>
2000
+ </button>
2001
+
2002
+ <mat-menu #menu="matMenu">
2003
+ @for (option of dropdown.options; track $index) {
2004
+ @if (option.divider) {
2005
+ <mat-divider></mat-divider>
2006
+ } @else {
2007
+ <button mat-menu-item (click)="onClickButton(option.value)">
2008
+ @if (option.iconHTML) {
2009
+ <mat-icon>{{ option.iconHTML }}</mat-icon>
2010
+ }
2011
+ <span>{{ option.title }}</span>
2012
+ </button>
2013
+ }
2014
+ }
2015
+ </mat-menu>
2016
+ }`,
2017
+ changeDetection: ChangeDetectionStrategy.OnPush,
2018
+ imports: [
2019
+ MatDivider,
2020
+ MatIcon,
2021
+ MatIconButton,
2022
+ MatMenu,
2023
+ MatMenuItem,
2024
+ MatMenuTrigger
2025
+ ]
2026
+ }]
2027
+ }],
2028
+ propDecorators: {
2029
+ dropdown: [{
2030
+ type: i0.Input,
2031
+ args: [{
2032
+ isSignal: true,
2033
+ alias: "dropdown",
2034
+ required: false
2035
+ }]
2036
+ }],
2037
+ action: [{
2038
+ type: i0.Output,
2039
+ args: ["action"]
2040
+ }]
2041
+ }
2042
+ });
2043
+ const tableBroMatElements = {
2044
+ "ng-mat-paginator": MatPaginator,
2045
+ "ng-mat-progress-bar": MatProgressBar,
2046
+ "ng-mat-toolbar": MatToolbar,
2047
+ "bro-mat-button": BroMaterialButtonComponent,
2048
+ "bro-mat-sort-header": BroMaterialSortHeaderComponent,
2049
+ "bro-mat-toolbar-main": BroMaterialToolbarMainComponent,
2050
+ "bro-mat-text-ellipsis": BroMaterialTextEllipsisComponent
2051
+ };
2052
+ function defineTableBroMatElements(injector, features = {}) {
2053
+ if (!isPlatformBrowser(injector.get(PLATFORM_ID))) return;
2054
+ Object.entries({
2055
+ ...tableBroMatElements,
2056
+ ...features
2057
+ }).forEach(([name, component]) => {
2058
+ if (!customElements.get(name)) customElements.define(name, keepThroughMoves(createCustomElement(component, { injector })));
2059
+ });
2060
+ if (typeof ngDevMode === "undefined" || ngDevMode) Object.entries({
2061
+ "bro-mat-tags": "Tags",
2062
+ "bro-mat-slide-toggle": "Switch",
2063
+ "bro-mat-toolbar-more": "ToolbarMenu"
2064
+ }).forEach(([name, feature]) => {
2065
+ if (!customElements.get(name)) customElements.define(name, missingFeature(feature));
2066
+ });
2067
+ }
2068
+ function missingFeature(feature) {
2069
+ const reported = /* @__PURE__ */ new Set();
2070
+ return class extends HTMLElement {
2071
+ connectedCallback() {
2072
+ const user = this.col ? `the column "${this.col.name}"` : "the toolbar";
2073
+ const element = feature.replace(/\B[A-Z]/g, " $&").toLowerCase();
2074
+ if (!reported.has(user)) {
2075
+ reported.add(user);
2076
+ console.error(`Table, Bro: ${user} uses the element ${element}: add with${feature}() to provideTableBroMatSkin()`);
2077
+ }
2078
+ }
2079
+ };
2080
+ }
2081
+ function keepThroughMoves(element) {
2082
+ const base = element;
2083
+ return class extends base {
2084
+ constructor() {
2085
+ super(...arguments);
2086
+ this.moving = false;
2087
+ }
2088
+ connectedCallback() {
2089
+ if (this.moving) {
2090
+ this.moving = false;
2091
+ return;
2092
+ }
2093
+ if (isPrerendered(this)) return;
2094
+ super.connectedCallback();
2095
+ }
2096
+ disconnectedCallback() {
2097
+ this.moving = true;
2098
+ queueMicrotask(() => {
2099
+ if (this.moving) {
2100
+ this.moving = false;
2101
+ super.disconnectedCallback();
2102
+ }
2103
+ });
2104
+ }
2105
+ };
2106
+ }
2107
+ function provideTableBroMatSkin(...features) {
2108
+ const elements = Object.assign({}, ...features.map((feature) => feature.elements));
2109
+ return makeEnvironmentProviders([provideAppInitializer(() => {
2110
+ registerSkin("mat", matSkinConfig);
2111
+ features.forEach((feature) => feature.init?.());
2112
+ defineTableBroMatElements(inject(EnvironmentInjector), elements);
2113
+ }), {
2114
+ provide: TABLE_BRO_ELEMENTS,
2115
+ useValue: {
2116
+ skin: "mat",
2117
+ elements: {
2118
+ ...tableBroMatElements,
2119
+ ...elements
2120
+ }
2121
+ },
2122
+ multi: true
2123
+ }]);
2124
+ }
2125
+ function withTags(options = {}) {
2126
+ const empty = options.texts?.empty;
2127
+ return {
2128
+ elements: { "bro-mat-tags": BroMaterialTagsComponent },
2129
+ init: () => {
2130
+ if (empty !== void 0) inject(TableBroMatTagsTexts).empty.set(empty);
2131
+ }
2132
+ };
2133
+ }
2134
+ function withSwitch() {
2135
+ return { elements: { "bro-mat-slide-toggle": BroMaterialSlideToggleComponent } };
2136
+ }
2137
+ function withToolbarMenu() {
2138
+ return { elements: { "bro-mat-toolbar-more": BroMaterialToolbarMoreComponent } };
2139
+ }
2140
+ export { BroMaterialButtonComponent, BroMaterialSlideToggleComponent, BroMaterialSortHeaderComponent, BroMaterialTagsComponent, BroMaterialTextEllipsisComponent, BroMaterialToolbarMainComponent, BroMaterialToolbarMoreComponent, TableBroFilterDrawerContainerNg, TableBroMatTagsTexts, matSkinConfig, provideTableBroMatSkin, withSwitch, withTags, withToolbarMenu };
2141
+
2142
+ //# sourceMappingURL=table-bro-angular-material.mjs.map