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 {OpenprojectMyPageModule} from "core-app/modules/my-page/openproject-my-page.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 {OpenprojectBimModule} from "core-app/modules/bim/openproject-bim.module";
@NgModule({
imports: [
@ -141,9 +142,6 @@ import {TimeEntryCacheService} from "core-components/time-entries/time-entry-cac
// Global Search
OpenprojectGlobalSearchModule,
// IFC Models
OpenprojectIFCModelsModule,
// Admin module
OpenprojectAdminModule,

@ -46,7 +46,7 @@ import {UserCacheService} from "core-components/user/user-cache.service";
import {CommentService} from "core-components/wp-activity/comment-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 {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 {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 {StateService} from "@uirouter/core";
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()
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 {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
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 {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space";
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 {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
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({
template: `

@ -27,7 +27,7 @@
// ++
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) {
return () => {

@ -28,14 +28,14 @@
import {APP_INITIALIZER, NgModule} from '@angular/core';
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 {DisplayFieldService} from "core-app/modules/fields/display/display-field.service";
import {initializeBcfDisplayFields} from "core-app/modules/bcf/fields/display/bcf-display-field.initializer";
import {BcfImportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-import-button.component";
import {BcfDetectorService} from "core-app/modules/bcf/helper/bcf-detector.service";
import {BcfPathHelperService} from "core-app/modules/bcf/helper/bcf-path-helper.service";
import {BcfExportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-export-button.component";
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";
@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 {untilComponentDestroyed} from "ng2-rx-componentdestroyed";
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({
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 {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource";
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({
selector: 'bcf-new-split',

@ -3,8 +3,8 @@ import {
CardEventHandler,
CardViewHandlerRegistry
} 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 {BcfClickHandler} from "core-app/modules/ifc_models/ifc-base-view/event-handler/bcf-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/bim/ifc_models/ifc-base-view/event-handler/bcf-click-handler";
export class BcfCardViewHandlerRegistry extends CardViewHandlerRegistry {

@ -29,7 +29,7 @@
import {Component, ElementRef, OnInit, OnDestroy, ChangeDetectionStrategy} from '@angular/core';
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({
selector: 'ifc-viewer',

@ -1,5 +1,5 @@
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 {
canvasElement:HTMLElement;

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

@ -26,12 +26,12 @@
// See doc/COPYRIGHT.rdoc for more details.
// ++
import {Ng2StateDeclaration} from '@uirouter/angular';
import {IFCViewerPageComponent} from "core-app/modules/ifc_models/pages/viewer/ifc-viewer-page.component";
import {IFCViewerComponent} from "core-app/modules/ifc_models/ifc-viewer/ifc-viewer.component";
import {IFCViewerPageComponent} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.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 {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 {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";

@ -31,7 +31,7 @@ import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {Observable} from "rxjs";
import {StateService, TransitionService} from "@uirouter/core";
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";

@ -1,5 +1,5 @@
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 {GonService} from "core-app/modules/common/gon/gon.service";
import {CurrentProjectService} from "core-components/projects/current-project.service";

@ -4,8 +4,8 @@ import {
PartitionedQuerySpacePageComponent,
ToolbarButtonComponentDefinition
} 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 {BcfExportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-export-button.component";
import {BcfImportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-import-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 {ZenModeButtonComponent} from "core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component";
import {componentDestroyed} from "ng2-rx-componentdestroyed";
@ -13,12 +13,12 @@ import {
bimListViewIdentifier,
bimViewerViewIdentifier,
BimViewService
} from "core-app/modules/ifc_models/pages/viewer/bim-view.service";
import {BimViewToggleButtonComponent} from "core-app/modules/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component";
import {IfcModelsDataService} from "core-app/modules/ifc_models/pages/viewer/ifc-models-data.service";
} from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service";
import {BimViewToggleButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component";
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 {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 {StateService, TransitionService} from "@uirouter/core";
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',
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,
providers: [

@ -28,7 +28,7 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
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({

@ -28,7 +28,7 @@
import {ChangeDetectionStrategy, Component} from '@angular/core';
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({

@ -37,7 +37,7 @@ import {
bimListViewIdentifier, bimSplitViewIdentifier,
bimViewerViewIdentifier,
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({
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 {Injector} from "@angular/core";
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 {BackRoutingService} from "core-app/modules/common/back-routing/back-routing.service";
export const OPENPROJECT_ROUTES = [
export const OPENPROJECT_ROUTES:Ng2StateDeclaration[] = [
{
name: 'root',
url: '/{projects}/{projectPath}',
@ -48,17 +48,15 @@ export const OPENPROJECT_ROUTES = [
projects: {type: 'path', value: null, squash: true},
// 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: 'work-packages.**',
// parent: 'root',
// url: '/work_packages/**',
// loadChildren: '../work_packages/openproject-work-packages.module#OpenprojectWorkPackagesModule'
// },
{
name: 'bim.**',
parent: 'root',
url: '/bcf',
loadChildren: () => import('../bim/ifc_models/openproject-ifc-models.module').then(m => m.OpenprojectIFCModelsModule)
},
];
/**
@ -78,12 +76,13 @@ export function bodyClass(className:string[]|string|null|undefined, action:'add'
}
}
}
export function updateMenuItem(menuItemClass:string|undefined, action:'add'|'remove' = 'add') {
if (!menuItemClass) {
return;
}
let menuItem = jQuery('#main-menu .' + menuItemClass)[0];
let menuItem = jQuery('#main-menu .' + menuItemClass)[0];
if (!menuItem) {
return;
@ -114,7 +113,7 @@ export function uiRouterConfiguration(uiRouter:UIRouter, injector:Injector, modu
decode: decodeURIComponent,
raw: true,
dynamic: true,
is: (val:unknown) => typeof(val) === 'string',
is: (val:unknown) => typeof (val) === 'string',
equals: (a:any, b:any) => _.isEqual(a, b),
}
);
@ -137,12 +136,12 @@ export function initializeUiRouterListeners(injector:Injector) {
// const uiRouter = injector.get(UIRouter);
// 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
// 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()`,
// 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
bodyClass(_.get(state, 'data.bodyClasses'), 'add');
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);
});
$transitions.onExit({}, function(transition:Transition, state:StateDeclaration) {
$transitions.onExit({}, function (transition:Transition, state:StateDeclaration) {
// Remove body class when leaving this state
bodyClass(_.get(state, 'data.bodyClasses'), 'remove');
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 toParams = transition.params('to');
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 {WorkPackageDmService} from "core-app/modules/hal/dm-services/work-package-dm.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 {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";

@ -34,7 +34,7 @@ import {WorkPackagesViewBase} from "core-app/modules/work_packages/routing/wp-vi
import {take} from "rxjs/operators";
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 {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 {WorkPackageTableConfigurationObject} from "core-components/wp-table/wp-table-configuration";
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 {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 {BcfDetectorService} from "core-app/modules/bcf/helper/bcf-detector.service";
import {BcfDetectorService} from "core-app/modules/bim/bcf/helper/bcf-detector.service";
import {
WorkPackageViewDisplayRepresentationService,
wpDisplayCardRepresentation

@ -28,7 +28,7 @@
import {ChangeDetectionStrategy, Component, OnInit} from "@angular/core";
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 {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.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 {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 {BcfImportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-import-button.component";
import {BcfExportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-export-button.component";
import {BcfImportButtonComponent} from "core-app/modules/bim/bcf/bcf-buttons/bcf-import-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 {WorkPackageSettingsButtonComponent} from "core-components/wp-buttons/wp-settings-button/wp-settings-button.component";
import {Observable, of} from "rxjs";

Loading…
Cancel
Save