Skip to content

Ng19 migration latest #10795

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 9 additions & 3 deletions lib/content-services/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "warn",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/prefer-for-of": "warn",
Expand Down Expand Up @@ -44,7 +50,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",
Expand Down Expand Up @@ -75,7 +80,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"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { CommonModule } from '@angular/common';

@Component({
selector: 'adf-aspect-list-dialog',
standalone: true,
imports: [CommonModule, MatDialogModule, TranslateModule, MatButtonModule, AspectListComponent, AutoFocusDirective],
templateUrl: './aspect-list-dialog.component.html',
styleUrls: ['./aspect-list-dialog.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({
selector: 'adf-aspect-list',
standalone: true,
imports: [CommonModule, MatExpansionModule, MatCheckboxModule, MatTableModule, TranslateModule, MatProgressSpinnerModule],
templateUrl: './aspect-list.component.html',
styleUrls: ['./aspect-list.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({
selector: 'adf-breadcrumb',
standalone: true,
imports: [CommonModule, MatIconModule, TranslateModule, MatSelectModule],
templateUrl: './breadcrumb.component.html',
styleUrls: ['./breadcrumb.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { TranslateModule } from '@ngx-translate/core';

@Component({
selector: 'adf-dropdown-breadcrumb',
standalone: true,
imports: [CommonModule, MatIconModule, MatSelectModule, TranslateModule],
templateUrl: './dropdown-breadcrumb.component.html',
styleUrls: ['./dropdown-breadcrumb.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ interface CategoryNameControlErrors {

@Component({
selector: 'adf-categories-management',
standalone: true,
imports: [
CommonModule,
TranslateModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { TranslateModule } from '@ngx-translate/core';

@Component({
selector: 'adf-content-metadata-card',
standalone: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as extra info: Careful here, we decided to move fully on standalone and reverting this will create issues along the way for sure @DenysVuika

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VitoAlbano thanks, in angular 19 standalone: true is default, so I removed those adnotations :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My fear is that this will create a lot of conflicts when rebasing but that should be fine for now

imports: [CommonModule, MatCardModule, ContentMetadataComponent, MatButtonModule, MatIconModule, TranslateModule],
templateUrl: './content-metadata-card.component.html',
styleUrls: ['./content-metadata-card.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,26 @@ import { MatIconModule } from '@angular/material/icon';
import { TranslateModule } from '@ngx-translate/core';

@Component({
standalone: true,
imports: [CommonModule, MatIconModule, MatExpansionModule, TranslateModule],
selector: 'adf-content-metadata-header',
encapsulation: ViewEncapsulation.None,
styles: [
`
adf-content-metadata-header {
display: flex;
align-items: center;
width: 100%;
}
adf-content-metadata-header {
display: flex;
align-items: center;
width: 100%;
}

.adf-metadata-properties-title {
display: block;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 700;
font-size: 15px;
padding-left: 12px;
}
`
.adf-metadata-properties-title {
display: block;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 700;
font-size: 15px;
padding-left: 12px;
}
`
],
template: `
<ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ enum DefaultPanels {

@Component({
selector: 'adf-content-metadata',
standalone: true,
imports: [
CommonModule,
MatExpansionModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const defaultValidation = () => true;

@Component({
selector: 'adf-content-node-selector-panel',
standalone: true,
imports: [
CommonModule,
MatFormFieldModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@

import { Component, DestroyRef, inject, Inject, OnInit, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
import {
EmptyListComponent,
NotificationService,
ToolbarComponent,
ToolbarTitleComponent,
TranslationService
} from '@alfresco/adf-core';
import { EmptyListComponent, NotificationService, ToolbarComponent, ToolbarTitleComponent, TranslationService } from '@alfresco/adf-core';
import { Node } from '@alfresco/js-api';
import { AllowableOperationsEnum } from '../common/models/allowable-operations.enum';
import { ContentService } from '../common/services/content.service';
Expand All @@ -47,7 +41,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({
selector: 'adf-content-node-selector',
standalone: true,
imports: [
CommonModule,
MatDialogModule,
Expand All @@ -70,7 +63,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
encapsulation: ViewEncapsulation.None
})
export class ContentNodeSelectorComponent implements OnInit {

title: string;
action: NodeAction;
buttonActionName: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export enum Relations {

@Component({
selector: 'adf-sites-dropdown',
standalone: true,
imports: [CommonModule, TranslateModule, MatFormFieldModule, MatSelectModule, InfiniteSelectScrollDirective],
templateUrl: './sites-dropdown.component.html',
encapsulation: ViewEncapsulation.None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ interface SharedDialogFormProps {

@Component({
selector: 'adf-share-dialog',
standalone: true,
imports: [
CommonModule,
TranslateModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { NodeSharedDirective } from '@alfresco/adf-content-services';

@Component({
selector: 'adf-node-share-test-component',
standalone: true,
imports: [NodeSharedDirective],
template: `
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { MatButtonModule } from '@angular/material/button';

@Component({
selector: 'adf-content-type-dialog',
standalone: true,
imports: [CommonModule, MatDialogModule, TranslateModule, MatExpansionModule, MatTableModule, MatButtonModule],
templateUrl: './content-type-dialog.component.html',
styleUrls: ['./content-type-dialog.component.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export interface CategorySelectorDialogOptions {

@Component({
selector: 'adf-category-selector-dialog',
standalone: true,
imports: [CommonModule, MatDialogModule, TranslateModule, CategoriesManagementComponent, MatButtonModule],
templateUrl: './category-selector.dialog.html',
styleUrls: ['./category-selector.dialog.scss'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import { FileDownloadStatus } from '@alfresco/js-api';

@Component({
selector: 'adf-download-zip-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 DownloadZipDialogStorybookComponent implements OnInit, OnChanges {
@Input()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import { FileDownloadStatus } from '@alfresco/js-api';
templateUrl: './download-zip.dialog.html',
styleUrls: ['./download-zip.dialog.scss'],
host: { class: 'adf-download-zip-dialog' },
encapsulation: ViewEncapsulation.None
encapsulation: ViewEncapsulation.None,
standalone: false
})
export class DownloadZipDialogComponent implements OnInit {
// flag for async threads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({
selector: 'adf-folder-dialog',
standalone: true,
imports: [
CommonModule,
MatDialogModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({
selector: 'adf-library-dialog',
standalone: true,
imports: [
CommonModule,
MatDialogModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import { AlfrescoApiService } from '../../services/alfresco-api.service';

@Component({
selector: 'adf-node-lock',
standalone: true,
imports: [
CommonModule,
TranslateModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { By } from '@angular/platform-browser';
import { NoopTranslateModule } from '@alfresco/adf-core';

@Component({
standalone: true,
imports: [AutoFocusDirective],
template: ` <div tabindex="0" adf-auto-focus>Test</div>`
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import { HttpClientTestingModule } from '@angular/common/http/testing';

@Component({
selector: 'adf-text-subject',
template: ''
template: '',
standalone: false
})
class TestComponent implements NodeAllowableOperationSubject {
disabled: boolean = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { NotificationService } from '@alfresco/adf-core';
import { ContentTestingModule } from '../testing/content.testing.module';

@Component({
standalone: true,
imports: [LibraryFavoriteDirective],
selector: 'app-test-component',
template: `<button #favoriteLibrary="favoriteLibrary" [adf-favorite-library]="selection">Favorite</button>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { By } from '@angular/platform-browser';
import { NoopTranslateModule } from '@alfresco/adf-core';

@Component({
standalone: true,
imports: [NodeCounterDirective],
template: `<div [adf-node-counter]="count"></div>`
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export class NodeCounterDirective implements OnInit, OnChanges {
}

@Component({
standalone: true,
imports: [TranslateModule],
selector: 'adf-node-counter',
template: ` <div>{{ 'NODE_COUNTER.SELECTED_COUNT' | translate : { count: counter } }}</div> `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { EMPTY, of } from 'rxjs';
import { CheckAllowableOperationDirective } from './check-allowable-operation.directive';

@Component({
standalone: true,
imports: [NodeDeleteDirective],
template: `<div id="delete-component" [adf-delete]="selection" (delete)="onDelete()"></div>`
})
Expand All @@ -38,7 +37,6 @@ class TestComponent {
}

@Component({
standalone: true,
imports: [NodeDeleteDirective, CheckAllowableOperationDirective],
template: `<div id="delete-component" [adf-check-allowable-operation]="'delete'" [adf-delete]="selection" (delete)="onDelete($event)"></div>`
})
Expand All @@ -52,7 +50,6 @@ class TestWithPermissionsComponent {
}

@Component({
standalone: true,
imports: [NodeDeleteDirective],
template: ` delete permanent
<div id="delete-permanent" [adf-delete]="selection" [permanent]="permanent" (delete)="onDelete($event)"></div>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { AlfrescoApiService } from '../services/alfresco-api.service';
import { AlfrescoApiServiceMock } from '../mock/alfresco-api.service.mock';

@Component({
standalone: true,
imports: [NodeDownloadDirective],
template: '<div [adfNodeDownload]="selection" [version]="version"></div>'
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const fakeNode = {
} as Node;

@Component({
template: '<div [adf-node-lock]="node"></div>'
template: '<div [adf-node-lock]="node"></div>',
standalone: false
})
class TestComponent {
node = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { NoopTranslateModule, TranslationService } from '@alfresco/adf-core';
import { TrashcanApi } from '@alfresco/js-api';

@Component({
standalone: true,
imports: [NodeRestoreDirective],
template: ` <div [adf-restore]="selection" (restore)="doneSpy()"></div>`
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1925,7 +1925,6 @@ describe('DocumentList', () => {
});

@Component({
standalone: true,
imports: [CommonModule, DocumentListComponent, CustomLoadingContentTemplateDirective],
template: `
<adf-document-list #customDocumentList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ const BYTES_TO_MB_CONVERSION_VALUE = 1048576;

@Component({
selector: 'adf-document-list',
standalone: true,
imports: [
CommonModule,
DataTableComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import { NodeDownloadDirective } from '../../../directives/node-download.directi

@Component({
selector: 'adf-file-auto-download',
standalone: true,
imports: [CommonModule, MatDialogModule, TranslateModule, MatButtonModule, NodeDownloadDirective],
templateUrl: './file-auto-download.component.html'
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({
selector: 'adf-filter-header',
standalone: true,
imports: [CommonModule, HeaderFilterTemplateDirective, SearchFilterContainerComponent],
templateUrl: './filter-header.component.html'
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({
selector: 'adf-library-name-column',
standalone: true,
imports: [CommonModule, TranslateModule],
template: `
<span
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';

@Component({
selector: 'adf-library-role-column',
standalone: true,
imports: [CommonModule, TranslateModule],
template: `
<span class="adf-datatable-cell-value" title="{{ displayText$ | async | translate }}">
Expand Down
Loading
Loading