Browse Source

fix some errors

pull/10102/head
Mehmet Erim 5 years ago
parent
commit
0e11eebd28
  1. 8
      npm/ng-packs/packages/account-core/src/lib/tenant-box.service.ts
  2. 1
      npm/ng-packs/packages/core/src/lib/utils/date-utils.ts
  3. 1
      npm/ng-packs/packages/core/src/lib/utils/index.ts
  4. 3
      npm/ng-packs/packages/core/src/lib/utils/rxjs-utils.ts
  5. 24
      npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts

8
npm/ng-packs/packages/account-core/src/lib/tenant-box.service.ts

@ -1,12 +1,11 @@
import { Injectable } from '@angular/core';
import { ToasterService } from '@abp/ng.theme.shared';
import {
AbpApplicationConfigurationService,
AbpTenantService,
ConfigStateService,
CurrentTenantDto,
SessionStateService,
} from '@abp/ng.core';
import { ToasterService } from '@abp/ng.theme.shared';
import { Injectable } from '@angular/core';
import { finalize } from 'rxjs/operators';
@Injectable()
@ -24,7 +23,6 @@ export class TenantBoxService {
private tenantService: AbpTenantService,
private sessionState: SessionStateService,
private configState: ConfigStateService,
private appConfigService: AbpApplicationConfigurationService,
) {}
onSwitch() {
@ -57,7 +55,7 @@ export class TenantBoxService {
private setTenant(tenant: CurrentTenantDto) {
this.sessionState.setTenant(tenant);
this.appConfigService.get().subscribe(res => this.configState.setState(res));
this.configState.refreshAppState();
}
private showError() {

1
npm/ng-packs/packages/core/src/lib/utils/date-utils.ts

@ -1,4 +1,3 @@
import { ApplicationConfiguration } from '../models/application-configuration';
import { DateTimeFormatDto } from '../proxy/volo/abp/asp-net-core/mvc/application-configurations/models';
import { ConfigStateService } from '../services';

1
npm/ng-packs/packages/core/src/lib/utils/index.ts

@ -16,6 +16,5 @@ export * from './multi-tenancy-utils';
export * from './number-utils';
export * from './object-utils';
export * from './route-utils';
export * from './rxjs-utils';
export * from './string-utils';
export * from './tree-utils';

3
npm/ng-packs/packages/core/src/lib/utils/rxjs-utils.ts

@ -1,3 +0,0 @@
function isFunction(value) {
return typeof value === 'function';
}

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

@ -5,7 +5,6 @@ import {
EventEmitter,
Inject,
Input,
isDevMode,
OnDestroy,
OnInit,
Optional,
@ -144,9 +143,8 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal {
setTimeout(() => this.listen(), 0);
this.modalRef = this.modal.open(this.modalContent, {
// TODO: set size to 'lg' when removed the size variable
size: this.size,
centered: this.centered,
size: 'lg',
centered: true,
keyboard: false,
scrollable: true,
beforeDismiss: () => {
@ -156,7 +154,7 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal {
return !this.visible;
},
...this.options,
windowClass: `${this.modalClass} ${this.options.windowClass || ''} ${this.modalIdentifier}`,
windowClass: `${this.options.windowClass || ''} ${this.modalIdentifier}`,
});
this.appear.emit();
@ -212,22 +210,6 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal {
}
});
setTimeout(() => {
if (!this.abpClose) return;
this.warnForDeprecatedClose();
fromEvent(this.abpClose.nativeElement, 'click')
.pipe(takeUntil(this.destroy$))
.subscribe(() => this.close());
}, 0);
this.init.emit();
}
private warnForDeprecatedClose() {
if (isDevMode()) {
console.warn(
'Please use abpClose directive instead of #abpClose template variable. #abpClose will be removed in v5.0',
);
}
}
}

Loading…
Cancel
Save