Browse Source

- modify checkWindowWidth method

- change account core package name
pull/9395/head
muhammedaltug 5 years ago
parent
commit
b49d842961
  1. 12
      npm/ng-packs/angular.json
  2. 6
      npm/ng-packs/packages/account-core/jest.config.js
  3. 44
      npm/ng-packs/packages/account-core/karma.conf.js
  4. 2
      npm/ng-packs/packages/account-core/package.json
  5. 2
      npm/ng-packs/packages/account/config/src/enums/route-names.ts
  6. 4
      npm/ng-packs/packages/account/config/src/providers/route.provider.ts
  7. 1
      npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/account-layout.component.ts
  8. 2
      npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/auth-wrapper/auth-wrapper.component.ts
  9. 2
      npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.ts
  10. 26
      npm/ng-packs/packages/theme-basic/src/lib/services/layout.service.ts
  11. 2
      npm/ng-packs/tsconfig.json

12
npm/ng-packs/angular.json

@ -561,11 +561,11 @@
} }
}, },
"test": { "test": {
"builder": "@angular-devkit/build-angular:karma", "builder": "@angular-builders/jest:run",
"options": { "options": {
"main": "packages/account-core/src/test.ts", "tsConfig": "tsconfig.json",
"tsConfig": "packages/account-core/tsconfig.spec.json", "coverage": true,
"karmaConfig": "packages/account-core/karma.conf.js" "passWithNoTests": true
} }
}, },
"lint": { "lint": {
@ -575,9 +575,7 @@
"packages/account-core/tsconfig.lib.json", "packages/account-core/tsconfig.lib.json",
"packages/account-core/tsconfig.spec.json" "packages/account-core/tsconfig.spec.json"
], ],
"exclude": [ "exclude": ["**/node_modules/**"]
"**/node_modules/**"
]
} }
} }
} }

6
npm/ng-packs/packages/account-core/jest.config.js

@ -0,0 +1,6 @@
const jestConfig = require('../../jest.config');
module.exports = {
...jestConfig,
name: 'account-core',
};

44
npm/ng-packs/packages/account-core/karma.conf.js

@ -1,44 +0,0 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '../../coverage/account-core'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

2
npm/ng-packs/packages/account-core/package.json

@ -1,5 +1,5 @@
{ {
"name": "@abp/ng.account-core", "name": "@abp/ng.account.core",
"version": "0.0.1", "version": "0.0.1",
"homepage": "https://abp.io", "homepage": "https://abp.io",
"repository": { "repository": {

2
npm/ng-packs/packages/account/config/src/enums/route-names.ts

@ -3,4 +3,6 @@ export const enum eAccountRouteNames {
Login = 'AbpAccount::Login', Login = 'AbpAccount::Login',
Register = 'AbpAccount::Register', Register = 'AbpAccount::Register',
ManageProfile = 'AbpAccount::MyAccount', ManageProfile = 'AbpAccount::MyAccount',
ForgotPassword = 'AbpAccount::ForgotPassword',
ResetPassword = 'AbpAccount::ResetPassword',
} }

4
npm/ng-packs/packages/account/config/src/providers/route.provider.ts

@ -38,13 +38,13 @@ export function configureRoutes(routes: RoutesService) {
{ {
path: '/account/forgot-password', path: '/account/forgot-password',
parentName: eAccountRouteNames.Account, parentName: eAccountRouteNames.Account,
name: 'AbpAccount::Forgot', name: eAccountRouteNames.ForgotPassword,
invisible: true, invisible: true,
}, },
{ {
path: '/account/reset-password', path: '/account/reset-password',
parentName: eAccountRouteNames.Account, parentName: eAccountRouteNames.Account,
name: 'AbpAccount::Reset', name: eAccountRouteNames.ResetPassword,
invisible: true, invisible: true,
}, },
]); ]);

1
npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/account-layout.component.ts

@ -1,6 +1,5 @@
import { AfterViewInit, Component } from '@angular/core'; import { AfterViewInit, Component } from '@angular/core';
import { eLayoutType, SubscriptionService } from '@abp/ng.core'; import { eLayoutType, SubscriptionService } from '@abp/ng.core';
import { LayoutService } from '../../services/layout.service'; import { LayoutService } from '../../services/layout.service';
@Component({ @Component({

2
npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/auth-wrapper/auth-wrapper.component.ts

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { AuthWrapperService } from '@abp/ng.account-core'; import { AuthWrapperService } from '@abp/ng.account.core';
@Component({ @Component({
selector: 'abp-auth-wrapper', selector: 'abp-auth-wrapper',

2
npm/ng-packs/packages/theme-basic/src/lib/components/account-layout/tenant-box/tenant-box.component.ts

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { TenantBoxService } from '@abp/ng.account-core'; import { TenantBoxService } from '@abp/ng.account.core';
@Component({ @Component({
selector: 'abp-tenant-box', selector: 'abp-tenant-box',

26
npm/ng-packs/packages/theme-basic/src/lib/services/layout.service.ts

@ -1,4 +1,4 @@
import { Injectable } from '@angular/core'; import { ChangeDetectorRef, Injectable } from '@angular/core';
import { eThemeBasicComponents } from '../enums'; import { eThemeBasicComponents } from '../enums';
import { SubscriptionService } from '@abp/ng.core'; import { SubscriptionService } from '@abp/ng.core';
import { fromEvent } from 'rxjs'; import { fromEvent } from 'rxjs';
@ -16,22 +16,18 @@ export class LayoutService {
navItemsComponentKey = eThemeBasicComponents.NavItems; navItemsComponentKey = eThemeBasicComponents.NavItems;
constructor(private subscription: SubscriptionService) {} constructor(private subscription: SubscriptionService, private cdRef: ChangeDetectorRef) {}
private checkWindowWidth() { private checkWindowWidth() {
setTimeout(() => { const isSmallScreen = window.innerWidth < 992;
if (window.innerWidth < 992) { if (isSmallScreen && this.smallScreen === false) {
if (this.smallScreen === false) { this.isCollapsed = false;
this.isCollapsed = false; setTimeout(() => {
setTimeout(() => { this.isCollapsed = true;
this.isCollapsed = true; }, 100);
}, 100); }
} this.smallScreen = isSmallScreen;
this.smallScreen = true; this.cdRef.detectChanges();
} else {
this.smallScreen = false;
}
}, 0);
} }
subscribeWindowSize() { subscribeWindowSize() {

2
npm/ng-packs/tsconfig.json

@ -25,8 +25,8 @@
"@abp/ng.components/page": ["packages/components/page/src/public-api.ts"], "@abp/ng.components/page": ["packages/components/page/src/public-api.ts"],
"@abp/ng.theme.basic": ["packages/theme-basic/src/public-api.ts"], "@abp/ng.theme.basic": ["packages/theme-basic/src/public-api.ts"],
"@abp/ng.account": ["packages/account/src/public-api.ts"], "@abp/ng.account": ["packages/account/src/public-api.ts"],
"@abp/ng.account-core": ["packages/account-core/src/public-api.ts"],
"@abp/ng.account/config": ["packages/account/config/src/public-api.ts"], "@abp/ng.account/config": ["packages/account/config/src/public-api.ts"],
"@abp/ng.account.core": ["packages/account-core/src/public-api.ts"],
"@abp/ng.identity": ["packages/identity/src/public-api.ts"], "@abp/ng.identity": ["packages/identity/src/public-api.ts"],
"@abp/ng.identity/config": ["packages/identity/config/src/public-api.ts"], "@abp/ng.identity/config": ["packages/identity/config/src/public-api.ts"],
"@abp/ng.tenant-management": ["packages/tenant-management/src/public-api.ts"], "@abp/ng.tenant-management": ["packages/tenant-management/src/public-api.ts"],

Loading…
Cancel
Save