mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Angular 19 migration (#10795)
This commit is contained in:
committed by
GitHub
parent
c7f28d54d6
commit
951b22e098
@@ -10,7 +10,13 @@
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"rules": {
|
||||
"jsdoc/tag-lines": ["error", "any", {"startLines": 1}],
|
||||
"jsdoc/tag-lines": [
|
||||
"error",
|
||||
"any",
|
||||
{
|
||||
"startLines": 1
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/naming-convention": "off",
|
||||
"@typescript-eslint/consistent-type-assertions": "warn",
|
||||
"@typescript-eslint/prefer-for-of": "off",
|
||||
@@ -45,7 +51,6 @@
|
||||
"style": "kebab-case"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/no-host-metadata-property": "off",
|
||||
"@angular-eslint/no-input-prefix": "error",
|
||||
"@typescript-eslint/consistent-type-definitions": "error",
|
||||
"@typescript-eslint/dot-notation": "off",
|
||||
@@ -76,7 +81,8 @@
|
||||
"rxjs/no-subject-unsubscribe": "error",
|
||||
"rxjs/no-subject-value": "error",
|
||||
"rxjs/no-unsafe-takeuntil": "error",
|
||||
"unicorn/filename-case": "error"
|
||||
"unicorn/filename-case": "error",
|
||||
"@angular-eslint/prefer-standalone": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@@ -20,42 +20,43 @@ import { Component } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'adf-demo-breadcrumb',
|
||||
template: `
|
||||
<adf-breadcrumb [compact]="compact">
|
||||
<adf-breadcrumb-item>
|
||||
<a href="/">Home</a>
|
||||
</adf-breadcrumb-item>
|
||||
<adf-breadcrumb [compact]="compact">
|
||||
<adf-breadcrumb-item>
|
||||
<a href="/">Home</a>
|
||||
</adf-breadcrumb-item>
|
||||
|
||||
<adf-breadcrumb-item>
|
||||
<a href="https://www.alfresco.com/">Alfresco</a>
|
||||
</adf-breadcrumb-item>
|
||||
<adf-breadcrumb-item>
|
||||
<a href="https://www.alfresco.com/">Alfresco</a>
|
||||
</adf-breadcrumb-item>
|
||||
|
||||
<adf-breadcrumb-item>
|
||||
<a href="https://www.alfresco.com">External Link 1</a>
|
||||
</adf-breadcrumb-item>
|
||||
<adf-breadcrumb-item>
|
||||
<a href="https://www.alfresco.com">External Link 1</a>
|
||||
</adf-breadcrumb-item>
|
||||
|
||||
<adf-breadcrumb-item>
|
||||
<a href="https://www.alfresco.com/">External Link 2</a>
|
||||
</adf-breadcrumb-item>
|
||||
<adf-breadcrumb-item>
|
||||
<a href="https://www.alfresco.com/">External Link 2</a>
|
||||
</adf-breadcrumb-item>
|
||||
|
||||
<adf-breadcrumb-item>
|
||||
<a href="https://www.alfresco.com/">External Link 3</a>
|
||||
</adf-breadcrumb-item>
|
||||
<adf-breadcrumb-item>
|
||||
<a href="https://www.alfresco.com/">External Link 3</a>
|
||||
</adf-breadcrumb-item>
|
||||
|
||||
<adf-breadcrumb-item *ngIf="showBreadcrumbItemWithMenu" aria-current="location" aria-haspopup="true" >
|
||||
<div>
|
||||
Current Page
|
||||
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Menu">
|
||||
<mat-icon>menu_open</mat-icon>
|
||||
</button>
|
||||
<adf-breadcrumb-item *ngIf="showBreadcrumbItemWithMenu" aria-current="location" aria-haspopup="true">
|
||||
<div>
|
||||
Current Page
|
||||
<button mat-icon-button [matMenuTriggerFor]="menu" aria-label="Menu">
|
||||
<mat-icon>menu_open</mat-icon>
|
||||
</button>
|
||||
|
||||
<mat-menu #menu="matMenu">
|
||||
<button mat-menu-item>Menu Item 1</button>
|
||||
<button mat-menu-item>Menu Item 2</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
</adf-breadcrumb-item>
|
||||
</adf-breadcrumb>
|
||||
`
|
||||
<mat-menu #menu="matMenu">
|
||||
<button mat-menu-item>Menu Item 1</button>
|
||||
<button mat-menu-item>Menu Item 2</button>
|
||||
</mat-menu>
|
||||
</div>
|
||||
</adf-breadcrumb-item>
|
||||
</adf-breadcrumb>
|
||||
`,
|
||||
standalone: false
|
||||
})
|
||||
export class DemoBreadcrumbComponent {
|
||||
compact = false;
|
||||
|
@@ -39,7 +39,6 @@ import { BreadcrumbFocusDirective } from '../../directives/breadcrumb-focus.dire
|
||||
import { BreadcrumbItemComponent } from '../breadcrumb-item/breadcrumb-item.component';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'adf-breadcrumb',
|
||||
templateUrl: './breadcrumb.component.html',
|
||||
styleUrls: ['./breadcrumb.component.scss'],
|
||||
|
@@ -20,7 +20,6 @@ import { FlagsComponent } from './flags/flags.component';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-feature-flags-wrapper',
|
||||
standalone: true,
|
||||
imports: [FlagsComponent],
|
||||
template: `
|
||||
<div class="adf-feature-flags-wrapper">
|
||||
|
@@ -22,7 +22,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-feature-flags-override-indicator',
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
styles: [
|
||||
`
|
||||
|
@@ -41,7 +41,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-feature-flags-overrides',
|
||||
standalone: true,
|
||||
imports: [
|
||||
FlagsOverrideComponent,
|
||||
CommonModule,
|
||||
|
@@ -27,7 +27,8 @@ import { UnitTestingUtils } from '../../../../src/lib/testing/unit-testing-utils
|
||||
<div>
|
||||
<div id="underFeatureFlag" *adfForFeatures="features"></div>
|
||||
</div>
|
||||
`
|
||||
`,
|
||||
standalone: false
|
||||
})
|
||||
class TestWithEnabledFlagComponent {
|
||||
features = 'feature1';
|
||||
@@ -37,7 +38,8 @@ class TestWithEnabledFlagComponent {
|
||||
<div>
|
||||
<div id="underFeatureFlag" *adfForFeatures="features"></div>
|
||||
</div>
|
||||
`
|
||||
`,
|
||||
standalone: false
|
||||
})
|
||||
class TestWithDisabledFlagComponent {
|
||||
features = ['feature1', 'feature2'];
|
||||
|
@@ -22,13 +22,12 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Directive({
|
||||
/* eslint-disable-next-line @angular-eslint/directive-selector */
|
||||
selector: '[adfForFeatures]',
|
||||
standalone: true
|
||||
selector: '[adfForFeatures]'
|
||||
})
|
||||
export class FeaturesDirective {
|
||||
private hasView = false;
|
||||
private inputUpdate$ = new BehaviorSubject([] as string[]);
|
||||
|
||||
|
||||
@Input()
|
||||
set adfForFeatures(feature: string[] | string) {
|
||||
this.inputUpdate$.next(Array.isArray(feature) ? feature : [feature]);
|
||||
|
@@ -27,7 +27,8 @@ import { UnitTestingUtils } from '../../../../src/lib/testing/unit-testing-utils
|
||||
<div>
|
||||
<div id="underFeatureFlag" *adfNotForFeatures="features"></div>
|
||||
</div>
|
||||
`
|
||||
`,
|
||||
standalone: false
|
||||
})
|
||||
class TestWithEnabledFlagComponent {
|
||||
features = ['feature1', 'feature3'];
|
||||
@@ -38,7 +39,8 @@ class TestWithEnabledFlagComponent {
|
||||
<div>
|
||||
<div id="underFeatureFlag" *adfNotForFeatures="features"></div>
|
||||
</div>
|
||||
`
|
||||
`,
|
||||
standalone: false
|
||||
})
|
||||
class TestWithDisabledFlagComponent {
|
||||
features = 'feature2';
|
||||
|
@@ -22,8 +22,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Directive({
|
||||
/* eslint-disable-next-line @angular-eslint/directive-selector */
|
||||
selector: '[adfNotForFeatures]',
|
||||
standalone: true
|
||||
selector: '[adfNotForFeatures]'
|
||||
})
|
||||
export class NotFeaturesDirective {
|
||||
private hasView = false;
|
||||
|
@@ -15,14 +15,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { APP_INITIALIZER } from '@angular/core';
|
||||
import { inject, provideAppInitializer } from '@angular/core';
|
||||
import {
|
||||
FlagsOverrideToken,
|
||||
FeaturesServiceToken,
|
||||
QaFeaturesHelperConfig,
|
||||
WritableFeaturesServiceConfig,
|
||||
WritableFeaturesServiceConfigToken,
|
||||
WritableFeaturesServiceToken
|
||||
WritableFeaturesServiceToken,
|
||||
IFeaturesService
|
||||
} from '../interfaces/features.interface';
|
||||
import { StorageFeaturesService } from '../services/storage-features.service';
|
||||
import { DebugFeaturesService } from '../services/debug-features.service';
|
||||
@@ -41,19 +42,18 @@ export function provideDebugFeatureFlags(config: WritableFeaturesServiceConfig &
|
||||
{ provide: WritableFeaturesServiceConfigToken, useValue: config },
|
||||
{ provide: WritableFeaturesServiceToken, useClass: StorageFeaturesService },
|
||||
{ provide: QaFeaturesHelper, useClass: QaFeaturesHelper },
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useFactory: (featuresService: StorageFeaturesService) => () => featuresService.init(),
|
||||
deps: [WritableFeaturesServiceToken],
|
||||
multi: true
|
||||
},
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useFactory: (qaFeaturesHelper: QaFeaturesHelper, document: Document & { [key: string]: QaFeaturesHelper }) => () => {
|
||||
provideAppInitializer(() => {
|
||||
const initializerFn = (
|
||||
(featuresService: IFeaturesService) => () =>
|
||||
featuresService.init()
|
||||
)(inject(WritableFeaturesServiceToken));
|
||||
return initializerFn();
|
||||
}),
|
||||
provideAppInitializer(() => {
|
||||
const initializerFn = ((qaFeaturesHelper: QaFeaturesHelper, document: Document) => () => {
|
||||
document[config.helperExposeKeyOnDocument ?? 'featureOverrides'] = qaFeaturesHelper;
|
||||
},
|
||||
deps: [QaFeaturesHelper, DOCUMENT],
|
||||
multi: true
|
||||
}
|
||||
})(inject(QaFeaturesHelper), inject(DOCUMENT));
|
||||
return initializerFn();
|
||||
})
|
||||
];
|
||||
}
|
||||
|
@@ -23,18 +23,12 @@ import { Observable } from 'rxjs';
|
||||
import { filter, map, withLatestFrom } from 'rxjs/operators';
|
||||
import { BreakpointObserver } from '@angular/cdk/layout';
|
||||
import { Directionality } from '@angular/cdk/bidi';
|
||||
import {
|
||||
SHELL_APP_SERVICE,
|
||||
SHELL_NAVBAR_MAX_WIDTH,
|
||||
SHELL_NAVBAR_MIN_WIDTH,
|
||||
ShellAppService
|
||||
} from '../../services/shell-app.service';
|
||||
import { SHELL_APP_SERVICE, SHELL_NAVBAR_MAX_WIDTH, SHELL_NAVBAR_MIN_WIDTH, ShellAppService } from '../../services/shell-app.service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
selector: 'app-shell',
|
||||
standalone: true,
|
||||
imports: [CommonModule, SidenavLayoutModule, RouterModule, DynamicExtensionComponent],
|
||||
templateUrl: './shell.component.html',
|
||||
styleUrls: ['./shell.component.scss'],
|
||||
|
@@ -26,7 +26,6 @@ import { TranslatePipe } from '@ngx-translate/core';
|
||||
templateUrl: './about-extension-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatTableModule, TranslatePipe]
|
||||
})
|
||||
export class AboutExtensionListComponent {
|
||||
|
@@ -27,7 +27,6 @@ import { MatTableModule } from '@angular/material/table';
|
||||
styleUrls: ['./about-license-list.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslatePipe, MatTableModule]
|
||||
})
|
||||
export class AboutLicenseListComponent {
|
||||
|
@@ -30,7 +30,6 @@ interface ModuleInfo {
|
||||
templateUrl: './module-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslatePipe, MatTableModule]
|
||||
})
|
||||
export class ModuleListComponent {
|
||||
|
@@ -26,7 +26,6 @@ import { MatTableModule } from '@angular/material/table';
|
||||
templateUrl: './package-list.component.html',
|
||||
styleUrls: ['./package-list.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslatePipe, MatTableModule]
|
||||
})
|
||||
export class PackageListComponent implements OnInit {
|
||||
|
@@ -18,8 +18,7 @@
|
||||
import { ContentChild, Directive, Input, TemplateRef } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: 'adf-about-panel',
|
||||
standalone: true
|
||||
selector: 'adf-about-panel'
|
||||
})
|
||||
export class AboutPanelDirective {
|
||||
@Input() label!: string;
|
||||
|
@@ -30,7 +30,6 @@ import { AboutStatusListComponent } from '../about-status-list/about-status-list
|
||||
templateUrl: './about-repository-info.component.html',
|
||||
styleUrls: ['./about-repository-info.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslatePipe, AboutLicenseListComponent, ModuleListComponent, AboutStatusListComponent]
|
||||
})
|
||||
export class AboutRepositoryInfoComponent implements OnInit {
|
||||
|
@@ -26,7 +26,6 @@ import { MatCardModule } from '@angular/material/card';
|
||||
templateUrl: './about-server-settings.component.html',
|
||||
styleUrls: ['./about-server-settings.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslatePipe, MatCardModule]
|
||||
})
|
||||
export class AboutServerSettingsComponent implements OnInit {
|
||||
|
@@ -26,7 +26,6 @@ import { MatTableModule } from '@angular/material/table';
|
||||
templateUrl: './about-status-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslatePipe, MatTableModule]
|
||||
})
|
||||
export class AboutStatusListComponent {
|
||||
|
@@ -25,7 +25,6 @@ import { MatExpansionModule } from '@angular/material/expansion';
|
||||
templateUrl: './about.component.html',
|
||||
styleUrls: ['about.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatExpansionModule]
|
||||
})
|
||||
export class AboutComponent {
|
||||
|
@@ -19,8 +19,7 @@ import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { AppConfigService } from './app-config.service';
|
||||
|
||||
@Pipe({
|
||||
name: 'adfAppConfig',
|
||||
standalone: true
|
||||
name: 'adfAppConfig'
|
||||
})
|
||||
export class AppConfigPipe implements PipeTransform {
|
||||
constructor(private config: AppConfigService) {}
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { APP_INITIALIZER, inject, ModuleWithProviders, NgModule, InjectionToken } from '@angular/core';
|
||||
import { inject, ModuleWithProviders, NgModule, InjectionToken, provideAppInitializer } from '@angular/core';
|
||||
import { AUTH_CONFIG, OAuthModule, OAuthStorage } from 'angular-oauth2-oidc';
|
||||
import { AuthenticationService } from '../services/authentication.service';
|
||||
import { AuthModuleConfig, AUTH_MODULE_CONFIG } from './auth-config';
|
||||
@@ -63,12 +63,10 @@ export function oauthStorageFactory(): OAuthStorage {
|
||||
},
|
||||
RedirectAuthService,
|
||||
{ provide: AuthService, useExisting: RedirectAuthService },
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useFactory: loginFactory,
|
||||
deps: [RedirectAuthService],
|
||||
multi: true
|
||||
},
|
||||
provideAppInitializer(() => {
|
||||
const initializerFn = loginFactory(inject(RedirectAuthService));
|
||||
return initializerFn();
|
||||
}),
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: TokenInterceptor,
|
||||
|
@@ -19,7 +19,8 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
template: '<div data-automation-id="auth-confirmation"></div>',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: false
|
||||
})
|
||||
export class AuthenticationConfirmationComponent {
|
||||
constructor() {}
|
||||
|
@@ -20,7 +20,6 @@ import { CommonModule } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-avatar',
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
templateUrl: './avatar.component.html',
|
||||
styleUrls: ['./avatar.component.scss'],
|
||||
|
@@ -19,7 +19,6 @@ import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-blank-page',
|
||||
standalone: true,
|
||||
template: ``
|
||||
})
|
||||
export class BlankPageComponent {}
|
||||
|
@@ -26,7 +26,6 @@ export type ButtonColor = ThemePalette;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-button',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatButtonModule, MatIconModule],
|
||||
templateUrl: './button.component.html',
|
||||
styleUrls: ['./button.component.scss'],
|
||||
|
@@ -28,7 +28,6 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-card-view-arrayitem',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatChipsModule, TranslatePipe, MatIconModule, MatMenuModule, MatCardModule, MatButtonModule],
|
||||
templateUrl: './card-view-arrayitem.component.html',
|
||||
styleUrls: ['./card-view-arrayitem.component.scss'],
|
||||
|
@@ -24,7 +24,6 @@ import { TranslatePipe } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-card-view-boolitem',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatCheckboxModule, TranslatePipe],
|
||||
templateUrl: './card-view-boolitem.component.html',
|
||||
styles: [
|
||||
|
@@ -52,7 +52,6 @@ import { MatInputModule } from '@angular/material/input';
|
||||
{ provide: DatetimeAdapter, useClass: AdfDateTimeFnsAdapter }
|
||||
],
|
||||
selector: 'adf-card-view-dateitem',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslatePipe,
|
||||
|
@@ -26,7 +26,6 @@ import { UnitTestingUtils } from '../../../testing/unit-testing-utils';
|
||||
|
||||
@Component({
|
||||
selector: 'whatever-you-want-to-have',
|
||||
standalone: true,
|
||||
template: '<div data-automation-id="found-me">Hey I am shiny!</div>'
|
||||
})
|
||||
export class CardViewShinyCustomElementItemComponent {
|
||||
|
@@ -22,7 +22,6 @@ import { DEFAULT_SEPARATOR } from '../card-view-textitem/card-view-textitem.comp
|
||||
|
||||
@Component({
|
||||
selector: 'adf-card-view-item-dispatcher',
|
||||
standalone: true,
|
||||
template: '<ng-template #content />'
|
||||
})
|
||||
export class CardViewItemDispatcherComponent implements OnChanges {
|
||||
|
@@ -29,7 +29,6 @@ import { MatIconModule } from '@angular/material/icon';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-card-view-key-value-pairs-item',
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslatePipe, MatTableModule, MatInputModule, FormsModule, MatButtonModule, MatIconModule],
|
||||
templateUrl: './card-view-keyvaluepairsitem.component.html',
|
||||
styleUrls: ['./card-view-keyvaluepairsitem.component.scss'],
|
||||
|
@@ -23,7 +23,6 @@ import { TranslatePipe } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-card-view-mapitem',
|
||||
standalone: true,
|
||||
imports: [CommonModule, TranslatePipe],
|
||||
templateUrl: './card-view-mapitem.component.html',
|
||||
styleUrls: ['./card-view-mapitem.component.scss']
|
||||
|
@@ -34,7 +34,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-card-view-selectitem',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslatePipe,
|
||||
|
@@ -20,18 +20,35 @@ import { SelectFilterInputComponent } from './select-filter-input.component';
|
||||
import { MatSelect, MatSelectModule } from '@angular/material/select';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NoopTranslateModule } from '../../../../testing/noop-translate.module';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
describe('SelectFilterInputComponent', () => {
|
||||
let fixture: ComponentFixture<SelectFilterInputComponent>;
|
||||
let component: SelectFilterInputComponent;
|
||||
let matSelect: MatSelect;
|
||||
let mockMatSelect: jasmine.SpyObj<MatSelect>;
|
||||
let openedChangeSubject: Subject<boolean>;
|
||||
let valueChangesSubject: Subject<any>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [NoopAnimationsModule, NoopTranslateModule, MatSelectModule],
|
||||
providers: [MatSelect]
|
||||
openedChangeSubject = new Subject<boolean>();
|
||||
valueChangesSubject = new Subject<any>();
|
||||
mockMatSelect = jasmine.createSpyObj('MatSelect', ['_onChange'], {
|
||||
openedChange: openedChangeSubject,
|
||||
multiple: false,
|
||||
options: { map: () => [] },
|
||||
compareWith: (a: any, b: any) => a === b,
|
||||
ngControl: {
|
||||
value: null,
|
||||
valueChanges: valueChangesSubject
|
||||
}
|
||||
});
|
||||
|
||||
TestBed.configureTestingModule({
|
||||
imports: [NoopAnimationsModule, NoopTranslateModule, MatSelectModule, SelectFilterInputComponent],
|
||||
providers: [{ provide: MatSelect, useValue: mockMatSelect }]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(SelectFilterInputComponent);
|
||||
component = fixture.componentInstance;
|
||||
matSelect = TestBed.inject(MatSelect);
|
||||
|
@@ -28,7 +28,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-select-filter-input',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatFormFieldModule, MatInputModule, FormsModule, MatButtonModule, MatIconModule, TranslatePipe],
|
||||
templateUrl: './select-filter-input.component.html',
|
||||
styleUrls: ['./select-filter-input.component.scss'],
|
||||
|
@@ -44,7 +44,6 @@ const templateTypes = {
|
||||
|
||||
@Component({
|
||||
selector: 'adf-card-view-textitem',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
MatFormFieldModule,
|
||||
|
@@ -23,7 +23,6 @@ import { CardViewItemDispatcherComponent } from '../card-view-item-dispatcher/ca
|
||||
|
||||
@Component({
|
||||
selector: 'adf-card-view',
|
||||
standalone: true,
|
||||
imports: [CommonModule, CardViewItemDispatcherComponent],
|
||||
templateUrl: './card-view.component.html',
|
||||
styleUrls: ['./card-view.component.scss'],
|
||||
|
@@ -31,7 +31,8 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
<button mat-button clipboard-notification="copy success" [adf-clipboard] [target]="ref">copy</button>
|
||||
|
||||
<input #ref />
|
||||
`
|
||||
`,
|
||||
standalone: false
|
||||
})
|
||||
class TestTargetClipboardComponent {}
|
||||
|
||||
@@ -73,7 +74,8 @@ describe('ClipboardDirective', () => {
|
||||
describe('CopyClipboardDirective', () => {
|
||||
@Component({
|
||||
selector: 'adf-copy-conent-test-component',
|
||||
template: `<span adf-clipboard="placeholder">{{ mockText }}</span>`
|
||||
template: `<span adf-clipboard="placeholder">{{ mockText }}</span>`,
|
||||
standalone: false
|
||||
})
|
||||
class TestCopyClipboardComponent {
|
||||
mockText = 'text to copy';
|
||||
|
@@ -21,7 +21,6 @@ import { TranslatePipe } from '@ngx-translate/core';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-clipboard]',
|
||||
standalone: true,
|
||||
exportAs: 'adfClipboard'
|
||||
})
|
||||
export class ClipboardDirective {
|
||||
@@ -75,7 +74,6 @@ export class ClipboardDirective {
|
||||
|
||||
@Component({
|
||||
selector: 'adf-copy-content-tooltip',
|
||||
standalone: true,
|
||||
imports: [TranslatePipe],
|
||||
template: `<span class="adf-copy-tooltip">{{ placeholder | translate }} </span>`,
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@@ -27,7 +27,6 @@ import { TranslatePipe } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-comment-list',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatListModule, MatLineModule, TimeAgoPipe, TranslatePipe],
|
||||
templateUrl: './comment-list.component.html',
|
||||
styleUrls: ['./comment-list.component.scss'],
|
||||
|
@@ -29,7 +29,6 @@ import { CommentListComponent } from './comment-list';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-comments',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslatePipe,
|
||||
|
@@ -25,7 +25,8 @@ import { LogService } from './log.service';
|
||||
|
||||
@Component({
|
||||
template: '',
|
||||
providers: [LogService]
|
||||
providers: [LogService],
|
||||
standalone: false
|
||||
})
|
||||
class ProvidesLogComponent {
|
||||
constructor(public logService: LogService) {}
|
||||
|
@@ -29,7 +29,6 @@ import { DOWN_ARROW, UP_ARROW } from '@angular/cdk/keycodes';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-context-menu',
|
||||
standalone: true,
|
||||
templateUrl: './context-menu-list.component.html',
|
||||
styleUrls: ['./context-menu-list.component.scss'],
|
||||
host: {
|
||||
|
@@ -26,6 +26,7 @@ describe('ContextMenuOverlayService', () => {
|
||||
let injector: Injector;
|
||||
const overlayConfig = {
|
||||
panelClass: 'test-panel',
|
||||
hasBackdrop: false,
|
||||
source: {
|
||||
clientY: 1,
|
||||
clientX: 1
|
||||
|
@@ -49,7 +49,7 @@ export class ContextMenuOverlayService {
|
||||
// prevent native contextmenu on overlay element if config.hasBackdrop is true
|
||||
if (overlayConfig.hasBackdrop) {
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
(overlay as any)._backdropElement.addEventListener(
|
||||
(overlay as any).backdropElement.addEventListener(
|
||||
'contextmenu',
|
||||
(event) => {
|
||||
event.preventDefault();
|
||||
|
@@ -25,7 +25,8 @@ import { UnitTestingUtils } from '../testing/unit-testing-utils';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-test-component',
|
||||
template: ` <div id="target" [adf-context-menu]="actions" [adf-context-menu-enabled]="isEnabled"></div> `
|
||||
template: ` <div id="target" [adf-context-menu]="actions" [adf-context-menu-enabled]="isEnabled"></div> `,
|
||||
standalone: false
|
||||
})
|
||||
class TestComponent {
|
||||
actions: any[] | (() => any[]);
|
||||
|
@@ -21,8 +21,7 @@ import { Directive, HostListener, Input } from '@angular/core';
|
||||
import { ContextMenuOverlayService } from './context-menu-overlay.service';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-context-menu]',
|
||||
standalone: true
|
||||
selector: '[adf-context-menu]'
|
||||
})
|
||||
export class ContextMenuDirective {
|
||||
/** Items for the menu. */
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { APP_INITIALIZER, NgModule, ModuleWithProviders } from '@angular/core';
|
||||
import { NgModule, ModuleWithProviders, inject, provideAppInitializer } from '@angular/core';
|
||||
import { TranslateModule, TranslateLoader, TranslateStore, TranslateService } from '@ngx-translate/core';
|
||||
import { ABOUT_DIRECTIVES } from './about/about.module';
|
||||
import { CARD_VIEW_DIRECTIVES } from './card-view/card-view.module';
|
||||
@@ -137,12 +137,15 @@ export class CoreModule {
|
||||
{ provide: TranslateLoader, useClass: TranslateLoaderService },
|
||||
MomentDateAdapter,
|
||||
StoragePrefixFactory,
|
||||
{
|
||||
provide: APP_INITIALIZER,
|
||||
useFactory: loadAppConfig,
|
||||
deps: [AppConfigService, StorageService, AdfHttpClient, StoragePrefixFactory],
|
||||
multi: true
|
||||
},
|
||||
provideAppInitializer(() => {
|
||||
const initializerFn = loadAppConfig(
|
||||
inject(AppConfigService),
|
||||
inject(StorageService),
|
||||
inject(AdfHttpClient),
|
||||
inject(StoragePrefixFactory)
|
||||
);
|
||||
return initializerFn();
|
||||
}),
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: AuthenticationInterceptor, multi: true },
|
||||
{ provide: Authentication, useClass: AuthenticationService },
|
||||
{
|
||||
|
@@ -21,7 +21,6 @@ import { CurrencyConfig } from '../../data/data-column.model';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
selector: 'adf-amount-cell',
|
||||
templateUrl: './amount-cell.component.html',
|
||||
|
@@ -21,7 +21,6 @@ import { CommonModule } from '@angular/common';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
selector: 'adf-boolean-cell',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
@@ -20,8 +20,7 @@ import { DataColumn } from '../../data/data-column.model';
|
||||
import { TranslationService } from '../../../translation';
|
||||
|
||||
@Pipe({
|
||||
name: 'columnsSearchFilter',
|
||||
standalone: true
|
||||
name: 'columnsSearchFilter'
|
||||
})
|
||||
export class ColumnsSearchFilterPipe implements PipeTransform {
|
||||
private translationService = inject(TranslationService);
|
||||
|
@@ -31,7 +31,6 @@ import { ColumnsSearchFilterPipe } from './columns-search-filter.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-datatable-column-selector',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
TranslatePipe,
|
||||
|
@@ -28,7 +28,6 @@ import { TruncatePipe } from '../../../pipes/truncate.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-datatable-cell',
|
||||
standalone: true,
|
||||
imports: [CommonModule, ClipboardDirective, TruncatePipe],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
|
@@ -21,7 +21,6 @@ import { DataRow } from '../../data/data-row.model';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-datatable-row',
|
||||
standalone: true,
|
||||
template: `<ng-content />`,
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
host: {
|
||||
|
@@ -38,7 +38,6 @@ import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-custom-column-template-component',
|
||||
standalone: true,
|
||||
template: ` <ng-template #tmplRef /> `
|
||||
})
|
||||
class CustomColumnTemplateComponent {
|
||||
@@ -47,7 +46,6 @@ class CustomColumnTemplateComponent {
|
||||
|
||||
@Component({
|
||||
selector: 'adf-custom-column-header-component',
|
||||
standalone: true,
|
||||
template: ` <ng-template #tmplRef> CUSTOM HEADER </ng-template> `
|
||||
})
|
||||
class CustomColumnHeaderComponent {
|
||||
|
@@ -93,7 +93,6 @@ export enum ShowHeaderMode {
|
||||
|
||||
@Component({
|
||||
selector: 'adf-datatable',
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
DataTableRowComponent,
|
||||
|
@@ -23,7 +23,6 @@ import { CommonModule } from '@angular/common';
|
||||
import { LocalizedDatePipe, TimeAgoPipe } from '../../../pipes';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, LocalizedDatePipe, TimeAgoPipe],
|
||||
selector: 'adf-date-cell',
|
||||
templateUrl: './date-cell.component.html',
|
||||
|
@@ -19,7 +19,6 @@ import { Component, Directive, ViewEncapsulation } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-empty-list',
|
||||
standalone: true,
|
||||
styleUrls: ['./empty-list.component.scss'],
|
||||
templateUrl: './empty-list.component.html',
|
||||
encapsulation: ViewEncapsulation.None
|
||||
@@ -27,19 +26,16 @@ import { Component, Directive, ViewEncapsulation } from '@angular/core';
|
||||
export class EmptyListComponent {}
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-empty-list-header]',
|
||||
standalone: true
|
||||
selector: '[adf-empty-list-header]'
|
||||
})
|
||||
export class EmptyListHeaderDirective {}
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-empty-list-body]',
|
||||
standalone: true
|
||||
selector: '[adf-empty-list-body]'
|
||||
})
|
||||
export class EmptyListBodyDirective {}
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-empty-list-footer]',
|
||||
standalone: true
|
||||
selector: '[adf-empty-list-footer]'
|
||||
})
|
||||
export class EmptyListFooterDirective {}
|
||||
|
@@ -22,7 +22,6 @@ import { FileSizePipe } from '../../../pipes';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-filesize-cell',
|
||||
standalone: true,
|
||||
imports: [CommonModule, FileSizePipe],
|
||||
template: `
|
||||
<ng-container *ngIf="value$ | async | adfFileSize as fileSize">
|
||||
|
@@ -22,7 +22,6 @@ import { DataTableCellComponent } from '../datatable-cell/datatable-cell.compone
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatIconModule],
|
||||
selector: 'adf-icon-cell',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
@@ -24,7 +24,6 @@ import { MatButtonModule } from '@angular/material/button';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-json-cell',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatButtonModule, MatDialogModule],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
template: `
|
||||
|
@@ -22,7 +22,6 @@ import { RouterModule } from '@angular/router';
|
||||
import { PathInfo } from '../../../models/path.model';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [AsyncPipe, RouterModule],
|
||||
selector: 'adf-location-cell',
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
|
@@ -21,7 +21,6 @@ import { DecimalConfig } from '../../data/data-column.model';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
selector: 'adf-number-cell',
|
||||
templateUrl: './number-cell.component.html',
|
||||
|
@@ -22,7 +22,6 @@ import { DataColumnComponent } from './data-column.component';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-data-column-header',
|
||||
standalone: true,
|
||||
template: ''
|
||||
})
|
||||
export class DateColumnHeaderComponent implements AfterContentInit {
|
||||
|
@@ -22,7 +22,6 @@ import { DataColumnComponent } from './data-column.component';
|
||||
|
||||
@Component({
|
||||
selector: 'data-columns',
|
||||
standalone: true,
|
||||
template: ''
|
||||
})
|
||||
export class DataColumnListComponent {
|
||||
|
@@ -23,7 +23,6 @@ import { CurrencyConfig, DateConfig, DecimalConfig } from '../data/data-column.m
|
||||
|
||||
@Component({
|
||||
selector: 'data-column',
|
||||
standalone: true,
|
||||
template: ''
|
||||
})
|
||||
export class DataColumnComponent implements OnInit {
|
||||
|
@@ -23,7 +23,6 @@ import { Directive } from '@angular/core';
|
||||
* adf-custom-empty-content-template.
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'adf-custom-empty-content-template, empty-folder-content',
|
||||
standalone: true
|
||||
selector: 'adf-custom-empty-content-template, empty-folder-content'
|
||||
})
|
||||
export class CustomEmptyContentTemplateDirective {}
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import { Directive } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: 'adf-custom-loading-content-template',
|
||||
standalone: true
|
||||
selector: 'adf-custom-loading-content-template'
|
||||
})
|
||||
export class CustomLoadingContentTemplateDirective {}
|
||||
|
@@ -23,7 +23,6 @@ import { Directive } from '@angular/core';
|
||||
* adf-custom-no-permission-template.
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'adf-custom-no-permission-template, no-permission-content',
|
||||
standalone: true
|
||||
selector: 'adf-custom-no-permission-template, no-permission-content'
|
||||
})
|
||||
export class CustomNoPermissionTemplateDirective {}
|
||||
|
@@ -20,8 +20,7 @@ import { DataRow } from '../data/data-row.model';
|
||||
import { DataColumn } from '../data/data-column.model';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-drop-zone]',
|
||||
standalone: true
|
||||
selector: '[adf-drop-zone]'
|
||||
})
|
||||
export class DropZoneDirective implements OnInit, OnDestroy {
|
||||
private element: HTMLElement;
|
||||
|
@@ -19,8 +19,7 @@ import { AfterContentInit, ContentChild, Directive, TemplateRef } from '@angular
|
||||
import { DataTableComponent } from '../components/datatable/datatable.component';
|
||||
|
||||
@Directive({
|
||||
selector: 'adf-header-filter-template',
|
||||
standalone: true
|
||||
selector: 'adf-header-filter-template'
|
||||
})
|
||||
export class HeaderFilterTemplateDirective implements AfterContentInit {
|
||||
@ContentChild(TemplateRef)
|
||||
|
@@ -22,8 +22,7 @@ import { DataTableComponent } from '../components/datatable/datatable.component'
|
||||
* Directive selectors without adf- prefix will be deprecated on 3.0.0
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'adf-loading-content-template, loading-content-template',
|
||||
standalone: true
|
||||
selector: 'adf-loading-content-template, loading-content-template'
|
||||
})
|
||||
export class LoadingContentTemplateDirective implements AfterContentInit {
|
||||
@ContentChild(TemplateRef)
|
||||
|
@@ -19,8 +19,7 @@ import { AfterContentInit, ContentChild, Directive, TemplateRef } from '@angular
|
||||
import { DataTableComponent } from '../components/datatable/datatable.component';
|
||||
|
||||
@Directive({
|
||||
selector: 'adf-main-menu-datatable-template',
|
||||
standalone: true
|
||||
selector: 'adf-main-menu-datatable-template'
|
||||
})
|
||||
export class MainMenuDataTableTemplateDirective implements AfterContentInit {
|
||||
@ContentChild(TemplateRef)
|
||||
|
@@ -22,8 +22,7 @@ import { DataTableComponent } from '../components/datatable/datatable.component'
|
||||
* Directive selectors without adf- prefix will be deprecated on 3.0.0
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'adf-no-content-template, no-content-template',
|
||||
standalone: true
|
||||
selector: 'adf-no-content-template, no-content-template'
|
||||
})
|
||||
export class NoContentTemplateDirective implements AfterContentInit {
|
||||
@ContentChild(TemplateRef)
|
||||
|
@@ -22,8 +22,7 @@ import { DataTableComponent } from '../components/datatable/datatable.component'
|
||||
* Directive selectors without adf- prefix will be deprecated on 3.0.0
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'adf-no-permission-template, no-permission-template',
|
||||
standalone: true
|
||||
selector: 'adf-no-permission-template, no-permission-template'
|
||||
})
|
||||
export class NoPermissionTemplateDirective implements AfterContentInit {
|
||||
@ContentChild(TemplateRef)
|
||||
|
@@ -23,7 +23,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-resizable]',
|
||||
standalone: true,
|
||||
exportAs: 'adf-resizable'
|
||||
})
|
||||
export class ResizableDirective implements OnInit, OnDestroy {
|
||||
|
@@ -19,8 +19,7 @@ import { ResizableDirective } from './resizable.directive';
|
||||
import { Directive, ElementRef, Input, NgZone, OnDestroy, OnInit, Renderer2 } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-resize-handle]',
|
||||
standalone: true
|
||||
selector: '[adf-resize-handle]'
|
||||
})
|
||||
export class ResizeHandleDirective implements OnInit, OnDestroy {
|
||||
/**
|
||||
|
@@ -33,7 +33,8 @@ export interface ConfirmDialogComponentProps {
|
||||
templateUrl: './confirm.dialog.html',
|
||||
styleUrls: ['./confirm.dialog.scss'],
|
||||
host: { class: 'adf-confirm-dialog' },
|
||||
encapsulation: ViewEncapsulation.None
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
standalone: false
|
||||
})
|
||||
export class ConfirmDialogComponent {
|
||||
title: string;
|
||||
|
@@ -25,7 +25,8 @@ import { Component, inject } from '@angular/core';
|
||||
import { Subject } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-dummy-component'
|
||||
selector: 'adf-dummy-component',
|
||||
standalone: false
|
||||
})
|
||||
class DummyComponent {
|
||||
data = inject(DIALOG_COMPONENT_DATA);
|
||||
|
@@ -29,7 +29,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
export const DIALOG_COMPONENT_DATA = new InjectionToken<any>('dialog component data');
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'adf-dialog',
|
||||
templateUrl: './dialog.component.html',
|
||||
styleUrls: ['./dialog.component.scss'],
|
||||
|
@@ -21,9 +21,8 @@ import { EditJsonDialogComponent, EditJsonDialogSettings } from './edit-json.dia
|
||||
|
||||
@Component({
|
||||
selector: 'adf-edit-json-dialog-storybook',
|
||||
template: `<button mat-raised-button (click)="openDialog()">
|
||||
Open dialog
|
||||
</button>`
|
||||
template: `<button mat-raised-button (click)="openDialog()">Open dialog</button>`,
|
||||
standalone: false
|
||||
})
|
||||
export class EditJsonDialogStorybookComponent implements OnInit, OnChanges {
|
||||
@Input()
|
||||
|
@@ -36,7 +36,6 @@ import { AppConfigValues } from '../../app-config';
|
||||
* If data.descriptionText is provided, it will be displayed as dialog content.
|
||||
*/
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'adf-unsaved-changes-dialog',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
templateUrl: './unsaved-changes-dialog.component.html',
|
||||
|
@@ -24,7 +24,6 @@ import { UnitTestingUtils } from '../testing/unit-testing-utils';
|
||||
/* spellchecker: disable */
|
||||
@Component({
|
||||
selector: 'adf-test-component',
|
||||
standalone: true,
|
||||
imports: [HighlightDirective],
|
||||
template: ` <div id="outerDiv1" adf-highlight adf-highlight-selector=".highlightable" adf-highlight-class="highlight-for-free-willy">
|
||||
<div id="innerDiv11" class="highlightable">Lorem ipsum salana-eyong-aysis dolor sit amet</div>
|
||||
|
@@ -21,8 +21,7 @@ import { Directive, ElementRef, Input, Renderer2, AfterViewChecked } from '@angu
|
||||
import { HighlightTransformService, HighlightTransformResult } from '../common/services/highlight-transform.service';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-highlight]',
|
||||
standalone: true
|
||||
selector: '[adf-highlight]'
|
||||
})
|
||||
export class HighlightDirective implements AfterViewChecked {
|
||||
/** Class selector for highlightable elements. */
|
||||
|
@@ -29,7 +29,8 @@ import { UnitTestingUtils } from '../testing/unit-testing-utils';
|
||||
<mat-option *ngFor="let option of options; let idx = index">
|
||||
{{ option.text }}
|
||||
</mat-option>
|
||||
</mat-select>`
|
||||
</mat-select>`,
|
||||
standalone: false
|
||||
})
|
||||
class TestComponent {
|
||||
options = new Array(50).fill({ text: 'dummy' });
|
||||
|
@@ -22,8 +22,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
const SELECT_ITEM_HEIGHT_EM = 3;
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-infinite-select-scroll]',
|
||||
standalone: true
|
||||
selector: '[adf-infinite-select-scroll]'
|
||||
})
|
||||
export class InfiniteSelectScrollDirective implements AfterViewInit {
|
||||
static readonly MAX_ITEMS = 50;
|
||||
|
@@ -29,9 +29,8 @@ describe('LogoutDirective', () => {
|
||||
describe('No input', () => {
|
||||
@Component({
|
||||
selector: 'adf-test-component',
|
||||
standalone: true,
|
||||
imports: [LogoutDirective],
|
||||
template: '<button adf-logout></button>'
|
||||
template: '<button adf-logout>Logout</button>'
|
||||
})
|
||||
class TestComponent {
|
||||
@ContentChildren(LogoutDirective)
|
||||
@@ -104,9 +103,8 @@ describe('LogoutDirective', () => {
|
||||
describe('redirectUri', () => {
|
||||
@Component({
|
||||
selector: 'adf-test-component',
|
||||
standalone: true,
|
||||
imports: [LogoutDirective],
|
||||
template: '<button adf-logout redirectUri="/myCustomUri"></button>'
|
||||
template: '<button adf-logout redirectUri="/myCustomUri">Logout</button>'
|
||||
})
|
||||
class TestComponent {
|
||||
@ContentChildren(LogoutDirective)
|
||||
@@ -143,9 +141,8 @@ describe('LogoutDirective', () => {
|
||||
describe('enableRedirect', () => {
|
||||
@Component({
|
||||
selector: 'adf-test-component',
|
||||
standalone: true,
|
||||
imports: [LogoutDirective],
|
||||
template: '<button adf-logout [enableRedirect]="false"></button>'
|
||||
template: '<button adf-logout [enableRedirect]="false">Logout</button>'
|
||||
})
|
||||
class TestComponent {
|
||||
@ContentChildren(LogoutDirective)
|
||||
|
@@ -21,8 +21,7 @@ import { AppConfigService } from '../app-config/app-config.service';
|
||||
import { AuthenticationService } from '../auth/services/authentication.service';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-logout]',
|
||||
standalone: true
|
||||
selector: '[adf-logout]'
|
||||
})
|
||||
export class LogoutDirective implements OnInit {
|
||||
/** URI to redirect to after logging out. */
|
||||
|
@@ -22,7 +22,6 @@ import { CommonModule } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-tooltip-card-component',
|
||||
standalone: true,
|
||||
imports: [CommonModule],
|
||||
templateUrl: './tooltip-card.component.html',
|
||||
styleUrls: ['./tooltip-card.component.scss'],
|
||||
|
@@ -34,7 +34,8 @@ const IMAGE_URL = 'alfresco-logo.svg';
|
||||
[width]="'400'"
|
||||
[htmlContent]="'this is the <b>html</b> raw code'"
|
||||
class="test-component"
|
||||
></span>`
|
||||
></span>`,
|
||||
standalone: false
|
||||
})
|
||||
class TestComponent {
|
||||
@ViewChild(TooltipCardDirective, { static: true })
|
||||
|
@@ -21,8 +21,7 @@ import { ComponentPortal } from '@angular/cdk/portal';
|
||||
import { TooltipCardComponent } from './tooltip-card.component';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-tooltip-card]',
|
||||
standalone: true
|
||||
selector: '[adf-tooltip-card]'
|
||||
})
|
||||
export class TooltipCardDirective implements OnInit, OnDestroy {
|
||||
@Input('adf-tooltip-card') text = '';
|
||||
|
@@ -21,8 +21,7 @@ import { Directive, ElementRef, HostListener, Input, NgZone, OnDestroy, OnInit,
|
||||
import { FileInfo, FileUtils } from '../common/utils/file-utils';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-upload]',
|
||||
standalone: true
|
||||
selector: '[adf-upload]'
|
||||
})
|
||||
export class UploadDirective implements OnInit, OnDestroy {
|
||||
/** Enables/disables uploading. */
|
||||
|
@@ -45,7 +45,6 @@ import { Chip } from './chip';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'adf-dynamic-chip-list',
|
||||
standalone: true,
|
||||
templateUrl: './dynamic-chip-list.component.html',
|
||||
styleUrls: ['./dynamic-chip-list.component.scss'],
|
||||
imports: [MatChipsModule, TranslatePipe, NgForOf, MatIconModule, NgIf, MatButtonModule],
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import { Directive } from '@angular/core';
|
||||
|
||||
@Directive({
|
||||
selector: '[adf-form-custom-button]',
|
||||
standalone: true
|
||||
selector: '[adf-form-custom-button]'
|
||||
})
|
||||
export class StartFormCustomButtonDirective {}
|
||||
|
@@ -41,7 +41,6 @@ declare const adf: any;
|
||||
|
||||
@Component({
|
||||
selector: 'adf-form-field',
|
||||
standalone: true,
|
||||
templateUrl: './form-field.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
imports: [FieldStylePipe]
|
||||
|
@@ -32,7 +32,6 @@ import { FormSectionComponent } from './form-section/form-section.component';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-form-renderer',
|
||||
standalone: true,
|
||||
templateUrl: './form-renderer.component.html',
|
||||
styleUrls: ['./form-renderer.component.scss'],
|
||||
providers: [
|
||||
|
@@ -23,7 +23,6 @@ import { NgFor } from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-form-section',
|
||||
standalone: true,
|
||||
templateUrl: './form-section.component.html',
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
styleUrls: ['./form-section.component.scss'],
|
||||
|
@@ -23,7 +23,6 @@ import { MatInputModule } from '@angular/material/input';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-inplace-form-input',
|
||||
standalone: true,
|
||||
templateUrl: './inplace-form-input.component.html',
|
||||
styleUrls: ['./inplace-form-input.component.scss'],
|
||||
imports: [MatFormFieldModule, ReactiveFormsModule, MatInputModule, NgClass],
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user