LP#1775466 Angular(6) base application
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / common.module.ts
1 import {NgModule, ModuleWithProviders} from '@angular/core';
2 import {EgCommonModule} from '@eg/common.module';
3 import {AudioService} from '@eg/share/util/audio.service';
4 import {GridModule} from '@eg/share/grid/grid.module';
5 import {StaffBannerComponent} from './share/staff-banner.component';
6 import {ComboboxComponent} from '@eg/share/combobox/combobox.component';
7 import {ComboboxEntryComponent} from '@eg/share/combobox/combobox-entry.component';
8 import {OrgSelectComponent} from '@eg/share/org-select/org-select.component';
9 import {AccessKeyDirective} from '@eg/share/accesskey/accesskey.directive';
10 import {AccessKeyService} from '@eg/share/accesskey/accesskey.service';
11 import {AccessKeyInfoComponent} from '@eg/share/accesskey/accesskey-info.component';
12 import {OpChangeComponent} from '@eg/staff/share/op-change/op-change.component';
13 import {ToastService} from '@eg/share/toast/toast.service';
14 import {ToastComponent} from '@eg/share/toast/toast.component';
15 import {StringComponent} from '@eg/share/string/string.component';
16 import {StringService} from '@eg/share/string/string.service';
17 import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
18 import {DateSelectComponent} from '@eg/share/date-select/date-select.component';
19 import {RecordBucketDialogComponent} from '@eg/staff/share/buckets/record-bucket-dialog.component';
20 import {BibSummaryComponent} from '@eg/staff/share/bib-summary/bib-summary.component';
21 import {TranslateComponent} from '@eg/staff/share/translate/translate.component';
22 import {AdminPageComponent} from '@eg/staff/share/admin-page/admin-page.component';
23
24 /**
25  * Imports the EG common modules and adds modules common to all staff UI's.
26  */
27
28 @NgModule({
29   declarations: [
30     StaffBannerComponent,
31     ComboboxComponent,
32     ComboboxEntryComponent,
33     OrgSelectComponent,
34     AccessKeyDirective,
35     AccessKeyInfoComponent,
36     ToastComponent,
37     StringComponent,
38     OpChangeComponent,
39     FmRecordEditorComponent,
40     DateSelectComponent,
41     RecordBucketDialogComponent,
42     BibSummaryComponent,
43     TranslateComponent,
44     AdminPageComponent
45   ],
46   imports: [
47     EgCommonModule,
48     GridModule
49   ],
50   exports: [
51     EgCommonModule,
52     GridModule,
53     StaffBannerComponent,
54     ComboboxComponent,
55     ComboboxEntryComponent,
56     OrgSelectComponent,
57     AccessKeyDirective,
58     AccessKeyInfoComponent,
59     ToastComponent,
60     StringComponent,
61     OpChangeComponent,
62     FmRecordEditorComponent,
63     DateSelectComponent,
64     RecordBucketDialogComponent,
65     BibSummaryComponent,
66     TranslateComponent,
67     AdminPageComponent
68   ]
69 })
70
71 export class StaffCommonModule {
72     static forRoot(): ModuleWithProviders {
73         return {
74             ngModule: StaffCommonModule,
75             providers: [ // Export staff-wide services
76                 AccessKeyService,
77                 AudioService,
78                 StringService,
79                 ToastService
80             ]
81         };
82     }
83 }
84