This commit is contained in:
Alexander Ziskind 2022-06-13 04:11:11 -05:00 коммит произвёл GitHub
Родитель 39f39a9365
Коммит 7ff61835e2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
39 изменённых файлов: 16552 добавлений и 11565 удалений

21
Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,21 @@
FROM node:16 AS frontend
WORKDIR /var/tmp
ADD package.json .
ADD package-lock.json .
RUN npm install
RUN npx ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points
ADD . .
RUN npm run build -- -c production
FROM nginx:stable
COPY --from=frontend /var/tmp/dist/rpstrackerng14 /usr/share/nginx/html
EXPOSE 80

Просмотреть файл

@ -1,10 +1,10 @@
# rpstrackerng
# Rpstrackerng14
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.1.4.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.0.1.
## 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.
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
## Code scaffolding
@ -12,7 +12,7 @@ Run `ng generate component component-name` to generate a new component. You can
## 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.
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
## Running unit tests
@ -20,8 +20,8 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
## 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).
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

Просмотреть файл

@ -3,76 +3,84 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"rpstrackerng": {
"rpstrackerng14": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/rpstrackerng",
"outputPath": "dist/rpstrackerng14",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
"src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "rpstrackerng:build"
},
"configurations": {
"production": {
"browserTarget": "rpstrackerng:build:production"
"browserTarget": "rpstrackerng14:build:production"
},
"development": {
"browserTarget": "rpstrackerng14:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "rpstrackerng:build"
"browserTarget": "rpstrackerng14:build"
}
},
"test": {
@ -80,60 +88,20 @@
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"rpstrackerng-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "rpstrackerng:serve"
},
"configurations": {
"production": {
"devServerTarget": "rpstrackerng:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
"styles": [
"src/styles.scss"
],
"scripts": []
}
}
}
}
},
"defaultProject": "rpstrackerng"
}
}

Просмотреть файл

@ -1,28 +0,0 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.e2e.json')
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};

Просмотреть файл

@ -1,14 +0,0 @@
import { AppPage } from './app.po';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to rpstrackerng!');
});
});

Просмотреть файл

@ -1,11 +0,0 @@
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
getTitleText() {
return element(by.css('app-root h1')).getText();
}
}

Просмотреть файл

@ -1,13 +0,0 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}

Просмотреть файл

@ -9,16 +9,28 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-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
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/rpstrackerng14'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
@ -26,6 +38,7 @@ module.exports = function (config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
singleRun: false,
restartOnFileChange: true
});
};
};

27267
package-lock.json сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,49 +1,39 @@
{
"name": "rpstrackerng",
"name": "rpstrackerng14",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"watch": "ng build --watch --configuration development",
"test": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "~11.2.0",
"@angular/common": "~11.2.0",
"@angular/compiler": "~11.2.0",
"@angular/core": "~11.2.0",
"@angular/forms": "~11.2.0",
"@angular/platform-browser": "~11.2.0",
"@angular/platform-browser-dynamic": "~11.2.0",
"@angular/router": "~11.2.0",
"@ng-bootstrap/ng-bootstrap": "^7.0.0",
"@angular/animations": "^14.0.0",
"@angular/common": "^14.0.0",
"@angular/compiler": "^14.0.0",
"@angular/core": "^14.0.0",
"@angular/forms": "^14.0.0",
"@angular/platform-browser": "^14.0.0",
"@angular/platform-browser-dynamic": "^14.0.0",
"@angular/router": "^14.0.0",
"bootstrap": "^4.2.1",
"core-js": "^2.5.4",
"rxjs": "~6.6.3",
"tslib": "^2.0.0",
"zone.js": "~0.10.2"
"rxjs": "^6.6.3",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1102.0",
"@angular/cli": "~11.2.0",
"@angular/compiler-cli": "~11.2.0",
"@angular/language-service": "~11.2.0",
"@types/node": "^12.11.1",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.1.1",
"@angular-devkit/build-angular": "^14.0.1",
"@angular/cli": "~14.0.1",
"@angular/compiler-cli": "^14.0.0",
"@types/jasmine": "~4.0.0",
"jasmine-core": "~4.1.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"tslint": "~6.1.0",
"typescript": "~4.0.7"
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"typescript": "~4.7.2"
}
}

Просмотреть файл

@ -19,7 +19,6 @@ const tempCurrentUser = {
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor(private store: Store) {
this.store.set<PtUser>('currentUser', tempCurrentUser);
}

Просмотреть файл

@ -1,4 +1,5 @@
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
@ -21,7 +22,8 @@ import { SharedModule } from './shared/shared.module';
CoreModule,
SharedModule,
DashboardModule,
BacklogModule
BacklogModule,
BrowserAnimationsModule,
],
providers: [],
bootstrap: [AppComponent]

Просмотреть файл

@ -5,18 +5,18 @@ export class StorageNsService {
setItem<T>(key: string, value: T): void {
const valueStr = JSON.stringify(value);
localStorage.setString(key, valueStr);
localStorage.setItem(key, valueStr);
}
getItem<T>(key: string): T | undefined {
const valueStr = localStorage.getString(key);
const valueStr = localStorage.getItem(key);
if (valueStr) {
return JSON.parse(valueStr);
}
}
removeItem(key: string): void {
localStorage.remove(key);
localStorage.removeItem(key);
}
key(keyIndex: number): string {

Просмотреть файл

Просмотреть файл

@ -55,23 +55,23 @@
<img [src]="selectedAssignee?.avatar" class="li-avatar rounded" />
<span>{{ itemForm.assigneeName }}</span>
<button class="btn btn-sm btn-outline-secondary" (click)="assigneePickerOpen(content)">Pick assignee</button>
<button class="btn btn-sm btn-outline-secondary" (click)="assigneePickerOpen('custom-modal-1')">Pick assignee</button>
</div>
</div>
</form>
<ng-template #content let-modal>
<custom-modal id="custom-modal-1">
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Select Assignee</h4>
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
<button type="button" class="close" aria-label="Close" (click)="closeModal('custom-modal-1')">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<ul class="list-group list-group-flush">
<li *ngFor="let user of users$ | async" class="list-group-item d-flex justify-content-between align-items-center"
(click)="modal.close(user)">
(click)="selectUser(user, 'custom-modal-1')">
<span>{{ user?.fullName }}</span>
<span class="badge ">
<img [src]="user?.avatar" class="li-avatar rounded mx-auto d-block" />
@ -82,4 +82,4 @@
<div class="modal-footer">
</div>
</ng-template>
</custom-modal>

Просмотреть файл

@ -7,11 +7,12 @@ import { PriorityEnum } from 'src/app/core/models/domain/enums';
import { ItemType, PT_ITEM_STATUSES, PT_ITEM_PRIORITIES } from 'src/app/core/constants';
import { Observable } from 'rxjs';
import { Store } from 'src/app/core/state/app-store';
import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap';
import { ModalService } from 'src/app/shared/services/modal.service';
@Component({
selector: 'app-item-details',
templateUrl: 'pt-item-details.component.html',
styleUrls: ['pt-item-details.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class PtItemDetailsComponent implements OnInit {
@ -35,7 +36,7 @@ export class PtItemDetailsComponent implements OnInit {
constructor(
private store: Store,
private modalService: NgbModal
private modalService: ModalService,
) { }
public ngOnInit() {
@ -55,17 +56,26 @@ export class PtItemDetailsComponent implements OnInit {
this.notifyUpdateItem();
}
public assigneePickerOpen(content: any) {
public assigneePickerOpen(id: string) {
this.usersRequested.emit();
this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
if (typeof result === 'object' && this.itemForm) {
this.selectedAssignee = result;
this.itemForm.assigneeName = (result as PtUser).fullName;
this.notifyUpdateItem();
}
}, (reason) => {
this.openModal(id);
}
});
public selectUser(selectedUser: PtUser, id: string) {
if (typeof selectedUser === 'object' && this.itemForm) {
this.selectedAssignee = selectedUser;
this.itemForm.assigneeName = (selectedUser as PtUser).fullName;
this.notifyUpdateItem();
}
this.closeModal(id);
}
openModal(id: string) {
this.modalService.open(id);
}
closeModal(id: string) {
this.modalService.close(id);
}
private notifyUpdateItem() {

Просмотреть файл

@ -4,7 +4,7 @@
<app-preset-filter></app-preset-filter>
<div class="btn-group mr-2">
<button type="button" (click)="onAddTap(content)" class="btn btn-sm btn-outline-secondary">Add</button>
<button type="button" (click)="onAddTap('custom-modal-1')" class="btn btn-sm btn-outline-secondary">Add</button>
</div>
</div>
@ -12,11 +12,10 @@
<app-list [items]="items$ | async" (listItemSelected)="selectListItem($event)"></app-list>
<ng-template #content let-modal>
<custom-modal id="custom-modal-1">
<div class="modal-header">
<h4 class="modal-title" id="modal-basic-title">Add New Item</h4>
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
<button type="button" class="close" aria-label="Close" (click)="closeModal('custom-modal-1')">
<span aria-hidden="true">&times;</span>
</button>
</div>
@ -48,8 +47,8 @@
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal" (click)="modal.dismiss('Cross click')">Close</button>
<button type="button" class="btn btn-primary" [disabled]="!newItem.title" (click)="modal.close(newItem)">Save
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal" (click)="closeModal('custom-modal-1')">Close</button>
<button type="button" class="btn btn-primary" [disabled]="!newItem.title" (click)="onSaveTap(newItem,'custom-modal-1')">Save
changes</button>
</div>
</ng-template>
</custom-modal>

Просмотреть файл

@ -7,11 +7,11 @@ import { NavigationService } from 'src/app/core/services';
import { BacklogService } from '../../services/backlog.service';
import { PtItem } from 'src/app/core/models/domain';
import { PresetType } from 'src/app/core/models/domain/types';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { PtNewItem } from 'src/app/shared/models/dto';
import { EMPTY_STRING } from 'src/app/core/helpers';
import { ItemType } from 'src/app/core/constants';
import { Store } from 'src/app/core/state/app-store';
import { ModalService } from 'src/app/shared/services/modal.service';
@Component({
selector: 'app-backlog',
@ -30,7 +30,7 @@ export class BacklogPageComponent implements OnInit {
private activatedRoute: ActivatedRoute,
private navigationService: NavigationService,
private backlogService: BacklogService,
private modalService: NgbModal,
private modalService: ModalService,
private store: Store
) { }
@ -63,19 +63,28 @@ export class BacklogPageComponent implements OnInit {
this.navigationService.navigate(['/detail', item.id]);
}
public onAddTap(content: any) {
this.modalService.open(content, { ariaLabelledBy: 'modal-basic-title' }).result.then((result) => {
if (typeof result === 'object') {
if (this.store.value.currentUser) {
this.backlogService.addNewPtItem(result, this.store.value.currentUser)
.then(nextItem => {
this.items$.next([nextItem, ...this.items$.value]);
});
}
this.resetModalFields();
}
}, (reason) => {
public onAddTap(id: string) {
this.openModal(id);
}
});
onSaveTap(newItem: PtNewItem, id: string) {
if (typeof newItem === 'object') {
if (this.store.value.currentUser) {
this.backlogService.addNewPtItem(newItem, this.store.value.currentUser)
.then(nextItem => {
this.items$.next([nextItem, ...this.items$.value]);
});
}
this.closeModal(id);
}
}
openModal(id: string) {
this.modalService.open(id);
}
closeModal(id: string) {
this.modalService.close(id);
this.resetModalFields();
}
}

Просмотреть файл

@ -128,7 +128,7 @@ export class BacklogService {
title: newTask.title,
completed: false,
dateCreated: new Date(),
dateModified: new Date()
dateModified: new Date(),
};
return new Promise<PtTask>((resolve, reject) => {
this.repo.insertPtTask(

Просмотреть файл

@ -68,11 +68,6 @@ export class DashboardPageComponent implements OnInit, OnDestroy {
});
}
public ngOnDestroy() {
if (this.sub) {
this.sub.unsubscribe();
}
}
private getDateRange(months: number): DateRange {
const now = new Date();
@ -83,4 +78,10 @@ export class DashboardPageComponent implements OnInit, OnDestroy {
dateEnd: now
};
}
public ngOnDestroy() {
if (this.sub) {
this.sub.unsubscribe();
}
}
}

Просмотреть файл

@ -4,6 +4,7 @@ import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment as env } from '../../../../environments/environment';
import { StatusCounts, PriorityCounts, TypeCounts } from '../models';
import { DashboardFilter } from 'src/app/shared/models/dto/stats/dashboard-filter';

Просмотреть файл

@ -0,0 +1,16 @@
<div class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<ng-content></ng-content>
</div>
</div>
</div>
<!--div class="custom-modal">
<div class="custom-modal-body">
<ng-content></ng-content>
</div>
</div-->
<div class="custom-modal-background"></div>

Просмотреть файл

@ -0,0 +1,35 @@
custom-modal {
display: none;
.custom-modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1000;
overflow: auto;
.custom-modal-body {
padding: 20px;
background: #fff;
margin: 40px;
}
}
.custom-modal-background {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #000;
opacity: 0.75;
z-index: 900;
}
}
body {
&.custom-modal-open {
overflow: hidden;
}
&.custom-modal-open .modal {
display: block;
}
}

Просмотреть файл

@ -0,0 +1,53 @@
import { Component, ViewEncapsulation, ElementRef, Input, OnInit, OnDestroy } from '@angular/core';
import { ModalService } from '../../services/modal.service';
@Component({
selector: 'custom-modal',
templateUrl: 'modal-dialog.component.html',
styleUrls: ['modal-dialog.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class ModalComponent implements OnInit, OnDestroy {
@Input() id: string;
private element: any;
constructor(private modalService: ModalService, private el: ElementRef) {
this.element = el.nativeElement;
}
ngOnInit(): void {
if (!this.id) {
console.error('modal must have an id');
return;
}
document.body.appendChild(this.element);
this.element.addEventListener('click', el => {
if (el.target.className === 'custom-modal') {
this.close();
}
});
this.modalService.add(this);
}
ngOnDestroy(): void {
this.modalService.remove(this.id);
this.element.remove();
}
open(): void {
this.element.style.display = 'block';
document.body.classList.add('custom-modal-open');
}
close(): void {
this.element.style.display = 'none';
document.body.classList.remove('custom-modal-open');
}
}

Просмотреть файл

@ -0,0 +1,24 @@
import { Injectable } from '@angular/core';
@Injectable({ providedIn: 'root' })
export class ModalService {
private modals: any[] = [];
add(modal: any) {
this.modals.push(modal);
}
remove(id: string) {
this.modals = this.modals.filter(x => x.id !== id);
}
open(id: string) {
const modal = this.modals.find(x => x.id === id);
modal.open();
}
close(id: string) {
const modal = this.modals.find(x => x.id === id);
modal.close();
}
}

Просмотреть файл

@ -3,27 +3,28 @@ import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { PresetFilterComponent } from './components/preset-filter/preset-filter.component';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { MainMenuComponent } from './components/main-menu/main-menu.component';
import { SideMenuComponent } from './components/side-menu/side-menu.component';
import { ModalComponent } from './components/modal-dialog/modal-dialog.component';
@NgModule({
imports: [
FormsModule,
RouterModule,
NgbModule
],
exports: [
FormsModule,
MainMenuComponent,
SideMenuComponent,
PresetFilterComponent,
NgbModule
ModalComponent,
],
declarations: [
MainMenuComponent,
SideMenuComponent,
PresetFilterComponent
PresetFilterComponent,
ModalComponent,
],
providers: [],
})

Просмотреть файл

@ -1,6 +1,6 @@
export const environment = {
production: true,
apiEndpoint: 'http://produrl.com/api/',
apiEndpoint: 'http://localhost:8080/api',
loggingEnabled: true,
loggingLevel: 'Debug'
};

Двоичные данные
src/favicon.ico

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 5.3 KiB

После

Ширина:  |  Высота:  |  Размер: 948 B

Просмотреть файл

@ -1,17 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>rpstrackerng</title>
<title>Rpstrackerng14</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>

Просмотреть файл

@ -8,8 +8,8 @@
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
* automatically update themselves. This includes recent versions of Safari, Chrome (including
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
@ -18,16 +18,6 @@
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
@ -35,7 +25,7 @@
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
@ -55,7 +45,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************

Просмотреть файл

Просмотреть файл

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

Просмотреть файл

@ -1,14 +0,0 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"files": [
"main.ts",
"polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}

Просмотреть файл

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

Просмотреть файл

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

15
tsconfig.app.json Normal file
Просмотреть файл

@ -0,0 +1,15 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}

Просмотреть файл

@ -1,24 +1,32 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"downlevelIteration": true,
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": false,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": false,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"module": "es2020",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"strict": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"target": "es2020",
"module": "es2020",
"lib": [
"es2018",
"es2020",
"dom"
]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": false
}
}

18
tsconfig.spec.json Normal file
Просмотреть файл

@ -0,0 +1,18 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
},
"files": [
"src/test.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}

Просмотреть файл

@ -1,130 +0,0 @@
{
"rulesDirectory": [
"codelyzer"
],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"deprecation": {
"severity": "warn"
},
"eofline": true,
"forin": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-misused-new": true,
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
true,
"single"
],
"radix": true,
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"no-output-on-prefix": true,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-output-rename": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
}
}