Angular v19

This commit is contained in:
2026-01-20 15:57:18 +01:00
parent e0c89f4358
commit 2eca9b2562
155 changed files with 9708 additions and 3068 deletions

View File

@@ -1,5 +1,5 @@
// angular modules
import { NgModule, APP_INITIALIZER, ModuleWithProviders, Injector, Optional, SkipSelf } from '@angular/core';
import { NgModule, ModuleWithProviders, Injector, Optional, SkipSelf, inject, provideAppInitializer } from '@angular/core';
import { DatePipe } from '@angular/common';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
@@ -90,12 +90,10 @@ export class AppCommonServiceModule {
providers: [
AppConfig,
ItemTypeService,
{
provide: APP_INITIALIZER,
useFactory: appConfigFactory,
deps: [Injector, AppConfig, OAuthService, AuthConfigFactory, OAuthStorage, ItemTypeService],
multi: true
},
provideAppInitializer(() => {
const initializerFn = (appConfigFactory)(inject(Injector), inject(AppConfig), inject(OAuthService), inject(AuthConfigFactory), inject(OAuthStorage), inject(ItemTypeService));
return initializerFn();
}),
{
provide: HTTP_INTERCEPTORS,
useClass: AccessTokenInterceptor,

View File

@@ -6,9 +6,10 @@ import * as appReducers from '../../reducers/app-common.reducer';
import * as appActions from '../../actions/app-common.actions';
@Component({
selector: 'fm-app-menu',
templateUrl: './app-menu.component.html',
styleUrls: ['./app-menu.component.scss']
selector: 'fm-app-menu',
templateUrl: './app-menu.component.html',
styleUrls: ['./app-menu.component.scss'],
standalone: false
})
export class AppMenuComponent implements OnInit {

View File

@@ -19,12 +19,13 @@ import { AppConfig } from '../../shared/app.config';
import * as appReducers from '../../reducers/app-common.reducer';
@Component({
selector: 'fm-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush
@Component({
selector: 'fm-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
})
export class AppComponent implements OnInit, OnDestroy {

View File

@@ -3,9 +3,10 @@ import { Router } from '@angular/router';
import { OAuthService } from 'angular-oauth2-oidc';
import { Location} from '@angular/common';
@Component({
selector: 'fm-auth-callback',
template:'<div></div>'
@Component({
selector: 'fm-auth-callback',
template: '<div></div>',
standalone: false
})
export class AuthCallbackComponent {

View File

@@ -3,9 +3,10 @@ import { IUser } from '../../models/user';
import { AppConfig } from '../../shared/app.config';
@Component({
selector: 'fm-avatar',
templateUrl: './avatar.component.html',
styleUrls: ['./avatar.component.css']
selector: 'fm-avatar',
templateUrl: './avatar.component.html',
styleUrls: ['./avatar.component.css'],
standalone: false
})
export class AvatarComponent implements OnInit {

View File

@@ -3,9 +3,10 @@ import { Component, EventEmitter, HostListener, Output } from '@angular/core';
import { DeviceService } from '../../services/device.service';
@Component({
selector: 'fm-back-button',
templateUrl: './back-button.component.html',
styleUrls: ['./back-button.component.scss']
selector: 'fm-back-button',
templateUrl: './back-button.component.html',
styleUrls: ['./back-button.component.scss'],
standalone: false
})
export class BackButtonComponent {
@Output() beforeLocationBack = new EventEmitter();

View File

@@ -5,9 +5,10 @@ import { ImageCroppedEvent,LoadedImage } from 'ngx-image-cropper';
import {ImageService } from '../../services/image.service';
@Component({
selector: 'fm-edit-image-modal',
templateUrl: './edit-image-modal.component.html',
styleUrls: ['./edit-image-modal.component.scss']
selector: 'fm-edit-image-modal',
templateUrl: './edit-image-modal.component.html',
styleUrls: ['./edit-image-modal.component.scss'],
standalone: false
})
export class EditImageModalComponent implements OnInit {

View File

@@ -2,9 +2,10 @@ import { Component, ChangeDetectorRef, Input,SimpleChanges,OnChanges, Output,Eve
import { IItem } from '../../models/item';
@Component({
selector: 'fm-gradient-select',
templateUrl: './gradient-select.component.html',
styleUrls: ['./gradient-select.component.scss']
selector: 'fm-gradient-select',
templateUrl: './gradient-select.component.html',
styleUrls: ['./gradient-select.component.scss'],
standalone: false
})
export class GradientSelectComponent implements OnChanges {

View File

@@ -6,9 +6,10 @@ import { GradientService } from '../../common-service.module';
@Component({
selector: 'fm-gradient',
templateUrl: './gradient.component.html',
styleUrls: ['./gradient.component.scss']
selector: 'fm-gradient',
templateUrl: './gradient.component.html',
styleUrls: ['./gradient.component.scss'],
standalone: false
})
export class GradientComponent implements OnInit,OnChanges {

View File

@@ -7,8 +7,9 @@ import { skip } from 'rxjs/operators';
import {OAuthService } from 'angular-oauth2-oidc';
import { IUser } from '../../models/user';
@Directive({
selector: '[fm-hasclaim]',
@Directive({
selector: '[fm-hasclaim]',
standalone: false
})
export class HasClaimDirective implements OnInit{
@Input('fm-hasclaim') claim:string;

View File

@@ -4,8 +4,9 @@ import {PackageService} from '../../services/package.service';
import * as appCommonReducer from '../../reducers/app-common.reducer';
import {Store} from '@ngrx/store';
@Directive({
selector: '[fmHasPackage]',
@Directive({
selector: '[fmHasPackage]',
standalone: false
})
export class HasPackageDirective implements OnDestroy, AfterViewInit {

View File

@@ -5,7 +5,8 @@ import { Observable, Subscription } from 'rxjs';
import { IUser } from '../../models/user';
@Directive({
selector: '[fmHasRole]',
selector: '[fmHasRole]',
standalone: false
})
export class HasRoleDirective implements OnInit, OnDestroy{
@Input('fmHasRole') role:string;

View File

@@ -7,9 +7,10 @@ import * as appReducers from '../../reducers/app-common.reducer';
import * as appActions from '../../actions/app-common.actions';
@Component({
selector: 'fm-help-menu',
templateUrl: './help-menu.component.html',
styleUrls: ['./help-menu.component.scss']
selector: 'fm-help-menu',
templateUrl: './help-menu.component.html',
styleUrls: ['./help-menu.component.scss'],
standalone: false
})
export class HelpMenuComponent implements OnInit {

View File

@@ -7,8 +7,9 @@ import { ClipboardService } from 'ngx-clipboard'
@Component({
selector: 'fm-item-link',
templateUrl: './item-link.component.html'
selector: 'fm-item-link',
templateUrl: './item-link.component.html',
standalone: false
})
export class ItemLinkComponent implements OnDestroy {

View File

@@ -3,10 +3,11 @@ import { Store, Action } from '@ngrx/store';
import * as appReducers from '../../reducers/app-common.reducer';
import * as commonActions from '../../actions/app-common.actions';
@Component({
selector: 'fm-menu-background',
templateUrl: './menu-background.component.html',
styleUrls: ['./menu-background.component.scss'],
@Component({
selector: 'fm-menu-background',
templateUrl: './menu-background.component.html',
styleUrls: ['./menu-background.component.scss'],
standalone: false
})
export class MenuBackgroundComponent implements OnInit {
@Input() visible = false;

View File

@@ -4,6 +4,8 @@ import { Component, OnInit } from '@angular/core';
selector: 'fm-not-found',
templateUrl: './not-found.component.html'
// styleUrls: ['./not-found.component.css']
,
standalone: false
})
export class NotFoundComponent implements OnInit {
constructor() { }

View File

@@ -2,7 +2,8 @@ import { Component, OnInit } from '@angular/core';
@Component({
selector: 'fm-not-implemented',
templateUrl: './not-implemented.component.html'
templateUrl: './not-implemented.component.html',
standalone: false
})
export class NotImplementedComponent implements OnInit {
constructor() { }

View File

@@ -6,9 +6,10 @@ import * as appReducers from '../../reducers/app-common.reducer';
import * as appActions from '../../actions/app-common.actions';
@Component({
selector: 'fm-notification-menu',
templateUrl: './notification-menu.component.html',
styleUrls: ['./notification-menu.component.scss']
selector: 'fm-notification-menu',
templateUrl: './notification-menu.component.html',
styleUrls: ['./notification-menu.component.scss'],
standalone: false
})
export class NotificationMenuComponent implements OnInit {

View File

@@ -4,8 +4,9 @@ import {PackageService} from '../../services/package.service';
import * as appCommonReducer from '../../reducers/app-common.reducer';
import {Store} from '@ngrx/store';
@Directive({
selector: '[fmPackageExists]',
@Directive({
selector: '[fmPackageExists]',
standalone: false
})
export class PackageExistsDirective implements OnDestroy, AfterViewInit {

View File

@@ -9,7 +9,8 @@ import * as commonActions from '../../actions/app-common.actions';
@Component({
selector: 'fm-resumable-file-upload',
templateUrl: './resumable-file-upload.component.html',
styleUrls: ['./resumable-file-upload.component.scss']
styleUrls: ['./resumable-file-upload.component.scss'],
standalone: false
})
export class ResumableFileUploadComponent implements OnInit, OnDestroy {

View File

@@ -7,9 +7,10 @@ import * as appCommonActions from '../../actions/app-common.actions';
@Component({
selector: 'fm-session-cleared',
templateUrl: 'session-cleared.component.html',
styleUrls: ['session-cleared.component.scss']
selector: 'fm-session-cleared',
templateUrl: 'session-cleared.component.html',
styleUrls: ['session-cleared.component.scss'],
standalone: false
})

View File

@@ -7,9 +7,10 @@ import * as appReducers from '../../reducers/app-common.reducer';
import * as appActions from '../../actions/app-common.actions';
@Component({
selector: 'fm-setting-menu',
templateUrl: './setting-menu.component.html',
styleUrls: ['./setting-menu.component.scss']
selector: 'fm-setting-menu',
templateUrl: './setting-menu.component.html',
styleUrls: ['./setting-menu.component.scss'],
standalone: false
})
export class SettingMenuComponent implements OnInit {

View File

@@ -1,9 +1,10 @@
import { Component, Input,Output,ViewChild,EventEmitter, ElementRef,OnChanges,SimpleChanges,HostListener,ChangeDetectorRef, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'fm-side-panel',
templateUrl: 'side-panel.component.html',
styleUrls: ['side-panel.component.scss']
@Component({
selector: 'fm-side-panel',
templateUrl: 'side-panel.component.html',
styleUrls: ['side-panel.component.scss'],
standalone: false
})

View File

@@ -6,16 +6,17 @@ import {TypeaheadService} from '../../services/typeahead.service';
import {NgbTypeahead} from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'fm-tag-input',
templateUrl: 'tag-input.component.html',
styleUrls: ['tag-input.component.scss'],
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => TagInputComponent),
multi: true
}
]
selector: 'fm-tag-input',
templateUrl: 'tag-input.component.html',
styleUrls: ['tag-input.component.scss'],
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => TagInputComponent),
multi: true
}
],
standalone: false
})
export class TagInputComponent implements ControlValueAccessor {

View File

@@ -7,11 +7,12 @@ import { commonReducers,ItemTypeService } from '../../../public-api'
import { EditImageModalComponent} from '../edit-image-modal/edit-image-modal.component';
import { AppConfig } from "../../shared/app.config";
@Component({
selector: 'fm-thumbnail',
templateUrl: 'thumbnail.component.html',
styleUrls: ['thumbnail.component.scss']
})
@Component({
selector: 'fm-thumbnail',
templateUrl: 'thumbnail.component.html',
styleUrls: ['thumbnail.component.scss'],
standalone: false
})
export class ThumbnailComponent {

View File

@@ -7,10 +7,11 @@ export interface TimeSpan {
endDate:Date;
}
@Component({
selector: 'fm-timespan',
templateUrl: './timespan.component.html',
styleUrls: ['./timespan.component.css']
@Component({
selector: 'fm-timespan',
templateUrl: './timespan.component.html',
styleUrls: ['./timespan.component.css'],
standalone: false
})
export class TimespanComponent implements OnInit, OnChanges {

View File

@@ -6,9 +6,10 @@ import * as appReducers from '../../reducers/app-common.reducer';
import * as appActions from '../../actions/app-common.actions';
@Component({
selector: 'fm-user-menu',
templateUrl: './user-menu.component.html',
styleUrls: ['./user-menu.component.scss']
selector: 'fm-user-menu',
templateUrl: './user-menu.component.html',
styleUrls: ['./user-menu.component.scss'],
standalone: false
})
export class UserMenuComponent implements OnInit {

View File

@@ -2,7 +2,8 @@ import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
@Pipe({
name: 'safe'
name: 'safe',
standalone: false
})
export class SafePipe implements PipeTransform {