Move all Global Search components to a separate angular module.

pull/6929/head
Wieland Lindenthal 6 years ago
parent 62c883d058
commit c4e20fb811
  1. 22
      frontend/src/app/angular4-modules.ts
  2. 0
      frontend/src/app/modules/global_search/global-search-input.component.html
  3. 22
      frontend/src/app/modules/global_search/global-search-input.component.ts
  4. 0
      frontend/src/app/modules/global_search/global-search-tabs.component.html
  5. 24
      frontend/src/app/modules/global_search/global-search-tabs.component.ts
  6. 0
      frontend/src/app/modules/global_search/global-search-title.component.html
  7. 8
      frontend/src/app/modules/global_search/global-search-title.component.ts
  8. 42
      frontend/src/app/modules/global_search/global-search-work-packages.component.ts
  9. 4
      frontend/src/app/modules/global_search/global-search.service.ts
  10. 18
      frontend/src/app/modules/global_search/openproject-global-search.module.ts

@ -42,7 +42,6 @@ import {OpModalService} from 'core-components/op-modals/op-modal.service';
import {CurrentProjectService} from 'core-components/projects/current-project.service';
import {ProjectCacheService} from 'core-components/projects/project-cache.service';
import {States} from 'core-components/states.service';
import {GlobalSearchInputComponent} from 'core-components/global-search/global-search-input.component';
import {PaginationService} from 'core-components/table-pagination/pagination-service';
import {UserCacheService} from 'core-components/user/user-cache.service';
import {MainMenuResizerComponent} from 'core-components/resizer/main-menu-resizer.component';
@ -80,10 +79,7 @@ import {OpenprojectWorkPackageRoutesModule} from "core-app/modules/work_packages
import {BrowserModule} from "@angular/platform-browser";
import {OpenprojectCalendarModule} from "core-app/modules/calendar/openproject-calendar.module";
import {FullCalendarModule} from "ng-fullcalendar";
import {GlobalSearchService} from "core-components/global-search/global-search.service";
import {GlobalSearchWorkPackagesComponent} from "core-components/global-search/global-search-work-packages.component";
import {GlobalSearchTabsComponent} from "core-components/global-search/global-search-tabs.component";
import {GlobalSearchTitleComponent} from "core-components/global-search/global-search-title.component";
import {OpenprojectGlobalSearchModule} from "core-app/modules/global_search/openproject-global-search.module";
@NgModule({
imports: [
@ -111,6 +107,9 @@ import {GlobalSearchTitleComponent} from "core-components/global-search/global-s
OpenprojectCalendarModule,
FullCalendarModule,
// Global Search
OpenprojectGlobalSearchModule,
// Plugin hooks and modules
OpenprojectPluginsModule,
// Linked plugins dynamically generated by bundler
@ -145,7 +144,6 @@ import {GlobalSearchTitleComponent} from "core-components/global-search/global-s
// Main Menu
MainMenuToggleService,
GlobalSearchService,
// Augmenting Rails
ModalWrapperAugmentService,
@ -153,12 +151,6 @@ import {GlobalSearchTitleComponent} from "core-components/global-search/global-s
declarations: [
OpContextMenuTrigger,
// Searchbar
GlobalSearchInputComponent,
GlobalSearchWorkPackagesComponent,
GlobalSearchTabsComponent,
GlobalSearchTitleComponent,
// Modals
ConfirmDialogModal,
DynamicContentModal,
@ -176,12 +168,6 @@ import {GlobalSearchTitleComponent} from "core-components/global-search/global-s
ConfirmFormSubmitController,
],
entryComponents: [
// Searchbar
GlobalSearchInputComponent,
GlobalSearchWorkPackagesComponent,
GlobalSearchTabsComponent,
GlobalSearchTitleComponent,
// Project Auto completer
ProjectMenuAutocompleteComponent,

@ -35,19 +35,19 @@ import {
Renderer2,
ViewChild
} from '@angular/core';
import {ContainHelpers} from 'core-app/modules/common/focus/contain-helpers';
import {FocusHelperService} from 'core-app/modules/common/focus/focus-helper';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service";
import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service";
import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource";
import {CollectionResource} from "core-app/modules/hal/resources/collection-resource";
import {DynamicCssService} from "core-app/modules/common/dynamic-css/dynamic-css.service";
import {GlobalSearchService} from "core-components/global-search/global-search.service";
import {ContainHelpers} from 'app/modules/common/focus/contain-helpers';
import {FocusHelperService} from 'app/modules/common/focus/focus-helper';
import {I18nService} from 'app/modules/common/i18n/i18n.service';
import {DynamicBootstrapper} from "app/globals/dynamic-bootstrapper";
import {PathHelperService} from "app/modules/common/path-helper/path-helper.service";
import {HalResourceService} from "app/modules/hal/services/hal-resource.service";
import {WorkPackageResource} from "app/modules/hal/resources/work-package-resource";
import {CollectionResource} from "app/modules/hal/resources/collection-resource";
import {DynamicCssService} from "app/modules/common/dynamic-css/dynamic-css.service";
import {GlobalSearchService} from "app/modules/global_search/global-search.service";
import {debounceTime, distinctUntilChanged} from "rxjs/operators";
import {untilComponentDestroyed} from "ng2-rx-componentdestroyed";
import {CurrentProjectService} from "core-components/projects/current-project.service";
import {CurrentProjectService} from "app/components/projects/current-project.service";
import {Subject, Subscription} from "rxjs";
export const globalSearchSelector = 'global-search-input';

@ -35,20 +35,20 @@ import {
Renderer2,
ViewChild
} from '@angular/core';
import {ContainHelpers} from 'core-app/modules/common/focus/contain-helpers';
import {FocusHelperService} from 'core-app/modules/common/focus/focus-helper';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service";
import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service";
import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource";
import {CollectionResource} from "core-app/modules/hal/resources/collection-resource";
import {DynamicCssService} from "core-app/modules/common/dynamic-css/dynamic-css.service";
import {GlobalSearchService} from "core-components/global-search/global-search.service";
import {ContainHelpers} from 'app/modules/common/focus/contain-helpers';
import {FocusHelperService} from 'app/modules/common/focus/focus-helper';
import {I18nService} from 'app/modules/common/i18n/i18n.service';
import {DynamicBootstrapper} from "app/globals/dynamic-bootstrapper";
import {PathHelperService} from "app/modules/common/path-helper/path-helper.service";
import {HalResourceService} from "app/modules/hal/services/hal-resource.service";
import {WorkPackageResource} from "app/modules/hal/resources/work-package-resource";
import {CollectionResource} from "app/modules/hal/resources/collection-resource";
import {DynamicCssService} from "app/modules/common/dynamic-css/dynamic-css.service";
import {GlobalSearchService} from "app/modules/global_search/global-search.service";
import {distinctUntilChanged} from "rxjs/operators";
import {untilComponentDestroyed} from "ng2-rx-componentdestroyed";
import {CurrentProjectService} from "core-components/projects/current-project.service";
import {GlobalSearchInputComponent} from "core-components/global-search/global-search-input.component";
import {CurrentProjectService} from "app/components/projects/current-project.service";
import {GlobalSearchInputComponent} from "app/modules/global_search/global-search-input.component";
import {Subscription} from "rxjs";
export const globalSearchTabsSelector = 'global-search-tabs';

@ -32,13 +32,13 @@ import {
ElementRef,
OnDestroy
} from '@angular/core';
import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
import {DynamicBootstrapper} from "app/globals/dynamic-bootstrapper";
import {distinctUntilChanged} from 'rxjs/operators';
import {untilComponentDestroyed} from 'ng2-rx-componentdestroyed';
import {combineLatest} from 'rxjs';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {GlobalSearchService} from "core-components/global-search/global-search.service";
import {CurrentProjectService} from "core-components/projects/current-project.service";
import {I18nService} from 'app/modules/common/i18n/i18n.service';
import {GlobalSearchService} from "app/modules/global_search/global-search.service";
import {CurrentProjectService} from "app/components/projects/current-project.service";
import {Injector} from "@angular/core";
export const globalSearchTitleSelector = 'global-search-title';

@ -36,30 +36,30 @@ import {
Renderer2,
ViewChild
} from '@angular/core';
import {ContainHelpers} from 'core-app/modules/common/focus/contain-helpers';
import {FocusHelperService} from 'core-app/modules/common/focus/focus-helper';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service";
import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service";
import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource";
import {CollectionResource} from "core-app/modules/hal/resources/collection-resource";
import {DynamicCssService} from "core-app/modules/common/dynamic-css/dynamic-css.service";
import {GlobalSearchService} from "core-components/global-search/global-search.service";
import {ContainHelpers} from 'app/modules/common/focus/contain-helpers';
import {FocusHelperService} from 'app/modules/common/focus/focus-helper';
import {I18nService} from 'app/modules/common/i18n/i18n.service';
import {DynamicBootstrapper} from "app/globals/dynamic-bootstrapper";
import {PathHelperService} from "app/modules/common/path-helper/path-helper.service";
import {HalResourceService} from "app/modules/hal/services/hal-resource.service";
import {WorkPackageResource} from "app/modules/hal/resources/work-package-resource";
import {CollectionResource} from "app/modules/hal/resources/collection-resource";
import {DynamicCssService} from "app/modules/common/dynamic-css/dynamic-css.service";
import {GlobalSearchService} from "app/modules/global_search/global-search.service";
import {debounceTime, distinctUntilChanged} from "rxjs/operators";
import {componentDestroyed, untilComponentDestroyed} from "ng2-rx-componentdestroyed";
import {CurrentProjectService} from "core-components/projects/current-project.service";
import {GlobalSearchInputComponent} from "core-components/global-search/global-search-input.component";
import {CurrentProjectService} from "app/components/projects/current-project.service";
import {GlobalSearchInputComponent} from "app/modules/global_search/global-search-input.component";
import {Subscription} from "rxjs";
import {WorkPackageTableFilters} from "core-components/wp-fast-table/wp-table-filters";
import {WorkPackageTableFiltersService} from "core-components/wp-fast-table/state/wp-table-filters.service";
import {QueryFiltersComponent} from "core-components/filters/query-filters/query-filters.component";
import {WorkPackageEmbeddedTableComponent} from "core-components/wp-table/embedded/wp-embedded-table.component";
import {QueryResource} from "core-app/modules/hal/resources/query-resource";
import {QueryFormResource} from "core-app/modules/hal/resources/query-form-resource";
import {QueryFormDmService} from "core-app/modules/hal/dm-services/query-form-dm.service";
import {WorkPackageFiltersService} from "core-components/filters/wp-filters/wp-filters.service";
import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper";
import {WorkPackageTableFilters} from "app/components/wp-fast-table/wp-table-filters";
import {WorkPackageTableFiltersService} from "app/components/wp-fast-table/state/wp-table-filters.service";
import {QueryFiltersComponent} from "app/components/filters/query-filters/query-filters.component";
import {WorkPackageEmbeddedTableComponent} from "app/components/wp-table/embedded/wp-embedded-table.component";
import {QueryResource} from "app/modules/hal/resources/query-resource";
import {QueryFormResource} from "app/modules/hal/resources/query-form-resource";
import {QueryFormDmService} from "app/modules/hal/dm-services/query-form-dm.service";
import {WorkPackageFiltersService} from "app/components/filters/wp-filters/wp-filters.service";
import {UrlParamsHelperService} from "app/components/wp-query/url-params-helper";
export const globalSearchWorkPackagesSelector = 'global-search-work-packages';

@ -28,8 +28,8 @@
import {Injectable} from '@angular/core';
import {BehaviorSubject} from 'rxjs';
import {I18nService} from "core-app/modules/common/i18n/i18n.service";
import {CurrentProjectService} from "core-components/projects/current-project.service";
import {I18nService} from "app/modules/common/i18n/i18n.service";
import {CurrentProjectService} from "app/components/projects/current-project.service";
import {Injector} from "@angular/core";
@Injectable()

@ -48,7 +48,11 @@ import {HalAwareErrorHandler} from "core-app/modules/hal/services/hal-aware-erro
import {CommonModule} from "@angular/common";
import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module";
import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/openproject-work-packages.module";
import {GlobalSearchService} from "core-components/global-search/global-search.service";
import {GlobalSearchInputComponent} from "core-app/modules/global_search/global-search-input.component";
import {GlobalSearchWorkPackagesComponent} from "core-app/modules/global_search/global-search-work-packages.component";
import {GlobalSearchTabsComponent} from "core-app/modules/global_search/global-search-tabs.component";
import {GlobalSearchTitleComponent} from "core-app/modules/global_search/global-search-title.component";
import {GlobalSearchService} from "core-app/modules/global_search/global-search.service";
@NgModule({
imports: [
@ -59,9 +63,17 @@ import {GlobalSearchService} from "core-components/global-search/global-search.s
GlobalSearchService
],
declarations: [
// Todo: GlobalSearchInputComponent etc.
GlobalSearchInputComponent,
GlobalSearchWorkPackagesComponent,
GlobalSearchTabsComponent,
GlobalSearchTitleComponent,
],
entryComponents: [
GlobalSearchInputComponent,
GlobalSearchWorkPackagesComponent,
GlobalSearchTabsComponent,
GlobalSearchTitleComponent
]
})
export class OpenprojectGlobalSearchModule { }

Loading…
Cancel
Save