1 import { CommonModule } from '@angular/common';
2 import { NgModule } from '@angular/core';
3 import { RouterModule } from '@angular/router';
5 import { NgbDropdownModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
6 import { NgxDatatableModule } from '@swimlane/ngx-datatable';
7 import { NgxPipeFunctionModule } from 'ngx-pipe-function';
9 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
10 import { FormlyModule } from '@ngx-formly/core';
11 import { FormlyBootstrapModule } from '@ngx-formly/bootstrap';
12 import { ComponentsModule } from '../components/components.module';
13 import { PipesModule } from '../pipes/pipes.module';
14 import { CRUDTableComponent } from './crud-table/crud-table.component';
15 import { TableActionsComponent } from './table-actions/table-actions.component';
16 import { TableKeyValueComponent } from './table-key-value/table-key-value.component';
17 import { TablePaginationComponent } from './table-pagination/table-pagination.component';
18 import { TableComponent } from './table/table.component';
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';
32 NgxPipeFunctionModule,
40 FormlyModule.forRoot({
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'] }
49 { name: 'required', message: 'This field is required' },
50 { name: 'json', message: 'This field is not a valid json document' },
54 'Role name must contain letters, numbers or the ' +
55 'following valid special characters "_+=,.@-]+" (pattern: [0-9a-zA-Z_+=,.@-]+)'
60 'Role path must start and finish with a slash "/".' +
61 ' (pattern: (\u002F)|(\u002F[\u0021-\u007E]+\u002F))'
63 { name: 'file_size', message: 'File size must not exceed 4KiB' }
65 wrappers: [{ name: 'input-wrapper', component: FormlyInputWrapperComponent }]
71 TableKeyValueComponent,
72 TableActionsComponent,
74 TablePaginationComponent,
76 FormlyArrayTypeComponent,
77 FormlyInputTypeComponent,
78 FormlyObjectTypeComponent,
79 FormlyInputWrapperComponent,
80 FormlyFileTypeComponent,
81 FormlyFileValueAccessorDirective
86 TableKeyValueComponent,
87 TableActionsComponent,
89 TablePaginationComponent
92 export class DataTableModule {}