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": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@angular-builders/jest:run",
"options": {
"main": "packages/account-core/src/test.ts",
"tsConfig": "packages/account-core/tsconfig.spec.json",
"karmaConfig": "packages/account-core/karma.conf.js"
"tsConfig": "tsconfig.json",
"coverage": true,
"passWithNoTests": true
}
},
"lint": {
@ -575,9 +575,7 @@
"packages/account-core/tsconfig.lib.json",
"packages/account-core/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
"exclude": ["**/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",
"homepage": "https://abp.io",
"repository": {

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

@ -3,4 +3,6 @@ export const enum eAccountRouteNames {
Login = 'AbpAccount::Login',
Register = 'AbpAccount::Register',
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',
parentName: eAccountRouteNames.Account,
name: 'AbpAccount::Forgot',
name: eAccountRouteNames.ForgotPassword,
invisible: true,
},
{
path: '/account/reset-password',
parentName: eAccountRouteNames.Account,
name: 'AbpAccount::Reset',
name: eAccountRouteNames.ResetPassword,
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 { eLayoutType, SubscriptionService } from '@abp/ng.core';
import { LayoutService } from '../../services/layout.service';
@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 { AuthWrapperService } from '@abp/ng.account-core';
import { AuthWrapperService } from '@abp/ng.account.core';
@Component({
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 { TenantBoxService } from '@abp/ng.account-core';
import { TenantBoxService } from '@abp/ng.account.core';
@Component({
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 { SubscriptionService } from '@abp/ng.core';
import { fromEvent } from 'rxjs';
@ -16,22 +16,18 @@ export class LayoutService {
navItemsComponentKey = eThemeBasicComponents.NavItems;
constructor(private subscription: SubscriptionService) {}
constructor(private subscription: SubscriptionService, private cdRef: ChangeDetectorRef) {}
private checkWindowWidth() {
setTimeout(() => {
if (window.innerWidth < 992) {
if (this.smallScreen === false) {
this.isCollapsed = false;
setTimeout(() => {
this.isCollapsed = true;
}, 100);
}
this.smallScreen = true;
} else {
this.smallScreen = false;
}
}, 0);
const isSmallScreen = window.innerWidth < 992;
if (isSmallScreen && this.smallScreen === false) {
this.isCollapsed = false;
setTimeout(() => {
this.isCollapsed = true;
}, 100);
}
this.smallScreen = isSmallScreen;
this.cdRef.detectChanges();
}
subscribeWindowSize() {

2
npm/ng-packs/tsconfig.json

@ -25,8 +25,8 @@
"@abp/ng.components/page": ["packages/components/page/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-core": ["packages/account-core/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/config": ["packages/identity/config/src/public-api.ts"],
"@abp/ng.tenant-management": ["packages/tenant-management/src/public-api.ts"],

Loading…
Cancel
Save