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