Browse Source

Merge pull request #2477 from abpframework/refactor/remove-deprecated

refactor!: remove deprecated functions, outputs, inputs etc.
pull/2479/head
Yasin Aydın 7 years ago
committed by GitHub
parent
commit
2e9eab77cb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      npm/ng-packs/packages/account/src/lib/account.module.ts
  2. 17
      npm/ng-packs/packages/account/src/lib/constants/routes.ts
  3. 1
      npm/ng-packs/packages/account/src/public-api.ts
  4. 4
      npm/ng-packs/packages/core/src/lib/enums/common.ts
  5. 4
      npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html
  6. 10
      npm/ng-packs/packages/identity/src/lib/components/users/users.component.html
  7. 28
      npm/ng-packs/packages/identity/src/lib/constants/routes.ts
  8. 8
      npm/ng-packs/packages/identity/src/lib/identity.module.ts
  9. 1
      npm/ng-packs/packages/identity/src/public-api.ts
  10. 4
      npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html
  11. 1
      npm/ng-packs/packages/tenant-management/src/lib/constants/index.ts
  12. 25
      npm/ng-packs/packages/tenant-management/src/lib/constants/routes.ts
  13. 8
      npm/ng-packs/packages/tenant-management/src/lib/tenant-management.module.ts
  14. 1
      npm/ng-packs/packages/tenant-management/src/public-api.ts
  15. 24
      npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts
  16. 31
      npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts
  17. 8
      npm/ng-packs/packages/theme-shared/src/lib/models/confirmation.ts
  18. 2
      npm/ng-packs/packages/theme-shared/src/lib/tests/sort-order-icon.component.spec.ts

24
npm/ng-packs/packages/account/src/lib/account.module.ts

@ -25,22 +25,14 @@ import { AuthWrapperComponent } from './components/auth-wrapper/auth-wrapper.com
ManageProfileComponent,
PersonalSettingsComponent,
],
imports: [CoreModule, AccountRoutingModule, ThemeSharedModule, TableModule, NgbDropdownModule, NgxValidateCoreModule],
imports: [
CoreModule,
AccountRoutingModule,
ThemeSharedModule,
TableModule,
NgbDropdownModule,
NgxValidateCoreModule,
],
exports: [],
})
export class AccountModule {}
/**
*
* @deprecated since version 0.9
*/
export function AccountProviders(options = {} as Options): Provider[] {
return [
{ provide: ACCOUNT_OPTIONS, useValue: options },
{
provide: 'ACCOUNT_OPTIONS',
useFactory: optionsFactory,
deps: [ACCOUNT_OPTIONS],
},
];
}

17
npm/ng-packs/packages/account/src/lib/constants/routes.ts

@ -1,17 +0,0 @@
import { ABP, eLayoutType } from '@abp/ng.core';
/**
*
* @deprecated since version 0.9
*/
export const ACCOUNT_ROUTES = {
routes: [
{
name: 'Account',
path: 'account',
invisible: true,
layout: eLayoutType.application,
children: [{ path: 'login', name: 'Login', order: 1 }, { path: 'register', name: 'Register', order: 2 }],
},
] as ABP.FullRoute[],
};

1
npm/ng-packs/packages/account/src/public-api.ts

@ -1,6 +1,5 @@
export * from './lib/account.module';
export * from './lib/components';
export * from './lib/constants/routes';
export * from './lib/tokens';
export * from './lib/models';
export * from './lib/services';

4
npm/ng-packs/packages/core/src/lib/enums/common.ts

@ -2,8 +2,4 @@ export const enum eLayoutType {
account = 'account',
application = 'application',
empty = 'empty',
/**
* @deprecated since version 0.9.0
*/
setting = 'setting',
}

4
npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html

@ -54,8 +54,8 @@
{{ 'AbpIdentity::RoleName' | abpLocalization }}
<abp-sort-order-icon
#sortOrderIcon
key="name"
[(selectedKey)]="sortKey"
sortKey="name"
[(selectedSortKey)]="sortKey"
[(order)]="sortOrder"
></abp-sort-order-icon>
</th>

10
npm/ng-packs/packages/identity/src/lib/components/users/users.component.html

@ -62,8 +62,8 @@
{{ 'AbpIdentity::UserName' | abpLocalization }}
<abp-sort-order-icon
#sortOrderIcon
key="userName"
[(selectedKey)]="sortKey"
sortKey="userName"
[(selectedSortKey)]="sortKey"
[(order)]="sortOrder"
>
</abp-sort-order-icon>
@ -71,14 +71,14 @@
<th pResizableColumn (click)="sortOrderIcon.sort('email')">
{{ 'AbpIdentity::EmailAddress' | abpLocalization }}
<abp-sort-order-icon
key="email"
[(selectedKey)]="sortKey"
sortKey="email"
[(selectedSortKey)]="sortKey"
[(order)]="sortOrder"
></abp-sort-order-icon>
</th>
<th pResizableColumn (click)="sortOrderIcon.sort('phoneNumber')">
{{ 'AbpIdentity::PhoneNumber' | abpLocalization }}
<abp-sort-order-icon key="phoneNumber" [(selectedKey)]="sortKey" [(order)]="sortOrder">
<abp-sort-order-icon sortKey="phoneNumber" [(selectedSortKey)]="sortKey" [(order)]="sortOrder">
</abp-sort-order-icon>
</th>
</tr>

28
npm/ng-packs/packages/identity/src/lib/constants/routes.ts

@ -1,28 +0,0 @@
import { eLayoutType, ABP } from '@abp/ng.core';
/**
*
* @deprecated
*/
export const IDENTITY_ROUTES = {
routes: [
{
name: 'AbpUiNavigation::Menu:Administration',
path: '',
order: 1,
wrapper: true,
},
{
name: 'AbpIdentity::Menu:IdentityManagement',
path: 'identity',
order: 1,
parentName: 'AbpUiNavigation::Menu:Administration',
layout: eLayoutType.application,
iconClass: 'fa fa-id-card-o',
children: [
{ path: 'roles', name: 'AbpIdentity::Roles', order: 2, requiredPolicy: 'AbpIdentity.Roles' },
{ path: 'users', name: 'AbpIdentity::Users', order: 1, requiredPolicy: 'AbpIdentity.Users' },
],
},
] as ABP.FullRoute[],
};

8
npm/ng-packs/packages/identity/src/lib/identity.module.ts

@ -26,11 +26,3 @@ import { NgxValidateCoreModule } from '@ngx-validate/core';
],
})
export class IdentityModule {}
/**
*
* @deprecated
*/
export function IdentityProviders(): Provider[] {
return [];
}

1
npm/ng-packs/packages/identity/src/public-api.ts

@ -5,7 +5,6 @@
export * from './lib/identity.module';
export * from './lib/actions/identity.actions';
export * from './lib/components';
export * from './lib/constants/routes';
export * from './lib/models/identity';
export * from './lib/services';
export * from './lib/states/identity.state';

4
npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html

@ -62,8 +62,8 @@
{{ 'AbpTenantManagement::TenantName' | abpLocalization }}
<abp-sort-order-icon
#sortOrderIcon
key="name"
[(selectedKey)]="sortKey"
sortKey="name"
[(selectedSortKey)]="sortKey"
[(order)]="sortOrder"
>
</abp-sort-order-icon>

1
npm/ng-packs/packages/tenant-management/src/lib/constants/index.ts

@ -1 +0,0 @@
export * from './routes';

25
npm/ng-packs/packages/tenant-management/src/lib/constants/routes.ts

@ -1,25 +0,0 @@
import { ABP, eLayoutType } from '@abp/ng.core';
/**
*
* @deprecated since version 0.9.0
*/
export const TENANT_MANAGEMENT_ROUTES = {
routes: [
{
name: 'AbpTenantManagement::Menu:TenantManagement',
path: 'tenant-management',
parentName: 'AbpUiNavigation::Menu:Administration',
layout: eLayoutType.application,
iconClass: 'fa fa-users',
children: [
{
path: 'tenants',
name: 'AbpTenantManagement::Tenants',
order: 1,
requiredPolicy: 'AbpTenantManagement.Tenants',
},
],
},
] as ABP.FullRoute[],
};

8
npm/ng-packs/packages/tenant-management/src/lib/tenant-management.module.ts

@ -24,11 +24,3 @@ import { NgxValidateCoreModule } from '@ngx-validate/core';
],
})
export class TenantManagementModule {}
/**
*
* @deprecated since version 0.9.0
*/
export function TenantManagementProviders(): Provider[] {
return [];
}

1
npm/ng-packs/packages/tenant-management/src/public-api.ts

@ -1,7 +1,6 @@
export * from './lib/tenant-management.module';
export * from './lib/actions';
export * from './lib/components';
export * from './lib/constants';
export * from './lib/models';
export * from './lib/services';
export * from './lib/states';

24
npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts

@ -19,9 +19,9 @@ import { ABP } from '@abp/ng.core';
[attr.type]="buttonType"
[ngClass]="buttonClass"
[disabled]="loading || disabled"
(click.stop)="click.next($event); abpClick.next($event)"
(focus)="focus.next($event); abpFocus.next($event)"
(blur)="blur.next($event); abpBlur.next($event)"
(click.stop)="abpClick.next($event)"
(focus)="abpFocus.next($event)"
(blur)="abpBlur.next($event)"
>
<i [ngClass]="icon" class="mr-1"></i><ng-content></ng-content>
</button>
@ -49,24 +49,6 @@ export class ButtonComponent implements OnInit {
@Input()
attributes: ABP.Dictionary<string>;
// tslint:disable
/**
* @deprecated use abpClick instead
*/
@Output() readonly click = new EventEmitter<MouseEvent>();
/**
* @deprecated use abpFocus instead
*/
// tslint:disable-next-line: no-output-native
@Output() readonly focus = new EventEmitter<FocusEvent>();
/**
* @deprecated use abpBlur instead
*/
@Output() readonly blur = new EventEmitter<FocusEvent>();
// tslint:enable
@Output() readonly abpClick = new EventEmitter<MouseEvent>();
@Output() readonly abpFocus = new EventEmitter<FocusEvent>();

31
npm/ng-packs/packages/theme-shared/src/lib/components/sort-order-icon/sort-order-icon.component.ts

@ -8,17 +8,8 @@ export class SortOrderIconComponent {
private _order: 'asc' | 'desc' | '';
private _selectedSortKey: string;
/**
* @deprecated use selectedSortKey instead.
*/
@Input()
set selectedKey(value: string) {
this.selectedSortKey = value;
this.selectedKeyChange.emit(value);
}
get selectedKey(): string {
return this._selectedSortKey;
}
sortKey: string;
@Input()
set selectedSortKey(value: string) {
@ -29,23 +20,6 @@ export class SortOrderIconComponent {
return this._selectedSortKey;
}
@Output() readonly selectedKeyChange = new EventEmitter<string>();
@Output() readonly selectedSortKeyChange = new EventEmitter<string>();
/**
* @deprecated use sortKey instead.
*/
@Input()
get key(): string {
return this.sortKey;
}
set key(value: string) {
this.sortKey = value;
}
@Input()
sortKey: string;
@Input()
set order(value: 'asc' | 'desc' | '') {
this._order = value;
@ -56,6 +30,7 @@ export class SortOrderIconComponent {
}
@Output() readonly orderChange = new EventEmitter<string>();
@Output() readonly selectedSortKeyChange = new EventEmitter<string>();
@Input()
iconClass: string;
@ -67,7 +42,6 @@ export class SortOrderIconComponent {
}
sort(key: string) {
this.selectedKey = key; // TODO: To be removed
this.selectedSortKey = key;
switch (this.order) {
case '':
@ -80,7 +54,6 @@ export class SortOrderIconComponent {
break;
case 'desc':
this.order = '';
this.selectedKey = ''; // TODO: To be removed
this.orderChange.emit('');
break;
}

8
npm/ng-packs/packages/theme-shared/src/lib/models/confirmation.ts

@ -7,13 +7,5 @@ export namespace Confirmation {
hideYesBtn?: boolean;
cancelText?: Config.LocalizationParam;
yesText?: Config.LocalizationParam;
/**
* @deprecated to be deleted in v2
*/
cancelCopy?: Config.LocalizationParam;
/**
* @deprecated to be deleted in v2
*/
yesCopy?: Config.LocalizationParam;
}
}

2
npm/ng-packs/packages/theme-shared/src/lib/tests/sort-order-icon.component.spec.ts

@ -8,7 +8,7 @@ describe('SortOrderIconComponent', () => {
beforeEach(() => {
spectator = createHost(
'<abp-sort-order-icon key="testKey" [(selectedSortKey)]="selectedSortKey" [(order)]="order"></abp-sort-order-icon>',
'<abp-sort-order-icon sortKey="testKey" [(selectedSortKey)]="selectedSortKey" [(order)]="order"></abp-sort-order-icon>',
{
hostProps: {
selectedSortKey: '',

Loading…
Cancel
Save