-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathshared-table.module.ts
101 lines (99 loc) · 2.75 KB
/
shared-table.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import { NgModule } from "@angular/core";
import {
CommonModule,
CurrencyPipe,
DatePipe,
DecimalPipe,
JsonPipe,
KeyValuePipe,
LowerCasePipe,
PercentPipe,
SlicePipe,
TitleCasePipe,
UpperCasePipe,
} from "@angular/common";
import { SharedTableComponent } from "./shared-table.component";
import { PipesModule } from "../../pipes/pipes.module";
import { MatCardModule } from "@angular/material/card";
import { MatCheckboxModule } from "@angular/material/checkbox";
import { MatIconModule } from "@angular/material/icon";
import { MatPaginatorModule } from "@angular/material/paginator";
import { MatSortModule, SortDirection } from "@angular/material/sort";
import { MatTableModule } from "@angular/material/table";
import { MatToolbarModule } from "@angular/material/toolbar";
import { MatFormFieldModule } from "@angular/material/form-field";
import { MatInputModule } from "@angular/material/input";
import { MatButtonModule } from "@angular/material/button";
import { FlexLayoutModule } from "@ngbracket/ngx-layout";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { ObjKeysPipe } from "shared/pipes/obj-keys.pipe";
import { RouterModule } from "@angular/router";
import { MatDatepickerModule } from "@angular/material/datepicker";
import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
import {
DateAdapter,
MAT_DATE_FORMATS,
MAT_DATE_LOCALE,
} from "@angular/material/core";
import { LuxonDateAdapter, MAT_LUXON_DATE_FORMATS } from "ngx-material-luxon";
import { MatMenuModule } from "@angular/material/menu";
export interface Column {
id: string;
type?: string;
visible?: boolean;
label: string;
hideOrder: number;
width?: number;
canSort?: boolean;
matchMode?: string;
format?: string;
icon?: string;
sortDefault?: SortDirection;
filterDefault?: any;
hideFilter?: boolean;
}
@NgModule({
declarations: [SharedTableComponent],
imports: [
CommonModule,
MatCardModule,
MatCheckboxModule,
MatIconModule,
MatPaginatorModule,
MatSortModule,
MatProgressSpinnerModule,
MatTableModule,
ReactiveFormsModule,
PipesModule,
MatToolbarModule,
MatFormFieldModule,
MatInputModule,
MatButtonModule,
FlexLayoutModule,
FormsModule,
RouterModule,
MatDatepickerModule,
MatMenuModule,
],
exports: [SharedTableComponent],
providers: [
CurrencyPipe,
DatePipe,
DecimalPipe,
JsonPipe,
ObjKeysPipe,
KeyValuePipe,
LowerCasePipe,
PercentPipe,
SlicePipe,
TitleCasePipe,
UpperCasePipe,
{
provide: DateAdapter,
useClass: LuxonDateAdapter,
deps: [MAT_DATE_LOCALE],
},
{ provide: MAT_DATE_FORMATS, useValue: MAT_LUXON_DATE_FORMATS },
],
})
export class SharedTableModule {}