Angular Migrations to 19

This commit is contained in:
Lorenz Hilpert
2025-02-24 13:51:42 +01:00
parent 10349409fb
commit 39d790c121
407 changed files with 4318 additions and 2497 deletions

View File

@@ -7,6 +7,7 @@ import { Camera, DataCaptureContext, DataCaptureView, FrameSourceState } from 's
templateUrl: 'scandit-overlay.component.html',
styleUrls: ['scandit-overlay.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ScanditOverlayComponent implements AfterViewInit, OnDestroy {
private dataCaptureContext: DataCaptureContext;

View File

@@ -33,6 +33,7 @@ import { animate, style, transition, trigger } from '@angular/animations';
]),
]),
],
standalone: false,
})
export class AppComponent implements OnInit {
readonly injector = inject(Injector);

View File

@@ -1,5 +1,5 @@
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { APP_INITIALIZER, ErrorHandler, Injector, LOCALE_ID, NgModule } from '@angular/core';
import { ErrorHandler, Injector, LOCALE_ID, NgModule, inject, provideAppInitializer } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { PlatformModule } from '@angular/cdk/platform';
@@ -159,12 +159,10 @@ export function _notificationsHubOptionsFactory(config: Config, auth: AuthServic
NgIconsModule.withIcons({ matWifiOff, matClose, matWifi }),
],
providers: [
{
provide: APP_INITIALIZER,
useFactory: _appInitializerFactory,
multi: true,
deps: [Config, Injector],
},
provideAppInitializer(() => {
const initializerFn = _appInitializerFactory(inject(Config), inject(Injector));
return initializerFn();
}),
{
provide: NOTIFICATIONS_HUB_OPTIONS,
useFactory: _notificationsHubOptionsFactory,

View File

@@ -4,6 +4,7 @@ import { Component, ChangeDetectionStrategy } from '@angular/core';
selector: 'app-main',
templateUrl: 'main.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class MainComponent {
constructor() {}

View File

@@ -10,7 +10,6 @@ import { BehaviorSubject } from 'rxjs';
templateUrl: 'preview.component.html',
styleUrls: ['preview.component.css'],
imports: [CommonModule, BranchSelectorComponent, PlatformModule],
standalone: true,
})
export class PreviewComponent implements OnInit {
selectedBranch$ = new BehaviorSubject<BranchDTO>({});

View File

@@ -7,9 +7,14 @@ import { AuthService } from '@core/auth';
templateUrl: 'token-login.component.html',
styleUrls: ['token-login.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class TokenLoginComponent implements OnInit {
constructor(private _route: ActivatedRoute, private _authService: AuthService, private _router: Router) {}
constructor(
private _route: ActivatedRoute,
private _authService: AuthService,
private _router: Router,
) {}
ngOnInit() {
if (this._route.snapshot.params.token && !this._authService.isAuthenticated()) {

View File

@@ -3,6 +3,7 @@ import { AuthService } from './auth.service';
@Directive({
selector: '[ifRole],[ifRoleElse],[ifNotRole],[ifNotRoleElse]',
standalone: false,
})
export class IfRoleDirective implements OnChanges {
@Input()

View File

@@ -6,6 +6,7 @@ import { DomainCatalogThumbnailService } from './thumbnail.service';
@Pipe({
name: 'thumbnailUrl',
pure: false,
standalone: false,
})
export class ThumbnailUrlPipe implements PipeTransform, OnDestroy {
private input$ = new BehaviorSubject<{ width?: number; height?: number; ean?: string }>(undefined);

View File

@@ -7,6 +7,7 @@ import { UiModalRef } from '@ui/modal';
templateUrl: 'address-selection-modal.component.html',
styleUrls: ['address-selection-modal.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class AddressSelectionModalComponent {
constructor(public ref: UiModalRef<AddressDTO[] | string>) {}

View File

@@ -15,6 +15,7 @@ import { injectCancelSearch } from '@shared/services/cancel-subject';
templateUrl: 'availabilities.component.html',
styleUrls: ['availabilities.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ModalAvailabilitiesComponent {
cancelSearch = injectCancelSearch({ optional: true });

View File

@@ -3,6 +3,7 @@ import { AvailabilityByBranchDTO } from '@domain/availability';
@Pipe({
name: 'inStock',
standalone: false,
})
export class InStockPipe implements PipeTransform {
transform(branchId: number, inStock: AvailabilityByBranchDTO[]): number {

View File

@@ -3,6 +3,7 @@ import { AvailabilityByBranchDTO } from '@domain/availability';
@Pipe({
name: 'stockInfo',
standalone: false,
})
export class StockInfoPipe implements PipeTransform {
transform(branchId: number, inStock: AvailabilityByBranchDTO[]): AvailabilityByBranchDTO {

View File

@@ -7,6 +7,7 @@ import { HistoryData } from './history-data';
templateUrl: 'history.component.html',
styleUrls: ['history.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class HistoryModalComponent {
get customerName() {

View File

@@ -7,6 +7,7 @@ import { UiModalRef } from '@ui/modal';
templateUrl: 'images.component.html',
styleUrls: ['images.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ModalImagesComponent {
images = this.modalRef.data.images;

View File

@@ -12,7 +12,6 @@ import { KulturpassOrderItemStore } from './kulturpass-order-item.store';
styleUrls: ['kulturpass-order-item.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'shared-kulturpass-order-item' },
standalone: true,
imports: [ProductImageModule, CommonModule, UiQuantityDropdownModule],
providers: [provideComponentStore(KulturpassOrderItemStore)],
})

View File

@@ -19,7 +19,6 @@ import { getCatalogProductNumber } from './catalog-product-number';
styleUrls: ['kulturpass-order-modal.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'shared-kulturpass-order-modal' },
standalone: true,
imports: [KulturpassOrderSearchboxComponent, CommonModule, BranchNamePipe, KulturpassOrderItemComponent, LoaderComponent],
providers: [provideComponentStore(KulturpassOrderModalStore)],
})

View File

@@ -13,7 +13,6 @@ import { CommonModule } from '@angular/common';
styleUrls: ['kulturpass-order-searchbox.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'shared-kulturpass-order-searchbox' },
standalone: true,
imports: [UiSearchboxNextModule, ReactiveFormsModule, CommonModule],
providers: [provideComponentStore(KulturpassOrderSearchboxStore)],
})

View File

@@ -10,7 +10,6 @@ import { MessageModalAction } from './message-modal.action';
styleUrls: ['message-modal.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'shared-message-modal' },
standalone: true,
imports: [CommonModule],
})
export class MessageModalComponent {

View File

@@ -5,6 +5,7 @@ import { MessageBoardItemDTO } from '@hub/notifications';
selector: 'modal-notifications-list-item',
templateUrl: 'notifications-list-item.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ModalNotificationsListItemComponent {
@Input()

View File

@@ -6,6 +6,7 @@ import { MessageBoardItemDTO } from '@hub/notifications';
selector: 'modal-notifications-package-inspection-group',
templateUrl: 'notifications-package-inspection-group.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ModalNotificationsPackageInspectionGroupComponent {
@Input()

View File

@@ -8,6 +8,7 @@ import { MessageBoardItemDTO } from '@hub/notifications';
selector: 'modal-notifications-remission-group',
templateUrl: 'notifications-remission-group.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ModalNotificationsRemissionGroupComponent {
private _pickupShelfInNavigationService = inject(PickupShelfInNavigationService);

View File

@@ -8,6 +8,7 @@ import { MessageBoardItemDTO } from '@hub/notifications';
selector: 'modal-notifications-reservation-group',
templateUrl: 'notifications-reservation-group.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ModalNotificationsReservationGroupComponent {
private _pickupShelfInNavigationService = inject(PickupShelfInNavigationService);

View File

@@ -8,6 +8,7 @@ import { MessageBoardItemDTO } from '@hub/notifications';
selector: 'modal-notifications-task-calendar-group',
templateUrl: 'notifications-task-calendar-group.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ModalNotificationsTaskCalendarGroupComponent {
private _pickupShelfInNavigationService = inject(PickupShelfInNavigationService);

View File

@@ -5,6 +5,7 @@ import { MessageBoardItemDTO } from '@hub/notifications';
selector: 'modal-notifications-update-group',
templateUrl: 'notifications-update-group.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ModalNotificationsUpdateGroupComponent {
@Input()

View File

@@ -14,6 +14,7 @@ interface ModalNotificationComponentState {
styleUrls: ['notifications.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
standalone: false,
})
export class ModalNotificationsComponent extends ComponentStore<ModalNotificationComponentState> {
private _selectedAreaSelector = (state: ModalNotificationComponentState) => {

View File

@@ -17,7 +17,6 @@ import { UiSpinnerModule } from '@ui/spinner';
templateUrl: 'modal-printer.component.html',
styleUrls: ['modal-printer.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [CommonModule, FormsModule, UiIconModule, UiSelectModule, UiSpinnerModule],
})
export class PrintModalComponent implements OnInit, OnDestroy {

View File

@@ -9,7 +9,6 @@ import { PurchaseOptionsStore } from '../store';
templateUrl: 'purchase-options-list-header.component.html',
styleUrls: ['purchase-options-list-header.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [CommonModule],
})
export class PurchaseOptionsListHeaderComponent {

View File

@@ -24,7 +24,6 @@ import moment from 'moment';
templateUrl: 'purchase-options-list-item.component.html',
styleUrls: ['purchase-options-list-item.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [
CommonModule,
UiQuantityDropdownModule,

View File

@@ -22,7 +22,6 @@ import { provideComponentStore } from '@ngrx/component-store';
templateUrl: 'purchase-options-modal.component.html',
styleUrls: ['purchase-options-modal.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
providers: [provideComponentStore(PurchaseOptionsStore)],
imports: [
CommonModule,

View File

@@ -2,7 +2,9 @@ import { ChangeDetectorRef, Directive, HostBinding, HostListener } from '@angula
import { asapScheduler } from 'rxjs';
import { PurchaseOption, PurchaseOptionsStore } from '../store';
@Directive({})
@Directive({
standalone: false,
})
export abstract class BasePurchaseOptionDirective {
protected abstract store: PurchaseOptionsStore;
protected abstract cdr: ChangeDetectorRef;

View File

@@ -10,7 +10,6 @@ import { map, shareReplay } from 'rxjs/operators';
templateUrl: 'delivery-purchase-options-tile.component.html',
styleUrls: ['purchase-options-tile.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [CommonModule, IconComponent],
})
export class DeliveryPurchaseOptionTileComponent extends BasePurchaseOptionDirective {

View File

@@ -9,7 +9,6 @@ import { IconComponent } from '@shared/components/icon';
templateUrl: 'download-purchase-options-tile.component.html',
styleUrls: ['purchase-options-tile.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [CommonModule, IconComponent],
})
export class DownloadPurchaseOptionTileComponent extends BasePurchaseOptionDirective {

View File

@@ -15,7 +15,6 @@ import { map } from 'rxjs/operators';
templateUrl: 'in-store-purchase-options-tile.component.html',
styleUrls: ['purchase-options-tile.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [CommonModule, IconComponent, BranchSelectorComponent, FormsModule, BranchNamePipe],
host: { tabindex: '-1' },
})

View File

@@ -15,7 +15,6 @@ import { map } from 'rxjs/operators';
templateUrl: 'pickup-purchase-options-tile.component.html',
styleUrls: ['purchase-options-tile.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [CommonModule, IconComponent, BranchSelectorComponent, FormsModule, BranchNamePipe],
host: { tabindex: '-1' },
})

View File

@@ -22,6 +22,7 @@ interface GoodsInListReorderModalState {
templateUrl: 'reorder.component.html',
styleUrls: ['reorder.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ReorderModalComponent extends ComponentStore<GoodsInListReorderModalState> {
private domainAvailabilityService = inject(DomainAvailabilityService);

View File

@@ -2,6 +2,7 @@ import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'supplierName',
standalone: false,
})
export class SupplierNamePipe implements PipeTransform {
readonly supplierMap = {

View File

@@ -7,6 +7,7 @@ import { UiModalRef } from '@ui/modal';
templateUrl: 'reviews.component.html',
styleUrls: ['reviews.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ModalReviewsComponent {
reviews = this.modalRef.data;

View File

@@ -14,7 +14,6 @@ import { validateEmail } from 'apps/isa-app/src/page/customer/validators/email-v
styleUrls: ['send-order-confirmation-modal.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'shared-send-order-confirmation-modal' },
standalone: true,
imports: [FormControldModule, ReactiveFormsModule, IconComponent],
})
export class SendOrderConfirmationModalComponent implements OnInit {

View File

@@ -10,7 +10,6 @@ import { PackageListModule } from '@shared/components/package-list';
templateUrl: 'wrong-destination-modal.component.html',
styleUrls: ['wrong-destination-modal.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [PackageListModule],
})
export class WrongDestinationModalComponent {

View File

@@ -7,6 +7,7 @@ import { Config } from '@core/config';
templateUrl: 'assortment.component.html',
styleUrls: ['assortment.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class AssortmentComponent implements OnInit {
get breadcrumbKey(): string {

View File

@@ -5,6 +5,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
templateUrl: 'price-update-item-loader.component.html',
styleUrls: ['price-update-item-loader.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class PriceUpdateItemLoaderComponent implements OnInit {
constructor() {}

View File

@@ -15,6 +15,7 @@ import { ReplaySubject, combineLatest } from 'rxjs';
styleUrls: ['price-update-item.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [DatePipe],
standalone: false,
})
export class PriceUpdateItemComponent {
private _item$ = new ReplaySubject<ProductListItemDTO>(1);

View File

@@ -19,6 +19,7 @@ import { trigger, transition, style, animate } from '@angular/animations';
transition(':leave', [animate('250ms cubic-bezier(0.35, 0, 0.25, 1)', style({ transform: 'scale(0.8)', opacity: 0 }))]),
]),
],
standalone: false,
})
export class PriceUpdateListComponent {
@ViewChild('scrollContainer', { static: true })

View File

@@ -17,6 +17,7 @@ import { provideCancelSearchSubject } from '@shared/services/cancel-subject';
styleUrls: ['price-update.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [provideComponentStore(PriceUpdateComponentStore), provideCancelSearchSubject()],
standalone: false,
})
export class PriceUpdateComponent implements OnInit {
private _subscription = new Subscription();

View File

@@ -7,7 +7,6 @@ import { RouterLink } from '@angular/router';
styleUrls: ['article-details-text-link.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'page-article-details-text-link' },
standalone: true,
imports: [RouterLink],
})
export class ArticleDetailsTextLinkComponent {

View File

@@ -11,7 +11,6 @@ import { ReiheRoutePipe } from './reihe-route.pipe';
styleUrls: ['article-details-text.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'page-article-details-text' },
standalone: true,
imports: [ArticleDetailsTextLinkComponent, NgFor, NgSwitch, NgSwitchCase, NgSwitchDefault, LineTypePipe, ReiheRoutePipe],
})
export class ArticleDetailsTextComponent {

View File

@@ -32,6 +32,7 @@ import moment, { Moment } from 'moment';
changeDetection: ChangeDetectionStrategy.Default,
providers: [ArticleDetailsStore, DatePipe],
animations: [slideYAnimation],
standalone: false,
})
export class ArticleDetailsComponent implements OnInit, OnDestroy {
private _customerSearchNavigation = inject(CustomerSearchNavigation);

View File

@@ -7,6 +7,7 @@ import { ProductCatalogNavigationService } from '@shared/services/navigation';
selector: 'page-article-recommendations',
templateUrl: 'article-recommendations.component.html',
styleUrls: ['article-recommendations.component.scss'],
standalone: false,
})
export class ArticleRecommendationsComponent {
@Output()

View File

@@ -22,6 +22,7 @@ import { FilterAutocompleteProvider } from '@shared/components/filter';
},
],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ArticleSearchComponent implements OnInit, OnDestroy {
private _onDestroy$ = new Subject<void>();

View File

@@ -13,6 +13,7 @@ import { Filter, FilterComponent } from '@shared/components/filter';
templateUrl: 'search-filter.component.html',
styleUrls: ['search-filter.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ArticleSearchFilterComponent implements OnInit, OnDestroy {
_processId$ = this._activatedRoute.parent.data.pipe(map((data) => Number(data.processId)));

View File

@@ -16,6 +16,7 @@ import { ProductCatalogNavigationService } from '@shared/services/navigation';
templateUrl: 'search-main.component.html',
styleUrls: ['search-main.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ArticleSearchMainComponent implements OnInit, OnDestroy {
readonly history$ = this.catalog.getSearchHistory({ take: 7 }).pipe(

View File

@@ -10,6 +10,7 @@ import { UiModalRef } from '@ui/modal';
templateUrl: 'added-to-cart-modal.component.html',
styleUrls: ['added-to-cart-modal.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class AddedToCartModalComponent {
get isTablet() {

View File

@@ -3,6 +3,7 @@ import { StockInfoDTO } from '@generated/swagger/cat-search-api';
@Pipe({
name: 'stockInfos',
standalone: false,
})
export class StockInfosPipe implements PipeTransform {
transform(infos: StockInfoDTO[], ...args: any[]): number {

View File

@@ -5,6 +5,7 @@ import { Component, ChangeDetectionStrategy, HostBinding, Input } from '@angular
templateUrl: 'search-result-item-loading.component.html',
styleUrls: ['search-result-item-loading.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class SearchResultItemLoadingComponent {
@Input()

View File

@@ -25,6 +25,7 @@ export interface SearchResultItemComponentState {
styleUrls: ['search-result-item.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [DatePipe],
standalone: false,
})
export class SearchResultItemComponent extends ComponentStore<SearchResultItemComponentState> {
@Input()

View File

@@ -37,6 +37,7 @@ import { ShellService } from '@shared/shell';
templateUrl: 'search-results.component.html',
styleUrls: ['search-results.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterViewInit {
@ViewChildren(SearchResultItemComponent) listItems: QueryList<SearchResultItemComponent>;

View File

@@ -3,6 +3,7 @@ import { ItemDTO } from '@generated/swagger/cat-search-api';
@Pipe({
name: 'searchResultSelected',
standalone: false,
})
export class SearchResultSelectedPipe implements PipeTransform {
transform(item: ItemDTO, selectedItemIds: number[]): any {

View File

@@ -21,6 +21,7 @@ import { provideCancelSearchSubject } from '@shared/services/cancel-subject';
styleUrls: ['page-catalog.component.scss'],
providers: [provideComponentStore(ArticleSearchService), provideCancelSearchSubject()],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class PageCatalogComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild(BreadcrumbComponent, { read: ElementRef }) breadcrumbRef: ElementRef<HTMLElement>;

View File

@@ -3,6 +3,7 @@ import { isString } from '@utils/common';
@Pipe({
name: 'trim',
standalone: false,
})
export class TrimPipe implements PipeTransform {
transform(value: string, length: number = 25): any {

View File

@@ -3,6 +3,7 @@ import { VATType } from '@generated/swagger/cat-search-api';
@Pipe({
name: 'vat',
standalone: false,
})
export class VatPipe implements PipeTransform {
transform(vatType: VATType, priceMaintained?: boolean, ...args: any[]): any {

View File

@@ -17,6 +17,7 @@ import { Router } from '@angular/router';
styleUrls: ['checkout-dummy.component.scss'],
providers: [CheckoutDummyStore, UntypedFormBuilder],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CheckoutDummyComponent implements OnInit, OnDestroy {
// Form

View File

@@ -37,6 +37,7 @@ import { CustomerSearchNavigation } from '@shared/services/navigation';
templateUrl: 'checkout-review.component.html',
styleUrls: ['checkout-review.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CheckoutReviewComponent implements OnInit, OnDestroy, AfterViewInit {
private _onDestroy$ = new Subject<void>();

View File

@@ -15,6 +15,7 @@ import { CustomerSearchNavigation } from '@shared/services/navigation';
templateUrl: 'checkout-review-details.component.html',
styleUrls: ['checkout-review-details.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CheckoutReviewDetailsComponent implements OnInit {
customerNavigation = inject(CustomerSearchNavigation);

View File

@@ -27,6 +27,7 @@ export interface ShoppingCartItemComponentState {
templateUrl: 'shopping-cart-item.component.html',
styleUrls: ['shopping-cart-item.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class ShoppingCartItemComponent extends ComponentStore<ShoppingCartItemComponentState> implements OnInit {
private _zone = inject(NgZone);

View File

@@ -8,6 +8,7 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
styleUrls: ['special-comment.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SpecialCommentComponent), multi: true }],
standalone: false,
})
export class SpecialCommentComponent implements ControlValueAccessor {
@ViewChild('autosize') autosize: CdkTextareaAutosize;

View File

@@ -23,6 +23,7 @@ import { ToasterService } from '@shared/shell';
templateUrl: 'checkout-summary.component.html',
styleUrls: ['checkout-summary.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CheckoutSummaryComponent implements OnInit, OnDestroy {
private _injector = inject(Injector);

View File

@@ -7,6 +7,7 @@ import { map } from 'rxjs/operators';
templateUrl: 'page-checkout.component.html',
styleUrls: ['page-checkout.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class PageCheckoutComponent implements OnInit {
readonly breadcrumbKey$ = this.applicationService.activatedProcessId$.pipe(map((processId) => String(processId)));

View File

@@ -3,6 +3,7 @@ import { BranchDTO } from '@generated/swagger/checkout-api';
@Pipe({
name: 'branchAddress',
standalone: false,
})
export class BranchAddressPipe implements PipeTransform {
transform(branch: BranchDTO, ...args: any[]): any {

View File

@@ -3,6 +3,7 @@ import { BuyerDTO } from '@generated/swagger/checkout-api';
@Pipe({
name: 'buyerName',
standalone: false,
})
export class BuyerNamePipe implements PipeTransform {
transform(buyer: BuyerDTO, ...args: any[]): any {

View File

@@ -3,6 +3,7 @@ import { PayerDTO } from '@generated/swagger/checkout-api';
@Pipe({
name: 'payerAddress',
standalone: false,
})
export class PayerAddressPipe implements PipeTransform {
transform(value: PayerDTO, ...args: any[]): any {

View File

@@ -2,6 +2,7 @@ import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'purchaseOptionIcon',
standalone: false,
})
export class PurchaseOptionIconPipe implements PipeTransform {
readonly purchaseOptionIcons = {

View File

@@ -2,6 +2,7 @@ import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'purchaseOptionName',
standalone: false,
})
export class PurchaseOptionNamePipe implements PipeTransform {
readonly purchaseOptionNames = {

View File

@@ -3,6 +3,7 @@ import { ShippingAddressDTO } from '@generated/swagger/checkout-api';
@Pipe({
name: 'shippingAddress',
standalone: false,
})
export class ShippingAddressPipe implements PipeTransform {
transform(value: ShippingAddressDTO, ...args: any[]): any {

View File

@@ -3,6 +3,7 @@ import { isString } from '@utils/common';
@Pipe({
name: 'trim',
standalone: false,
})
export class TrimPipe implements PipeTransform {
transform(value: string, length: number = 15): any {

View File

@@ -23,6 +23,7 @@ import { CustomerOrderDetailsStore } from '../customer-order-details.store';
templateUrl: 'customer-order-details-header.component.html',
styleUrls: ['customer-order-details-header.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerOrderDetailsHeaderComponent implements OnChanges {
@Output()

View File

@@ -36,6 +36,7 @@ export interface CustomerOrderDetailsItemComponentState {
templateUrl: 'customer-order-details-item.component.html',
styleUrls: ['customer-order-details-item.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerOrderDetailsItemComponent extends ComponentStore<CustomerOrderDetailsItemComponentState> implements OnInit, OnDestroy {
@ViewChild('autosize') autosize: CdkTextareaAutosize;

View File

@@ -9,6 +9,7 @@ import { first, map } from 'rxjs/operators';
styleUrls: ['customer-order-details-tags.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => CustomerOrderDetailsTagsComponent), multi: true }],
standalone: false,
})
export class CustomerOrderDetailsTagsComponent implements OnInit, OnDestroy, ControlValueAccessor {
selected$ = new BehaviorSubject<string>('');

View File

@@ -30,6 +30,7 @@ import { CustomerOrderDetailsTagsComponent } from './customer-order-details-tags
styleUrls: ['customer-order-details.component.scss'],
providers: [provideComponentStore(CustomerOrderDetailsStore)],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerOrderDetailsComponent implements OnInit, AfterViewInit, OnDestroy {
@ContentChildren(CustomerOrderDetailsItemComponent)

View File

@@ -14,6 +14,7 @@ import { map, shareReplay, switchMap, tap, withLatestFrom } from 'rxjs/operators
templateUrl: 'customer-order-edit.component.html',
styleUrls: ['customer-order-edit.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerOrderEditComponent implements OnInit {
get processId() {

View File

@@ -11,6 +11,7 @@ import { map, switchMap, shareReplay, take } from 'rxjs/operators';
templateUrl: 'customer-order-history.component.html',
styleUrls: ['customer-order-history.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerOrderHistoryComponent implements OnInit {
get processId() {

View File

@@ -14,6 +14,7 @@ import { CustomerOrdersNavigationService } from '@shared/services/navigation';
templateUrl: 'customer-order-search-filter.component.html',
styleUrls: ['customer-order-search-filter.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerOrderSearchFilterComponent implements OnInit, OnDestroy {
loading$: Observable<boolean>;

View File

@@ -10,7 +10,6 @@ import { Subscription } from 'rxjs';
templateUrl: 'order-branch-id-input.component.html',
styleUrls: ['order-branch-id-input.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [BranchSelectorComponent, ReactiveFormsModule],
})
export class OrderBranchIdInputComponent extends AbstractUiFilterInputDirective implements OnInit, OnDestroy {

View File

@@ -21,6 +21,7 @@ import { CustomerOrdersNavigationService } from '@shared/services/navigation';
multi: true,
},
],
standalone: false,
})
export class CustomerOrderSearchComponent implements OnInit, OnDestroy {
private _onDestroy$ = new Subject<void>();

View File

@@ -15,6 +15,7 @@ import { ApplicationService } from '@core/application';
templateUrl: 'customer-order-search-main.component.html',
styleUrls: ['customer-order-search-main.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerOrderSearchMainComponent implements OnInit, OnDestroy {
filter$ = this._customerOrderSearchStore.filter$.pipe(filter((f) => !!f));

View File

@@ -3,6 +3,7 @@ import { KeyValueDTOOfStringAndString, OrderItemListItemDTO } from '@generated/s
@Pipe({
name: 'goodsOutItemSelectable',
standalone: false,
})
export class CustomerOrderItemSelectablePipe implements PipeTransform {
transform(

View File

@@ -3,6 +3,7 @@ import { OrderItemListItemDTO } from '@generated/swagger/oms-api';
@Pipe({
name: 'goodsOutItemSelected',
standalone: false,
})
export class CustomerOrderItemSelectedPipe implements PipeTransform {
transform(item: OrderItemListItemDTO, selectedOrderItemSubsetIds: number[]): any {

View File

@@ -17,6 +17,7 @@ export interface CustomerOrderItemComponentState {
templateUrl: 'customer-order-item.component.html',
styleUrls: ['customer-order-item.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerOrderItemComponent extends ComponentStore<CustomerOrderItemComponentState> {
@Input()

View File

@@ -41,6 +41,7 @@ export interface CustomerOrderSearchResultsState {
templateUrl: 'customer-order-search-results.component.html',
styleUrls: ['customer-order-search-results.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerOrderSearchResultsComponent
extends ComponentStore<CustomerOrderSearchResultsState>

View File

@@ -19,6 +19,7 @@ import { provideCancelSearchSubject } from '@shared/services/cancel-subject';
styleUrls: ['customer-order.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [provideComponentStore(CustomerOrderSearchStore), provideCancelSearchSubject()],
standalone: false,
})
export class CustomerOrderComponent implements OnInit {
@ViewChild(BreadcrumbComponent, { read: ElementRef }) breadcrumbRef: ElementRef<HTMLElement>;

View File

@@ -2,6 +2,7 @@ import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'addToPreviousCompartmentCodeLabelPipe',
standalone: false,
})
export class AddToPreviousCompartmentCodeLabelPipe implements PipeTransform {
transform(compartmentCode: string): string {

View File

@@ -35,6 +35,7 @@ export const ProcessingStatusNameMap = new Map<number, { value: string; disabled
@Pipe({
name: 'processingStatus',
standalone: false,
})
@Injectable()
export class CustomerOrderProcessingStatusPipe implements PipeTransform {

View File

@@ -3,6 +3,7 @@ import { NotificationChannel } from '@generated/swagger/oms-api';
@Pipe({
name: 'notificationsChannel',
standalone: false,
})
export class CustomerOrderNotificationsChannelPipe implements PipeTransform {
static channels = new Map<NotificationChannel, string>([

View File

@@ -21,6 +21,7 @@ const paymentTypeNames = {
@Pipe({
name: 'paymentType',
standalone: false,
})
export class CustomerOrderPaymentTypePipe implements PipeTransform {
transform(value: any, ...args: any[]): any {

View File

@@ -26,7 +26,6 @@ export interface CustomerMenuComponentState {
styleUrls: ['customer-menu.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'page-customer-menu' },
standalone: true,
imports: [CdkMenuModule, SharedMenuModule, IconComponent, RouterLink, NgIf, AsyncPipe],
})
export class CustomerMenuComponent extends ComponentStore<CustomerMenuComponentState> {

View File

@@ -7,6 +7,7 @@ import { CustomerLabelColor, CustomerLabelTextColor } from '../../../constants';
templateUrl: 'customer-result-list-item-full.component.html',
styleUrls: ['customer-result-list-item-full.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerResultListItemFullComponent {
customerLabelColor = CustomerLabelColor;

View File

@@ -7,6 +7,7 @@ import { CustomerLabelColor, CustomerLabelTextColor } from '../../../constants';
templateUrl: 'customer-result-list-item.component.html',
styleUrls: ['customer-result-list-item.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerResultListItemComponent {
customerLabelColor = CustomerLabelColor;

View File

@@ -10,6 +10,7 @@ import { asapScheduler } from 'rxjs';
templateUrl: 'customer-result-list.component.html',
styleUrls: ['customer-result-list.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class CustomerResultListComponent {
public customerSearchNavigation = inject(CustomerSearchNavigation);

View File

@@ -42,6 +42,7 @@ export interface CustomerTypeSelectorState {
multi: true,
},
],
standalone: false,
})
export class CustomerTypeSelectorComponent
extends ComponentStore<CustomerTypeSelectorState>

View File

@@ -8,6 +8,7 @@ import { FormBlockControl } from '../form-block';
styleUrls: ['accept-agb-form-block.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
exportAs: 'appAcceptAGBFormBlock',
standalone: false,
})
export class AcceptAGBFormBlockComponent extends FormBlockControl<boolean> {
get tabIndexEnd(): number {

View File

@@ -13,6 +13,7 @@ import { AddressFormBlockData } from './address-form-block-data';
templateUrl: 'address-form-block.component.html',
styleUrls: ['address-form-block.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false,
})
export class AddressFormBlockComponent extends FormBlockGroup<AddressFormBlockData> implements OnInit {
@Input() countries: CountryDTO[];

Some files were not shown because too many files have changed in this diff Show More