1d641e435aa706ec441de7661c6dca7192c5b052
[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 {CatalogCommonModule} from '@eg/share/catalog/catalog-common.module';
7 import {StaffBannerComponent} from './share/staff-banner.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 {BucketDialogComponent} from '@eg/staff/share/buckets/bucket-dialog.component';
14 import {BibSummaryComponent} from '@eg/staff/share/bib-summary/bib-summary.component';
15 import {EgHelpPopoverComponent} from '@eg/share/eg-help-popover/eg-help-popover.component';
16 import {DatetimeValidatorDirective} from '@eg/share/validators/datetime_validator.directive';
17 import {MultiSelectComponent} from '@eg/share/multi-select/multi-select.component';
18 import {NotBeforeMomentValidatorDirective} from '@eg/share/validators/not_before_moment_validator.directive';
19 import {PatronBarcodeValidatorDirective} from '@eg/share/validators/patron_barcode_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     AccessKeyDirective,
29     AccessKeyInfoComponent,
30     TitleComponent,
31     OpChangeComponent,
32     BucketDialogComponent,
33     BibSummaryComponent,
34     EgHelpPopoverComponent,
35     DatetimeValidatorDirective,
36     MultiSelectComponent,
37     NotBeforeMomentValidatorDirective,
38     PatronBarcodeValidatorDirective,
39   ],
40   imports: [
41     EgCommonModule,
42     CommonWidgetsModule,
43     GridModule,
44     CatalogCommonModule
45   ],
46   exports: [
47     EgCommonModule,
48     CommonWidgetsModule,
49     GridModule,
50     CatalogCommonModule,
51     StaffBannerComponent,
52     AccessKeyDirective,
53     AccessKeyInfoComponent,
54     TitleComponent,
55     OpChangeComponent,
56     BucketDialogComponent,
57     BibSummaryComponent,
58     EgHelpPopoverComponent,
59     DatetimeValidatorDirective,
60     MultiSelectComponent,
61     NotBeforeMomentValidatorDirective,
62     PatronBarcodeValidatorDirective
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