bug fixed

This commit is contained in:
richard-loafle 2020-03-31 17:30:33 +09:00
parent 3a9ae7300f
commit 6935b9a69e
29 changed files with 1166 additions and 298 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
# compiled output
/dist
/pack
/tmp
/out-tsc
# Only exists if Bazel was run

View File

@ -3,6 +3,44 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"logger": {
"projectType": "library",
"root": "projects/logger",
"sourceRoot": "projects/logger/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/logger/tsconfig.lib.json",
"project": "projects/logger/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/logger/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/logger/src/test.ts",
"tsConfig": "projects/logger/tsconfig.spec.json",
"karmaConfig": "projects/logger/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/logger/tsconfig.lib.json",
"projects/logger/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
}
}
}
},
"core": {
"projectType": "library",
"root": "projects/core",

965
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,8 +6,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"clean:all": "rimraf dist/*",
"build:all": "npm-run-all -s clean:all build:core build:util:all build:api:all build:protocol:all build:native:all build:store:all build:ui:all build:ui-skin:all",
"build:all": "npm-run-all -s build:logger build:core build:util:all build:api:all build:protocol:all build:native:all build:store:all build:ui:all build:ui-skin:all",
"build:api:all": "npm-run-all -s build:api-common build:api-external build:api-message build:api-prompt build:api-public build:pi",
"build:api-common": "node ./scripts/build.js api-common",
"build:api-external": "node ./scripts/build.js api-external",
@ -16,6 +15,7 @@
"build:api-public": "node ./scripts/build.js api-public",
"build:pi": "node ./scripts/build.js pi",
"build:core": "node ./scripts/build.js core",
"build:logger": "node ./scripts/build.js logger",
"build:native:all": "npm-run-all -s build:native build:native-browser",
"build:native": "node ./scripts/build.js native",
"build:native-browser": "node ./scripts/build.js native-browser",
@ -50,7 +50,7 @@
"build:ui-authentication": "node ./scripts/build.js ui-authentication",
"build:ui-skin:all": "npm-run-all -s build:ui-skin-default",
"build:ui-skin-default": "node ./scripts/build.js ui-skin-default useScssBundle",
"publish:all": "npm-run-all -s publish:core publish:util:all publish:api:all publish:protocol:all publish:native:all publish:store:all publish:ui:all publish:ui-skin:all",
"publish:all": "npm-run-all -s publish:logger publish:core publish:util:all publish:api:all publish:protocol:all publish:native:all publish:store:all publish:ui:all publish:ui-skin:all",
"publish:api:all": "npm-run-all -s publish:api-common publish:api-external publish:api-message publish:api-prompt publish:api-public publish:pi",
"publish:api-common": "cd ./dist/api-common && npm publish",
"publish:api-external": "cd ./dist/api-external && npm publish",
@ -59,6 +59,7 @@
"publish:api-public": "cd ./dist/api-public && npm publish",
"publish:pi": "cd ./dist/pi && npm publish",
"publish:core": "cd ./dist/core && npm publish",
"publish:logger": "cd ./dist/logger && npm publish",
"publish:native:all": "npm-run-all -s publish:native publish:native-browser",
"publish:native": "cd ./dist/native && npm publish",
"publish:native-browser": "cd ./dist/native-browser && npm publish",
@ -134,43 +135,45 @@
"@ucap/api-prompt": "~0.0.1",
"@ucap/api-public": "~0.0.1",
"@ucap/core": "~0.0.1",
"@ucap/logger": "~0.0.2",
"@ucap/native": "~0.0.1",
"@ucap/native-browser": "~0.0.1",
"@ucap/ng-api-common": "file:dist/api-common/ucap-ng-api-common-0.0.1.tgz",
"@ucap/ng-api-external": "file:dist/api-external/ucap-ng-api-external-0.0.1.tgz",
"@ucap/ng-api-message": "file:dist/api-message/ucap-ng-api-message-0.0.1.tgz",
"@ucap/ng-api-prompt": "file:dist/api-prompt/ucap-ng-api-prompt-0.0.1.tgz",
"@ucap/ng-api-public": "file:dist/api-public/ucap-ng-api-public-0.0.1.tgz",
"@ucap/ng-core": "file:dist/core/ucap-ng-core-0.0.1.tgz",
"@ucap/ng-i18n": "file:dist/i18n/ucap-ng-i18n-0.0.1.tgz",
"@ucap/ng-native": "file:dist/native/ucap-ng-native-0.0.1.tgz",
"@ucap/ng-native-browser": "file:dist/native-browser/ucap-ng-native-browser-0.0.1.tgz",
"@ucap/ng-pi": "file:dist/pi/ucap-ng-pi-0.0.1.tgz",
"@ucap/ng-protocol": "file:dist/protocol/ucap-ng-protocol-0.0.1.tgz",
"@ucap/ng-protocol-authentication": "file:dist/protocol-authentication/ucap-ng-protocol-authentication-0.0.1.tgz",
"@ucap/ng-protocol-buddy": "file:dist/protocol-buddy/ucap-ng-protocol-buddy-0.0.1.tgz",
"@ucap/ng-protocol-event": "file:dist/protocol-event/ucap-ng-protocol-event-0.0.1.tgz",
"@ucap/ng-protocol-file": "file:dist/protocol-file/ucap-ng-protocol-file-0.0.1.tgz",
"@ucap/ng-protocol-group": "file:dist/protocol-group/ucap-ng-protocol-group-0.0.1.tgz",
"@ucap/ng-protocol-info": "file:dist/protocol-info/ucap-ng-protocol-info-0.0.1.tgz",
"@ucap/ng-protocol-inner": "file:dist/protocol-inner/ucap-ng-protocol-inner-0.0.1.tgz",
"@ucap/ng-protocol-option": "file:dist/protocol-option/ucap-ng-protocol-option-0.0.1.tgz",
"@ucap/ng-protocol-ping": "file:dist/protocol-ping/ucap-ng-protocol-ping-0.0.1.tgz",
"@ucap/ng-protocol-query": "file:dist/protocol-query/ucap-ng-protocol-query-0.0.1.tgz",
"@ucap/ng-protocol-room": "file:dist/protocol-room/ucap-ng-protocol-room-0.0.1.tgz",
"@ucap/ng-protocol-service": "file:dist/protocol-service/ucap-ng-protocol-service-0.0.1.tgz",
"@ucap/ng-protocol-status": "file:dist/protocol-status/ucap-ng-protocol-status-0.0.1.tgz",
"@ucap/ng-protocol-sync": "file:dist/protocol-sync/ucap-ng-protocol-sync-0.0.1.tgz",
"@ucap/ng-protocol-umg": "file:dist/protocol-umg/ucap-ng-protocol-umg-0.0.1.tgz",
"@ucap/ng-store-authentication": "file:dist/store-authentication/ucap-ng-store-authentication-0.0.2.tgz",
"@ucap/ng-store-chat": "file:dist/store-chat/ucap-ng-store-chat-0.0.3.tgz",
"@ucap/ng-store-group": "file:dist/store-group/ucap-ng-store-group-0.0.3.tgz",
"@ucap/ng-store-organization": "file:dist/store-organization/ucap-ng-store-organization-0.0.3.tgz",
"@ucap/ng-ui": "file:dist/ui/ucap-ng-ui-0.0.3.tgz",
"@ucap/ng-ui-authentication": "file:dist/ui-authentication/ucap-ng-ui-authentication-0.0.1.tgz",
"@ucap/ng-ui-organization": "file:dist/ui-organization/ucap-ng-ui-organization-0.0.1.tgz",
"@ucap/ng-ui-skin-default": "file:dist/ui-skin-default/ucap-ng-ui-skin-default-0.0.1.tgz",
"@ucap/ng-web-storage": "file:dist/web-storage/ucap-ng-web-storage-0.0.1.tgz",
"@ucap/ng-api-common": "file:pack/ucap-ng-api-common-0.0.1.tgz",
"@ucap/ng-api-external": "file:pack/ucap-ng-api-external-0.0.1.tgz",
"@ucap/ng-api-message": "file:pack/ucap-ng-api-message-0.0.1.tgz",
"@ucap/ng-api-prompt": "file:pack/ucap-ng-api-prompt-0.0.1.tgz",
"@ucap/ng-api-public": "file:pack/ucap-ng-api-public-0.0.1.tgz",
"@ucap/ng-core": "file:pack/ucap-ng-core-0.0.1.tgz",
"@ucap/ng-i18n": "file:pack/ucap-ng-i18n-0.0.4.tgz",
"@ucap/ng-logger": "file:pack/ucap-ng-logger-0.0.1.tgz",
"@ucap/ng-native": "file:pack/ucap-ng-native-0.0.1.tgz",
"@ucap/ng-native-browser": "file:pack/ucap-ng-native-browser-0.0.1.tgz",
"@ucap/ng-pi": "file:pack/ucap-ng-pi-0.0.1.tgz",
"@ucap/ng-protocol": "file:pack/ucap-ng-protocol-0.0.1.tgz",
"@ucap/ng-protocol-authentication": "file:pack/ucap-ng-protocol-authentication-0.0.1.tgz",
"@ucap/ng-protocol-buddy": "file:pack/ucap-ng-protocol-buddy-0.0.1.tgz",
"@ucap/ng-protocol-event": "file:pack/ucap-ng-protocol-event-0.0.1.tgz",
"@ucap/ng-protocol-file": "file:pack/ucap-ng-protocol-file-0.0.1.tgz",
"@ucap/ng-protocol-group": "file:pack/ucap-ng-protocol-group-0.0.1.tgz",
"@ucap/ng-protocol-info": "file:pack/ucap-ng-protocol-info-0.0.1.tgz",
"@ucap/ng-protocol-inner": "file:pack/ucap-ng-protocol-inner-0.0.1.tgz",
"@ucap/ng-protocol-option": "file:pack/ucap-ng-protocol-option-0.0.1.tgz",
"@ucap/ng-protocol-ping": "file:pack/ucap-ng-protocol-ping-0.0.1.tgz",
"@ucap/ng-protocol-query": "file:pack/ucap-ng-protocol-query-0.0.1.tgz",
"@ucap/ng-protocol-room": "file:pack/ucap-ng-protocol-room-0.0.1.tgz",
"@ucap/ng-protocol-service": "file:pack/ucap-ng-protocol-service-0.0.1.tgz",
"@ucap/ng-protocol-status": "file:pack/ucap-ng-protocol-status-0.0.1.tgz",
"@ucap/ng-protocol-sync": "file:pack/ucap-ng-protocol-sync-0.0.1.tgz",
"@ucap/ng-protocol-umg": "file:pack/ucap-ng-protocol-umg-0.0.1.tgz",
"@ucap/ng-store-authentication": "file:pack/ucap-ng-store-authentication-0.0.2.tgz",
"@ucap/ng-store-chat": "file:pack/ucap-ng-store-chat-0.0.3.tgz",
"@ucap/ng-store-group": "file:pack/ucap-ng-store-group-0.0.3.tgz",
"@ucap/ng-store-organization": "file:pack/ucap-ng-store-organization-0.0.3.tgz",
"@ucap/ng-ui": "file:pack/ucap-ng-ui-0.0.3.tgz",
"@ucap/ng-ui-authentication": "file:pack/ucap-ng-ui-authentication-0.0.5.tgz",
"@ucap/ng-ui-organization": "file:pack/ucap-ng-ui-organization-0.0.1.tgz",
"@ucap/ng-ui-skin-default": "file:pack/ucap-ng-ui-skin-default-0.0.1.tgz",
"@ucap/ng-web-storage": "file:pack/ucap-ng-web-storage-0.0.1.tgz",
"@ucap/pi": "~0.0.1",
"@ucap/protocol": "~0.0.1",
"@ucap/protocol-authentication": "~0.0.1",

View File

@ -5,7 +5,8 @@
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"i18next": "i18next",
"@ucap/core": "@ucap/core"
"@ucap/core": "@ucap/core",
"@ucap/ng-logger": "@ucap/ng-logger"
}
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@ucap/ng-i18n",
"version": "0.0.1",
"version": "0.0.4",
"publishConfig": {
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
},

View File

@ -1,3 +1,5 @@
import { InjectionToken } from '@angular/core';
export const _MODULE_CONFIG = new InjectionToken('@ucap/i18n config of module');
export const _MODULE_CONFIG = new InjectionToken(
'@ucap/ng-i18n config of module'
);

View File

@ -12,6 +12,8 @@ import i18next, {
StringMap
} from 'i18next';
import { LogService } from '@ucap/ng-logger';
import { I18nextEvents } from '../types/i18next.event';
@Injectable()
@ -61,7 +63,7 @@ export class I18nService implements OnDestroy {
// tslint:disable-next-line: variable-name
private _currentLng: string;
constructor() {
constructor(private logService: LogService) {
this.initialized$ = this.initializedSubject.asObservable().pipe(share());
this.loaded$ = this.loadedSubject.asObservable().pipe(share());
this.failedLoading$ = this.failedLoadingSubject
@ -110,12 +112,13 @@ export class I18nService implements OnDestroy {
this.subscribeEvents();
return i18next.init();
return i18next.init(options);
}
changeLanguage(lng: string) {
const self = this;
return new Promise<void>((resolve, reject) => {
if (lng === this.currentLng) {
if (lng === self.currentLng) {
resolve();
return;
}
@ -123,6 +126,7 @@ export class I18nService implements OnDestroy {
i18next
.changeLanguage(lng)
.then(v => {
self.logService.info('changeLanguage', lng);
resolve();
})
.catch(reason => {

24
projects/logger/README.md Normal file
View File

@ -0,0 +1,24 @@
# Logger
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.0.
## Code scaffolding
Run `ng generate component component-name --project logger` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project logger`.
> Note: Don't forget to add `--project logger` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build logger` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build logger`, go to the dist folder `cd dist/logger` and run `npm publish`.
## Running unit tests
Run `ng test logger` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@ -0,0 +1,32 @@
// 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-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/logger'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

View File

@ -0,0 +1,10 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/logger",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@ucap/logger": "@ucap/logger"
}
}
}

View File

@ -0,0 +1,13 @@
{
"name": "@ucap/ng-logger",
"version": "0.0.1",
"publishConfig": {
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
},
"peerDependencies": {
"@angular/common": "^9.1.0",
"@angular/core": "^9.1.0",
"@ucap/logger": "~0.0.1",
"tslib": "^1.10.0"
}
}

View File

@ -0,0 +1,8 @@
import { ModuleConfig as CoreModuleConfig } from '@ucap/core';
import { LoggerOptions, DestinationStream } from '@ucap/logger';
// tslint:disable-next-line: no-empty-interface
export interface ModuleConfig extends CoreModuleConfig {
optionsOrStream?: LoggerOptions | DestinationStream;
}

View File

@ -0,0 +1,5 @@
import { InjectionToken } from '@angular/core';
export const _MODULE_CONFIG = new InjectionToken(
'@ucap/ng-logger config of module'
);

View File

@ -0,0 +1,30 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ModuleConfig } from './config/module-config';
import { _MODULE_CONFIG } from './config/token';
import { LogService } from './services/log.service';
const SERVICES = [LogService];
@NgModule({
declarations: [],
imports: [],
exports: []
})
export class LoggerRootModule {}
@NgModule({
imports: [CommonModule]
})
export class LoggerModule {
public static forRoot(
config: ModuleConfig
): ModuleWithProviders<LoggerRootModule> {
return {
ngModule: LoggerRootModule,
providers: [{ provide: _MODULE_CONFIG, useValue: config }, ...SERVICES]
};
}
}

View File

@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { LogService } from './log.service';
describe('LogService', () => {
let service: LogService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(LogService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Injectable, Inject } from '@angular/core';
import { LogService as UCAPLogService } from '@ucap/logger';
import { _MODULE_CONFIG } from '../config/token';
import { ModuleConfig } from '../config/module-config';
@Injectable({
providedIn: 'root'
})
export class LogService extends UCAPLogService {
constructor(@Inject(_MODULE_CONFIG) moduleConfig: ModuleConfig) {
super(moduleConfig.optionsOrStream);
}
}

View File

@ -0,0 +1,7 @@
/*
* Public API Surface of logger
*/
export * from './lib/services/log.service';
export * from './lib/logger.module';

View File

@ -0,0 +1,26 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);

View File

@ -0,0 +1,23 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@ -0,0 +1,6 @@
{
"extends": "./tsconfig.lib.json",
"angularCompilerOptions": {
"enableIvy": false
}
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@ -0,0 +1,17 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"lib",
"kebab-case"
]
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@ucap/ng-ui-authentication",
"version": "0.0.1",
"version": "0.0.5",
"publishConfig": {
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
},

View File

@ -1,17 +1,12 @@
<div class="login-form">
<div
class="mat-title"
style="background-image: url(./assets/images/logo/bg_login_w160.png);"
>
{{ 'accounts.instructionsOfLogin' | ucapI18n }}
</div>
<div class="ucap-login-container">
<ng-content select="[ucapAuthenticationLogin='header']"></ng-content>
<form name="loginForm" [formGroup]="loginForm" novalidate>
<mat-form-field
[style.display]="!!curCompanyCode ? 'none' : 'block'"
class="login-company"
>
<mat-label>{{ 'accounts.fieldCompany' | ucapI18n }}</mat-label>
<mat-label>{{ 'login.fields.company' | ucapI18n }}</mat-label>
<mat-select [formControl]="companyCodeFormControl">
<mat-option
*ngFor="let company of companyList"
@ -37,7 +32,7 @@
</svg>
</span>
<mat-form-field class="login-id">
<mat-label>{{ 'accounts.fieldLoginId' | ucapI18n }}</mat-label>
<mat-label>{{ 'login.fields.loginId' | ucapI18n }}</mat-label>
<input matInput [formControl]="loginIdFormControl" />
</mat-form-field>
</div>
@ -72,7 +67,7 @@
</svg>
</span>
<mat-form-field class="login-pw">
<mat-label>{{ 'accounts.fieldLoginPw' | ucapI18n }}</mat-label>
<mat-label>{{ 'login.fields.loginPw' | ucapI18n }}</mat-label>
<input
matInput
type="password"
@ -89,21 +84,21 @@
companyCodeFormControl.hasError('required')
"
>
{{ 'accounts.errors.requireCompany' | ucapI18n }}
{{ 'login.errors.requireCompany' | ucapI18n }}
</mat-error>
<mat-error
*ngIf="
loginIdFormControl.dirty && loginIdFormControl.hasError('required')
"
>
{{ 'accounts.errors.requireLoginId' | ucapI18n }}
{{ 'login.errors.requireLoginId' | ucapI18n }}
</mat-error>
<mat-error
*ngIf="
loginPwFormControl.dirty && loginPwFormControl.hasError('required')
"
>
{{ 'accounts.errors.requireLoginPw' | ucapI18n }}
{{ 'login.errors.requireLoginPw' | ucapI18n }}
</mat-error>
</div>
@ -129,7 +124,7 @@
formControlName="rememberMe"
aria-label="Remember Me"
>
{{ 'accounts.rememberMe' | ucapI18n }}
{{ 'login.labels.rememberMe' | ucapI18n }}
</mat-checkbox>
<mat-checkbox
@ -138,21 +133,10 @@
formControlName="autoLogin"
aria-label="Auto Login"
>
{{ 'accounts.autoLogin' | ucapI18n }}
{{ 'login.labels.autoLogin' | ucapI18n }}
</mat-checkbox>
</div>
</form>
<div class="register" fxLayout="column" fxLayoutAlign="center center">
<div *ngIf="false">
<span class="text">Don't have an account?</span>
<a class="link">Forgot Password?</a>
<a class="link">Create an account</a>
</div>
</div>
<div class="policy" (click)="onClickNoti()">
<div class="icon-img"><i class="mid mdi-alarm-light"></i></div>
<a class="link">{{ !!notiText ? notiText : '개인정보 처리방침' }}</a>
</div>
<ng-content select="[ucapAuthenticationLogin='footer']"></ng-content>
</div>

View File

@ -24,7 +24,7 @@ $login-max-height: 800px;
}
}
.login-form {
.ucap-login-container {
position: relative;
transform: scale(1);
width: 100%;
@ -198,7 +198,7 @@ $login-max-height: 800px;
}
@include tab {
.login-form {
.ucap-login-container {
font-size: 0.9em;
.mat-title {
background-size: 90% auto;

View File

@ -4,7 +4,7 @@
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@ucap/ui": "@ucap/ui"
"@ucap/ng-ui": "@ucap/ng-ui"
}
}
}

View File

@ -3,7 +3,7 @@ const path = require('path');
const fse = require('fs-extra');
const { Bundler } = require('scss-bundle');
async function build() {
async function buildForProduction() {
const args = process.argv.slice(2);
const projectName = args[0];
const useScssBundle =
@ -12,13 +12,17 @@ async function build() {
const rootPath = path.join(__dirname, '..');
const projectPath = path.join(rootPath, 'projects', projectName);
const distPath = path.join(rootPath, 'dist', projectName);
const packPath = path.join(rootPath, 'pack');
let projectVersion;
let packFileName;
const ngBuild = () => {
return new Promise(async (resolve, reject) => {
try {
execSync(`ng build ${projectName} --prod`, { stdio: 'inherit' });
const projectVersion = require(path.join(distPath, 'package.json'))
.version;
packFileName = `ucap-ng-${projectName}-${projectVersion}.tgz`;
resolve();
} catch (error) {
reject(error);
@ -58,55 +62,26 @@ async function build() {
});
};
const npmPack = () => {
const installToLocal = () => {
return new Promise(async (resolve, reject) => {
try {
process.chdir(distPath);
execSync(`npm pack`, { stdio: 'inherit' });
projectVersion = require(path.join(distPath, 'package.json')).version;
fse.moveSync(
path.join(distPath, packFileName),
path.join(packPath, packFileName),
{
overwrite: true
}
);
process.chdir(path.join(rootPath));
resolve();
} catch (error) {
reject(error);
}
});
};
const installToLocal = () => {
return new Promise(async (resolve, reject) => {
try {
execSync(
`npm install -D ${path.join(
distPath,
`ucap-ng-${projectName}-${projectVersion}.tgz`
)}`,
{
stdio: 'inherit'
}
);
resolve();
} catch (error) {
reject(error);
}
});
};
const clean = () => {
return new Promise(async (resolve, reject) => {
try {
execSync(
`rimraf ${path.join(
distPath,
`ucap-ng-${projectName}-${projectVersion}.tgz`
)}`,
{
stdio: 'inherit'
}
);
execSync(`npm install -D ${path.join(packPath, packFileName)}`, {
stdio: 'inherit'
});
resolve();
} catch (error) {
@ -117,9 +92,7 @@ async function build() {
await ngBuild();
await scssBundle();
await npmPack();
await installToLocal();
await clean();
}
build();
buildForProduction();

View File

@ -23,6 +23,10 @@
"ui-skin-default": [
"dist/ui-skin-default/ui-skin-default",
"dist/ui-skin-default"
],
"logger": [
"dist/logger/logger",
"dist/logger"
]
}
},