mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
ACS-8772: Migrate node tooltip to Angular signals (#11498)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { OAuthService, OAuthStorage } from 'angular-oauth2-oidc';
|
||||
import { Observable, defer, EMPTY, combineLatest } from 'rxjs';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
@@ -33,17 +33,7 @@ import { HttpHeaders } from '@angular/common/http';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class OidcAuthenticationService extends BaseAuthenticationService {
|
||||
constructor(
|
||||
appConfig: AppConfigService,
|
||||
cookie: CookieService,
|
||||
private jwtHelperService: JwtHelperService,
|
||||
private authStorage: OAuthStorage,
|
||||
private oauthService: OAuthService,
|
||||
private readonly authConfig: AuthConfigService,
|
||||
private readonly auth: AuthService
|
||||
) {
|
||||
super(appConfig, cookie);
|
||||
}
|
||||
private readonly auth = inject(AuthService);
|
||||
|
||||
/**
|
||||
* Observable that determines whether an SSO login should be performed.
|
||||
@@ -56,6 +46,17 @@ export class OidcAuthenticationService extends BaseAuthenticationService {
|
||||
map(([authenticated, isDiscoveryDocumentLoaded]) => !authenticated && isDiscoveryDocumentLoaded)
|
||||
);
|
||||
|
||||
constructor(
|
||||
appConfig: AppConfigService,
|
||||
cookie: CookieService,
|
||||
private jwtHelperService: JwtHelperService,
|
||||
private authStorage: OAuthStorage,
|
||||
private oauthService: OAuthService,
|
||||
private readonly authConfig: AuthConfigService
|
||||
) {
|
||||
super(appConfig, cookie);
|
||||
}
|
||||
|
||||
isLoggedIn(): boolean {
|
||||
return this.oauthService.hasValidAccessToken() && this.oauthService.hasValidIdToken();
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ import { MatError } from '@angular/material/form-field';
|
||||
})
|
||||
export class CardViewBoolItemComponent extends BaseCardView<CardViewBoolItemModel> {
|
||||
@Input()
|
||||
editable: boolean;
|
||||
declare editable: boolean;
|
||||
|
||||
private _error: string;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ export interface CardViewArrayItem {
|
||||
|
||||
export class CardViewArrayItemModel extends CardViewBaseItemModel implements CardViewItem, DynamicComponentModel {
|
||||
type: string = 'array';
|
||||
value: Observable<CardViewArrayItem[]>;
|
||||
declare value: Observable<CardViewArrayItem[]>;
|
||||
noOfItemsToDisplay: number;
|
||||
|
||||
constructor(cardViewArrayItemProperties: CardViewArrayItemProperties) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import { CardViewBoolItemProperties } from '../interfaces/card-view.interfaces';
|
||||
export class CardViewBoolItemModel extends CardViewBaseItemModel implements CardViewItem, DynamicComponentModel {
|
||||
type = 'bool';
|
||||
value = false;
|
||||
default: boolean;
|
||||
declare default: boolean;
|
||||
|
||||
constructor(cardViewBoolItemProperties: CardViewBoolItemProperties) {
|
||||
super(cardViewBoolItemProperties);
|
||||
|
||||
@@ -21,7 +21,7 @@ import { CardViewBaseItemModel } from './card-view-baseitem.model';
|
||||
|
||||
export class CardViewMapItemModel extends CardViewBaseItemModel implements CardViewItem, DynamicComponentModel {
|
||||
type = 'map';
|
||||
value: Map<string, string>;
|
||||
declare value: Map<string, string>;
|
||||
|
||||
get displayValue() {
|
||||
if (this.value && this.value.size > 0) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import { DataRow } from '../../data/data-row.model';
|
||||
import { DataTableAdapter } from '../../data/datatable-adapter';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { DataTableService } from '../../services/datatable.service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { AsyncPipe } from '@angular/common';
|
||||
import { ClipboardDirective } from '../../../clipboard/clipboard.directive';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { TruncatePipe } from '../../../pipes/truncate.pipe';
|
||||
@@ -29,7 +29,7 @@ import { UserPreferencesService } from '../../../common/services/user-preference
|
||||
|
||||
@Component({
|
||||
selector: 'adf-datatable-cell',
|
||||
imports: [CommonModule, ClipboardDirective, TruncatePipe],
|
||||
imports: [ClipboardDirective, TruncatePipe, AsyncPipe],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
@let value = value$ | async;
|
||||
|
||||
@@ -23,7 +23,7 @@ import { ContainerColumnModel } from './container-column.model';
|
||||
import { FormFieldTypes } from './form-field-types';
|
||||
|
||||
export class ContainerModel extends FormWidgetModel {
|
||||
field: FormFieldModel;
|
||||
declare field: FormFieldModel;
|
||||
|
||||
readonly columns: ContainerColumnModel[] = [];
|
||||
isExpanded: boolean = true;
|
||||
|
||||
@@ -52,12 +52,12 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
private readonly defaultEmptyOptionName = 'Choose one...';
|
||||
|
||||
// model members
|
||||
fieldType: string;
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
declare fieldType: string;
|
||||
declare id: string;
|
||||
declare name: string;
|
||||
declare type: string;
|
||||
overrideId: boolean;
|
||||
tab: string;
|
||||
declare tab: string;
|
||||
rowspan: number = 1;
|
||||
colspan: number = 1;
|
||||
placeholder: string = null;
|
||||
@@ -98,7 +98,7 @@ export class FormFieldModel extends FormWidgetModel {
|
||||
variableConfig: VariableConfig;
|
||||
schemaDefinition: DataColumn[];
|
||||
externalProperty?: string;
|
||||
style?: string;
|
||||
declare style?: string;
|
||||
parent?: RepeatableSectionModel;
|
||||
|
||||
// container model members
|
||||
|
||||
Reference in New Issue
Block a user