12c0ff164c42303776b1f79abe4bc24ddcf7b93e
[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 {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 {TitleComponent} from '@eg/share/title/title.component';
13 import {FmRecordEditorComponent} from '@eg/share/fm-editor/fm-editor.component';
14 import {BucketDialogComponent} from '@eg/staff/share/buckets/bucket-dialog.component';
15 import {BibSummaryComponent} from '@eg/staff/share/bib-summary/bib-summary.component';
16 import {TranslateComponent} from '@eg/staff/share/translate/translate.component';
17 import {AdminPageComponent} from '@eg/staff/share/admin-page/admin-page.component';
18 import {EgHelpPopoverComponent} from '@eg/share/eg-help-popover/eg-help-popover.component';
19 import {DatetimeValidatorDirective} from '@eg/share/validators/datetime_validator.directive';
20
21 /**
22  * Imports the EG common modules and adds modules common to all staff UI's.
23  */
24
25 @NgModule({
26   declarations: [
27     StaffBannerComponent,
28     OrgFamilySelectComponent,
29     AccessKeyDirective,
30     AccessKeyInfoComponent,
31     TitleComponent,
32     OpChangeComponent,
33     FmRecordEditorComponent,
34     BucketDialogComponent,
35     BibSummaryComponent,
36     TranslateComponent,
37     AdminPageComponent,
38     EgHelpPopoverComponent,
39     DatetimeValidatorDirective,
40   ],
41   imports: [
42     EgCommonModule,
43     CommonWidgetsModule,
44     GridModule
45   ],
46   exports: [
47     EgCommonModule,
48     CommonWidgetsModule,
49     GridModule,
50     StaffBannerComponent,
51     OrgFamilySelectComponent,
52     AccessKeyDirective,
53     AccessKeyInfoComponent,
54     TitleComponent,
55     OpChangeComponent,
56     FmRecordEditorComponent,
57     BucketDialogComponent,
58     BibSummaryComponent,
59     TranslateComponent,
60     AdminPageComponent,
61     EgHelpPopoverComponent,
62     DatetimeValidatorDirective,
63   ]
64 })
65
66 export class StaffCommonModule {
67     static forRoot(): ModuleWithProviders {
68         return {
69             ngModule: StaffCommonModule,
70             providers: [ // Export staff-wide services
71                 AccessKeyService,
72                 AudioService
73             ]
74         };
75     }
76 }
77