]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | import { CommonModule } from '@angular/common'; |
2 | import { NgModule } from '@angular/core'; | |
11fdf7f2 TL |
3 | import { RouterModule } from '@angular/router'; |
4 | ||
f67539c2 | 5 | import { NgbDropdownModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; |
11fdf7f2 | 6 | import { NgxDatatableModule } from '@swimlane/ngx-datatable'; |
f67539c2 | 7 | import { NgxPipeFunctionModule } from 'ngx-pipe-function'; |
11fdf7f2 | 8 | |
1e59de90 TL |
9 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; |
10 | import { FormlyModule } from '@ngx-formly/core'; | |
11 | import { FormlyBootstrapModule } from '@ngx-formly/bootstrap'; | |
11fdf7f2 TL |
12 | import { ComponentsModule } from '../components/components.module'; |
13 | import { PipesModule } from '../pipes/pipes.module'; | |
1e59de90 | 14 | import { CRUDTableComponent } from './crud-table/crud-table.component'; |
11fdf7f2 TL |
15 | import { TableActionsComponent } from './table-actions/table-actions.component'; |
16 | import { TableKeyValueComponent } from './table-key-value/table-key-value.component'; | |
39ae355f | 17 | import { TablePaginationComponent } from './table-pagination/table-pagination.component'; |
11fdf7f2 | 18 | import { TableComponent } from './table/table.component'; |
1e59de90 TL |
19 | import { CrudFormComponent } from '../forms/crud-form/crud-form.component'; |
20 | import { FormlyArrayTypeComponent } from '../forms/crud-form/formly-array-type/formly-array-type.component'; | |
21 | import { FormlyInputTypeComponent } from '../forms/crud-form/formly-input-type/formly-input-type.component'; | |
22 | import { FormlyObjectTypeComponent } from '../forms/crud-form/formly-object-type/formly-object-type.component'; | |
23 | import { FormlyTextareaTypeComponent } from '../forms/crud-form/formly-textarea-type/formly-textarea-type.component'; | |
24 | import { FormlyInputWrapperComponent } from '../forms/crud-form/formly-input-wrapper/formly-input-wrapper.component'; | |
25 | import { FormlyFileTypeComponent } from '../forms/crud-form/formly-file-type/formly-file-type.component'; | |
26 | import { FormlyFileValueAccessorDirective } from '../forms/crud-form/formly-file-type/formly-file-type-accessor'; | |
11fdf7f2 TL |
27 | |
28 | @NgModule({ | |
29 | imports: [ | |
30 | CommonModule, | |
31 | NgxDatatableModule, | |
f67539c2 | 32 | NgxPipeFunctionModule, |
11fdf7f2 | 33 | FormsModule, |
f67539c2 TL |
34 | NgbDropdownModule, |
35 | NgbTooltipModule, | |
11fdf7f2 TL |
36 | PipesModule, |
37 | ComponentsModule, | |
1e59de90 TL |
38 | RouterModule, |
39 | ReactiveFormsModule, | |
40 | FormlyModule.forRoot({ | |
41 | types: [ | |
42 | { name: 'array', component: FormlyArrayTypeComponent }, | |
43 | { name: 'object', component: FormlyObjectTypeComponent }, | |
44 | { name: 'input', component: FormlyInputTypeComponent, wrappers: ['input-wrapper'] }, | |
45 | { name: 'textarea', component: FormlyTextareaTypeComponent, wrappers: ['input-wrapper'] }, | |
46 | { name: 'file', component: FormlyFileTypeComponent, wrappers: ['input-wrapper'] } | |
47 | ], | |
48 | validationMessages: [ | |
49 | { name: 'required', message: 'This field is required' }, | |
50 | { name: 'json', message: 'This field is not a valid json document' }, | |
51 | { | |
52 | name: 'rgwRoleName', | |
53 | message: | |
54 | 'Role name must contain letters, numbers or the ' + | |
55 | 'following valid special characters "_+=,.@-]+" (pattern: [0-9a-zA-Z_+=,.@-]+)' | |
56 | }, | |
57 | { | |
58 | name: 'rgwRolePath', | |
59 | message: | |
60 | 'Role path must start and finish with a slash "/".' + | |
61 | ' (pattern: (\u002F)|(\u002F[\u0021-\u007E]+\u002F))' | |
62 | }, | |
63 | { name: 'file_size', message: 'File size must not exceed 4KiB' } | |
64 | ], | |
65 | wrappers: [{ name: 'input-wrapper', component: FormlyInputWrapperComponent }] | |
66 | }), | |
67 | FormlyBootstrapModule | |
11fdf7f2 | 68 | ], |
39ae355f TL |
69 | declarations: [ |
70 | TableComponent, | |
71 | TableKeyValueComponent, | |
72 | TableActionsComponent, | |
1e59de90 TL |
73 | CRUDTableComponent, |
74 | TablePaginationComponent, | |
75 | CrudFormComponent, | |
76 | FormlyArrayTypeComponent, | |
77 | FormlyInputTypeComponent, | |
78 | FormlyObjectTypeComponent, | |
79 | FormlyInputWrapperComponent, | |
80 | FormlyFileTypeComponent, | |
81 | FormlyFileValueAccessorDirective | |
39ae355f TL |
82 | ], |
83 | exports: [ | |
84 | TableComponent, | |
85 | NgxDatatableModule, | |
86 | TableKeyValueComponent, | |
87 | TableActionsComponent, | |
1e59de90 | 88 | CRUDTableComponent, |
39ae355f TL |
89 | TablePaginationComponent |
90 | ] | |
11fdf7f2 TL |
91 | }) |
92 | export class DataTableModule {} |