LP#1831788: create CommonWidgetsModule
[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 {CommonWidgetsModule} from '@eg/share/common-widgets.module';
4 import {AudioService} from '@eg/share/util/audio.service';
5 import {GridModule} from '@eg/share/grid/grid.module';
6 import {StaffBannerComponent} from './share/staff-banner.component';
7 import {OrgFamilySelectComponent} from '@eg/share/org-family-select/org-family-select.component';
8 import {AccessKeyDirective} from '@eg/share/accesskey/accesskey.directive';
9 import {AccessKeyService} from '@eg/share/accesskey/accesskey.service';
10 import {AccessKeyInfoComponent} from '@eg/share/accesskey/accesskey-info.component';
11 import {OpChangeComponent} from '@eg/staff/share/op-change/op-change.component';
12 import {ToastService} from '@eg/share/toast/toast.service';
13 import {ToastComponent} from '@eg/share/toast/toast.component';
14 import {StringComponent} from '@eg/share/string/string.component';
15 import {StringService} from '@eg/share/string/string.service';
16 import {TitleComponent} from '@eg/share/title/title.component';
17 import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
18 import {BucketDialogComponent} from '@eg/staff/share/buckets/bucket-dialog.component';
19 import {BibSummaryComponent} from '@eg/staff/share/bib-summary/bib-summary.component';
20 import {TranslateComponent} from '@eg/staff/share/translate/translate.component';
21 import {AdminPageComponent} from '@eg/staff/share/admin-page/admin-page.component';
22 import {EgHelpPopoverComponent} from '@eg/share/eg-help-popover/eg-help-popover.component';
23 import {ReactiveFormsModule} from '@angular/forms';
24
25 /**
26  * Imports the EG common modules and adds modules common to all staff UI's.
27  */
28
29 @NgModule({
30   declarations: [
31     StaffBannerComponent,
32     OrgFamilySelectComponent,
33     AccessKeyDirective,
34     AccessKeyInfoComponent,
35     ToastComponent,
36     StringComponent,
37     TitleComponent,
38     OpChangeComponent,
39     FmRecordEditorComponent,
40     BucketDialogComponent,
41     BibSummaryComponent,
42     TranslateComponent,
43     AdminPageComponent,
44     EgHelpPopoverComponent
45   ],
46   imports: [
47     EgCommonModule,
48     ReactiveFormsModule,
49     CommonWidgetsModule,
50     GridModule
51   ],
52   exports: [
53     EgCommonModule,
54     CommonWidgetsModule,
55     GridModule,
56     StaffBannerComponent,
57     OrgFamilySelectComponent,
58     AccessKeyDirective,
59     AccessKeyInfoComponent,
60     ToastComponent,
61     StringComponent,
62     TitleComponent,
63     OpChangeComponent,
64     FmRecordEditorComponent,
65     BucketDialogComponent,
66     BibSummaryComponent,
67     TranslateComponent,
68     AdminPageComponent,
69     EgHelpPopoverComponent
70   ]
71 })
72
73 export class StaffCommonModule {
74     static forRoot(): ModuleWithProviders {
75         return {
76             ngModule: StaffCommonModule,
77             providers: [ // Export staff-wide services
78                 AccessKeyService,
79                 AudioService,
80                 StringService,
81                 ToastService
82             ]
83         };
84     }
85 }
86