Reorder modules

pull/6881/head
Oliver Günther 6 years ago
parent 03a46bc9d4
commit b11c2097ca
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 10
      frontend/src/app/angular4-modules.ts
  2. 4
      frontend/src/app/modules/attachments/attachment-list/attachment-list-item.component.ts
  3. 0
      frontend/src/app/modules/attachments/attachment-list/attachment-list-item.html
  4. 0
      frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts
  5. 0
      frontend/src/app/modules/attachments/attachment-list/attachment-list.html
  6. 2
      frontend/src/app/modules/attachments/attachments-upload/attachments-upload.component.ts
  7. 0
      frontend/src/app/modules/attachments/attachments-upload/attachments-upload.html
  8. 0
      frontend/src/app/modules/attachments/attachments.component.ts
  9. 0
      frontend/src/app/modules/attachments/attachments.html
  10. 16
      frontend/src/app/modules/attachments/openproject-attachments.module.ts
  11. 22
      frontend/src/app/modules/common/openproject-common.module.ts
  12. 4
      frontend/src/app/modules/fields/openproject-fields.module.ts
  13. 13
      frontend/src/app/modules/work_packages/openproject-work-packages.module.ts

@ -26,10 +26,7 @@
// See doc/COPYRIGHT.rdoc for more details. // See doc/COPYRIGHT.rdoc for more details.
// ++ // ++
import {PortalModule} from '@angular/cdk/portal';
import {APP_INITIALIZER, ApplicationRef, Injector, NgModule} from '@angular/core'; import {APP_INITIALIZER, ApplicationRef, Injector, NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {BrowserModule} from '@angular/platform-browser';
import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module'; import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module';
import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive';
@ -53,7 +50,6 @@ import {PasswordConfirmationModal} from "core-components/modals/request-for-conf
import {OpTitleService} from 'core-components/html/op-title.service'; import {OpTitleService} from 'core-components/html/op-title.service';
import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module"; import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module";
import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module";
import {OpenprojectAccessibilityModule} from "core-app/modules/a11y/openproject-a11y.module";
import {CommentService} from "core-components/wp-activity/comment-service"; import {CommentService} from "core-components/wp-activity/comment-service";
import {OpDragScrollDirective} from "core-app/modules/common/ui/op-drag-scroll.directive"; import {OpDragScrollDirective} from "core-app/modules/common/ui/op-drag-scroll.directive";
import {UIRouterModule} from "@uirouter/angular"; import {UIRouterModule} from "@uirouter/angular";
@ -77,16 +73,10 @@ import {OpenprojectEditorModule} from 'core-app/modules/editor/openproject-edito
@NgModule({ @NgModule({
imports: [ imports: [
BrowserModule,
FormsModule,
// UI router routes configuration // UI router routes configuration
UIRouterModule.forRoot(), UIRouterModule.forRoot(),
// Angular CDK
PortalModule,
// Commons // Commons
OpenprojectCommonModule, OpenprojectCommonModule,
// A11y
OpenprojectAccessibilityModule,
// Hal Module // Hal Module
OpenprojectHalModule, OpenprojectHalModule,

@ -26,12 +26,12 @@
// See doc/COPYRIGHT.rdoc for more details. // See doc/COPYRIGHT.rdoc for more details.
//++ //++
import {WorkPackageNotificationService} from '../../wp-edit/wp-notification.service'; import {Component, Input} from '@angular/core';
import {Component, Inject, Input} from '@angular/core';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service';
import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; import {HalResource} from 'core-app/modules/hal/resources/hal-resource';
import {States} from 'core-components/states.service'; import {States} from 'core-components/states.service';
import {WorkPackageNotificationService} from "core-components/wp-edit/wp-notification.service";
@Component({ @Component({
selector: 'attachment-list-item', selector: 'attachment-list-item',

@ -26,13 +26,13 @@
// See doc/COPYRIGHT.rdoc for more details. // See doc/COPYRIGHT.rdoc for more details.
//++ //++
import {UploadFile} from '../../api/op-file-upload/op-file-upload.service';
import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; import {ConfigurationService} from 'core-app/modules/common/config/configuration.service';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {Component, ElementRef, Input, ViewChild} from '@angular/core'; import {Component, ElementRef, Input, ViewChild} from '@angular/core';
import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; import {HalResource} from 'core-app/modules/hal/resources/hal-resource';
import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service';
import {OnInit} from '@angular/core'; import {OnInit} from '@angular/core';
import {UploadFile} from "core-components/api/op-file-upload/op-file-upload.service";
@Component({ @Component({
selector: 'attachments-upload', selector: 'attachments-upload',

@ -26,24 +26,18 @@
// See doc/COPYRIGHT.rdoc for more details. // See doc/COPYRIGHT.rdoc for more details.
// ++ // ++
import {AttachmentsComponent} from 'core-components/attachments/attachments.component';
import {AttachmentListComponent} from 'core-components/attachments/attachment-list/attachment-list.component';
import {AttachmentListItemComponent} from 'core-components/attachments/attachment-list/attachment-list-item.component';
import {AttachmentsUploadComponent} from 'core-components/attachments/attachments-upload/attachments-upload.component';
import {NgModule} from '@angular/core'; import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {BrowserModule} from '@angular/platform-browser';
import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module';
import {AttachmentsComponent} from "core-app/modules/attachments/attachments.component";
import {AttachmentListComponent} from "core-app/modules/attachments/attachment-list/attachment-list.component";
import {AttachmentListItemComponent} from "core-app/modules/attachments/attachment-list/attachment-list-item.component";
import {AttachmentsUploadComponent} from "core-app/modules/attachments/attachments-upload/attachments-upload.component";
@NgModule({ @NgModule({
imports: [ imports: [
FormsModule,
BrowserModule,
OpenprojectCommonModule, OpenprojectCommonModule,
], ],
providers: [
],
declarations: [ declarations: [
AttachmentsComponent, AttachmentsComponent,
AttachmentListComponent, AttachmentListComponent,

@ -70,6 +70,9 @@ import {SortHeaderDirective} from 'core-components/wp-table/sort-header/sort-hea
import {ZenModeButtonComponent} from 'core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component'; import {ZenModeButtonComponent} from 'core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component';
import {OPContextMenuComponent} from 'core-components/op-context-menu/op-context-menu.component'; import {OPContextMenuComponent} from 'core-components/op-context-menu/op-context-menu.component';
import {TimezoneService} from 'core-components/datetime/timezone.service'; import {TimezoneService} from 'core-components/datetime/timezone.service';
import {UIRouterModule} from "@uirouter/angular";
import {PortalModule} from "@angular/cdk/portal";
import {CommonModule} from "@angular/common";
export function bootstrapModule(injector:Injector) { export function bootstrapModule(injector:Injector) {
return () => { return () => {
@ -84,11 +87,28 @@ export function bootstrapModule(injector:Injector) {
@NgModule({ @NgModule({
imports: [ imports: [
FormsModule, // UI router components (NOT routes!)
UIRouterModule,
// Angular browser + common module
CommonModule,
BrowserModule, BrowserModule,
// Angular Forms
FormsModule,
// Angular CDK
PortalModule,
// Our own A11y module
OpenprojectAccessibilityModule, OpenprojectAccessibilityModule,
], ],
exports: [ exports: [
// Re-export all commonly used
// modules to DRY
UIRouterModule,
CommonModule,
BrowserModule,
FormsModule,
PortalModule,
OpenprojectAccessibilityModule,
OpDatePickerComponent, OpDatePickerComponent,
OpDateTimeComponent, OpDateTimeComponent,
OpIcon, OpIcon,

@ -27,7 +27,6 @@
// ++ // ++
import {APP_INITIALIZER, NgModule} from '@angular/core'; import {APP_INITIALIZER, NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {EditFieldService} from "core-app/modules/fields/edit/edit-field.service"; import {EditFieldService} from "core-app/modules/fields/edit/edit-field.service";
import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service";
import {initializeCoreEditFields} from "core-app/modules/fields/edit/edit-field.initializer"; import {initializeCoreEditFields} from "core-app/modules/fields/edit/edit-field.initializer";
@ -35,7 +34,6 @@ import {initializeCoreDisplayFields} from "core-app/modules/fields/display/displ
import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component";
import {BooleanEditFieldComponent} from "core-app/modules/fields/edit/field-types/boolean-edit-field.component"; import {BooleanEditFieldComponent} from "core-app/modules/fields/edit/field-types/boolean-edit-field.component";
import {DateEditFieldComponent} from "core-app/modules/fields/edit/field-types/date-edit-field.component"; import {DateEditFieldComponent} from "core-app/modules/fields/edit/field-types/date-edit-field.component";
import {FormsModule} from "@angular/forms";
import {DurationEditFieldComponent} from "core-app/modules/fields/edit/field-types/duration-edit-field.component"; import {DurationEditFieldComponent} from "core-app/modules/fields/edit/field-types/duration-edit-field.component";
import {FloatEditFieldComponent} from "core-app/modules/fields/edit/field-types/float-edit-field.component"; import {FloatEditFieldComponent} from "core-app/modules/fields/edit/field-types/float-edit-field.component";
import {IntegerEditFieldComponent} from "core-app/modules/fields/edit/field-types/integer-edit-field.component"; import {IntegerEditFieldComponent} from "core-app/modules/fields/edit/field-types/integer-edit-field.component";
@ -53,8 +51,6 @@ import {OpenprojectEditorModule} from 'core-app/modules/editor/openproject-edito
@NgModule({ @NgModule({
imports: [ imports: [
FormsModule,
BrowserModule,
OpenprojectCommonModule, OpenprojectCommonModule,
OpenprojectAccessibilityModule, OpenprojectAccessibilityModule,
OpenprojectEditorModule, OpenprojectEditorModule,

@ -26,17 +26,13 @@
// See doc/COPYRIGHT.rdoc for more details. // See doc/COPYRIGHT.rdoc for more details.
// ++ // ++
import {FormsModule} from '@angular/forms';
import {PortalModule} from '@angular/cdk/portal';
import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module';
import {WorkPackageFormAttributeGroupComponent} from 'core-components/wp-form-group/wp-attribute-group.component'; import {WorkPackageFormAttributeGroupComponent} from 'core-components/wp-form-group/wp-attribute-group.component';
import {OpenprojectAccessibilityModule} from 'core-app/modules/a11y/openproject-a11y.module';
import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module'; import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module';
import {OpenprojectFieldsModule} from 'core-app/modules/fields/openproject-fields.module'; import {OpenprojectFieldsModule} from 'core-app/modules/fields/openproject-fields.module';
import {ChartsModule} from 'ng2-charts'; import {ChartsModule} from 'ng2-charts';
import {DynamicModule} from 'ng-dynamic-component'; import {DynamicModule} from 'ng-dynamic-component';
import {APP_INITIALIZER, Injector, NgModule} from '@angular/core'; import {APP_INITIALIZER, Injector, NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import { import {
GroupDescriptor, GroupDescriptor,
WorkPackageSingleViewComponent WorkPackageSingleViewComponent
@ -81,7 +77,6 @@ import {OpenprojectAttachmentsModule} from 'core-app/modules/attachments/openpro
import {WorkPackageEditFieldComponent} from 'core-app/components/wp-edit/wp-edit-field/wp-edit-field.component'; import {WorkPackageEditFieldComponent} from 'core-app/components/wp-edit/wp-edit-field/wp-edit-field.component';
import {WpCustomActionComponent} from 'core-components/wp-custom-actions/wp-custom-actions/wp-custom-action.component'; import {WpCustomActionComponent} from 'core-components/wp-custom-actions/wp-custom-actions/wp-custom-action.component';
import {WpCustomActionsComponent} from 'core-components/wp-custom-actions/wp-custom-actions.component'; import {WpCustomActionsComponent} from 'core-components/wp-custom-actions/wp-custom-actions.component';
import {UIRouterModule} from '@uirouter/angular';
import {WorkPackageSplitViewComponent} from 'core-components/routing/wp-split-view/wp-split-view.component'; import {WorkPackageSplitViewComponent} from 'core-components/routing/wp-split-view/wp-split-view.component';
import {WorkPackageRelationsCountComponent} from 'core-components/work-packages/wp-relations-count/wp-relations-count.component'; import {WorkPackageRelationsCountComponent} from 'core-components/work-packages/wp-relations-count/wp-relations-count.component';
import {WorkPackageWatchersCountComponent} from 'core-components/work-packages/wp-relations-count/wp-watchers-count.component'; import {WorkPackageWatchersCountComponent} from 'core-components/work-packages/wp-relations-count/wp-watchers-count.component';
@ -195,16 +190,8 @@ import {WpChildrenInlineCreateService} from "core-components/wp-relations/embedd
@NgModule({ @NgModule({
imports: [ imports: [
UIRouterModule,
BrowserModule,
FormsModule,
// Angular CDK
PortalModule,
// Commons // Commons
OpenprojectCommonModule, OpenprojectCommonModule,
// A11y
OpenprojectAccessibilityModule,
// Hal Module // Hal Module
OpenprojectHalModule, OpenprojectHalModule,
// Display + Edit field functionality // Display + Edit field functionality

Loading…
Cancel
Save