OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/frontend/app/angular4-modules.ts

135 lines
7.3 KiB

Angular 4 support and upgraded timeline header directive (#5984) * Added Angular4 dependency and initial setup * Angular 4 transition: timeline header directive * removed superfluous require declaration * moved Angular4 dependencies to vendor.js * Angular4: upgraded timeline relations directive * Fixes karma tests. However, logging seems to be broken now. * Angular4: upgraded directive wpTimelineStaticElements * dev rebase * WIP Angular 4+ transition * converted WorkPackageTableTimelineGrid to Angular4+ * start migrating WorkPackageTimelineTableController to Angular4+ * completed migration of component tree WorkPackageTimelineTableController * Fix Pagination directive * set any to scope for TS warnings * Convert wp-table-pagination * merged changes from Oliver * begin migrating WorkPackagesTableController * begin migrating WorkPackagesTableController * Apply karma fix to PR * Fix pagination options * WIP Angular migration wp-table.directive * Angular4 migration - table sums * Angular4 migration: fixed error message when no sums are displayed * Angular4 migration: removed superfluous Angular1 registration * WIP Angular4 migration * WIP Angular4 migration - removed unused directives - start migartion sortHeader directive * WIP Angular4 migration - sortHeader directive * WIP Angular4 migration: sort header * Angular4 migration: implemented dropDown directive for Angular4 * merged origin/dev * updated package-lock.json * use shrinkwrap instead of package-lock * Angular4 migration: fixed accessible_by_keyboard directive * WIP #26714 * reformat code * fixes #26714 pass projectIdentifier to wpTable * cleanup * fixes #26716 * WIP Angular4 migration: added support for test execution * wpTablePagination: convertered reasonable tests to Angular4 * merged dev branch, updated dependencies * fixed #26727 * Replace openproject initialization in head * fixed #26728 * Replace time entries and messages ng1 controllers * Remove unused timeline reference * Fix OP Helpers for member page * Fix initial cached paged options * Fixed broken inlineCreate * Only nil-check for table, projectIdentifier CAN be null
7 years ago
// -- copyright
// OpenProject is a project management system.
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
//
// 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 doc/COPYRIGHT.rdoc for more details.
// ++
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {UpgradeModule} from '@angular/upgrade/static';
import {TablePaginationComponent} from 'core-app/components/table-pagination/table-pagination.component';
import {AccessibleByKeyboardDirectiveUpgraded} from 'core-app/ui_components/accessible-by-keyboard-directive-upgraded';
import {OpIcon} from 'core-components/common/icon/op-icon';
import {ContextMenuService} from 'core-components/context-menus/context-menu.service';
import {HasDropdownMenuDirective} from 'core-components/context-menus/has-dropdown-menu/has-dropdown-menu-directive';
import {States} from 'core-components/states.service';
import {PaginationService} from 'core-components/table-pagination/pagination-service';
import {WorkPackageDisplayFieldService} from 'core-components/wp-display/wp-display-field/wp-display-field.service';
import {WorkPackageNotificationService} from 'core-components/wp-edit/wp-notification.service';
import {WorkPackageTableColumnsService} from 'core-components/wp-fast-table/state/wp-table-columns.service';
import {WorkPackageTableGroupByService} from 'core-components/wp-fast-table/state/wp-table-group-by.service';
import {WorkPackageTableHierarchiesService} from 'core-components/wp-fast-table/state/wp-table-hierarchy.service';
import {WorkPackageTablePaginationService} from 'core-components/wp-fast-table/state/wp-table-pagination.service';
import {WorkPackageTableRelationColumnsService} from 'core-components/wp-fast-table/state/wp-table-relation-columns.service';
import {WorkPackageTableSortByService} from 'core-components/wp-fast-table/state/wp-table-sort-by.service';
import {WorkPackageTableTimelineService} from 'core-components/wp-fast-table/state/wp-table-timeline.service';
import {WpInlineCreateDirectiveUpgraded} from 'core-components/wp-inline-create/wp-inline-create.directive';
import {WorkPackageRelationsService} from 'core-components/wp-relations/wp-relations.service';
import {WpResizerDirectiveUpgraded} from 'core-components/wp-resizer/wp-resizer.directive';
import {SortHeaderDirective} from 'core-components/wp-table/sort-header/sort-header.directive';
import {WorkPackageTablePaginationComponent} from 'core-components/wp-table/table-pagination/wp-table-pagination.component';
import {WorkPackageTimelineTableController} from 'core-components/wp-table/timeline/container/wp-timeline-container.directive';
import {WorkPackageTableTimelineRelations} from 'core-components/wp-table/timeline/global-elements/wp-timeline-relations.directive';
import {WorkPackageTableTimelineStaticElements} from 'core-components/wp-table/timeline/global-elements/wp-timeline-static-elements.directive';
import {WorkPackageTableTimelineGrid} from 'core-components/wp-table/timeline/grid/wp-timeline-grid.directive';
import {WorkPackageTimelineHeaderController} from 'core-components/wp-table/timeline/header/wp-timeline-header.directive';
import {WorkPackageTableSumsRowController} from 'core-components/wp-table/wp-table-sums-row/wp-table-sums-row.directive';
import {
WorkPackagesTableController,
WorkPackagesTableControllerHolder
} from 'core-components/wp-table/wp-table.directive';
import {
$rootScopeToken, columnsModalToken, focusHelperToken, I18nToken, NotificationsServiceToken, upgradeService,
upgradeServiceWithToken
} from './angular4-transition-utils';
import {WpWorkflowButtonComponent} from 'core-components/wp-workflow-buttons/wp-workflow-button/wp-workflow-button.component';
import {WpWorkflowButtonsComponent} from 'core-components/wp-workflow-buttons/wp-workflow-buttons.component';
import {HalRequestService} from 'core-components/api/api-v3/hal-request/hal-request.service';
import {WorkPackageCacheService} from 'core-components/work-packages/work-package-cache.service';
Angular 4 support and upgraded timeline header directive (#5984) * Added Angular4 dependency and initial setup * Angular 4 transition: timeline header directive * removed superfluous require declaration * moved Angular4 dependencies to vendor.js * Angular4: upgraded timeline relations directive * Fixes karma tests. However, logging seems to be broken now. * Angular4: upgraded directive wpTimelineStaticElements * dev rebase * WIP Angular 4+ transition * converted WorkPackageTableTimelineGrid to Angular4+ * start migrating WorkPackageTimelineTableController to Angular4+ * completed migration of component tree WorkPackageTimelineTableController * Fix Pagination directive * set any to scope for TS warnings * Convert wp-table-pagination * merged changes from Oliver * begin migrating WorkPackagesTableController * begin migrating WorkPackagesTableController * Apply karma fix to PR * Fix pagination options * WIP Angular migration wp-table.directive * Angular4 migration - table sums * Angular4 migration: fixed error message when no sums are displayed * Angular4 migration: removed superfluous Angular1 registration * WIP Angular4 migration * WIP Angular4 migration - removed unused directives - start migartion sortHeader directive * WIP Angular4 migration - sortHeader directive * WIP Angular4 migration: sort header * Angular4 migration: implemented dropDown directive for Angular4 * merged origin/dev * updated package-lock.json * use shrinkwrap instead of package-lock * Angular4 migration: fixed accessible_by_keyboard directive * WIP #26714 * reformat code * fixes #26714 pass projectIdentifier to wpTable * cleanup * fixes #26716 * WIP Angular4 migration: added support for test execution * wpTablePagination: convertered reasonable tests to Angular4 * merged dev branch, updated dependencies * fixed #26727 * Replace openproject initialization in head * fixed #26728 * Replace time entries and messages ng1 controllers * Remove unused timeline reference * Fix OP Helpers for member page * Fix initial cached paged options * Fixed broken inlineCreate * Only nil-check for table, projectIdentifier CAN be null
7 years ago
@NgModule({
imports: [
BrowserModule,
UpgradeModule
],
providers: [
WorkPackagesTableControllerHolder,
upgradeService('wpRelations', WorkPackageRelationsService),
upgradeService('states', States),
upgradeService('paginationService', PaginationService),
upgradeService('wpTablePagination', WorkPackageTablePaginationService),
upgradeService('wpDisplayField', WorkPackageDisplayFieldService),
upgradeService('wpTableTimeline', WorkPackageTableTimelineService),
upgradeService('wpNotificationsService', WorkPackageNotificationService),
upgradeService('wpTableHierarchies', WorkPackageTableHierarchiesService),
upgradeService('wpTableSortBy', WorkPackageTableSortByService),
upgradeService('wpTableRelationColumns', WorkPackageTableRelationColumnsService),
upgradeService('wpTableGroupBy', WorkPackageTableGroupByService),
upgradeService('wpTableColumns', WorkPackageTableColumnsService),
upgradeService('contextMenu', ContextMenuService),
upgradeService('halRequest', HalRequestService),
upgradeService('wpCacheService', WorkPackageCacheService),
Angular 4 support and upgraded timeline header directive (#5984) * Added Angular4 dependency and initial setup * Angular 4 transition: timeline header directive * removed superfluous require declaration * moved Angular4 dependencies to vendor.js * Angular4: upgraded timeline relations directive * Fixes karma tests. However, logging seems to be broken now. * Angular4: upgraded directive wpTimelineStaticElements * dev rebase * WIP Angular 4+ transition * converted WorkPackageTableTimelineGrid to Angular4+ * start migrating WorkPackageTimelineTableController to Angular4+ * completed migration of component tree WorkPackageTimelineTableController * Fix Pagination directive * set any to scope for TS warnings * Convert wp-table-pagination * merged changes from Oliver * begin migrating WorkPackagesTableController * begin migrating WorkPackagesTableController * Apply karma fix to PR * Fix pagination options * WIP Angular migration wp-table.directive * Angular4 migration - table sums * Angular4 migration: fixed error message when no sums are displayed * Angular4 migration: removed superfluous Angular1 registration * WIP Angular4 migration * WIP Angular4 migration - removed unused directives - start migartion sortHeader directive * WIP Angular4 migration - sortHeader directive * WIP Angular4 migration: sort header * Angular4 migration: implemented dropDown directive for Angular4 * merged origin/dev * updated package-lock.json * use shrinkwrap instead of package-lock * Angular4 migration: fixed accessible_by_keyboard directive * WIP #26714 * reformat code * fixes #26714 pass projectIdentifier to wpTable * cleanup * fixes #26716 * WIP Angular4 migration: added support for test execution * wpTablePagination: convertered reasonable tests to Angular4 * merged dev branch, updated dependencies * fixed #26727 * Replace openproject initialization in head * fixed #26728 * Replace time entries and messages ng1 controllers * Remove unused timeline reference * Fix OP Helpers for member page * Fix initial cached paged options * Fixed broken inlineCreate * Only nil-check for table, projectIdentifier CAN be null
7 years ago
upgradeServiceWithToken('$rootScope', $rootScopeToken),
upgradeServiceWithToken('I18n', I18nToken),
upgradeServiceWithToken('NotificationsService', NotificationsServiceToken),
upgradeServiceWithToken('columnsModal', columnsModalToken),
upgradeServiceWithToken('FocusHelper', focusHelperToken)
],
declarations: [
OpIcon,
AccessibleByKeyboardDirectiveUpgraded,
TablePaginationComponent,
WorkPackageTablePaginationComponent,
WorkPackageTimelineHeaderController,
WorkPackageTableTimelineRelations,
WorkPackageTableTimelineStaticElements,
WorkPackageTableTimelineGrid,
WorkPackageTimelineTableController,
WorkPackagesTableController,
WpResizerDirectiveUpgraded,
WpWorkflowButtonComponent,
WpWorkflowButtonsComponent,
Angular 4 support and upgraded timeline header directive (#5984) * Added Angular4 dependency and initial setup * Angular 4 transition: timeline header directive * removed superfluous require declaration * moved Angular4 dependencies to vendor.js * Angular4: upgraded timeline relations directive * Fixes karma tests. However, logging seems to be broken now. * Angular4: upgraded directive wpTimelineStaticElements * dev rebase * WIP Angular 4+ transition * converted WorkPackageTableTimelineGrid to Angular4+ * start migrating WorkPackageTimelineTableController to Angular4+ * completed migration of component tree WorkPackageTimelineTableController * Fix Pagination directive * set any to scope for TS warnings * Convert wp-table-pagination * merged changes from Oliver * begin migrating WorkPackagesTableController * begin migrating WorkPackagesTableController * Apply karma fix to PR * Fix pagination options * WIP Angular migration wp-table.directive * Angular4 migration - table sums * Angular4 migration: fixed error message when no sums are displayed * Angular4 migration: removed superfluous Angular1 registration * WIP Angular4 migration * WIP Angular4 migration - removed unused directives - start migartion sortHeader directive * WIP Angular4 migration - sortHeader directive * WIP Angular4 migration: sort header * Angular4 migration: implemented dropDown directive for Angular4 * merged origin/dev * updated package-lock.json * use shrinkwrap instead of package-lock * Angular4 migration: fixed accessible_by_keyboard directive * WIP #26714 * reformat code * fixes #26714 pass projectIdentifier to wpTable * cleanup * fixes #26716 * WIP Angular4 migration: added support for test execution * wpTablePagination: convertered reasonable tests to Angular4 * merged dev branch, updated dependencies * fixed #26727 * Replace openproject initialization in head * fixed #26728 * Replace time entries and messages ng1 controllers * Remove unused timeline reference * Fix OP Helpers for member page * Fix initial cached paged options * Fixed broken inlineCreate * Only nil-check for table, projectIdentifier CAN be null
7 years ago
WorkPackageTableSumsRowController,
SortHeaderDirective,
HasDropdownMenuDirective,
WpInlineCreateDirectiveUpgraded
],
entryComponents: [
WorkPackageTablePaginationComponent,
WorkPackagesTableController,
TablePaginationComponent,
WpWorkflowButtonsComponent
Angular 4 support and upgraded timeline header directive (#5984) * Added Angular4 dependency and initial setup * Angular 4 transition: timeline header directive * removed superfluous require declaration * moved Angular4 dependencies to vendor.js * Angular4: upgraded timeline relations directive * Fixes karma tests. However, logging seems to be broken now. * Angular4: upgraded directive wpTimelineStaticElements * dev rebase * WIP Angular 4+ transition * converted WorkPackageTableTimelineGrid to Angular4+ * start migrating WorkPackageTimelineTableController to Angular4+ * completed migration of component tree WorkPackageTimelineTableController * Fix Pagination directive * set any to scope for TS warnings * Convert wp-table-pagination * merged changes from Oliver * begin migrating WorkPackagesTableController * begin migrating WorkPackagesTableController * Apply karma fix to PR * Fix pagination options * WIP Angular migration wp-table.directive * Angular4 migration - table sums * Angular4 migration: fixed error message when no sums are displayed * Angular4 migration: removed superfluous Angular1 registration * WIP Angular4 migration * WIP Angular4 migration - removed unused directives - start migartion sortHeader directive * WIP Angular4 migration - sortHeader directive * WIP Angular4 migration: sort header * Angular4 migration: implemented dropDown directive for Angular4 * merged origin/dev * updated package-lock.json * use shrinkwrap instead of package-lock * Angular4 migration: fixed accessible_by_keyboard directive * WIP #26714 * reformat code * fixes #26714 pass projectIdentifier to wpTable * cleanup * fixes #26716 * WIP Angular4 migration: added support for test execution * wpTablePagination: convertered reasonable tests to Angular4 * merged dev branch, updated dependencies * fixed #26727 * Replace openproject initialization in head * fixed #26728 * Replace time entries and messages ng1 controllers * Remove unused timeline reference * Fix OP Helpers for member page * Fix initial cached paged options * Fixed broken inlineCreate * Only nil-check for table, projectIdentifier CAN be null
7 years ago
]
})
export class OpenProjectModule {
constructor(private upgrade:UpgradeModule) {
}
// noinspection JSUnusedGlobalSymbols
ngDoBootstrap() {
this.upgrade.bootstrap(document.body, ['openproject'], {strictDi: false});
}
}