-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathapp.module.ts
333 lines (324 loc) · 15.7 KB
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
import { NgxSliderModule } from '@angular-slider/ngx-slider';
import { ScrollingModule as ExperimentalScrollingModule } from '@angular/cdk-experimental/scrolling';
import { ScrollingModule } from '@angular/cdk/scrolling';
import { HttpClientModule } from '@angular/common/http';
import { APP_INITIALIZER, ApplicationRef, DoBootstrap, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FaIconLibrary } from '@fortawesome/angular-fontawesome';
import { fas } from '@fortawesome/free-solid-svg-icons';
import { NgbModule, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
import { GridsterModule } from 'angular-gridster2';
import { DynamicAttributesModule, DynamicModule } from 'ng-dynamic-component';
import { NgxSpinnerModule } from 'ngx-spinner';
import { UiComponentsModule } from './ui-components/ui-components.module';
import { RouterModule, Routes } from '@angular/router';
import { AppRoutingModule } from './app-routing.module';
import { AppTranslationModule } from './app-translation.module';
import { AppComponent } from './app.component';
import { Ng2HandySyntaxHighlighterModule } from 'ng2-handy-syntax-highlighter';
import { AppConfig } from './app.config';
import { AdditionalComponent } from './components/additional/additional.component';
import { AdditionComponent } from './components/addition/addition.component';
import { AnalogueDetailComponent } from './components/analogues/analogue-detail/analogue-detail.component';
import { AnalogueEntryComponent } from './components/analogues/analogue-entry/analogue-entry.component';
import { AnaloguesComponent } from './components/analogues/analogues.component';
import { AnnotatorDirective } from './directives/annotator.directive';
import { AnnotatorService } from './services/annotator/annotator.service';
import { ApparatusEntryComponent } from './components/apparatus-entry/apparatus-entry.component';
import { ApparatusEntryDetailComponent } from './components/apparatus-entry/apparatus-entry-detail/apparatus-entry-detail.component';
import { ApparatusEntryReadingsComponent } from './components/apparatus-entry/apparatus-entry-readings/apparatus-entry-readings.component';
import { BiblioEntryComponent } from './components/biblio/biblio.component';
import { BibliographyInfoComponent } from './components/bibliography-info/bibliography-info.component';
import { BibliographicStyleSelectorComponent } from './components/bibliography-info/bibliographic-style-selector/bibliographic-style-selector';
import { BiblioListComponent } from './components/biblioList/biblio-list.component';
import { ChangeLayerSelectorComponent } from './components/change-layer-selector/change-layer-selector.component';
import { CharComponent } from './components/char/char.component';
import { ChoiceComponent } from './components/choice/choice.component';
import { CollationComponent } from './view-modes/collation/collation.component';
import { ContentViewerComponent } from './components/content-viewer/content-viewer.component';
import { CriticalApparatusComponent } from './components/critical-apparatus/critical-apparatus.component';
import { DamageComponent } from './components/damage/damage.component';
import { DeletionComponent } from './components/deletion/deletion.component';
import { DocumentalMixedComponent } from './view-modes/documental-mixed/documental-mixed.component';
import { EditionLevelSelectorComponent } from './components/edition-level-selector/edition-level-selector.component';
import { EditionStmtComponent } from './components/edition-stmt/edition-stmt.component';
import { EditorialConventionLayoutDirective } from './directives/editorial-convention-layout.directive';
import { EditorialDeclComponent } from './components/editorial-decl/editorial-decl.component';
import { EncodingDescComponent } from './components/encoding-desc/encoding-desc.component';
import { EntitiesSelectComponent } from './components/entities-select/entities-select.component';
import { EvtInfoComponent } from './evt-info/evt-info.component';
import { ExtentComponent } from './components/extent/extent.component';
import { FileDescComponent } from './components/file-desc/file-desc.component';
import { FilterPipe } from './pipes/filter.pipe';
import { GapComponent } from './components/gap/gap.component';
import { GComponent } from './components/g/g.component';
import { GenericElementComponent } from './components/generic-element/generic-element.component';
import { GenericParserService } from './services/xml-parsers/generic-parser.service';
import { GlobalListsComponent } from './components/global-lists/global-lists.component';
import { HandleImgErrorDirective } from './directives/handle-img-error.directive';
import { HighlightDirective } from './directives/highlight.directive';
import { HistoryComponent } from './components/history/history.component';
import { HtmlAttributesDirective } from './directives/html-attributes.directive';
import { HumanizePipe } from './pipes/humanize.pipe';
import { IdbService } from './services/idb.service';
import { IdentifierComponent } from './components/identifier/identifier.component';
import { ImageImageComponent } from './view-modes/image-image/image-image.component';
import { ImageGrpPanelComponent } from './panels/imagegrp-panel/imagegrp-panel.component';
import { ImageOnlyComponent } from './view-modes/image-only/image-only.component';
import { ImagePanelComponent } from './panels/image-panel/image-panel.component';
import { ImageTextComponent } from './view-modes/image-text/image-text.component';
import { LbComponent } from './components/lb/lb.component';
import { MainHeaderComponent } from './main-header/main-header.component';
import { MainMenuComponent } from './main-menu/main-menu.component';
import { ManuscriptThumbnailsViewerComponent } from './components/manuscript-thumbnails-viewer/manuscript-thumbnails-viewer.component';
import { ModComponent } from './components/mod/mod.component';
import { ModDetailComponent } from './components/mod/mod-detail/mod-detail.component';
import { ModGroupComponent } from './components/mod/mod-group/mod-group.component';
import { ModSequenceComponent } from './components/mod/mod-sequence/mod-sequence.component';
import { MsContentsComponent } from './components/ms-contents/ms-contents.component';
import { MsDescComponent } from './components/ms-desc/ms-desc.component';
import { MsDescSectionComponent } from './ui-components/ms-desc-section/ms-desc-section.component';
import { MsDescSelectorComponent } from './components/ms-desc-selector/ms-desc-selector.component';
import { MsFragComponent } from './components/ms-frag/ms-frag.component';
import { MsIdentifierComponent } from './components/ms-identifier/ms-identifier.component';
import { MsItemComponent } from './components/ms-item/ms-item.component';
import { MsPartComponent } from './components/ms-part/ms-part.component';
import { NamedEntitiesListComponent } from './components/named-entities-list/named-entities-list.component';
import { NamedEntityComponent } from './components/named-entity/named-entity.component';
import { NamedEntityDetailComponent } from './components/named-entity/named-entity-detail/named-entity-detail.component';
import { NamedEntityOccurrenceComponent } from './components/named-entity/named-entity-occurrence/named-entity-occurrence.component';
import { NamedEntityRefComponent } from './components/named-entity-ref/named-entity-ref.component';
import { NamedEntityRelationComponent } from './components/named-entity-relation/named-entity-relation.component';
import { NamespaceComponent } from './components/namespace/namespace.component';
import { NavBarComponent } from './nav-bar/nav-bar.component';
import { NavBarImageComponent } from './nav-bar-image/nav-bar-image.component';
import { NoteComponent } from './components/note/note.component';
import { NotesStmtComponent } from './components/notes-stmt/notes-stmt.component';
import { OriginalEncodingViewerComponent } from './components/original-encoding-viewer/original-encoding-viewer.component';
import { OsdComponent } from './components/osd/osd.component';
import { PageComponent } from './components/page/page.component';
import { PageSelectorComponent } from './components/page-selector/page-selector.component';
import { ParagraphComponent } from './components/paragraph/paragraph.component';
import { PhysDescComponent } from './components/phys-desc/phys-desc.component';
import { PinboardComponent } from './pinboard/pinboard.component';
import { PinboardPanelComponent } from './panels/pinboard-panel/pinboard-panel.component';
import { PinnerComponent } from './pinboard/pinner/pinner.component';
import { ProjectDescComponent } from './components/project-desc/project-desc.component';
import { ProjectInfoComponent } from './components/project-info/project-info.component';
import { PublicationStmtComponent } from './components/publication-stmt/publication-stmt.component';
import { QuoteEntryComponent } from './components/quote-entry/quote-entry.component';
import { ReadingComponent } from './components/reading/reading.component';
import { ReadingTextComponent } from './view-modes/reading-text/reading-text.component';
import { RenditionComponent } from './components/rendition/rendition.component';
import { RespStmtComponent } from './components/resp-stmt/resp-stmt.component';
import { SamplingDeclComponent } from './components/sampling-decl/sampling-decl.component';
import { SeriesStmtComponent } from './components/series-stmt/series-stmt.component';
import { ShortcutsComponent } from './shortcuts/shortcuts.component';
import { SicComponent } from './components/sic/sic.component';
import { SpaceComponent } from './components/space/space.component';
import { SourceDetailComponent } from './components/sources/source-detail/source-detail.component';
import { SourceNoteComponent } from './components/sources/source-note/source-note.component';
import { SourcesComponent } from './components/sources/sources.component';
import { SourcesPanelComponent } from './panels/sources-panel/sources-panel.component';
import { StartsWithPipe } from './pipes/starts-with.pipe';
import { StyledBiblioEntryComponent } from './components/bibliography-info/biblio-styled/biblio-styled.component';
import { SubstitutionComponent } from './components/substitution/substitution.component';
import { SuppliedComponent } from './components/supplied/supplied.component';
import { SurplusComponent } from './components/surplus/surplus.component';
import { TagsDeclComponent } from './components/tags-decl/tags-decl.component';
import { TextComponent } from './components/text/text.component';
import { TextPanelComponent } from './panels/text-panel/text-panel.component';
import { TextSourcesComponent } from './view-modes/text-sources/text-sources.component';
import { TextTextComponent } from './view-modes/text-text/text-text.component';
import { TextVersionsComponent } from './view-modes/text-versions/text-versions.component';
import { ThemesService } from './services/themes.service';
import { TitleStmtComponent } from './components/title-stmt/title-stmt.component';
import { VceditorComponent } from './components/vceditor/vceditor.component';
import { VerseComponent } from './components/verse/verse.component';
import { VersesGroupComponent } from './components/verses-group/verses-group.component';
import { VersionPanelComponent } from './panels/version-panel/version-panel.component';
import { WordComponent } from './components/word/word.component';
import { WitnessPanelComponent } from './panels/witness-panel/witness-panel.component';
import { XmlBeautifyPipe } from './pipes/xml-beautify.pipe';
import { XMLParsers } from './services/xml-parsers/xml-parsers';
const routes: Routes = [
];
export function initializeApp(appConfig: AppConfig) {
return () => appConfig.load();
}
const DynamicComponents = [
AdditionalComponent,
AdditionComponent,
AnalogueEntryComponent,
ApparatusEntryComponent,
ApparatusEntryDetailComponent,
ApparatusEntryReadingsComponent,
CharComponent,
ChoiceComponent,
DamageComponent,
DeletionComponent,
EditionStmtComponent,
EditorialDeclComponent,
EncodingDescComponent,
ExtentComponent,
FileDescComponent,
GapComponent,
GComponent,
GenericElementComponent,
HistoryComponent,
IdentifierComponent,
LbComponent,
MsContentsComponent,
MsDescComponent,
MsFragComponent,
MsIdentifierComponent,
MsItemComponent,
MsPartComponent,
NamedEntitiesListComponent,
NamedEntityComponent,
NamedEntityDetailComponent,
NamedEntityRefComponent,
NamedEntityRelationComponent,
NamespaceComponent,
NoteComponent,
NotesStmtComponent,
ParagraphComponent,
PhysDescComponent,
ProjectDescComponent,
PublicationStmtComponent,
QuoteEntryComponent,
ReadingComponent,
RenditionComponent,
RespStmtComponent,
SamplingDeclComponent,
SeriesStmtComponent,
SicComponent,
SpaceComponent,
SuppliedComponent,
SurplusComponent,
TagsDeclComponent,
TextComponent,
TitleStmtComponent,
VerseComponent,
VersesGroupComponent,
WordComponent,
];
@NgModule({
declarations: [
AnalogueDetailComponent,
AnaloguesComponent,
AnnotatorDirective,
AppComponent,
BiblioEntryComponent,
BibliographyInfoComponent,
BibliographicStyleSelectorComponent,
BiblioListComponent,
ChangeLayerSelectorComponent,
CollationComponent,
ContentViewerComponent,
CriticalApparatusComponent,
DocumentalMixedComponent,
EditionLevelSelectorComponent,
EditorialConventionLayoutDirective,
EntitiesSelectComponent,
EvtInfoComponent,
FilterPipe,
GlobalListsComponent,
HandleImgErrorDirective,
HighlightDirective,
HtmlAttributesDirective,
HumanizePipe,
ImagePanelComponent,
ImageGrpPanelComponent,
ImageTextComponent,
ImageOnlyComponent,
ImageImageComponent,
MainHeaderComponent,
MainMenuComponent,
ManuscriptThumbnailsViewerComponent,
ModComponent,
ModDetailComponent,
ModGroupComponent,
ModSequenceComponent,
MsDescSectionComponent,
MsDescSelectorComponent,
NamedEntityOccurrenceComponent,
NavBarComponent,
NavBarImageComponent,
OriginalEncodingViewerComponent,
OsdComponent,
PageComponent,
PageSelectorComponent,
PinboardComponent,
PinboardPanelComponent,
PinnerComponent,
ProjectInfoComponent,
ReadingTextComponent,
ShortcutsComponent,
SourceDetailComponent,
SourceNoteComponent,
SourcesComponent,
SourcesPanelComponent,
StartsWithPipe,
StyledBiblioEntryComponent,
SubstitutionComponent,
TextPanelComponent,
TextSourcesComponent,
TextTextComponent,
TextVersionsComponent,
VersionPanelComponent,
VceditorComponent,
WitnessPanelComponent,
XmlBeautifyPipe,
...DynamicComponents,
],
imports: [
AppRoutingModule,
AppTranslationModule,
BrowserModule,
BrowserAnimationsModule,
DynamicAttributesModule,
DynamicModule,
ExperimentalScrollingModule,
FormsModule,
GridsterModule,
HttpClientModule,
Ng2HandySyntaxHighlighterModule,
NgbModule,
NgbPopoverModule,
NgxSliderModule,
NgxSpinnerModule,
RouterModule.forRoot(routes, { useHash: true, relativeLinkResolution: 'legacy' }),
ScrollingModule,
UiComponentsModule,
],
providers: [
AnnotatorService,
AppConfig,
{
provide: APP_INITIALIZER,
useFactory: initializeApp,
deps: [AppConfig], multi: true,
},
AppConfig,
GenericParserService,
IdbService,
ThemesService,
XMLParsers,
],
bootstrap: [
AppComponent,
],
})
export class AppModule implements DoBootstrap {
constructor(
library: FaIconLibrary,
) {
library.addIconPacks(fas);
}
ngDoBootstrap(appRef: ApplicationRef): void {
DynamicComponents.forEach((c) => appRef.bootstrap(c));
}
}