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