LP1840050 Modularize various standalone components + more.
[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 {AccessKeyDirective} from '@eg/share/accesskey/accesskey.directive';
8 import {AccessKeyService} from '@eg/share/accesskey/accesskey.service';
9 import {AccessKeyInfoComponent} from '@eg/share/accesskey/accesskey-info.component';
10 import {OpChangeComponent} from '@eg/staff/share/op-change/op-change.component';
11 import {TitleComponent} from '@eg/share/title/title.component';
12 import {BucketDialogComponent} from '@eg/staff/share/buckets/bucket-dialog.component';
13 import {BibSummaryComponent} from '@eg/staff/share/bib-summary/bib-summary.component';
14 import {EgHelpPopoverComponent} from '@eg/share/eg-help-popover/eg-help-popover.component';
15 import {DatetimeValidatorDirective} from '@eg/share/validators/datetime_validator.directive';
16 import {MultiSelectComponent} from '@eg/share/multi-select/multi-select.component';
17 import {NotBeforeMomentValidatorDirective} from '@eg/share/validators/not_before_moment_validator.directive';
18 import {PatronBarcodeValidatorDirective} from '@eg/share/validators/patron_barcode_validator.directive';
19
20 /**
21  * Imports the EG common modules and adds modules common to all staff UI's.
22  */
23
24 @NgModule({
25   declarations: [
26     StaffBannerComponent,
27     AccessKeyDirective,
28     AccessKeyInfoComponent,
29     TitleComponent,
30     OpChangeComponent,
31     BucketDialogComponent,
32     BibSummaryComponent,
33     EgHelpPopoverComponent,
34     DatetimeValidatorDirective,
35     MultiSelectComponent,
36     NotBeforeMomentValidatorDirective,
37     PatronBarcodeValidatorDirective,
38   ],
39   imports: [
40     EgCommonModule,
41     CommonWidgetsModule,
42     GridModule
43   ],
44   exports: [
45     EgCommonModule,
46     CommonWidgetsModule,
47     GridModule,
48     StaffBannerComponent,
49     AccessKeyDirective,
50     AccessKeyInfoComponent,
51     TitleComponent,
52     OpChangeComponent,
53     BucketDialogComponent,
54     BibSummaryComponent,
55     EgHelpPopoverComponent,
56     DatetimeValidatorDirective,
57     MultiSelectComponent,
58     NotBeforeMomentValidatorDirective,
59     PatronBarcodeValidatorDirective
60   ]
61 })
62
63 export class StaffCommonModule {
64     static forRoot(): ModuleWithProviders {
65         return {
66             ngModule: StaffCommonModule,
67             providers: [ // Export staff-wide services
68                 AccessKeyService,
69                 AudioService
70             ]
71         };
72     }
73 }
74