Browse Source

ng version upgrade to v20

pull/23057/head
erdemcaygor 8 months ago
parent
commit
7b61edc70f
  1. 32
      npm/ng-packs/package.json
  2. 4
      npm/ng-packs/packages/components/extensible/src/lib/models/actions.ts
  3. 4
      npm/ng-packs/packages/components/extensible/src/lib/models/entity-props.ts
  4. 4
      npm/ng-packs/packages/components/extensible/src/lib/models/props.ts
  5. 12
      npm/ng-packs/packages/components/extensible/src/lib/pipes/create-injector.pipe.ts
  6. 2
      npm/ng-packs/packages/core/src/lib/pipes/sort.pipe.ts
  7. 6
      npm/ng-packs/packages/core/src/lib/services/list.service.ts
  8. 6
      npm/ng-packs/packages/core/src/lib/tests/utils/common.utils.ts

32
npm/ng-packs/package.json

@ -46,15 +46,15 @@
"devDependencies": {
"@abp/ng.theme.lepton-x": "~4.2.0",
"@abp/utils": "~9.2.0",
"@angular-devkit/build-angular": "~19.1.0",
"@angular-devkit/core": "~19.1.0",
"@angular-devkit/schematics": "~19.1.0",
"@angular-devkit/schematics-cli": "~19.1.0",
"@angular-eslint/eslint-plugin": "~19.0.0",
"@angular-eslint/eslint-plugin-template": "~19.0.0",
"@angular-eslint/template-parser": "~19.0.0",
"@angular-devkit/build-angular": "~20.0.0",
"@angular-devkit/core": "~20.0.0",
"@angular-devkit/schematics": "~20.0.0",
"@angular-devkit/schematics-cli": "~20.0.0",
"@angular-eslint/eslint-plugin": "~20.0.0",
"@angular-eslint/eslint-plugin-template": "~20.0.0",
"@angular-eslint/template-parser": "~20.0.0",
"@angular/animations": "20.0.2",
"@angular/cli": "~19.1.0",
"@angular/cli": "~20.0.1",
"@angular/common": "20.0.2",
"@angular/compiler": "20.0.2",
"@angular/compiler-cli": "20.0.2",
@ -66,8 +66,8 @@
"@angular/platform-browser-dynamic": "20.0.2",
"@angular/router": "20.0.2",
"@fortawesome/fontawesome-free": "^6.0.0",
"@ng-bootstrap/ng-bootstrap": "~18.0.0",
"@ngneat/spectator": "~19.1.0",
"@ng-bootstrap/ng-bootstrap": "~19.0.0-rc.0",
"@ngneat/spectator": "~19.6.2",
"@ngx-validate/core": "^0.2.0",
"@nx/angular": "~21.1.3",
"@nx/cypress": "~21.1.3",
@ -84,14 +84,14 @@
"@swc/cli": "0.6.0",
"@swc/core": "~1.5.0",
"@swc/helpers": "~0.5.0",
"@swimlane/ngx-datatable": "^20.0.0",
"@swimlane/ngx-datatable": "^21.0.0",
"@types/jest": "29.5.14",
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "7.16.0",
"@typescript-eslint/parser": "7.16.0",
"@typescript-eslint/utils": "^7.16.0",
"angular-oauth2-oidc": "^19.0.0",
"autoprefixer": "^10.0.0",
"angular-oauth2-oidc": "^20.0.0",
"autoprefixer": "^10.4.21",
"bootstrap": "^5.0.0",
"bootstrap-icons": "^1.0.0",
"chart.js": "^4.0.0",
@ -111,8 +111,8 @@
"just-compare": "^2.0.0",
"lerna": "^4.0.0",
"lint-staged": "^13.0.0",
"ng-packagr": "~19.1.0",
"ng-zorro-antd": "~19.0.0",
"ng-packagr": "~20.0.0",
"ng-zorro-antd": "~19.3.1",
"nx": "~21.1.3",
"postcss": "^8.0.0",
"postcss-import": "14.1.0",
@ -127,7 +127,7 @@
"ts-toolbelt": "^9.0.0",
"tslib": "^2.0.0",
"tslint": "~6.1.0",
"typescript": "~5.7.3",
"typescript": "~5.8.3",
"zone.js": "~0.15.0"
},
"lint-staged": {

4
npm/ng-packs/packages/components/extensible/src/lib/models/actions.ts

@ -1,5 +1,5 @@
import { LinkedList } from '@abp/utils';
import { InjectFlags, InjectionToken, InjectOptions, Type } from '@angular/core';
import { InjectionToken, InjectOptions, Type } from '@angular/core';
export abstract class ActionList<R = any, A = Action<R>> extends LinkedList<A> {}
@ -7,7 +7,7 @@ export abstract class ActionData<R = any> {
abstract getInjected: <T>(
token: Type<T> | InjectionToken<T>,
notFoundValue?: T,
flags?: InjectOptions | InjectFlags,
flags?: InjectOptions | { optional: true; host: true; skipSelf: true },
) => T;
index?: number;
abstract record: R;

4
npm/ng-packs/packages/components/extensible/src/lib/models/entity-props.ts

@ -1,5 +1,5 @@
import { ABP, escapeHtmlChars } from '@abp/ng.core';
import { InjectFlags, InjectOptions, InjectionToken, Type } from '@angular/core';
import { InjectOptions, InjectionToken, Type } from '@angular/core';
import { Observable, of } from 'rxjs';
import { ActionCallback } from './actions';
import {
@ -93,6 +93,6 @@ export type ColumnPredicate = (getInjected: GetInjected, auxData?: any) => boole
export type GetInjected = <T>(
token: Type<T> | InjectionToken<T>,
notFoundValue?: T,
options?: InjectOptions | InjectFlags,
options?: InjectOptions | { optional: true; host: true; skipSelf: true },
) => T;
type PropDataObject = { [key: string]: any };

4
npm/ng-packs/packages/components/extensible/src/lib/models/props.ts

@ -1,5 +1,5 @@
import { LinkedList } from '@abp/utils';
import { InjectFlags, InjectionToken, InjectOptions, Type } from '@angular/core';
import { InjectionToken, InjectOptions, Type } from '@angular/core';
import { ePropType } from '../enums/props.enum';
import { FormPropTooltip } from './form-props';
@ -9,7 +9,7 @@ export abstract class PropData<R = any> {
abstract getInjected: <T>(
token: Type<T> | InjectionToken<T>,
notFoundValue?: T,
options?: InjectOptions | InjectFlags,
options?: InjectOptions | { optional: true; host: true; skipSelf: true },
) => T;
index?: number;
abstract record: R;

12
npm/ng-packs/packages/components/extensible/src/lib/pipes/create-injector.pipe.ts

@ -1,12 +1,4 @@
import {
InjectFlags,
InjectionToken,
InjectOptions,
Injector,
Pipe,
PipeTransform,
Type,
} from '@angular/core';
import { InjectionToken, InjectOptions, Injector, Pipe, PipeTransform, Type } from '@angular/core';
import { HasCreateInjectorPipe, ToolbarComponent } from '../models/toolbar-actions';
import { EXTENSIONS_ACTION_CALLBACK, EXTENSIONS_ACTION_DATA } from '../tokens/extensions.token';
@ -22,7 +14,7 @@ export class CreateInjectorPipe<R> implements PipeTransform {
const get = <T>(
token: Type<T> | InjectionToken<T>,
notFoundValue?: T,
options?: InjectOptions | InjectFlags,
options?: InjectOptions | { optional: true; host: true; skipSelf: true },
) => {
const componentData = context.getData();
const componentDataCallback = (data: any) => {

2
npm/ng-packs/packages/core/src/lib/pipes/sort.pipe.ts

@ -6,7 +6,7 @@ export type SortOrder = 'asc' | 'desc';
name: 'abpSort',
})
export class SortPipe implements PipeTransform {
transform(value: any[], sortOrder: SortOrder | string = 'asc', sortKey?: string): any {
transform(value: any[], sortOrder: SortOrder | string = 'asc', sortKey?: string | number): any {
sortOrder = sortOrder && (sortOrder.toLowerCase() as any);
if (!value || (sortOrder !== 'asc' && sortOrder !== 'desc')) return value;

6
npm/ng-packs/packages/core/src/lib/services/list.service.ts

@ -65,12 +65,12 @@ export class ListService<QueryParamsType = ABP.PageQueryParams | any> implements
return this._totalCount;
}
private _sortKey = '';
set sortKey(value: string) {
private _sortKey: string | number = '';
set sortKey(value: string | number) {
this._sortKey = value;
this.get();
}
get sortKey(): string {
get sortKey(): string | number {
return this._sortKey;
}

6
npm/ng-packs/packages/core/src/lib/tests/utils/common.utils.ts

@ -1,4 +1,4 @@
import { AbstractType, InjectFlags, InjectionToken, Injector, Type } from '@angular/core';
import { AbstractType, InjectionToken, Injector, Type } from '@angular/core';
import { Subject } from 'rxjs';
export const mockActions = new Subject();
@ -10,10 +10,10 @@ export class DummyInjector extends Injector {
get<T>(
token: Type<T> | InjectionToken<T> | AbstractType<T>,
notFoundValue?: T,
flags?: InjectFlags,
flags?: { optional: true; host: true; skipSelf: true },
): T;
get(token: any, notFoundValue?: any): any;
get(token, notFoundValue?, flags?: InjectFlags): any {
get(token, notFoundValue?, flags?: { optional: true; host: true; skipSelf: true }): any {
return this.payload[token.name || token._desc || token];
}
}

Loading…
Cancel
Save