Feature/36390 code structure (#9319)
* core/shared/features in progress
* shared/components in progress
* Fix rebase errors
* core: added admin + apiv3
* shared: attachments + attirbute-help-text
* core: OpenprojectAugmentingModule
* shared: OpenprojectAutocompleterModule
* shared: Autocompleter
* feature: backlog
* feature: bim
* feature: boards
* shared: calendar
* core: userModule
* feature: dashboards
* shared: editor
* shared: fields
* shared: focus
* core: globalsearch
* shared: grid
* shared: grid fix
* core: hal
* shared: icon
* feature: invite user modal
* feature: job status
* shared: members autocomplete
* shared: modal
* feature: my page
* feature: overview
* shared: principal
* feature: projects
* feature: repoting
* core: routing
* shared: time entries
* shared: OpenprojectWorkPackageGraphsModule
* feature: workpackages
* core: active window
* shared: autofocus
* features: wp: back-button
* core: browser
* shared: collapseible section
* core: config
* shared: copy-to-clipboard
* shared: date-time
* shared: helpers: drag-and-drop
* shared: draggable autocompleter
* shared: dynamic bootstrapper
* shared: dynamic forms
* features: wp: edit actions bar
* shared: EditableToolbarTitleComponent
* core: BannersService
* shared: OpFormFieldComponent
* shared: hide section
* shared: highlight col
* core: I18 + Sanitizer
* shared: isClickedWithModifier
* core: LoadingIndicator
* core: Modal Heading
* core: Model auth
* shared: no results
* shared: notifications
* shared: datepicker
* shared: option-list
* core: path helper
* shared: persistent toggle
* shared: remote field
* shared: set click position
* shared: slide toggle
* shared: tabs
* shared: drag-scroll
* shared: keyCodes
* shared: OPSharedModule
* global styles: common
* core:
* import fixes
* shared: Enterprise banner
* features: wps: filters
* features: home screen
* import fixes
* core: html
* import fixes
* core: main-menu
* features: home screen
* shared: modals
* shared: op-context-menu
* core + shared: current project
* core: schema-cache
* shared: table-pagination
* features: wps: time-entries
* shared: user-link
* features: wps
* features: wps
* features: wps: all wp-* components
* core: states
* Rename: angular4-modules to app.module
* core: expression service
* Modules just with plugins
* Test fixes
* added missing content-tabs.component.sass
* Replaced with .op-ckeditor--wrapper
* Replaced by .op-ckeditor-source-element
* Replaced by the entire wysiwyg_editor.rb with dev version
* Replacements by ckeditor-augmented-textarea
* Fixes ./spec/support/components/work_packages/table_configuration_modal.rb:106
* Fixes ./modules/reporting/spec/features/update_entries_spec.rb:69
* work_packages renamed to work-packages
* TimeEntryChangeset moved to helpers
* 'filters' moved to wps/components
* 'admin' moved to features
* HAL moved to shared
* plugins moved to features
* plugins moved to features
* Test fixes
* Unit test fixes
* plugin generator into /features/plugins
* fix sass rule indentation
* Revert "plugins moved to features"
This reverts commit f65ccbfd4b
.
* Import fixes
* Avoid commiting in linked plugins
Co-authored-by: ulferts <jens.ulferts@googlemail.com>
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
pull/9386/head
parent
d5bd82a163
commit
7e2e05c88f
@ -1,229 +0,0 @@ |
||||
//-- copyright
|
||||
// OpenProject is an open source project management software.
|
||||
// Copyright (C) 2012-2021 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, ApplicationRef, Injector, NgModule } from '@angular/core'; |
||||
import { ReactiveFormsModule } from '@angular/forms'; |
||||
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 { States } from 'core-components/states.service'; |
||||
import { PaginationService } from 'core-components/table-pagination/pagination-service'; |
||||
import { MainMenuResizerComponent } from 'core-components/resizer/main-menu-resizer.component'; |
||||
import { ConfirmDialogModal } from "core-components/modals/confirm-dialog/confirm-dialog.modal"; |
||||
import { ConfirmDialogService } from "core-components/modals/confirm-dialog/confirm-dialog.service"; |
||||
import { DynamicContentModal } from "core-components/modals/modal-wrapper/dynamic-content.modal"; |
||||
import { PasswordConfirmationModal } from "core-components/modals/request-for-confirmation/password-confirmation.modal"; |
||||
import { OpenprojectFieldsModule } from "core-app/modules/fields/openproject-fields.module"; |
||||
import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; |
||||
import { CommentService } from "core-components/wp-activity/comment-service"; |
||||
import { OpDragScrollDirective } from "core-app/modules/common/ui/op-drag-scroll.directive"; |
||||
import { OpenprojectPluginsModule } from "core-app/modules/plugins/openproject-plugins.module"; |
||||
import { ConfirmFormSubmitController } from "core-components/modals/confirm-form-submit/confirm-form-submit.directive"; |
||||
import { ProjectMenuAutocompleteComponent } from "core-components/projects/project-menu-autocomplete/project-menu-autocomplete.component"; |
||||
import { OpenProjectFileUploadService } from "core-components/api/op-file-upload/op-file-upload.service"; |
||||
import { OpenProjectDirectFileUploadService } from './components/api/op-file-upload/op-direct-file-upload.service'; |
||||
import { LinkedPluginsModule } from "core-app/modules/plugins/linked-plugins.module"; |
||||
import { HookService } from "core-app/modules/plugins/hook-service"; |
||||
import { DynamicBootstrapper } from "core-app/globals/dynamic-bootstrapper"; |
||||
import { OpenprojectWorkPackagesModule } from 'core-app/modules/work_packages/openproject-work-packages.module'; |
||||
import { OpenprojectAttachmentsModule } from 'core-app/modules/attachments/openproject-attachments.module'; |
||||
import { OpenprojectEditorModule } from 'core-app/modules/editor/openproject-editor.module'; |
||||
import { OpenprojectGridsModule } from "core-app/modules/grids/openproject-grids.module"; |
||||
import { OpenprojectRouterModule } from "core-app/modules/router/openproject-router.module"; |
||||
import { OpenprojectWorkPackageRoutesModule } from "core-app/modules/work_packages/openproject-work-package-routes.module"; |
||||
import { BrowserModule } from "@angular/platform-browser"; |
||||
import { OpenprojectCalendarModule } from "core-app/modules/calendar/openproject-calendar.module"; |
||||
import { OpenprojectGlobalSearchModule } from "core-app/modules/global_search/openproject-global-search.module"; |
||||
import { MainMenuToggleComponent } from "core-components/main-menu/main-menu-toggle.component"; |
||||
import { MainMenuNavigationService } from "core-components/main-menu/main-menu-navigation.service"; |
||||
import { OpenprojectAdminModule } from "core-app/modules/admin/openproject-admin.module"; |
||||
import { OpenprojectDashboardsModule } from "core-app/modules/dashboards/openproject-dashboards.module"; |
||||
import { OpenprojectWorkPackageGraphsModule } from "core-app/modules/work-package-graphs/openproject-work-package-graphs.module"; |
||||
import { WpPreviewModal } from "core-components/modals/preview-modal/wp-preview-modal/wp-preview.modal"; |
||||
import { PreviewTriggerService } from "core-app/globals/global-listeners/preview-trigger.service"; |
||||
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 { KeyboardShortcutService } from "core-app/modules/a11y/keyboard-shortcut-service"; |
||||
import { globalDynamicComponents } from "core-app/global-dynamic-components.const"; |
||||
import { OpenprojectMembersModule } from "core-app/modules/members/members.module"; |
||||
import { OpenprojectEnterpriseModule } from "core-components/enterprise/openproject-enterprise.module"; |
||||
import { OpenprojectAugmentingModule } from "core-app/modules/augmenting/openproject-augmenting.module"; |
||||
import { OpenprojectInviteUserModalModule } from "core-app/modules/invite-user-modal/invite-user-modal.module"; |
||||
import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; |
||||
import { RevitAddInSettingsButtonService } from "core-app/modules/bim/revit_add_in/revit-add-in-settings-button.service"; |
||||
import { OpenprojectAutocompleterModule } from "core-app/modules/autocompleter/openproject-autocompleter.module"; |
||||
import { OpenProjectBackupService } from './components/api/op-backup/op-backup.service'; |
||||
import { OpenprojectTabsModule } from "core-app/modules/common/tabs/openproject-tabs.module"; |
||||
|
||||
@NgModule({ |
||||
imports: [ |
||||
// The BrowserModule must only be loaded here!
|
||||
BrowserModule, |
||||
// Commons
|
||||
OpenprojectCommonModule, |
||||
// Router module
|
||||
OpenprojectRouterModule, |
||||
// Hal Module
|
||||
OpenprojectHalModule, |
||||
|
||||
// CKEditor
|
||||
OpenprojectEditorModule, |
||||
// Display + Edit field functionality
|
||||
OpenprojectFieldsModule, |
||||
OpenprojectGridsModule, |
||||
OpenprojectAttachmentsModule, |
||||
|
||||
// Project module
|
||||
OpenprojectProjectsModule, |
||||
|
||||
// Work packages and their routes
|
||||
OpenprojectWorkPackagesModule, |
||||
OpenprojectWorkPackageRoutesModule, |
||||
|
||||
// Work packages in graph representation
|
||||
OpenprojectWorkPackageGraphsModule, |
||||
|
||||
// Calendar module
|
||||
OpenprojectCalendarModule, |
||||
|
||||
// Dashboards
|
||||
OpenprojectDashboardsModule, |
||||
|
||||
// Overview
|
||||
OpenprojectOverviewModule, |
||||
|
||||
// MyPage
|
||||
OpenprojectMyPageModule, |
||||
|
||||
// Global Search
|
||||
OpenprojectGlobalSearchModule, |
||||
|
||||
// Admin module
|
||||
OpenprojectAdminModule, |
||||
OpenprojectEnterpriseModule, |
||||
|
||||
// Plugin hooks and modules
|
||||
OpenprojectPluginsModule, |
||||
// Linked plugins dynamically generated by bundler
|
||||
LinkedPluginsModule, |
||||
|
||||
// Members
|
||||
OpenprojectMembersModule, |
||||
|
||||
// Angular Forms
|
||||
ReactiveFormsModule, |
||||
|
||||
// Augmenting Module
|
||||
OpenprojectAugmentingModule, |
||||
|
||||
// Modals
|
||||
OpenprojectModalModule, |
||||
|
||||
// Invite user modal
|
||||
OpenprojectInviteUserModalModule, |
||||
|
||||
// Autocompleters
|
||||
OpenprojectAutocompleterModule, |
||||
|
||||
// Tabs
|
||||
OpenprojectTabsModule, |
||||
], |
||||
providers: [ |
||||
{ provide: States, useValue: new States() }, |
||||
{ provide: APP_INITIALIZER, useFactory: initializeServices, deps: [Injector], multi: true }, |
||||
PaginationService, |
||||
OpenProjectBackupService, |
||||
OpenProjectFileUploadService, |
||||
OpenProjectDirectFileUploadService, |
||||
// Split view
|
||||
CommentService, |
||||
ConfirmDialogService, |
||||
RevitAddInSettingsButtonService, |
||||
], |
||||
declarations: [ |
||||
OpContextMenuTrigger, |
||||
|
||||
// Modals
|
||||
ConfirmDialogModal, |
||||
DynamicContentModal, |
||||
PasswordConfirmationModal, |
||||
WpPreviewModal, |
||||
|
||||
// Main menu
|
||||
MainMenuResizerComponent, |
||||
MainMenuToggleComponent, |
||||
|
||||
// Project autocompleter
|
||||
ProjectMenuAutocompleteComponent, |
||||
|
||||
// Form configuration
|
||||
OpDragScrollDirective, |
||||
ConfirmFormSubmitController, |
||||
] |
||||
}) |
||||
export class OpenProjectModule { |
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
ngDoBootstrap(appRef:ApplicationRef) { |
||||
|
||||
// Register global dynamic components
|
||||
// this is necessary to ensure they are not tree-shaken
|
||||
// (if they are not used anywhere in Angular, they would be removed)
|
||||
DynamicBootstrapper.register(...globalDynamicComponents); |
||||
|
||||
// Perform global dynamic bootstrapping of our entry components
|
||||
// that are in the current DOM response.
|
||||
DynamicBootstrapper.bootstrapOptionalDocument(appRef, document); |
||||
|
||||
// Call hook service to allow modules to bootstrap additional elements.
|
||||
// We can't use ngDoBootstrap in nested modules since they are not called.
|
||||
const hookService = (appRef as any)._injector.get(HookService); |
||||
hookService |
||||
.call('openProjectAngularBootstrap') |
||||
.forEach((results:{ selector:string, cls:any }[]) => { |
||||
DynamicBootstrapper.bootstrapOptionalDocument(appRef, document, results); |
||||
}); |
||||
} |
||||
} |
||||
|
||||
export function initializeServices(injector:Injector) { |
||||
return () => { |
||||
const PreviewTrigger = injector.get(PreviewTriggerService); |
||||
const mainMenuNavigationService = injector.get(MainMenuNavigationService); |
||||
const keyboardShortcuts = injector.get(KeyboardShortcutService); |
||||
// Conditionally add the Revit Add-In settings button
|
||||
injector.get(RevitAddInSettingsButtonService); |
||||
|
||||
mainMenuNavigationService.register(); |
||||
|
||||
PreviewTrigger.setupListener(); |
||||
|
||||
keyboardShortcuts.register(); |
||||
}; |
||||
} |
@ -0,0 +1,228 @@ |
||||
//-- copyright
|
||||
// OpenProject is an open source project management software.
|
||||
// Copyright (C) 2012-2021 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, ApplicationRef, Injector, NgModule } from '@angular/core'; |
||||
import { ReactiveFormsModule } from '@angular/forms'; |
||||
import { OpContextMenuTrigger } from 'core-app/shared/components/op-context-menu/handlers/op-context-menu-trigger.directive'; |
||||
import { States } from 'core-app/core/states/states.service'; |
||||
import { OpenprojectFieldsModule } from "core-app/shared/components/fields/openproject-fields.module"; |
||||
import { OPSharedModule } from "core-app/shared/shared.module"; |
||||
import { OpDragScrollDirective } from "core-app/shared/directives/op-drag-scroll/op-drag-scroll.directive"; |
||||
import { OpenProjectDirectFileUploadService } from './core/file-upload/op-direct-file-upload.service'; |
||||
import { DynamicBootstrapper } from "core-app/core/setup/globals/dynamic-bootstrapper"; |
||||
import { OpenprojectWorkPackagesModule } from 'core-app/features/work-packages/openproject-work-packages.module'; |
||||
import { OpenprojectAttachmentsModule } from 'core-app/shared/components/attachments/openproject-attachments.module'; |
||||
import { OpenprojectEditorModule } from 'core-app/shared/components/editor/openproject-editor.module'; |
||||
import { OpenprojectGridsModule } from "core-app/shared/components/grids/openproject-grids.module"; |
||||
import { OpenprojectRouterModule } from "core-app/core/routing/openproject-router.module"; |
||||
import { OpenprojectWorkPackageRoutesModule } from "core-app/features/work-packages/openproject-work-package-routes.module"; |
||||
import { BrowserModule } from "@angular/platform-browser"; |
||||
import { OpenprojectCalendarModule } from "core-app/shared/components/calendar/openproject-calendar.module"; |
||||
import { OpenprojectGlobalSearchModule } from "core-app/core/global_search/openproject-global-search.module"; |
||||
import { OpenprojectDashboardsModule } from "core-app/features/dashboards/openproject-dashboards.module"; |
||||
import { OpenprojectWorkPackageGraphsModule } from "core-app/shared/components/work-package-graphs/openproject-work-package-graphs.module"; |
||||
import { PreviewTriggerService } from "core-app/core/setup/globals/global-listeners/preview-trigger.service"; |
||||
import { OpenprojectOverviewModule } from "core-app/features/overview/openproject-overview.module"; |
||||
import { OpenprojectMyPageModule } from "core-app/features/my-page/openproject-my-page.module"; |
||||
import { OpenprojectProjectsModule } from "core-app/features/projects/openproject-projects.module"; |
||||
import { KeyboardShortcutService } from "core-app/shared/directives/a11y/keyboard-shortcut-service"; |
||||
import { OpenprojectMembersModule } from "core-app/shared/components/autocompleter/members-autocompleter/members.module"; |
||||
import { OpenprojectAugmentingModule } from "core-app/core/augmenting/openproject-augmenting.module"; |
||||
import { OpenprojectInviteUserModalModule } from "core-app/features/invite-user-modal/invite-user-modal.module"; |
||||
import { OpenprojectModalModule } from "core-app/shared/components/modal/modal.module"; |
||||
import { RevitAddInSettingsButtonService } from "core-app/features/bim/revit_add_in/revit-add-in-settings-button.service"; |
||||
import { OpenprojectAutocompleterModule } from "core-app/shared/components/autocompleter/openproject-autocompleter.module"; |
||||
import { OpenProjectBackupService } from './core/backup/op-backup.service'; |
||||
import { OpenProjectFileUploadService } from "core-app/core/file-upload/op-file-upload.service"; |
||||
import { OpenprojectEnterpriseModule } from "core-app/features/enterprise/openproject-enterprise.module"; |
||||
import { MainMenuToggleComponent } from "core-app/core/main-menu/main-menu-toggle.component"; |
||||
import { MainMenuNavigationService } from "core-app/core/main-menu/main-menu-navigation.service"; |
||||
import { ConfirmDialogService } from "core-app/shared/components/modals/confirm-dialog/confirm-dialog.service"; |
||||
import { ConfirmDialogModal } from "core-app/shared/components/modals/confirm-dialog/confirm-dialog.modal"; |
||||
import { DynamicContentModal } from "core-app/shared/components/modals/modal-wrapper/dynamic-content.modal"; |
||||
import { PasswordConfirmationModal } from "core-app/shared/components/modals/request-for-confirmation/password-confirmation.modal"; |
||||
import { WpPreviewModal } from "core-app/shared/components/modals/preview-modal/wp-preview-modal/wp-preview.modal"; |
||||
import { ConfirmFormSubmitController } from "core-app/shared/components/modals/confirm-form-submit/confirm-form-submit.directive"; |
||||
import { ProjectMenuAutocompleteComponent } from "core-app/shared/components/autocompleter/project-menu-autocomplete/project-menu-autocomplete.component"; |
||||
import { PaginationService } from "core-app/shared/components/table-pagination/pagination-service"; |
||||
import { MainMenuResizerComponent } from "core-app/shared/components/resizer/resizer/main-menu-resizer.component"; |
||||
import { CommentService } from "core-app/features/work-packages/components/wp-activity/comment-service"; |
||||
import { OpenprojectTabsModule } from "core-app/shared/components/tabs/openproject-tabs.module"; |
||||
import { OpenprojectAdminModule } from "core-app/features/admin/openproject-admin.module"; |
||||
import { OpenprojectHalModule } from "core-app/features/hal/openproject-hal.module"; |
||||
import { globalDynamicComponents } from "core-app/core/setup/global-dynamic-components.const"; |
||||
import { HookService } from "core-app/features/plugins/hook-service"; |
||||
import { OpenprojectPluginsModule } from "core-app/features/plugins/openproject-plugins.module"; |
||||
import { LinkedPluginsModule } from "core-app/features/plugins/linked-plugins.module"; |
||||
|
||||
@NgModule({ |
||||
imports: [ |
||||
// The BrowserModule must only be loaded here!
|
||||
BrowserModule, |
||||
// Commons
|
||||
OPSharedModule, |
||||
// Router module
|
||||
OpenprojectRouterModule, |
||||
// Hal Module
|
||||
OpenprojectHalModule, |
||||
|
||||
// CKEditor
|
||||
OpenprojectEditorModule, |
||||
// Display + Edit field functionality
|
||||
OpenprojectFieldsModule, |
||||
OpenprojectGridsModule, |
||||
OpenprojectAttachmentsModule, |
||||
|
||||
// Project module
|
||||
OpenprojectProjectsModule, |
||||
|
||||
// Work packages and their routes
|
||||
OpenprojectWorkPackagesModule, |
||||
OpenprojectWorkPackageRoutesModule, |
||||
|
||||
// Work packages in graph representation
|
||||
OpenprojectWorkPackageGraphsModule, |
||||
|
||||
// Calendar module
|
||||
OpenprojectCalendarModule, |
||||
|
||||
// Dashboards
|
||||
OpenprojectDashboardsModule, |
||||
|
||||
// Overview
|
||||
OpenprojectOverviewModule, |
||||
|
||||
// MyPage
|
||||
OpenprojectMyPageModule, |
||||
|
||||
// Global Search
|
||||
OpenprojectGlobalSearchModule, |
||||
|
||||
// Admin module
|
||||
OpenprojectAdminModule, |
||||
OpenprojectEnterpriseModule, |
||||
|
||||
// Plugin hooks and modules
|
||||
OpenprojectPluginsModule, |
||||
// Linked plugins dynamically generated by bundler
|
||||
LinkedPluginsModule, |
||||
|
||||
// Members
|
||||
OpenprojectMembersModule, |
||||
|
||||
// Angular Forms
|
||||
ReactiveFormsModule, |
||||
|
||||
// Augmenting Module
|
||||
OpenprojectAugmentingModule, |
||||
|
||||
// Modals
|
||||
OpenprojectModalModule, |
||||
|
||||
// Invite user modal
|
||||
OpenprojectInviteUserModalModule, |
||||
|
||||
// Autocompleters
|
||||
OpenprojectAutocompleterModule, |
||||
|
||||
// Tabs
|
||||
OpenprojectTabsModule, |
||||
], |
||||
providers: [ |
||||
{ provide: States, useValue: new States() }, |
||||
{ provide: APP_INITIALIZER, useFactory: initializeServices, deps: [Injector], multi: true }, |
||||
PaginationService, |
||||
OpenProjectBackupService, |
||||
OpenProjectFileUploadService, |
||||
OpenProjectDirectFileUploadService, |
||||
// Split view
|
||||
CommentService, |
||||
ConfirmDialogService, |
||||
RevitAddInSettingsButtonService, |
||||
], |
||||
declarations: [ |
||||
OpContextMenuTrigger, |
||||
|
||||
// Modals
|
||||
ConfirmDialogModal, |
||||
DynamicContentModal, |
||||
PasswordConfirmationModal, |
||||
WpPreviewModal, |
||||
|
||||
// Main menu
|
||||
MainMenuResizerComponent, |
||||
MainMenuToggleComponent, |
||||
|
||||
// Project autocompleter
|
||||
ProjectMenuAutocompleteComponent, |
||||
|
||||
// Form configuration
|
||||
OpDragScrollDirective, |
||||
ConfirmFormSubmitController, |
||||
] |
||||
}) |
||||
export class OpenProjectModule { |
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
ngDoBootstrap(appRef:ApplicationRef) { |
||||
|
||||
// Register global dynamic components
|
||||
// this is necessary to ensure they are not tree-shaken
|
||||
// (if they are not used anywhere in Angular, they would be removed)
|
||||
DynamicBootstrapper.register(...globalDynamicComponents); |
||||
|
||||
// Perform global dynamic bootstrapping of our entry components
|
||||
// that are in the current DOM response.
|
||||
DynamicBootstrapper.bootstrapOptionalDocument(appRef, document); |
||||
|
||||
// Call hook service to allow modules to bootstrap additional elements.
|
||||
// We can't use ngDoBootstrap in nested modules since they are not called.
|
||||
const hookService = (appRef as any)._injector.get(HookService); |
||||
hookService |
||||
.call('openProjectAngularBootstrap') |
||||
.forEach((results:{ selector:string, cls:any }[]) => { |
||||
DynamicBootstrapper.bootstrapOptionalDocument(appRef, document, results); |
||||
}); |
||||
} |
||||
} |
||||
|
||||
export function initializeServices(injector:Injector) { |
||||
return () => { |
||||
const PreviewTrigger = injector.get(PreviewTriggerService); |
||||
const mainMenuNavigationService = injector.get(MainMenuNavigationService); |
||||
const keyboardShortcuts = injector.get(KeyboardShortcutService); |
||||
// Conditionally add the Revit Add-In settings button
|
||||
injector.get(RevitAddInSettingsButtonService); |
||||
|
||||
mainMenuNavigationService.register(); |
||||
|
||||
PreviewTrigger.setupListener(); |
||||
|
||||
keyboardShortcuts.register(); |
||||
}; |
||||
} |
@ -1,20 +0,0 @@ |
||||
import { |
||||
Component, |
||||
} from '@angular/core'; |
||||
import { WpTableConfigurationService } from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; |
||||
import { RestrictedWpTableConfigurationService } from 'core-components/wp-table/external-configuration/restricted-wp-table-configuration.service'; |
||||
import { WpTableConfigurationRelationSelectorComponent } from "core-components/wp-table/configuration-modal/wp-table-configuration-relation-selector"; |
||||
import { WpTableConfigurationModalPrependToken } from "core-components/wp-table/configuration-modal/wp-table-configuration.modal"; |
||||
import { ExternalQueryConfigurationComponent } from "core-components/wp-table/external-configuration/external-query-configuration.component"; |
||||
|
||||
@Component({ |
||||
templateUrl: './external-query-configuration.template.html', |
||||
providers: [ |
||||
[ |
||||
{ provide: WpTableConfigurationService, useClass: RestrictedWpTableConfigurationService } |
||||
], |
||||
{ provide: WpTableConfigurationModalPrependToken, useValue: WpTableConfigurationRelationSelectorComponent } |
||||
], |
||||
}) |
||||
export class ExternalRelationQueryConfigurationComponent extends ExternalQueryConfigurationComponent { |
||||
} |
@ -1,30 +0,0 @@ |
||||
import { Inject, Injectable } from '@angular/core'; |
||||
import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; |
||||
import { TabInterface } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; |
||||
import { WpTableConfigurationService } from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; |
||||
import { QueryConfigurationLocals } from 'core-components/wp-table/external-configuration/external-query-configuration.component'; |
||||
import { OpQueryConfigurationLocalsToken } from "core-components/wp-table/external-configuration/external-query-configuration.constants"; |
||||
|
||||
@Injectable() |
||||
export class RestrictedWpTableConfigurationService extends WpTableConfigurationService { |
||||
|
||||
constructor(@Inject(OpQueryConfigurationLocalsToken) readonly locals:QueryConfigurationLocals, |
||||
readonly I18n:I18nService) { |
||||
super(I18n); |
||||
} |
||||
|
||||
public get tabs():TabInterface[] { |
||||
const disabledTabs = this.locals.disabledTabs || {}; |
||||
|
||||
return this |
||||
._tabs |
||||
.map(el => { |
||||
const reason = disabledTabs[el.id]; |
||||
if (reason != null) { |
||||
el.disable = reason; |
||||
} |
||||
|
||||
return el; |
||||
}); |
||||
} |
||||
} |
@ -1,3 +0,0 @@ |
||||
.op-work-package-tabs |
||||
position: relative |
||||
width: 100% |
@ -1,30 +0,0 @@ |
||||
import { NgModule } from '@angular/core'; |
||||
import { CommonModule } from '@angular/common'; |
||||
import { WpTabsComponent } from './components/wp-tabs/wp-tabs.component'; |
||||
import { UIRouterModule } from "@uirouter/angular"; |
||||
import { WpTabWrapperComponent } from "core-components/wp-tabs/components/wp-tab-wrapper/wp-tab-wrapper.component"; |
||||
import { DynamicModule } from "ng-dynamic-component"; |
||||
import { OpenprojectAccessibilityModule } from "core-app/modules/a11y/openproject-a11y.module"; |
||||
import { OpenprojectTabsModule } from "core-app/modules/common/tabs/openproject-tabs.module"; |
||||
import { IconModule } from "core-app/modules/icon/icon.module"; |
||||
|
||||
@NgModule({ |
||||
declarations: [ |
||||
WpTabsComponent, |
||||
WpTabWrapperComponent, |
||||
], |
||||
imports: [ |
||||
CommonModule, |
||||
UIRouterModule, |
||||
DynamicModule, |
||||
OpenprojectAccessibilityModule, |
||||
OpenprojectTabsModule, |
||||
IconModule |
||||
], |
||||
exports: [ |
||||
WpTabsComponent, |
||||
WpTabWrapperComponent, |
||||
], |
||||
}) |
||||
export class OpWpTabsModule { |
||||
} |
@ -1,7 +1,7 @@ |
||||
import { Inject, Injectable } from "@angular/core"; |
||||
import { DOCUMENT } from "@angular/common"; |
||||
import { BehaviorSubject, Observable, Subject } from "rxjs"; |
||||
import { debugLog } from "core-app/helpers/debug_output"; |
||||
import { debugLog } from "core-app/shared/helpers/debug_output"; |
||||
|
||||
@Injectable({ providedIn: 'root' }) |
||||
export class ActiveWindowService { |
@ -1,7 +1,7 @@ |
||||
import { APIv3FormResource } from "core-app/modules/apiv3/forms/apiv3-form-resource"; |
||||
import { FormResource } from "core-app/modules/hal/resources/form-resource"; |
||||
import { APIv3FormResource } from "core-app/core/apiv3/forms/apiv3-form-resource"; |
||||
import { FormResource } from "core-app/features/hal/resources/form-resource"; |
||||
import { Observable } from "rxjs"; |
||||
import { HalSource } from "core-app/modules/hal/resources/hal-resource"; |
||||
import { HalSource } from "core-app/features/hal/resources/hal-resource"; |
||||
|
||||
export class APIv3WorkPackageForm extends APIv3FormResource { |
||||
/** |
@ -1,8 +1,8 @@ |
||||
import { APIv3ResourcePath } from "core-app/modules/apiv3/paths/apiv3-resource"; |
||||
import { FormResource } from "core-app/modules/hal/resources/form-resource"; |
||||
import { APIv3ResourcePath } from "core-app/core/apiv3/paths/apiv3-resource"; |
||||
import { FormResource } from "core-app/features/hal/resources/form-resource"; |
||||
import { Observable } from "rxjs"; |
||||
import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; |
||||
import { HalPayloadHelper } from "core-app/modules/hal/schemas/hal-payload.helper"; |
||||
import { SchemaResource } from "core-app/features/hal/resources/schema-resource"; |
||||
import { HalPayloadHelper } from "core-app/features/hal/schemas/hal-payload.helper"; |
||||
|
||||
export class APIv3FormResource<T extends FormResource = FormResource> extends APIv3ResourcePath<T> { |
||||
/** |
@ -1,11 +1,11 @@ |
||||
import { Constructor } from "@angular/cdk/table"; |
||||
import { SimpleResource, SimpleResourceCollection } from "core-app/modules/apiv3/paths/path-resources"; |
||||
import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; |
||||
import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; |
||||
import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; |
||||
import { HalResource } from "core-app/modules/hal/resources/hal-resource"; |
||||
import { SimpleResource, SimpleResourceCollection } from "core-app/core/apiv3/paths/path-resources"; |
||||
import { InjectField } from "core-app/shared/helpers/angular/inject-field.decorator"; |
||||
import { HalResourceService } from "core-app/features/hal/services/hal-resource.service"; |
||||
import { Observable } from "rxjs"; |
||||
import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; |
||||
import { APIV3Service } from "core-app/core/apiv3/api-v3.service"; |
||||
import { ApiV3FilterBuilder } from "core-app/shared/helpers/api-v3/api-v3-filter-builder"; |
||||
import { HalResource } from "core-app/features/hal/resources/hal-resource"; |
||||
|
||||
export class APIv3ResourcePath<T = HalResource> extends SimpleResource { |
||||
readonly injector = this.apiRoot.injector; |
@ -1,4 +1,3 @@ |
||||
import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; |
||||
import { Constructor } from "@angular/cdk/table"; |
||||
|
||||
/** |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue