project initialized

This commit is contained in:
richard-loafle 2020-03-27 17:39:01 +09:00
commit b39312afb8
664 changed files with 38721 additions and 0 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

46
.gitignore vendored Normal file
View File

@ -0,0 +1,46 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db

5
.prettierrc Normal file
View File

@ -0,0 +1,5 @@
{
"trailingComma": "none",
"tabWidth": 2,
"singleQuote": true
}

11
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"recommendations": [
"Angular.ng-template",
"msjsdiag.debugger-for-chrome",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-tslint-plugin",
"VisualStudioExptTeam.vscodeintellicode",
"nkokhelox.svg-font-previewer"
]
}

7
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,7 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}

14
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,14 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.autoClosingBrackets": "languageDefined",
"editor.trimAutoWhitespace": true,
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"files.watcherExclude": {
"**/dist": true
},
"debug.node.autoAttach": "on"
}

15
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build:main:dev",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

27
README.md Normal file
View File

@ -0,0 +1,27 @@
# MMessenger
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.3.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## 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).

1368
angular.json Normal file

File diff suppressed because it is too large Load Diff

16313
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

223
package.json Normal file
View File

@ -0,0 +1,223 @@
{
"name": "ucap-angular",
"version": "0.0.0",
"private": true,
"scripts": {
"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: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",
"build:api-message": "node ./scripts/build.js api-message",
"build:api-prompt": "node ./scripts/build.js api-prompt",
"build:api-public": "node ./scripts/build.js api-public",
"build:pi": "node ./scripts/build.js pi",
"build:core": "node ./scripts/build.js core",
"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",
"build:protocol:all": "npm-run-all -s build:protocol build:protocol-authentication build:protocol-buddy build:protocol-event build:protocol-file build:protocol-group build:protocol-status build:protocol-info build:protocol-inner build:protocol-option build:protocol-ping build:protocol-query build:protocol-room build:protocol-service build:protocol-sync build:protocol-umg",
"build:protocol": "node ./scripts/build.js protocol",
"build:protocol-authentication": "node ./scripts/build.js protocol-authentication",
"build:protocol-buddy": "node ./scripts/build.js protocol-buddy",
"build:protocol-event": "node ./scripts/build.js protocol-event",
"build:protocol-file": "node ./scripts/build.js protocol-file",
"build:protocol-group": "node ./scripts/build.js protocol-group",
"build:protocol-info": "node ./scripts/build.js protocol-info",
"build:protocol-inner": "node ./scripts/build.js protocol-inner",
"build:protocol-option": "node ./scripts/build.js protocol-option",
"build:protocol-ping": "node ./scripts/build.js protocol-ping",
"build:protocol-query": "node ./scripts/build.js protocol-query",
"build:protocol-room": "node ./scripts/build.js protocol-room",
"build:protocol-service": "node ./scripts/build.js protocol-service",
"build:protocol-status": "node ./scripts/build.js protocol-status",
"build:protocol-sync": "node ./scripts/build.js protocol-sync",
"build:protocol-umg": "node ./scripts/build.js protocol-umg",
"build:util:all": "npm-run-all -s build:web-storage build:i18n",
"build:web-storage": "node ./scripts/build.js web-storage",
"build:i18n": "node ./scripts/build.js i18n",
"build:store:all": "npm-run-all -s build:store-organization build:store-authentication build:store-group build:store-chat",
"build:store-authentication": "node ./scripts/build.js store-authentication",
"build:store-chat": "node ./scripts/build.js store-chat",
"build:store-group": "node ./scripts/build.js store-group",
"build:store-organization": "node ./scripts/build.js store-organization",
"build:ui:all": "npm-run-all -s build:ui build:ui-organization build:ui-authentication",
"build:ui": "node ./scripts/build.js ui",
"build:ui-organization": "node ./scripts/build.js ui-organization",
"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: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",
"publish:api-message": "cd ./dist/api-message && npm publish",
"publish:api-prompt": "cd ./dist/api-prompt && npm publish",
"publish:api-public": "cd ./dist/api-public && npm publish",
"publish:pi": "cd ./dist/pi && npm publish",
"publish:core": "cd ./dist/core && 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",
"publish:protocol:all": "npm-run-all -s publish:protocol publish:protocol-authentication publish:protocol-buddy publish:protocol-event publish:protocol-file publish:protocol-group publish:protocol-status publish:protocol-info publish:protocol-inner publish:protocol-option publish:protocol-ping publish:protocol-query publish:protocol-room publish:protocol-service publish:protocol-sync publish:protocol-umg",
"publish:protocol": "cd ./dist/protocol && npm publish",
"publish:protocol-authentication": "cd ./dist/protocol-authentication && npm publish",
"publish:protocol-buddy": "cd ./dist/protocol-buddy && npm publish",
"publish:protocol-event": "cd ./dist/protocol-event && npm publish",
"publish:protocol-file": "cd ./dist/protocol-file && npm publish",
"publish:protocol-group": "cd ./dist/protocol-group && npm publish",
"publish:protocol-info": "cd ./dist/protocol-info && npm publish",
"publish:protocol-inner": "cd ./dist/protocol-inner && npm publish",
"publish:protocol-option": "cd ./dist/protocol-option && npm publish",
"publish:protocol-ping": "cd ./dist/protocol-ping && npm publish",
"publish:protocol-query": "cd ./dist/protocol-query && npm publish",
"publish:protocol-room": "cd ./dist/protocol-room && npm publish",
"publish:protocol-service": "cd ./dist/protocol-service && npm publish",
"publish:protocol-status": "cd ./dist/protocol-status && npm publish",
"publish:protocol-sync": "cd ./dist/protocol-sync && npm publish",
"publish:protocol-umg": "cd ./dist/protocol-umg && npm publish",
"publish:util:all": "npm-run-all -s publish:web-storage publish:i18n",
"publish:web-storage": "cd ./dist/web-storage && npm publish",
"publish:i18n": "cd ./dist/i18n && npm publish",
"publish:store:all": "npm-run-all -s publish:store-organization publish:store-authentication publish:store-group publish:store-chat",
"publish:store-authentication": "cd ./dist/store-authentication && npm publish",
"publish:store-chat": "cd ./dist/store-chat && npm publish",
"publish:store-group": "cd ./dist/store-group && npm publish",
"publish:store-organization": "cd ./dist/store-organization && npm publish",
"publish:ui:all": "npm-run-all -s publish:ui publish:ui-organization publish:ui-authentication",
"publish:ui": "cd ./dist/ui && npm publish",
"publish:ui-organization": "cd ./dist/ui-organization && npm publish",
"publish:ui-authentication": "cd ./dist/ui-authentication && npm publish",
"publish:ui-skin:all": "npm-run-all -s publish:ui-skin-default",
"publish:ui-skin-default": "cd ./dist/ui-skin-default && npm publish",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"dependencies": {
"tslib": "^1.10.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.6",
"@angular-devkit/build-ng-packagr": "^0.900.6",
"@angular/animations": "^9.0.6",
"@angular/cdk": "^9.1.2",
"@angular/cli": "^9.0.6",
"@angular/common": "^9.0.6",
"@angular/compiler": "^9.0.6",
"@angular/compiler-cli": "^9.0.6",
"@angular/core": "^9.0.6",
"@angular/flex-layout": "^9.0.0-beta.29",
"@angular/forms": "^9.0.6",
"@angular/language-service": "^9.0.6",
"@angular/material": "^9.1.2",
"@angular/material-moment-adapter": "^9.1.2",
"@angular/platform-browser": "^9.0.6",
"@angular/platform-browser-dynamic": "^9.0.6",
"@angular/router": "^9.0.6",
"@ngrx/effects": "^9.0.0",
"@ngrx/entity": "^9.0.0",
"@ngrx/router-store": "^9.0.0",
"@ngrx/store": "^9.0.0",
"@ngrx/store-devtools": "^9.0.0",
"@types/jasmine": "^3.5.9",
"@types/jasminewd2": "~2.0.3",
"@types/moment-timezone": "^0.5.12",
"@types/node": "^12.12.30",
"@ucap/api": "~0.0.1",
"@ucap/api-common": "~0.0.1",
"@ucap/api-external": "~0.0.2",
"@ucap/api-message": "~0.0.1",
"@ucap/api-prompt": "~0.0.1",
"@ucap/api-public": "~0.0.1",
"@ucap/core": "~0.0.1",
"@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.2.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/pi": "~0.0.1",
"@ucap/protocol": "~0.0.1",
"@ucap/protocol-authentication": "~0.0.1",
"@ucap/protocol-buddy": "~0.0.1",
"@ucap/protocol-event": "~0.0.1",
"@ucap/protocol-file": "~0.0.1",
"@ucap/protocol-group": "~0.0.1",
"@ucap/protocol-info": "~0.0.1",
"@ucap/protocol-inner": "~0.0.1",
"@ucap/protocol-option": "~0.0.1",
"@ucap/protocol-ping": "~0.0.1",
"@ucap/protocol-query": "~0.0.1",
"@ucap/protocol-room": "~0.0.1",
"@ucap/protocol-service": "~0.0.1",
"@ucap/protocol-status": "~0.0.1",
"@ucap/protocol-sync": "~0.0.1",
"@ucap/protocol-umg": "~0.0.1",
"@ucap/web-socket": "~0.0.1",
"@ucap/web-storage": "~0.0.1",
"autolinker": "^3.13.0",
"axios": "^0.19.2",
"codelyzer": "^5.2.1",
"concurrently": "^5.1.0",
"fs-extra": "^9.0.0",
"i18next": "^19.3.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"libphonenumber-js": "^1.7.47",
"moment": "^2.24.0",
"moment-timezone": "^0.5.28",
"move-cli": "^1.2.1",
"ng-packagr": "^9.0.3",
"npm-run-all": "^4.1.5",
"protractor": "~5.4.3",
"rimraf": "^3.0.2",
"rxjs": "~6.5.4",
"scss-bundle": "^3.1.1",
"ts-node": "~8.3.0",
"tslib": "^1.11.1",
"tslint": "~5.18.0",
"typescript": "~3.7.5",
"webpack-bundle-analyzer": "^3.6.1",
"zone.js": "~0.10.2"
}
}

View File

@ -0,0 +1,25 @@
# UcapMMessengerApiCommon
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.2.
## Code scaffolding
Run `ng generate component component-name --project api-common` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project api-common`.
> Note: Don't forget to add `--project api-common` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build api-common` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build api-common`, go to the dist folder `cd dist/api-common` and run `npm publish`.
## Running unit tests
Run `ng test api-common` 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/api-common'),
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,11 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/api-common",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@ucap/api-common": "@ucap/api-common",
"@ucap/ng-core": "@ucap/ng-core"
}
}
}

View File

@ -0,0 +1,16 @@
{
"name": "@ucap/ng-api-common",
"version": "0.0.1",
"publishConfig": {
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
},
"peerDependencies": {
"@angular/common": "^9.0.2",
"@angular/core": "^9.0.2",
"@ucap/api-common": "~0.0.1",
"@ucap/ng-core": "~0.0.1",
"axios": "^0.19.2",
"rxjs": "~6.5.4",
"tslib": "^1.10.0"
}
}

View File

@ -0,0 +1,24 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { ModuleConfig } from '@ucap/api-common';
import { _MODULE_CONFIG } from './config/token';
import { CommonApiService } from './services/common-api.service';
const SERVICES = [CommonApiService];
@NgModule({})
export class CommonApiRootModule {}
@NgModule({})
export class CommonApiModule {
public static forRoot(
config: ModuleConfig
): ModuleWithProviders<CommonApiRootModule> {
return {
ngModule: CommonApiRootModule,
providers: [{ provide: _MODULE_CONFIG, useValue: config }, ...SERVICES]
};
}
}

View File

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

View File

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { CommonApiService } from './common-api.service';
describe('CommonApiService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: CommonApiService = TestBed.inject(CommonApiService);
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,24 @@
import { Injectable, Inject } from '@angular/core';
import { AxiosInstance } from 'axios';
import {
ModuleConfig,
CommonApiService as UcapCommonApiService
} from '@ucap/api-common';
import { AXIOS_INSTANCE } from '@ucap/ng-core';
import { _MODULE_CONFIG } from '../config/token';
@Injectable({
providedIn: 'root'
})
export class CommonApiService extends UcapCommonApiService {
constructor(
@Inject(_MODULE_CONFIG) moduleConfig: ModuleConfig,
@Inject(AXIOS_INSTANCE) axios: AxiosInstance
) {
super(moduleConfig, axios);
}
}

View File

@ -0,0 +1,7 @@
/*
* Public API Surface of api-common
*/
export * from './lib/services/common-api.service';
export * from './lib/common-api.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

@ -0,0 +1,24 @@
# ApiExternal
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.2.
## Code scaffolding
Run `ng generate component component-name --project api-external` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project api-external`.
> Note: Don't forget to add `--project api-external` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build api-external` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build api-external`, go to the dist folder `cd dist/api-external` and run `npm publish`.
## Running unit tests
Run `ng test api-external` 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/api-external'),
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,11 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/api-external",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@ucap/api-external": "@ucap/api-external",
"@ucap/ng-core": "@ucap/ng-core"
}
}
}

View File

@ -0,0 +1,16 @@
{
"name": "@ucap/ng-api-external",
"version": "0.0.1",
"publishConfig": {
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
},
"peerDependencies": {
"@angular/common": "^9.0.2",
"@angular/core": "^9.0.2",
"@ucap/api-external": "~0.0.1",
"@ucap/ng-core": "~0.0.1",
"axios": "^0.19.2",
"rxjs": "~6.5.4",
"tslib": "^1.10.0"
}
}

View File

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

View File

@ -0,0 +1,24 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { ModuleConfig } from '@ucap/api-external';
import { _MODULE_CONFIG } from './config/token';
import { ExternalApiService } from './services/external-api.service';
const SERVICES = [ExternalApiService];
@NgModule({})
export class ExternalApiRootModule {}
@NgModule({})
export class ExternalApiModule {
public static forRoot(
config: ModuleConfig
): ModuleWithProviders<ExternalApiRootModule> {
return {
ngModule: ExternalApiRootModule,
providers: [{ provide: _MODULE_CONFIG, useValue: config }, ...SERVICES]
};
}
}

View File

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { ExternalApiService } from './external-api.service';
describe('ExternalApiService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: ExternalApiService = TestBed.inject(ExternalApiService);
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,24 @@
import { Injectable, Inject } from '@angular/core';
import { AxiosInstance } from 'axios';
import {
ModuleConfig,
ExternalApiService as UcapExternalApiService
} from '@ucap/api-external';
import { AXIOS_INSTANCE } from '@ucap/ng-core';
import { _MODULE_CONFIG } from '../config/token';
@Injectable({
providedIn: 'root'
})
export class ExternalApiService extends UcapExternalApiService {
constructor(
@Inject(_MODULE_CONFIG) moduleConfig: ModuleConfig,
@Inject(AXIOS_INSTANCE) axios: AxiosInstance
) {
super(moduleConfig, axios);
}
}

View File

@ -0,0 +1,7 @@
/*
* Public API Surface of api-external
*/
export * from './lib/services/external-api.service';
export * from './lib/external-api.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

@ -0,0 +1,24 @@
# ApiMessage
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.2.
## Code scaffolding
Run `ng generate component component-name --project api-message` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project api-message`.
> Note: Don't forget to add `--project api-message` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build api-message` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build api-message`, go to the dist folder `cd dist/api-message` and run `npm publish`.
## Running unit tests
Run `ng test api-message` 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/api-message'),
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,11 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/api-message",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@ucap/api-message": "@ucap/api-message",
"@ucap/ng-core": "@ucap/ng-core"
}
}
}

View File

@ -0,0 +1,16 @@
{
"name": "@ucap/ng-api-message",
"version": "0.0.1",
"publishConfig": {
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
},
"peerDependencies": {
"@angular/common": "^9.0.2",
"@angular/core": "^9.0.2",
"@ucap/api-message": "~0.0.1",
"@ucap/ng-core": "~0.0.1",
"axios": "^0.19.2",
"rxjs": "~6.5.4",
"tslib": "^1.10.0"
}
}

View File

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

View File

@ -0,0 +1,24 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { ModuleConfig } from '@ucap/api-message';
import { _MODULE_CONFIG } from './config/token';
import { MessageApiService } from './services/message-api.service';
const SERVICES = [MessageApiService];
@NgModule({})
export class MessageApiRootModule {}
@NgModule({})
export class MessageApiModule {
public static forRoot(
config: ModuleConfig
): ModuleWithProviders<MessageApiRootModule> {
return {
ngModule: MessageApiRootModule,
providers: [{ provide: _MODULE_CONFIG, useValue: config }, ...SERVICES]
};
}
}

View File

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { MessageApiService } from './message-api.service';
describe('MessageApiService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: MessageApiService = TestBed.inject(MessageApiService);
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,24 @@
import { Injectable, Inject } from '@angular/core';
import { AxiosInstance } from 'axios';
import {
ModuleConfig,
MessageApiService as UcapMessageApiService
} from '@ucap/api-message';
import { AXIOS_INSTANCE } from '@ucap/ng-core';
import { _MODULE_CONFIG } from '../config/token';
@Injectable({
providedIn: 'root'
})
export class MessageApiService extends UcapMessageApiService {
constructor(
@Inject(_MODULE_CONFIG) moduleConfig: ModuleConfig,
@Inject(AXIOS_INSTANCE) axios: AxiosInstance
) {
super(moduleConfig, axios);
}
}

View File

@ -0,0 +1,7 @@
/*
* Public API Surface of api-message
*/
export * from './lib/services/message-api.service';
export * from './lib/message-api.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

@ -0,0 +1,24 @@
# ApiPrompt
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.2.
## Code scaffolding
Run `ng generate component component-name --project api-prompt` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project api-prompt`.
> Note: Don't forget to add `--project api-prompt` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build api-prompt` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build api-prompt`, go to the dist folder `cd dist/api-prompt` and run `npm publish`.
## Running unit tests
Run `ng test api-prompt` 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/api-prompt'),
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,11 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/api-prompt",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@ucap/api-prompt": "@ucap/api-prompt",
"@ucap/ng-core": "@ucap/ng-core"
}
}
}

View File

@ -0,0 +1,16 @@
{
"name": "@ucap/ng-api-prompt",
"version": "0.0.1",
"publishConfig": {
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
},
"peerDependencies": {
"@angular/common": "^9.0.2",
"@angular/core": "^9.0.2",
"@ucap/api-prompt": "~0.0.1",
"@ucap/ng-core": "~0.0.1",
"axios": "^0.19.2",
"rxjs": "~6.5.4",
"tslib": "^1.10.0"
}
}

View File

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

View File

@ -0,0 +1,25 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { ModuleConfig } from '@ucap/api-prompt';
import { _MODULE_CONFIG } from './config/token';
import { CallService } from './services/call.service';
import { ConferenceService } from './services/conference.service';
const SERVICES = [CallService, ConferenceService];
@NgModule({})
export class PromptApiRootModule {}
@NgModule({})
export class PromptApiModule {
public static forRoot(
config: ModuleConfig
): ModuleWithProviders<PromptApiRootModule> {
return {
ngModule: PromptApiRootModule,
providers: [{ provide: _MODULE_CONFIG, useValue: config }, ...SERVICES]
};
}
}

View File

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

View File

@ -0,0 +1,21 @@
import { Injectable, Inject } from '@angular/core';
import { AxiosInstance } from 'axios';
import { ModuleConfig, CallService as UcapCallService } from '@ucap/api-prompt';
import { AXIOS_INSTANCE } from '@ucap/ng-core';
import { _MODULE_CONFIG } from '../config/token';
@Injectable({
providedIn: 'root'
})
export class CallService extends UcapCallService {
constructor(
@Inject(_MODULE_CONFIG) moduleConfig: ModuleConfig,
@Inject(AXIOS_INSTANCE) axios: AxiosInstance
) {
super(moduleConfig, axios);
}
}

View File

@ -0,0 +1,17 @@
import { Injectable, Inject } from '@angular/core';
import {
ModuleConfig,
ConferenceService as UcapConferenceService
} from '@ucap/api-prompt';
import { _MODULE_CONFIG } from '../config/token';
@Injectable({
providedIn: 'root'
})
export class ConferenceService extends UcapConferenceService {
constructor(@Inject(_MODULE_CONFIG) moduleConfig: ModuleConfig) {
super(moduleConfig);
}
}

View File

@ -0,0 +1,8 @@
/*
* Public API Surface of api-prompt
*/
export * from './lib/services/call.service';
export * from './lib/services/conference.service';
export * from './lib/prompt-api.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

@ -0,0 +1,24 @@
# ApiPublic
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.2.
## Code scaffolding
Run `ng generate component component-name --project api-public` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project api-public`.
> Note: Don't forget to add `--project api-public` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build api-public` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build api-public`, go to the dist folder `cd dist/api-public` and run `npm publish`.
## Running unit tests
Run `ng test api-public` 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/api-public'),
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,11 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/api-public",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@ucap/api-public": "@ucap/api-public",
"@ucap/ng-core": "@ucap/ng-core"
}
}
}

View File

@ -0,0 +1,16 @@
{
"name": "@ucap/ng-api-public",
"version": "0.0.1",
"publishConfig": {
"registry": "http://10.81.13.221:8081/nexus/repository/npm-ucap/"
},
"peerDependencies": {
"@angular/common": "^9.0.2",
"@angular/core": "^9.0.2",
"@ucap/api-public": "~0.0.1",
"@ucap/ng-core": "~0.0.1",
"axios": "^0.19.2",
"rxjs": "~6.5.4",
"tslib": "^1.10.0"
}
}

View File

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

View File

@ -0,0 +1,24 @@
import { NgModule, ModuleWithProviders } from '@angular/core';
import { ModuleConfig } from '@ucap/api-public';
import { _MODULE_CONFIG } from './config/token';
import { PublicApiService } from './services/public-api.service';
const SERVICES = [PublicApiService];
@NgModule({})
export class PublicApiRootModule {}
@NgModule({})
export class PublicApiModule {
public static forRoot(
config: ModuleConfig
): ModuleWithProviders<PublicApiRootModule> {
return {
ngModule: PublicApiRootModule,
providers: [{ provide: _MODULE_CONFIG, useValue: config }, ...SERVICES]
};
}
}

View File

@ -0,0 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { PublicApiService } from './public-api.service';
describe('PublicApiService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: PublicApiService = TestBed.inject(PublicApiService);
expect(service).toBeTruthy();
});
});

View File

@ -0,0 +1,24 @@
import { Injectable, Inject } from '@angular/core';
import { AxiosInstance } from 'axios';
import {
ModuleConfig,
PublicApiService as UcapPublicApiService
} from '@ucap/api-public';
import { AXIOS_INSTANCE } from '@ucap/ng-core';
import { _MODULE_CONFIG } from '../config/token';
@Injectable({
providedIn: 'root'
})
export class PublicApiService extends UcapPublicApiService {
constructor(
@Inject(_MODULE_CONFIG) moduleConfig: ModuleConfig,
@Inject(AXIOS_INSTANCE) axios: AxiosInstance
) {
super(moduleConfig, axios);
}
}

View File

@ -0,0 +1,7 @@
/*
* Public API Surface of api-public
*/
export * from './lib/services/public-api.service';
export * from './lib/public-api.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"
]
}
}

25
projects/core/README.md Normal file
View File

@ -0,0 +1,25 @@
# UcapMMessengerCore
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.2.
## Code scaffolding
Run `ng generate component component-name --project core` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project core`.
> Note: Don't forget to add `--project core` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build core` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build core`, go to the dist folder `cd dist/core` and run `npm publish`.
## Running unit tests
Run `ng test core` 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/core'),
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/core",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@ucap/core": "@ucap/core"
}
}
}

View File

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

View File

@ -0,0 +1,5 @@
import { InjectionToken } from '@angular/core';
export const AXIOS_INSTANCE = new InjectionToken(
'@ucap/ng-core axios instance'
);

View File

@ -0,0 +1,172 @@
export interface StickerInfo {
index: string;
title: string;
iconPath: string;
iconPathOn: string;
useYn: boolean;
fileInfos: StickerFilesInfo[];
}
export interface StickerFilesInfo {
index: string;
path: string;
}
export const StickerMap: StickerInfo[] = [
{
index: '00',
title: 'History',
iconPath: 'sticker_cate00.png',
iconPathOn: 'sticker_cate00_f.png',
useYn: true,
fileInfos: []
},
{
index: '01',
title: '꼼므',
iconPath: 'sticker_cate01.png',
iconPathOn: 'sticker_cate01_f.png',
useYn: true,
fileInfos: [
{ index: '01_01', path: 'sticker_s_01_01.png' },
{ index: '01_02', path: 'sticker_s_01_02.png' },
{ index: '01_03', path: 'sticker_s_01_03.png' },
{ index: '01_04', path: 'sticker_s_01_04.png' },
{ index: '01_05', path: 'sticker_s_01_05.png' },
{ index: '01_06', path: 'sticker_s_01_06.png' },
{ index: '01_07', path: 'sticker_s_01_07.png' },
{ index: '01_08', path: 'sticker_s_01_08.png' }
]
},
{
index: '02',
title: '까미',
iconPath: 'sticker_cate02.png',
iconPathOn: 'sticker_cate02_f.png',
useYn: true,
fileInfos: [
{ index: '02_02', path: 'sticker_s_02_02.png' },
{ index: '02_03', path: 'sticker_s_02_03.png' },
{ index: '02_04', path: 'sticker_s_02_04.png' },
{ index: '02_05', path: 'sticker_s_02_05.png' },
{ index: '02_06', path: 'sticker_s_02_06.png' },
{ index: '02_07', path: 'sticker_s_02_07.png' },
{ index: '02_08', path: 'sticker_s_02_08.png' }
]
},
{
index: '03',
title: '왈도',
iconPath: 'sticker_cate03.png',
iconPathOn: 'sticker_cate03_f.png',
useYn: true,
fileInfos: [
{ index: '03_01', path: 'sticker_s_03_01.png' },
{ index: '03_02', path: 'sticker_s_03_02.png' },
{ index: '03_03', path: 'sticker_s_03_03.png' },
{ index: '03_04', path: 'sticker_s_03_04.png' },
{ index: '03_05', path: 'sticker_s_03_05.png' },
{ index: '03_06', path: 'sticker_s_03_06.png' },
{ index: '03_07', path: 'sticker_s_03_07.png' },
{ index: '03_08', path: 'sticker_s_03_08.png' }
]
},
{
index: '04',
title: '웅쓰',
iconPath: 'sticker_cate04.png',
iconPathOn: 'sticker_cate04_f.png',
useYn: true,
fileInfos: [
{ index: '04_01', path: 'sticker_s_04_01.png' },
{ index: '04_02', path: 'sticker_s_04_02.png' },
{ index: '04_03', path: 'sticker_s_04_03.png' },
{ index: '04_04', path: 'sticker_s_04_04.png' },
{ index: '04_05', path: 'sticker_s_04_05.png' },
{ index: '04_06', path: 'sticker_s_04_06.png' },
{ index: '04_07', path: 'sticker_s_04_07.png' },
{ index: '04_08', path: 'sticker_s_04_08.png' }
]
},
{
index: '05',
title: '말풍선',
iconPath: 'sticker_cate05.png',
iconPathOn: 'sticker_cate05_f.png',
useYn: true,
fileInfos: [
{ index: '05_01', path: 'sticker_s_05_01.png' },
{ index: '05_02', path: 'sticker_s_05_02.png' },
{ index: '05_03', path: 'sticker_s_05_03.png' },
{ index: '05_04', path: 'sticker_s_05_04.png' },
{ index: '05_05', path: 'sticker_s_05_05.png' },
{ index: '05_06', path: 'sticker_s_05_06.png' },
{ index: '05_07', path: 'sticker_s_05_07.png' },
{ index: '05_08', path: 'sticker_s_05_08.png' },
{ index: '05_09', path: 'sticker_s_05_09.png' },
{ index: '05_10', path: 'sticker_s_05_10.png' },
{ index: '05_11', path: 'sticker_s_05_11.png' },
{ index: '05_12', path: 'sticker_s_05_12.png' },
{ index: '05_13', path: 'sticker_s_05_13.png' },
{ index: '05_14', path: 'sticker_s_05_14.png' },
{ index: '05_15', path: 'sticker_s_05_15.png' },
{ index: '05_16', path: 'sticker_s_05_16.png' }
]
},
{
index: '12',
title: '황소',
iconPath: 'sticker_cate12.png',
iconPathOn: 'sticker_cate12_f.png',
useYn: true,
fileInfos: [
{ index: '12_01', path: 'sticker_s_12_01.gif' },
{ index: '12_02', path: 'sticker_s_12_02.gif' },
{ index: '12_03', path: 'sticker_s_12_03.gif' },
{ index: '12_04', path: 'sticker_s_12_04.gif' },
{ index: '12_05', path: 'sticker_s_12_05.gif' },
{ index: '12_06', path: 'sticker_s_12_06.gif' },
{ index: '12_07', path: 'sticker_s_12_07.gif' },
{ index: '12_08', path: 'sticker_s_12_08.gif' },
{ index: '12_09', path: 'sticker_s_12_09.gif' },
{ index: '12_10', path: 'sticker_s_12_10.gif' },
{ index: '12_11', path: 'sticker_s_12_11.gif' },
{ index: '12_12', path: 'sticker_s_12_12.gif' },
{ index: '12_13', path: 'sticker_s_12_13.gif' },
{ index: '12_14', path: 'sticker_s_12_14.gif' },
{ index: '12_15', path: 'sticker_s_12_15.gif' },
{ index: '12_16', path: 'sticker_s_12_16.gif' }
]
}
];
const ActiveAndOrdering: string[] = ['00', '01', '02', '03', '04', '05'];
export class StickerUtil {
static getStickerInfoList(): StickerInfo[] {
const rtnStickerList: StickerInfo[] = [];
ActiveAndOrdering.forEach(idx => {
const stickerInfos: StickerInfo[] = StickerMap.filter(
sticker => sticker.index === idx && sticker.useYn
);
if (!!stickerInfos && stickerInfos.length > 0) {
rtnStickerList.push(stickerInfos[0]);
}
});
return rtnStickerList;
}
static getStickerInfoSub(index: string): StickerFilesInfo[] {
const stickerFilesList: StickerFilesInfo[] = [];
const stickerInfos: StickerInfo[] = StickerMap.filter(
sticker => sticker.index === index && sticker.useYn
);
if (!!stickerInfos && stickerInfos.length > 0) {
stickerFilesList.concat(stickerInfos[0].fileInfos);
}
return stickerFilesList;
}
}

View File

@ -0,0 +1,16 @@
import { ValidatorFn, AbstractControl } from '@angular/forms';
import { StringUtil as UcapStringUtil } from '@ucap/core';
export class StringUtil extends UcapStringUtil {
public static checkSpecialCharacter(): ValidatorFn {
const fn = (control: AbstractControl): { [key: string]: any } | null => {
const forbidden = /[\{\}\[\]\/?.;:|\)*~`!^+<>@\#$%&\\\=\(\'\"]/g.test(
control.value
);
return forbidden ? { groupName: { value: control.value } } : null;
};
return fn;
}
}

View File

@ -0,0 +1,17 @@
export class WindowUtil {
public static popupOpen(
url: string,
title: string = 'Messenger',
width: number,
height: number
): void {
let optionStr = `frame=true,menubar=no,location=no,resizable=yes,scrollbars=yes,status=no`;
if (width > 0) {
optionStr += `,width=${width}`;
}
if (width > 0) {
optionStr += `,height=${height + 15}`;
}
open(url, title, optionStr);
}
}

View File

@ -0,0 +1,9 @@
/*
* Public API Surface of core
*/
export * from './lib/utils/sticker.util';
export * from './lib/utils/string.util';
export * from './lib/utils/window.util';
export * from './lib/config/token';

26
projects/core/src/test.ts Normal file
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,7 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [true, "attribute", "lib", "camelCase"],
"component-selector": [true, "element", "lib", "kebab-case"]
}
}

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

@ -0,0 +1,24 @@
# I18n
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.6.
## Code scaffolding
Run `ng generate component component-name --project i18n` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project i18n`.
> Note: Don't forget to add `--project i18n` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build i18n` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build i18n`, go to the dist folder `cd dist/i18n` and run `npm publish`.
## Running unit tests
Run `ng test i18n` 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/i18n'),
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,11 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/i18n",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"i18next": "i18next",
"@ucap/core": "@ucap/core"
}
}
}

View File

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

Some files were not shown because too many files have changed in this diff Show More