Skip to content
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

Alex angular 19 migration #6712

Merged
merged 21 commits into from
Dec 10, 2024
Merged
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
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
"semi": "off",
"@typescript-eslint/semi": ["error"],
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
"no-extra-semi": "off",
"@angular-eslint/prefer-standalone": [
"off"
]
}
},
{
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/on-push-or-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ jobs:
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
# - run: |
# npx nx build ngx-bootstrap --runner=cloud --configuration=production
# npx nx build --runner=cloud --configuration=production
- run: |
npx nx build ngx-bootstrap --runner=cloud --configuration=production
npx nx build --runner=cloud --configuration=production
npx nx build ngx-bootstrap --configuration=production
npx nx build --configuration=production


# run unit tests
Expand All @@ -80,7 +83,8 @@ jobs:
with:
path: ${{ env.CACHE_DIST_PATH }}
key: dist-${{ github.run_id }}
- run: npm test -- --runner=cloud --codeCoverage
# - run: npm test -- --runner=cloud --codeCoverage
- run: npm test -- --codeCoverage
- run: npx codecov ./coverage/
continue-on-error: true

Expand All @@ -94,7 +98,8 @@ jobs:
with:
path: ${{ env.CACHE_NODE_MODULES_PATH }}
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- run: npm run lint -- --runner=cloud
# - run: npm run lint -- --runner=cloud
- run: npm run lint --

# firebase deploy preview
firebase_preview:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Thumbs.db

firebase-debug.log
.nx-cache
.nx
scully.log
/.angular
/.scully
Expand All @@ -59,4 +60,4 @@ scully.log

migration.json

.nx/cache
.nx/cache
3 changes: 3 additions & 0 deletions apps/ngx-bootstrap-docs/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
"style": "kebab-case"
}
],
"@angular-eslint/prefer-standalone": [
"off"
],
"@typescript-eslint/no-explicit-any": 0,
"@angular-eslint/component-class-suffix": 0,
"@angular-eslint/no-output-on-prefix": 0
Expand Down
3 changes: 2 additions & 1 deletion apps/ngx-bootstrap-docs/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { filter } from 'rxjs/operators';

@Component({
selector: 'bs-demo',
templateUrl: './app.component.html'
templateUrl: './app.component.html',
standalone: false
})
export class AppComponent implements AfterContentInit {
showSidebar = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "18.1.3"
"version": "19.0.0"
}
3 changes: 3 additions & 0 deletions libs/common-docs/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"prefix": "ngx-bootstrap-base",
"style": "kebab-case"
}
],
"@angular-eslint/prefer-standalone": [
"off"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { ComponentApi } from '../../models/components-api.model';
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'ng-api-doc-class',
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: './api-doc-class.component.html'
templateUrl: './api-doc-class.component.html',
standalone: false
})
export class NgApiDocClassComponent {
headerAnchor?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const CONFIG_SUFFIX_LENGTH = 'Config'.length;
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'ng-api-doc-config',
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: './api-doc-config.component.html'
templateUrl: './api-doc-config.component.html',
standalone: false
})
export class NgApiDocConfigComponent {
apiDocs?: ClassDesc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import { DomSanitizer } from '@angular/platform-browser';
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'ng-api-doc',
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: './api-doc.component.html'
templateUrl: './api-doc.component.html',
standalone: false
})
export class NgApiDocComponent {
apiDocs?: DirectiveDesc;
Expand Down
4 changes: 0 additions & 4 deletions libs/common-docs/src/lib/api-docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import { SampleBoxComponent } from './sample-box/sample-box.component';
import { TabsModule } from 'ngx-bootstrap/tabs';
export { NgApiDoc } from './api-docs.model';
export { Analytics } from './analytics/analytics';
export { NgApiDocComponent } from './api-doc/api-doc.component';
export { NgApiDocClassComponent } from './api-doc-class/api-doc-class.component';
export { NgApiDocConfigComponent } from './api-doc-config/api-doc-config.component';
export { SampleBoxComponent } from './sample-box/sample-box.component';

@NgModule({
imports: [CommonModule, TabsModule],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { Component, Input } from '@angular/core';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'ng-sample-box',
templateUrl: './sample-box.component.html'
templateUrl: './sample-box.component.html',
standalone: false
})
export class SampleBoxComponent {
@Input() ts?: string;
Expand Down
3 changes: 2 additions & 1 deletion libs/common-docs/src/lib/common/add-nav/add-nav.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ interface IComponentContent {
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'add-nav',
templateUrl: './add-nav.component.html'
templateUrl: './add-nav.component.html',
standalone: false
})
export class AddNavComponent implements OnChanges, AfterViewChecked, AfterViewInit {
@Input() componentContent?: ContentSection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component } from '@angular/core';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'app-footer',
templateUrl: './app-footer.component.html'
templateUrl: './app-footer.component.html',
standalone: false
})
export class AppFooterComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Subscription } from 'rxjs';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'bread-crumbs',
templateUrl: 'breadCrumbs.component.html'
templateUrl: 'breadCrumbs.component.html',
standalone: false
})
export class BreadCrumbsComponent implements OnDestroy {
routeSubscription: Subscription;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Routes } from "@angular/router";
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'components',
templateUrl: './components-page.component.html'
templateUrl: './components-page.component.html',
standalone: false
})
export class ComponentsPageComponent {
componentsArray?:Routes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component } from "@angular/core";
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'construction',
templateUrl: './construction-page.component.html'
templateUrl: './construction-page.component.html',
standalone: false
})
export class ConstructionPageComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ interface ICompany {
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'discover',
templateUrl: './discover.component.html',
styleUrls: ['discover.component.scss']
styleUrls: ['discover.component.scss'],
standalone: false
})

export class DiscoverComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { Component } from '@angular/core';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'documentation',
templateUrl: './documentation.component.html'
templateUrl: './documentation.component.html',
standalone: false
})
export class DocumentationComponent {
name = `Native Angular widgets for Bootstrap 5 and Bootstrap 4`;
Expand Down
3 changes: 2 additions & 1 deletion libs/common-docs/src/lib/common/landing/landing.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { Router } from '@angular/router';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'landing',
templateUrl: './landing.component.html'
templateUrl: './landing.component.html',
standalone: false
})
export class LandingComponent implements AfterViewInit {
currentVersion?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { Component } from '@angular/core';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'schematics',
templateUrl: './schematics.component.html'
templateUrl: './schematics.component.html',
standalone: false
})
export class SchematicsComponent {
name = `Schematics of ngx-bootstrap`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Pipe, PipeTransform } from '@angular/core';
import { Route, Routes } from '@angular/router';

@Pipe({ name: 'SearchFilter' })
@Pipe({
name: 'SearchFilter',
standalone: false
})
export class SearchFilterPipe implements PipeTransform {
transform(value: Routes, text?: string): Routes {
if (!text) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { DOCS_TOKENS } from '../../tokens/docs-routes-token';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'search-input',
templateUrl: './search-input.component.html'
templateUrl: './search-input.component.html',
standalone: false
})
export class SearchInputComponent {
@Input() showInput = true;
Expand Down
3 changes: 2 additions & 1 deletion libs/common-docs/src/lib/common/sidebar/sidebar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const _bs5Css = 'assets/css/bootstrap-5.2.3/css/bootstrap.min.css';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'sidebar',
templateUrl: './sidebar.component.html'
templateUrl: './sidebar.component.html',
standalone: false
})
export class SidebarComponent {
isShown = false;
Expand Down
3 changes: 2 additions & 1 deletion libs/common-docs/src/lib/common/themes/themes.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { Component } from "@angular/core";
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'themes',
templateUrl: './themes.component.html'
templateUrl: './themes.component.html',
standalone: false
})

export class ThemesComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'top-menu',
templateUrl: './top-menu.component.html'
templateUrl: './top-menu.component.html',
standalone: false
})
export class TopMenuComponent implements AfterViewInit {
shadowRoutes = ['/documentation', '/discover', '/schematics', '/'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { ComponentApi } from '../../models/components-api.model';
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'api-sections',
templateUrl: './api-sections.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
})
export class ApiSectionsComponent {
apiSectionsContent: ComponentApi[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'examples',
templateUrl: './examples.component.html'
templateUrl: './examples.component.html',
standalone: false
})
export class ExamplesComponent {
examples: ComponentExample[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ interface IContentSection {
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'demo-section',
templateUrl: './demo-section.component.html'
templateUrl: './demo-section.component.html',
standalone: false
})
export class DemoSectionComponent {
@Input() name?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type AvailableTabsPathsType = typeof availableTabsPaths[number];
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'docs-section',

template: `
<ng-container *ngIf="content">
<tabset class="example-tabset-box">
Expand All @@ -24,7 +25,8 @@ type AvailableTabsPathsType = typeof availableTabsPaths[number];
</tabset>
<add-nav class="add-nav" [componentContent]="overview ? content[0] : api ? content[1] : content[2]"></add-nav>
</ng-container>
`
`,
standalone: false
})
export class DocsSectionComponent implements OnDestroy {
@Input() content: ContentSection[] | undefined;
Expand Down
5 changes: 4 additions & 1 deletion libs/common-docs/src/lib/docs.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ import { TopMenuComponent } from './common/top-menu/top-menu.component';
import { RouterModule } from '@angular/router';

/* export */
export { NgApiDocModule, NgApiDocComponent, NgApiDocClassComponent, NgApiDocConfigComponent } from './api-docs/index';
export { NgApiDocModule } from './api-docs/index';
export { NgApiDocComponent } from './api-docs/api-doc/api-doc.component';
export { NgApiDocClassComponent } from './api-docs/api-doc-class/api-doc-class.component';
export { NgApiDocConfigComponent } from './api-docs/api-doc-config/api-doc-config.component';
export { ExamplesComponent, ExamplesComponentModule } from './demo-section-components/demo-examples-section/index';
export { ApiSectionsComponent, ApiSectionsComponentModule } from './demo-section-components/demo-api-section/index';
export { DemoSectionComponent } from './demo-section/demo-section.component';
Expand Down
3 changes: 3 additions & 0 deletions libs/doc-pages/accordion/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"prefix": "ngx-bootstrap-base",
"style": "kebab-case"
}
],
"@angular-eslint/prefer-standalone": [
"off"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { ContentSection } from '@ngx-bootstrap-doc/docs';
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'accordion-section',
templateUrl: './accordion-section.components.html',
changeDetection: ChangeDetectionStrategy.OnPush
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: false
})
export class AccordionSectionComponent {
name = 'Accordion';
Expand Down
3 changes: 2 additions & 1 deletion libs/doc-pages/accordion/src/lib/demos/animated/animated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component } from '@angular/core';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'demo-accordion-animation',
templateUrl: './animated.html'
templateUrl: './animated.html',
standalone: false
})
export class DemoAccordionAnimatedComponent {}
3 changes: 2 additions & 1 deletion libs/doc-pages/accordion/src/lib/demos/basic/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Component } from '@angular/core';
@Component({
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'demo-accordion-basic',
templateUrl: './basic.html'
templateUrl: './basic.html',
standalone: false
})
export class DemoAccordionBasicComponent {}
3 changes: 2 additions & 1 deletion libs/doc-pages/accordion/src/lib/demos/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function getAccordionConfig(): AccordionConfig {
// eslint-disable-next-line @angular-eslint/component-selector
selector: 'demo-accordion-config',
templateUrl: './config.html',
providers: [{ provide: AccordionConfig, useFactory: getAccordionConfig }]
providers: [{ provide: AccordionConfig, useFactory: getAccordionConfig }],
standalone: false
})
export class DemoAccordionConfigComponent {}
Loading
Loading