Merge bcf and ifc_models into bim and lazy load

pull/8100/head
Oliver Günther 5 years ago
parent d5f6c8d7a7
commit 29f0ffe498
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 6
      frontend/src/app/angular4-modules.ts
  2. 2
      frontend/src/app/components/wp-activity/user/user-activity.component.ts
  3. 2
      frontend/src/app/components/wp-query-select/wp-static-queries.service.ts
  4. 2
      frontend/src/app/modules/bim/bcf/bcf-buttons/bcf-export-button.component.ts
  5. 2
      frontend/src/app/modules/bim/bcf/bcf-buttons/bcf-import-button.component.ts
  6. 0
      frontend/src/app/modules/bim/bcf/bcf-wp-single-view/bcf-wp-single-view.component.html
  7. 0
      frontend/src/app/modules/bim/bcf/bcf-wp-single-view/bcf-wp-single-view.component.sass
  8. 0
      frontend/src/app/modules/bim/bcf/bcf-wp-single-view/bcf-wp-single-view.component.ts
  9. 2
      frontend/src/app/modules/bim/bcf/fields/display/bcf-display-field.initializer.ts
  10. 0
      frontend/src/app/modules/bim/bcf/fields/display/bcf-thumbnail-field.module.ts
  11. 0
      frontend/src/app/modules/bim/bcf/helper/bcf-detector.service.ts
  12. 0
      frontend/src/app/modules/bim/bcf/helper/bcf-path-helper.service.ts
  13. 12
      frontend/src/app/modules/bim/bcf/openproject-bcf.module.ts
  14. 0
      frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.html
  15. 2
      frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.ts
  16. 0
      frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.html
  17. 2
      frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.ts
  18. 0
      frontend/src/app/modules/bim/ifc_models/empty/empty-component.ts
  19. 4
      frontend/src/app/modules/bim/ifc_models/ifc-base-view/event-handler/bcf-card-view-handler-registry.ts
  20. 0
      frontend/src/app/modules/bim/ifc_models/ifc-base-view/event-handler/bcf-click-handler.ts
  21. 0
      frontend/src/app/modules/bim/ifc_models/ifc-base-view/event-handler/bcf-double-click-handler.ts
  22. 2
      frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts
  23. 2
      frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service.ts
  24. 18
      frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.module.ts
  25. 8
      frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.routes.ts
  26. 2
      frontend/src/app/modules/bim/ifc_models/pages/viewer/bim-view.service.ts
  27. 2
      frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service.ts
  28. 14
      frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts
  29. 2
      frontend/src/app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component.ts
  30. 2
      frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component.ts
  31. 2
      frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-dropdown.directive.ts
  32. 0
      frontend/src/app/modules/bim/ifc_models/xeokit/xeokit-server.d.ts
  33. 0
      frontend/src/app/modules/bim/ifc_models/xeokit/xeokit-server.js
  34. 0
      frontend/src/app/modules/bim/ifc_models/xeokit/xeokit.d.ts
  35. 51
      frontend/src/app/modules/bim/openproject-bim.module.ts
  36. 33
      frontend/src/app/modules/router/openproject.routes.ts
  37. 2
      frontend/src/app/modules/work_packages/openproject-work-packages.module.ts
  38. 2
      frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts
  39. 2
      frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.ts
  40. 6
      frontend/src/app/modules/work_packages/routing/wp-view-page/wp-view-page.component.ts

@ -93,8 +93,9 @@ import {PreviewTriggerService} from "core-app/globals/global-listeners/preview-t
import {OpenprojectOverviewModule} from "core-app/modules/overview/openproject-overview.module"; import {OpenprojectOverviewModule} from "core-app/modules/overview/openproject-overview.module";
import {OpenprojectMyPageModule} from "core-app/modules/my-page/openproject-my-page.module"; import {OpenprojectMyPageModule} from "core-app/modules/my-page/openproject-my-page.module";
import {OpenprojectProjectsModule} from "core-app/modules/projects/openproject-projects.module"; import {OpenprojectProjectsModule} from "core-app/modules/projects/openproject-projects.module";
import {OpenprojectIFCModelsModule} from "core-app/modules/ifc_models/openproject-ifc-models.module"; import {OpenprojectIFCModelsModule} from "core-app/modules/bim/ifc_models/openproject-ifc-models.module";
import {TimeEntryCacheService} from "core-components/time-entries/time-entry-cache.service"; import {TimeEntryCacheService} from "core-components/time-entries/time-entry-cache.service";
import {OpenprojectBimModule} from "core-app/modules/bim/openproject-bim.module";
@NgModule({ @NgModule({
imports: [ imports: [
@ -141,9 +142,6 @@ import {TimeEntryCacheService} from "core-components/time-entries/time-entry-cac
// Global Search // Global Search
OpenprojectGlobalSearchModule, OpenprojectGlobalSearchModule,
// IFC Models
OpenprojectIFCModelsModule,
// Admin module // Admin module
OpenprojectAdminModule, OpenprojectAdminModule,

@ -46,7 +46,7 @@ import {UserCacheService} from "core-components/user/user-cache.service";
import {CommentService} from "core-components/wp-activity/comment-service"; import {CommentService} from "core-components/wp-activity/comment-service";
import {I18nService} from "core-app/modules/common/i18n/i18n.service"; import {I18nService} from "core-app/modules/common/i18n/i18n.service";
import {WorkPackageCommentFieldHandler} from "core-components/work-packages/work-package-comment/work-package-comment-field-handler"; import {WorkPackageCommentFieldHandler} from "core-components/work-packages/work-package-comment/work-package-comment-field-handler";
import {ViewPointOriginal} from "core-app/modules/bcf/bcf-wp-single-view/bcf-wp-single-view.component"; import {ViewPointOriginal} from "core-app/modules/bim/bcf/bcf-wp-single-view/bcf-wp-single-view.component";
import {DomSanitizer, SafeHtml} from "@angular/platform-browser"; import {DomSanitizer, SafeHtml} from "@angular/platform-browser";
import {HalResource} from "core-app/modules/hal/resources/hal-resource"; import {HalResource} from "core-app/modules/hal/resources/hal-resource";

@ -33,7 +33,7 @@ import {PathHelperService} from "core-app/modules/common/path-helper/path-helper
import {CurrentProjectService} from "core-components/projects/current-project.service"; import {CurrentProjectService} from "core-components/projects/current-project.service";
import {StateService} from "@uirouter/core"; import {StateService} from "@uirouter/core";
import {CurrentUserService} from "core-components/user/current-user.service"; import {CurrentUserService} from "core-components/user/current-user.service";
import {BcfDetectorService} from "core-app/modules/bcf/helper/bcf-detector.service"; import {BcfDetectorService} from "core-app/modules/bim/bcf/helper/bcf-detector.service";
@Injectable() @Injectable()
export class WorkPackageStaticQueriesService { export class WorkPackageStaticQueriesService {

@ -30,7 +30,7 @@ import {Component, OnDestroy, OnInit, Query} from '@angular/core';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper"; import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
import {CurrentProjectService} from "core-components/projects/current-project.service"; import {CurrentProjectService} from "core-components/projects/current-project.service";
import {BcfPathHelperService} from "core-app/modules/bcf/helper/bcf-path-helper.service"; import {BcfPathHelperService} from "core-app/modules/bim/bcf/helper/bcf-path-helper.service";
import {untilComponentDestroyed} from "ng2-rx-componentdestroyed"; import {untilComponentDestroyed} from "ng2-rx-componentdestroyed";
import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space";
import {QueryResource} from "core-app/modules/hal/resources/query-resource"; import {QueryResource} from "core-app/modules/hal/resources/query-resource";

@ -30,7 +30,7 @@ import {Component} from '@angular/core';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper"; import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
import {CurrentProjectService} from "core-components/projects/current-project.service"; import {CurrentProjectService} from "core-components/projects/current-project.service";
import {BcfPathHelperService} from "core-app/modules/bcf/helper/bcf-path-helper.service"; import {BcfPathHelperService} from "core-app/modules/bim/bcf/helper/bcf-path-helper.service";
@Component({ @Component({
template: ` template: `

@ -27,7 +27,7 @@
// ++ // ++
import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service";
import {BcfThumbnailDisplayField} from "core-app/modules/bcf/fields/display/bcf-thumbnail-field.module"; import {BcfThumbnailDisplayField} from "core-app/modules/bim/bcf/fields/display/bcf-thumbnail-field.module";
export function initializeBcfDisplayFields(displayFieldService:DisplayFieldService) { export function initializeBcfDisplayFields(displayFieldService:DisplayFieldService) {
return () => { return () => {

@ -28,14 +28,14 @@
import {APP_INITIALIZER, NgModule} from '@angular/core'; import {APP_INITIALIZER, NgModule} from '@angular/core';
import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module";
import {BcfWpSingleViewComponent} from "core-app/modules/bcf/bcf-wp-single-view/bcf-wp-single-view.component"; import {BcfWpSingleViewComponent} from "core-app/modules/bim/bcf/bcf-wp-single-view/bcf-wp-single-view.component";
import {NgxGalleryModule} from "ngx-gallery"; import {NgxGalleryModule} from "ngx-gallery";
import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service";
import {initializeBcfDisplayFields} from "core-app/modules/bcf/fields/display/bcf-display-field.initializer"; import {initializeBcfDisplayFields} from "core-app/modules/bim/bcf/fields/display/bcf-display-field.initializer";
import {BcfImportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-import-button.component"; import {BcfImportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-import-button.component";
import {BcfDetectorService} from "core-app/modules/bcf/helper/bcf-detector.service"; import {BcfDetectorService} from "core-app/modules/bim/bcf/helper/bcf-detector.service";
import {BcfPathHelperService} from "core-app/modules/bcf/helper/bcf-path-helper.service"; import {BcfPathHelperService} from "core-app/modules/bim/bcf/helper/bcf-path-helper.service";
import {BcfExportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-export-button.component"; import {BcfExportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-export-button.component";
@NgModule({ @NgModule({

@ -11,7 +11,7 @@ import {WorkPackagesListService} from "core-components/wp-list/wp-list.service";
import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper"; import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper";
import {untilComponentDestroyed} from "ng2-rx-componentdestroyed"; import {untilComponentDestroyed} from "ng2-rx-componentdestroyed";
import {WorkPackageViewHandlerToken} from "core-app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry"; import {WorkPackageViewHandlerToken} from "core-app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry";
import {BcfCardViewHandlerRegistry} from "core-app/modules/ifc_models/ifc-base-view/event-handler/bcf-card-view-handler-registry"; import {BcfCardViewHandlerRegistry} from "core-app/modules/bim/ifc_models/ifc-base-view/event-handler/bcf-card-view-handler-registry";
@Component({ @Component({
templateUrl: './bcf-list-container.component.html', templateUrl: './bcf-list-container.component.html',

@ -30,7 +30,7 @@ import {WorkPackageCreateComponent} from 'core-components/wp-new/wp-create.compo
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource";
import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; import {InjectField} from "core-app/helpers/angular/inject-field.decorator";
import {IFCViewerService} from "core-app/modules/ifc_models/ifc-viewer/ifc-viewer.service"; import {IFCViewerService} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service";
@Component({ @Component({
selector: 'bcf-new-split', selector: 'bcf-new-split',

@ -3,8 +3,8 @@ import {
CardEventHandler, CardEventHandler,
CardViewHandlerRegistry CardViewHandlerRegistry
} from "core-components/wp-card-view/event-handler/card-view-handler-registry"; } from "core-components/wp-card-view/event-handler/card-view-handler-registry";
import {BcfDoubleClickHandler} from "core-app/modules/ifc_models/ifc-base-view/event-handler/bcf-double-click-handler"; import {BcfDoubleClickHandler} from "core-app/modules/bim/ifc_models/ifc-base-view/event-handler/bcf-double-click-handler";
import {BcfClickHandler} from "core-app/modules/ifc_models/ifc-base-view/event-handler/bcf-click-handler"; import {BcfClickHandler} from "core-app/modules/bim/ifc_models/ifc-base-view/event-handler/bcf-click-handler";
export class BcfCardViewHandlerRegistry extends CardViewHandlerRegistry { export class BcfCardViewHandlerRegistry extends CardViewHandlerRegistry {

@ -29,7 +29,7 @@
import {Component, ElementRef, OnInit, OnDestroy, ChangeDetectionStrategy} from '@angular/core'; import {Component, ElementRef, OnInit, OnDestroy, ChangeDetectionStrategy} from '@angular/core';
import {GonService} from "core-app/modules/common/gon/gon.service"; import {GonService} from "core-app/modules/common/gon/gon.service";
import {IFCViewerService} from "core-app/modules/ifc_models/ifc-viewer/ifc-viewer.service"; import {IFCViewerService} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service";
@Component({ @Component({
selector: 'ifc-viewer', selector: 'ifc-viewer',

@ -1,5 +1,5 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import {XeokitServer} from "core-app/modules/ifc_models/xeokit/xeokit-server"; import {XeokitServer} from "core-app/modules/bim/ifc_models/xeokit/xeokit-server";
export interface XeokitElements { export interface XeokitElements {
canvasElement:HTMLElement; canvasElement:HTMLElement;

@ -30,16 +30,16 @@ import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/open
import {UIRouterModule} from '@uirouter/angular'; import {UIRouterModule} from '@uirouter/angular';
import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module";
import {IFCViewerComponent} from './ifc-viewer/ifc-viewer.component'; import {IFCViewerComponent} from './ifc-viewer/ifc-viewer.component';
import {IFC_ROUTES} from "core-app/modules/ifc_models/openproject-ifc-models.routes"; import {IFC_ROUTES} from "core-app/modules/bim/ifc_models/openproject-ifc-models.routes";
import {IFCViewerPageComponent} from "core-app/modules/ifc_models/pages/viewer/ifc-viewer-page.component"; import {IFCViewerPageComponent} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component";
import {EmptyComponent} from "core-app/modules/ifc_models/empty/empty-component"; import {EmptyComponent} from "core-app/modules/bim/ifc_models/empty/empty-component";
import {BimViewToggleButtonComponent} from "core-app/modules/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component"; import {BimViewToggleButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component";
import {BimViewToggleDropdownDirective} from "core-app/modules/ifc_models/toolbar/view-toggle/bim-view-toggle-dropdown.directive"; import {BimViewToggleDropdownDirective} from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-dropdown.directive";
import {BimManageIfcModelsButtonComponent} from "core-app/modules/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component"; import {BimManageIfcModelsButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component";
import {IFCViewerService} from "core-app/modules/ifc_models/ifc-viewer/ifc-viewer.service"; import {IFCViewerService} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service";
import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module"; import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module";
import {BCFNewSplitComponent} from "core-app/modules/ifc_models/bcf/new-split/bcf-new-split.component"; import {BCFNewSplitComponent} from "core-app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component";
import {BcfListContainerComponent} from "core-app/modules/ifc_models/bcf/list-container/bcf-list-container.component"; import {BcfListContainerComponent} from "core-app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component";
@NgModule({ @NgModule({
imports: [ imports: [

@ -26,12 +26,12 @@
// See doc/COPYRIGHT.rdoc for more details. // See doc/COPYRIGHT.rdoc for more details.
// ++ // ++
import {Ng2StateDeclaration} from '@uirouter/angular'; import {Ng2StateDeclaration} from '@uirouter/angular';
import {IFCViewerPageComponent} from "core-app/modules/ifc_models/pages/viewer/ifc-viewer-page.component"; import {IFCViewerPageComponent} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component";
import {IFCViewerComponent} from "core-app/modules/ifc_models/ifc-viewer/ifc-viewer.component"; import {IFCViewerComponent} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component";
import {WorkPackagesBaseComponent} from "core-app/modules/work_packages/routing/wp-base/wp--base.component"; import {WorkPackagesBaseComponent} from "core-app/modules/work_packages/routing/wp-base/wp--base.component";
import {EmptyComponent} from "core-app/modules/ifc_models/empty/empty-component"; import {EmptyComponent} from "core-app/modules/bim/ifc_models/empty/empty-component";
import {makeSplitViewRoutes} from "core-app/modules/work_packages/routing/split-view-routes.template"; import {makeSplitViewRoutes} from "core-app/modules/work_packages/routing/split-view-routes.template";
import {BcfListContainerComponent} from "core-app/modules/ifc_models/bcf/list-container/bcf-list-container.component"; import {BcfListContainerComponent} from "core-app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component";
import {WorkPackageSplitViewComponent} from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; import {WorkPackageSplitViewComponent} from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component";

@ -31,7 +31,7 @@ import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {Observable} from "rxjs"; import {Observable} from "rxjs";
import {StateService, TransitionService} from "@uirouter/core"; import {StateService, TransitionService} from "@uirouter/core";
import {input} from "reactivestates"; import {input} from "reactivestates";
import {OpenprojectIFCModelsModule} from "core-app/modules/ifc_models/openproject-ifc-models.module"; import {OpenprojectIFCModelsModule} from "core-app/modules/bim/ifc_models/openproject-ifc-models.module";
import {takeUntil} from "rxjs/operators"; import {takeUntil} from "rxjs/operators";

@ -1,5 +1,5 @@
import {Injectable} from "@angular/core"; import {Injectable} from "@angular/core";
import {OpenprojectIFCModelsModule} from "core-app/modules/ifc_models/openproject-ifc-models.module"; import {OpenprojectIFCModelsModule} from "core-app/modules/bim/ifc_models/openproject-ifc-models.module";
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 {GonService} from "core-app/modules/common/gon/gon.service"; import {GonService} from "core-app/modules/common/gon/gon.service";
import {CurrentProjectService} from "core-components/projects/current-project.service"; import {CurrentProjectService} from "core-components/projects/current-project.service";

@ -4,8 +4,8 @@ import {
PartitionedQuerySpacePageComponent, PartitionedQuerySpacePageComponent,
ToolbarButtonComponentDefinition ToolbarButtonComponentDefinition
} from "core-app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component"; } from "core-app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component";
import {BcfImportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-import-button.component"; import {BcfImportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-import-button.component";
import {BcfExportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-export-button.component"; import {BcfExportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-export-button.component";
import {WorkPackageFilterButtonComponent} from "core-components/wp-buttons/wp-filter-button/wp-filter-button.component"; import {WorkPackageFilterButtonComponent} from "core-components/wp-buttons/wp-filter-button/wp-filter-button.component";
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 {componentDestroyed} from "ng2-rx-componentdestroyed"; import {componentDestroyed} from "ng2-rx-componentdestroyed";
@ -13,12 +13,12 @@ import {
bimListViewIdentifier, bimListViewIdentifier,
bimViewerViewIdentifier, bimViewerViewIdentifier,
BimViewService BimViewService
} from "core-app/modules/ifc_models/pages/viewer/bim-view.service"; } from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service";
import {BimViewToggleButtonComponent} from "core-app/modules/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component"; import {BimViewToggleButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component";
import {IfcModelsDataService} from "core-app/modules/ifc_models/pages/viewer/ifc-models-data.service"; import {IfcModelsDataService} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service";
import {QueryParamListenerService} from "core-components/wp-query/query-param-listener.service"; import {QueryParamListenerService} from "core-components/wp-query/query-param-listener.service";
import {QueryResource} from "core-app/modules/hal/resources/query-resource"; import {QueryResource} from "core-app/modules/hal/resources/query-resource";
import {BimManageIfcModelsButtonComponent} from "core-app/modules/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component"; import {BimManageIfcModelsButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component";
import {WorkPackageCreateButtonComponent} from "core-components/wp-buttons/wp-create-button/wp-create-button.component"; import {WorkPackageCreateButtonComponent} from "core-components/wp-buttons/wp-create-button/wp-create-button.component";
import {StateService, TransitionService} from "@uirouter/core"; import {StateService, TransitionService} from "@uirouter/core";
import {BehaviorSubject, Subject} from "rxjs"; import {BehaviorSubject, Subject} from "rxjs";
@ -27,7 +27,7 @@ import {BehaviorSubject, Subject} from "rxjs";
templateUrl: '/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html', templateUrl: '/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html',
styleUrls: [ styleUrls: [
// Absolute paths do not work for styleURLs :-( // Absolute paths do not work for styleURLs :-(
'../../../work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass' '../../../../work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.sass'
], ],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
providers: [ providers: [

@ -28,7 +28,7 @@
import {ChangeDetectionStrategy, Component} from '@angular/core'; import {ChangeDetectionStrategy, Component} from '@angular/core';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {IfcModelsDataService} from "core-app/modules/ifc_models/pages/viewer/ifc-models-data.service"; import {IfcModelsDataService} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service";
@Component({ @Component({

@ -28,7 +28,7 @@
import {ChangeDetectionStrategy, Component} from '@angular/core'; import {ChangeDetectionStrategy, Component} from '@angular/core';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {BimViewService} from "core-app/modules/ifc_models/pages/viewer/bim-view.service"; import {BimViewService} from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service";
@Component({ @Component({

@ -37,7 +37,7 @@ import {
bimListViewIdentifier, bimSplitViewIdentifier, bimListViewIdentifier, bimSplitViewIdentifier,
bimViewerViewIdentifier, bimViewerViewIdentifier,
BimViewService BimViewService
} from "core-app/modules/ifc_models/pages/viewer/bim-view.service"; } from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service";
@Directive({ @Directive({
selector: '[bimViewDropdown]' selector: '[bimViewDropdown]'

@ -0,0 +1,51 @@
// -- copyright
// OpenProject is an open source project management software.
// Copyright (C) 2012-2020 the OpenProject GmbH
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License version 3.
//
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
// Copyright (C) 2006-2013 Jean-Philippe Lang
// Copyright (C) 2010-2013 the ChiliProject Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// See docs/COPYRIGHT.rdoc for more details.
// ++
import {APP_INITIALIZER, NgModule} from '@angular/core';
import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module";
import {BcfWpSingleViewComponent} from "core-app/modules/bim/bcf/bcf-wp-single-view/bcf-wp-single-view.component";
import {NgxGalleryModule} from "ngx-gallery";
import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service";
import {initializeBcfDisplayFields} from "core-app/modules/bim/bcf/fields/display/bcf-display-field.initializer";
import {BcfImportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-import-button.component";
import {BcfDetectorService} from "core-app/modules/bim/bcf/helper/bcf-detector.service";
import {BcfPathHelperService} from "core-app/modules/bim/bcf/helper/bcf-path-helper.service";
import {BcfExportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-export-button.component";
import {OpenprojectBcfModule} from "core-app/modules/bim/bcf/openproject-bcf.module";
import {OpenprojectIFCModelsModule} from "core-app/modules/bim/ifc_models/openproject-ifc-models.module";
@NgModule({
imports: [
OpenprojectBcfModule,
OpenprojectIFCModelsModule,
]
})
export class OpenprojectBimModule {
}

@ -31,11 +31,11 @@ import {INotification, NotificationsService} from "core-app/modules/common/notif
import {CurrentProjectService} from "core-components/projects/current-project.service"; import {CurrentProjectService} from "core-components/projects/current-project.service";
import {Injector} from "@angular/core"; import {Injector} from "@angular/core";
import {FirstRouteService} from "core-app/modules/router/first-route-service"; import {FirstRouteService} from "core-app/modules/router/first-route-service";
import {StatesModule} from "@uirouter/angular"; import {Ng2StateDeclaration, StatesModule} from "@uirouter/angular";
import {appBaseSelector, ApplicationBaseComponent} from "core-app/modules/router/base/application-base.component"; import {appBaseSelector, ApplicationBaseComponent} from "core-app/modules/router/base/application-base.component";
import {BackRoutingService} from "core-app/modules/common/back-routing/back-routing.service"; import {BackRoutingService} from "core-app/modules/common/back-routing/back-routing.service";
export const OPENPROJECT_ROUTES = [ export const OPENPROJECT_ROUTES:Ng2StateDeclaration[] = [
{ {
name: 'root', name: 'root',
url: '/{projects}/{projectPath}', url: '/{projects}/{projectPath}',
@ -48,17 +48,15 @@ export const OPENPROJECT_ROUTES = [
projects: {type: 'path', value: null, squash: true}, projects: {type: 'path', value: null, squash: true},
// Allow passing of flash messages after routes load // Allow passing of flash messages after routes load
flash_message: { dynamic: true, value: null, inherit: false } flash_message: {dynamic: true, value: null, inherit: false}
} }
}, },
// We could lazily load work packages module already, {
// but e.g., the plugin context requires service from it. name: 'bim.**',
// { parent: 'root',
// name: 'work-packages.**', url: '/bcf',
// parent: 'root', loadChildren: () => import('../bim/ifc_models/openproject-ifc-models.module').then(m => m.OpenprojectIFCModelsModule)
// url: '/work_packages/**', },
// loadChildren: '../work_packages/openproject-work-packages.module#OpenprojectWorkPackagesModule'
// },
]; ];
/** /**
@ -78,12 +76,13 @@ export function bodyClass(className:string[]|string|null|undefined, action:'add'
} }
} }
} }
export function updateMenuItem(menuItemClass:string|undefined, action:'add'|'remove' = 'add') { export function updateMenuItem(menuItemClass:string|undefined, action:'add'|'remove' = 'add') {
if (!menuItemClass) { if (!menuItemClass) {
return; return;
} }
let menuItem = jQuery('#main-menu .' + menuItemClass)[0]; let menuItem = jQuery('#main-menu .' + menuItemClass)[0];
if (!menuItem) { if (!menuItem) {
return; return;
@ -114,7 +113,7 @@ export function uiRouterConfiguration(uiRouter:UIRouter, injector:Injector, modu
decode: decodeURIComponent, decode: decodeURIComponent,
raw: true, raw: true,
dynamic: true, dynamic: true,
is: (val:unknown) => typeof(val) === 'string', is: (val:unknown) => typeof (val) === 'string',
equals: (a:any, b:any) => _.isEqual(a, b), equals: (a:any, b:any) => _.isEqual(a, b),
} }
); );
@ -137,12 +136,12 @@ export function initializeUiRouterListeners(injector:Injector) {
// const uiRouter = injector.get(UIRouter); // const uiRouter = injector.get(UIRouter);
// uiRouter.trace.enable(); // uiRouter.trace.enable();
// Apply classes from bodyClasses in each state definition // Apply classes from bodyClasses in each state definition
// This was defined as onEnter, onExit functions in each state before // This was defined as onEnter, onExit functions in each state before
// but since AOT doesn't allow anonymous functions, we can't re-use them now. // but since AOT doesn't allow anonymous functions, we can't re-use them now.
// The transition will only return the target state on `transition.to()`, // The transition will only return the target state on `transition.to()`,
// however the second parameter has the currently (e.g., parent) entering state chain. // however the second parameter has the currently (e.g., parent) entering state chain.
$transitions.onEnter({}, function(transition:Transition, state:StateDeclaration) { $transitions.onEnter({}, function (transition:Transition, state:StateDeclaration) {
// Add body class when entering this state // Add body class when entering this state
bodyClass(_.get(state, 'data.bodyClasses'), 'add'); bodyClass(_.get(state, 'data.bodyClasses'), 'add');
if (transition.from().data && _.get(state, 'data.menuItem') !== transition.from().data.menuItem) { if (transition.from().data && _.get(state, 'data.menuItem') !== transition.from().data.menuItem) {
@ -153,7 +152,7 @@ export function initializeUiRouterListeners(injector:Injector) {
window.scrollTo(0, 0); window.scrollTo(0, 0);
}); });
$transitions.onExit({}, function(transition:Transition, state:StateDeclaration) { $transitions.onExit({}, function (transition:Transition, state:StateDeclaration) {
// Remove body class when leaving this state // Remove body class when leaving this state
bodyClass(_.get(state, 'data.bodyClasses'), 'remove'); bodyClass(_.get(state, 'data.bodyClasses'), 'remove');
if (transition.to().data && _.get(state, 'data.menuItem') !== transition.to().data.menuItem) { if (transition.to().data && _.get(state, 'data.menuItem') !== transition.to().data.menuItem) {
@ -161,7 +160,7 @@ export function initializeUiRouterListeners(injector:Injector) {
} }
}); });
$transitions.onStart({}, function(transition:Transition) { $transitions.onStart({}, function (transition:Transition) {
const $state = transition.router.stateService; const $state = transition.router.stateService;
const toParams = transition.params('to'); const toParams = transition.params('to');
const fromState = transition.from(); const fromState = transition.from();

@ -147,7 +147,7 @@ import {WorkPackageCardViewComponent} from "core-components/wp-card-view/wp-card
import {WorkPackageIsolatedQuerySpaceDirective} from "core-app/modules/work_packages/query-space/wp-isolated-query-space.directive"; import {WorkPackageIsolatedQuerySpaceDirective} from "core-app/modules/work_packages/query-space/wp-isolated-query-space.directive";
import {WorkPackageDmService} from "core-app/modules/hal/dm-services/work-package-dm.service"; import {WorkPackageDmService} from "core-app/modules/hal/dm-services/work-package-dm.service";
import {WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service"; import {WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service";
import {OpenprojectBcfModule} from "core-app/modules/bcf/openproject-bcf.module"; import {OpenprojectBcfModule} from "core-app/modules/bim/bcf/openproject-bcf.module";
import {WorkPackageRelationsAutocomplete} from "core-components/wp-relations/wp-relations-create/wp-relations-autocomplete/wp-relations-autocomplete.component"; import {WorkPackageRelationsAutocomplete} from "core-components/wp-relations/wp-relations-create/wp-relations-autocomplete/wp-relations-autocomplete.component";
import {CustomDateActionAdminComponent} from 'core-components/wp-custom-actions/date-action/custom-date-action-admin.component'; import {CustomDateActionAdminComponent} from 'core-components/wp-custom-actions/date-action/custom-date-action-admin.component';
import {WorkPackagesTableConfigMenu} from "core-components/wp-table/config-menu/config-menu.component"; import {WorkPackagesTableConfigMenu} from "core-components/wp-table/config-menu/config-menu.component";

@ -34,7 +34,7 @@ import {WorkPackagesViewBase} from "core-app/modules/work_packages/routing/wp-vi
import {take} from "rxjs/operators"; import {take} from "rxjs/operators";
import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service";
import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service";
import {BcfDetectorService} from "core-app/modules/bcf/helper/bcf-detector.service"; import {BcfDetectorService} from "core-app/modules/bim/bcf/helper/bcf-detector.service";
import {wpDisplayCardRepresentation} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; import {wpDisplayCardRepresentation} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service";
import {WorkPackageTableConfigurationObject} from "core-components/wp-table/wp-table-configuration"; import {WorkPackageTableConfigurationObject} from "core-components/wp-table/wp-table-configuration";
import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service";

@ -42,7 +42,7 @@ import {WorkPackagesViewBase} from "core-app/modules/work_packages/routing/wp-vi
import {take} from "rxjs/operators"; import {take} from "rxjs/operators";
import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service";
import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service";
import {BcfDetectorService} from "core-app/modules/bcf/helper/bcf-detector.service"; import {BcfDetectorService} from "core-app/modules/bim/bcf/helper/bcf-detector.service";
import { import {
WorkPackageViewDisplayRepresentationService, WorkPackageViewDisplayRepresentationService,
wpDisplayCardRepresentation wpDisplayCardRepresentation

@ -28,7 +28,7 @@
import {ChangeDetectionStrategy, Component, OnInit} from "@angular/core"; import {ChangeDetectionStrategy, Component, OnInit} from "@angular/core";
import {take} from "rxjs/operators"; import {take} from "rxjs/operators";
import {BcfDetectorService} from "core-app/modules/bcf/helper/bcf-detector.service"; import {BcfDetectorService} from "core-app/modules/bim/bcf/helper/bcf-detector.service";
import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service";
import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service";
import {QueryParamListenerService} from "core-components/wp-query/query-param-listener.service"; import {QueryParamListenerService} from "core-components/wp-query/query-param-listener.service";
@ -42,8 +42,8 @@ import {WorkPackageFilterButtonComponent} from "core-components/wp-buttons/wp-fi
import {WorkPackageViewToggleButton} from "core-components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component"; import {WorkPackageViewToggleButton} from "core-components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component";
import {WorkPackageDetailsViewButtonComponent} from "core-components/wp-buttons/wp-details-view-button/wp-details-view-button.component"; import {WorkPackageDetailsViewButtonComponent} from "core-components/wp-buttons/wp-details-view-button/wp-details-view-button.component";
import {WorkPackageTimelineButtonComponent} from "core-components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component"; import {WorkPackageTimelineButtonComponent} from "core-components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component";
import {BcfImportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-import-button.component"; import {BcfImportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-import-button.component";
import {BcfExportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-export-button.component"; import {BcfExportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-export-button.component";
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 {WorkPackageSettingsButtonComponent} from "core-components/wp-buttons/wp-settings-button/wp-settings-button.component"; import {WorkPackageSettingsButtonComponent} from "core-components/wp-buttons/wp-settings-button/wp-settings-button.component";
import {Observable, of} from "rxjs"; import {Observable, of} from "rxjs";

Loading…
Cancel
Save