Rename display representation service

pull/7547/head
Oliver Günther 5 years ago
parent c8b3f8b1ce
commit 52a4185001
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 5
      frontend/src/app/components/states.service.ts
  2. 7
      frontend/src/app/components/wp-buttons/wp-details-view-button/wp-details-view-button.component.ts
  3. 8
      frontend/src/app/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component.ts
  4. 6
      frontend/src/app/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component.ts
  5. 3
      frontend/src/app/components/wp-card-view/event-handler/card-view-handler-registry.ts
  6. 10
      frontend/src/app/components/wp-fast-table/handlers/table-handler-registry.ts
  7. 0
      frontend/src/app/components/wp-fast-table/state/wp-view-display-representation.service.ts
  8. 4
      frontend/src/app/components/wp-list/wp-states-initialization.service.ts
  9. 4
      frontend/src/app/modules/work_packages/query-space/wp-isolated-query-space.directive.ts
  10. 2
      frontend/src/app/modules/work_packages/routing/wp-list/wp-list.component.ts
  11. 4
      frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts

@ -5,7 +5,6 @@ import {UserResource} from 'core-app/modules/hal/resources/user-resource';
import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource';
import {input, InputState, multiInput, MultiInputState, StatesGroup} from 'reactivestates';
import {QueryColumn} from './wp-query/query-column';
import {WikiPageResource} from 'core-app/modules/hal/resources/wiki-page-resource';
import {PostResource} from 'core-app/modules/hal/resources/post-resource';
import {HalResource} from 'core-app/modules/hal/resources/hal-resource';
import {StatusResource} from "core-app/modules/hal/resources/status-resource";
@ -13,10 +12,8 @@ import {QueryFilterInstanceSchemaResource} from "core-app/modules/hal/resources/
import {Subject} from "rxjs";
import {QuerySortByResource} from "core-app/modules/hal/resources/query-sort-by-resource";
import {QueryGroupByResource} from "core-app/modules/hal/resources/query-group-by-resource";
import {Input} from "@angular/core";
import {QueryFilterResource} from "core-app/modules/hal/resources/query-filter-resource";
import {VersionResource} from "core-app/modules/hal/resources/version-resource";
import {wpDisplayRepresentation} from "core-components/wp-fast-table/state/work-package-display-representation.service";
import {wpDisplayRepresentation} from "core-components/wp-fast-table/state/wp-view-display-representation.service";
export class States extends StatesGroup {
name = 'MainStore';

@ -34,10 +34,7 @@ import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit
import {AbstractWorkPackageButtonComponent} from 'core-components/wp-buttons/wp-buttons.module';
import {I18nService} from "core-app/modules/common/i18n/i18n.service";
import {untilComponentDestroyed} from "ng2-rx-componentdestroyed";
import {
WorkPackageDisplayRepresentationService,
wpDisplayCardRepresentation
} from "core-components/wp-fast-table/state/work-package-display-representation.service";
import {WorkPackageViewDisplayRepresentationService} from "core-components/wp-fast-table/state/wp-view-display-representation.service";
@Component({
templateUrl: '../wp-button.template.html',
@ -66,7 +63,7 @@ export class WorkPackageDetailsViewButtonComponent extends AbstractWorkPackageBu
public states:States,
public wpTableFocus:WorkPackageTableFocusService,
public keepTab:KeepTabService,
public wpDisplayRepresentationService:WorkPackageDisplayRepresentationService) {
public wpDisplayRepresentationService:WorkPackageViewDisplayRepresentationService) {
super(I18n);

@ -31,11 +31,11 @@ import {AbstractWorkPackageButtonComponent, ButtonControllerText} from '../wp-bu
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit} from '@angular/core';
import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {TimelineZoomLevel} from 'core-app/modules/hal/resources/query-resource';
import {componentDestroyed, untilComponentDestroyed} from "ng2-rx-componentdestroyed";
import {untilComponentDestroyed} from "ng2-rx-componentdestroyed";
import {
WorkPackageDisplayRepresentationService,
WorkPackageViewDisplayRepresentationService,
wpDisplayCardRepresentation
} from "core-components/wp-fast-table/state/work-package-display-representation.service";
} from "core-components/wp-fast-table/state/wp-view-display-representation.service";
export interface TimelineButtonText extends ButtonControllerText {
zoomOut:string;
@ -68,7 +68,7 @@ export class WorkPackageTimelineButtonComponent extends AbstractWorkPackageButto
constructor(readonly I18n:I18nService,
readonly cdRef:ChangeDetectorRef,
public wpTableTimeline:WorkPackageTableTimelineService,
public wpDisplayRepresentationService:WorkPackageDisplayRepresentationService) {
public wpDisplayRepresentationService:WorkPackageViewDisplayRepresentationService) {
super(I18n);
this.activateLabel = I18n.t('js.timelines.button_activate');

@ -32,9 +32,9 @@ import {I18nService} from 'core-app/modules/common/i18n/i18n.service';
import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper";
import {StateService} from "@uirouter/core";
import {
WorkPackageDisplayRepresentationService, wpDisplayCardRepresentation,
WorkPackageViewDisplayRepresentationService, wpDisplayCardRepresentation,
wpDisplayListRepresentation
} from "core-components/wp-fast-table/state/work-package-display-representation.service";
} from "core-components/wp-fast-table/state/wp-view-display-representation.service";
import {untilComponentDestroyed} from "ng2-rx-componentdestroyed";
@ -80,7 +80,7 @@ export class WorkPackageViewToggleButton extends AbstractWorkPackageButtonCompon
constructor(readonly $state:StateService,
readonly I18n:I18nService,
readonly cdRef:ChangeDetectorRef,
readonly wpDisplayRepresentationService:WorkPackageDisplayRepresentationService) {
readonly wpDisplayRepresentationService:WorkPackageViewDisplayRepresentationService) {
super(I18n);
this.cardLabel = I18n.t('js.button_card_list');

@ -5,7 +5,8 @@ import {CardRightClickHandler} from "core-components/wp-card-view/event-handler/
import {
WorkPackageViewEventHandler,
WorkPackageViewHandlerRegistry
} from "core-app/modules/work_packages/event-handling/event-handler-registry";
} from "core-app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry";
export type CardEventHandler = WorkPackageViewEventHandler<WorkPackageCardViewComponent>;

@ -21,7 +21,7 @@ import {DragAndDropTransformer} from "core-components/wp-fast-table/handlers/sta
import {
WorkPackageViewEventHandler,
WorkPackageViewHandlerRegistry
} from "core-app/modules/work_packages/event-handling/event-handler-registry";
} from "core-app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry";
type StateTransformers = {
// noinspection JSUnusedLocalSymbols
@ -65,4 +65,12 @@ export class TableHandlerRegistry extends WorkPackageViewHandlerRegistry<WorkPac
HighlightingTransformer,
DragAndDropTransformer
];
attachTo(viewRef:WorkPackageTable) {
this.stateTransformers.map((cls) => {
return new cls(this.injector, viewRef);
});
super.attachTo(viewRef);
}
}

@ -22,7 +22,7 @@ import {QuerySchemaResource} from 'core-app/modules/hal/resources/query-schema-r
import {WorkPackageTableHighlightingService} from "core-components/wp-fast-table/state/wp-table-highlighting.service";
import {take} from "rxjs/operators";
import {WorkPackageTableOrderService} from "core-components/wp-fast-table/state/wp-table-order.service";
import {WorkPackageDisplayRepresentationService} from "core-components/wp-fast-table/state/work-package-display-representation.service";
import {WorkPackageViewDisplayRepresentationService} from "core-components/wp-fast-table/state/wp-view-display-representation.service";
@Injectable()
export class WorkPackageStatesInitializationService {
@ -43,7 +43,7 @@ export class WorkPackageStatesInitializationService {
protected wpCacheService:WorkPackageCacheService,
protected wpListChecksumService:WorkPackagesListChecksumService,
protected authorisationService:AuthorisationService,
protected wpDisplayRepresentation:WorkPackageDisplayRepresentationService) {
protected wpDisplayRepresentation:WorkPackageViewDisplayRepresentationService) {
}
/**

@ -62,8 +62,8 @@ import {PortalCleanupService} from "core-app/modules/fields/display/display-port
import {TableDragActionsRegistryService} from "core-components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service";
import {WorkPackageTableOrderService} from "core-components/wp-fast-table/state/wp-table-order.service";
import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service";
import {WorkPackageDisplayRepresentationService} from "core-components/wp-fast-table/state/work-package-display-representation.service";
import {WorkPackageCardViewService} from "core-components/wp-card-view/services/wp-card-view.service";
import {WorkPackageViewDisplayRepresentationService} from "core-components/wp-fast-table/state/wp-view-display-representation.service";
/**
* Directive to open a work package query 'space', an isolated injector hierarchy
@ -97,7 +97,7 @@ import {WorkPackageCardViewService} from "core-components/wp-card-view/services/
WorkPackageTableAdditionalElementsService,
WorkPackageTableFocusService,
WorkPackageTableHighlightingService,
WorkPackageDisplayRepresentationService,
WorkPackageViewDisplayRepresentationService,
WorkPackageTableOrderService,
CausedUpdatesService,

@ -33,9 +33,9 @@ import {OpTitleService} from "core-components/html/op-title.service";
import {WorkPackagesViewBase} from "core-app/modules/work_packages/routing/wp-view-base/work-packages-view.base";
import {take} from "rxjs/operators";
import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service";
import {wpDisplayCardRepresentation} from "core-components/wp-fast-table/state/work-package-display-representation.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 {wpDisplayCardRepresentation} from "core-components/wp-fast-table/state/wp-view-display-representation.service";
@Component({
selector: 'wp-list',

@ -57,7 +57,7 @@ import {debugLog} from "core-app/helpers/debug_output";
import {QueryDmService} from "core-app/modules/hal/dm-services/query-dm.service";
import {WorkPackageStatesInitializationService} from "core-components/wp-list/wp-states-initialization.service";
import {WorkPackageTableOrderService} from "core-components/wp-fast-table/state/wp-table-order.service";
import {WorkPackageDisplayRepresentationService} from "core-components/wp-fast-table/state/work-package-display-representation.service";
import {WorkPackageViewDisplayRepresentationService} from "core-components/wp-fast-table/state/wp-view-display-representation.service";
export abstract class WorkPackagesViewBase implements OnInit, OnDestroy {
@ -85,7 +85,7 @@ export abstract class WorkPackagesViewBase implements OnInit, OnDestroy {
readonly QueryDm:QueryDmService = this.injector.get(QueryDmService);
readonly wpStatesInitialization:WorkPackageStatesInitializationService = this.injector.get(WorkPackageStatesInitializationService);
readonly cdRef:ChangeDetectorRef = this.injector.get(ChangeDetectorRef);
readonly wpDisplayRepresentation:WorkPackageDisplayRepresentationService = this.injector.get(WorkPackageDisplayRepresentationService);
readonly wpDisplayRepresentation:WorkPackageViewDisplayRepresentationService = this.injector.get(WorkPackageViewDisplayRepresentationService);
constructor(protected injector:Injector) {
}

Loading…
Cancel
Save