fix conflicts, add nrwl webpack peer dependencie, reformat code

This commit is contained in:
Dan Percic 2021-05-10 12:57:21 +03:00
parent 9822c4b023
commit f076bfd4dc
11 changed files with 64 additions and 45 deletions

View File

@ -1,5 +1,5 @@
import { Component, Injector, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Project, RuleSetModel, User } from '@redaction/red-ui-http';
import { Project, RuleSetModel } from '@redaction/red-ui-http';
import { AppStateService } from '@state/app-state.service';
import { UserService } from '@services/user.service';
import { DoughnutChartConfig } from '@shared/components/simple-doughnut-chart/simple-doughnut-chart.component';
@ -150,10 +150,6 @@ export class ProjectListingScreenComponent extends BaseListingComponent<ProjectW
this._fileChangedSub.unsubscribe();
}
getUser(id: string): User {
return this._userService.getUserById(id);
}
documentCount(project: ProjectWrapper) {
return project.files.length;
}

View File

@ -1,5 +1,5 @@
import { Component, HostListener, Injector, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
import { NavigationStart, Router } from '@angular/router';
import { NotificationService, NotificationType } from '@services/notification.service';
import { AppStateService } from '@state/app-state.service';
import { FileDropOverlayService } from '@upload-download/services/file-drop-overlay.service';

View File

@ -18,15 +18,13 @@ export class InitialsAvatarComponent implements OnChanges {
@Input() tooltipPosition: 'below' | 'above' = 'above';
displayName: string;
initials: string;
colorClass: string;
constructor(private readonly _userService: UserService, private readonly _translateService: TranslateService) {}
get hasBorder(): boolean {
return !!this.user && this._userService.userId !== this.userId && this._userService.isManager(this.user);
return !!this.user && !this._isCurrentUser && this._userService.isManager(this.user);
}
get disabled(): boolean {
@ -34,18 +32,17 @@ export class InitialsAvatarComponent implements OnChanges {
}
private get _colorClass() {
if (this._userService.userId === this.userId) {
return 'red-white';
}
if (this.disabled) {
return 'inactive';
}
if (this.color.includes('-')) {
return this.color;
}
if (this._isCurrentUser) return 'red-white';
if (this.disabled) return 'inactive';
if (this.color.includes('-')) return this.color;
return `${this.color}-dark`;
}
private get _isCurrentUser(): boolean {
return this.user && this._userService.userId === this.user.userId;
}
ngOnChanges(): void {
const isSystemUser = this.userId && this.userId.toLowerCase() === 'system';
if (isSystemUser) {
@ -81,24 +78,4 @@ export class InitialsAvatarComponent implements OnChanges {
.map((str) => str[0])
.join('');
}
private get _colorClass(): string {
if (this._isCurrentUser) return 'red-white';
if (this.disabled) return 'inactive';
if (this.color.includes('-')) return this.color;
return `${this.color}-dark`;
}
private get _isCurrentUser(): boolean {
return this.user && this._userService.userId === this.user.userId;
}
get hasBorder(): boolean {
return !!this.user && this._userService.userId !== this.userId && this._userService.isManager(this.user);
}
get disabled(): boolean {
return !this._userService.isActive(this.user);
}
}

View File

@ -6,7 +6,8 @@
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="2"></feGaussianBlur>
<feColorMatrix in="shadowBlurOuter1"
type="matrix" values="0 0 0 0 0.88627451 0 0 0 0 0.894117647 0 0 0 0 0.91372549 0 0 0 1 0"></feColorMatrix>
type="matrix"
values="0 0 0 0 0.88627451 0 0 0 0 0.894117647 0 0 0 0 0.91372549 0 0 0 1 0"></feColorMatrix>
</filter>
</defs>
<g fill="none" fill-rule="evenodd" id="Assignee" stroke="none" stroke-width="1">

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -8,7 +8,8 @@
<rect height="34" id="Rectangle" rx="17" width="34" x="0" y="0"></rect>
<g fill="currentColor"
fill-rule="nonzero"
id="status" transform="translate(17.000000, 17.000000) scale(-1, 1) translate(-17.000000, -17.000000) translate(10.000000, 10.000000)">
id="status"
transform="translate(17.000000, 17.000000) scale(-1, 1) translate(-17.000000, -17.000000) translate(10.000000, 10.000000)">
<polygon id="Path"
points="9.17 3.5 8.19 4.48 9.94 6.3 1.4 6.3 1.4 7.7 9.94 7.7 8.19 9.52 9.17 10.5 12.6 7"></polygon>
</g>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -6,7 +6,8 @@
<rect height="32" id="Rectangle" width="60" x="1087" y="718"></rect>
<g fill="currentColor"
fill-rule="nonzero"
id="right_white" transform="translate(1117.000000, 734.000000) scale(1, -1) translate(-1117.000000, -734.000000) translate(1109.000000, 726.000000)">
id="right_white"
transform="translate(1117.000000, 734.000000) scale(1, -1) translate(-1117.000000, -734.000000) translate(1109.000000, 726.000000)">
<polygon id="Path"
points="12 6.24 10.88 5.12 8 8 7.2 7.2 5.12 5.12 4 6.24 8 10.24"
transform="translate(8.000000, 7.680000) scale(1, -1) translate(-8.000000, -7.680000) "></polygon>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -10,7 +10,8 @@
<feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="6"></feGaussianBlur>
<feColorMatrix in="shadowBlurOuter1"
type="matrix" values="0 0 0 0 0.156862745 0 0 0 0 0.196078431 0 0 0 0 0.254901961 0 0 0 0.1428069 0"></feColorMatrix>
type="matrix"
values="0 0 0 0 0.156862745 0 0 0 0 0.196078431 0 0 0 0 0.254901961 0 0 0 0.1428069 0"></feColorMatrix>
</filter>
</defs>
<g fill="none" fill-rule="evenodd" id="File-Upload-&amp;-Download-Overlays" stroke="none" stroke-width="1">

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -10,7 +10,8 @@
<feOffset dx="0" dy="3" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="6"></feGaussianBlur>
<feColorMatrix in="shadowBlurOuter1"
type="matrix" values="0 0 0 0 0.156862745 0 0 0 0 0.196078431 0 0 0 0 0.254901961 0 0 0 0.1428069 0"></feColorMatrix>
type="matrix"
values="0 0 0 0 0.156862745 0 0 0 0 0.196078431 0 0 0 0 0.254901961 0 0 0 0.1428069 0"></feColorMatrix>
</filter>
</defs>
<g fill="none" fill-rule="evenodd" id="File-Upload-&amp;-Download-Overlays" stroke="none" stroke-width="1">
@ -38,7 +39,8 @@
</g>
<g fill="currentColor"
fill-rule="nonzero"
id="Group-6-Copy" transform="translate(347.000000, 23.000000) rotate(180.000000) translate(-347.000000, -23.000000) translate(332.000000, 8.000000)">
id="Group-6-Copy"
transform="translate(347.000000, 23.000000) rotate(180.000000) translate(-347.000000, -23.000000) translate(332.000000, 8.000000)">
<g id="status"
transform="translate(15.500000, 15.500000) rotate(90.000000) translate(-15.500000, -15.500000) translate(8.000000, 8.000000)">
<polygon id="Path"

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -6,7 +6,8 @@
<feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="2"></feGaussianBlur>
<feColorMatrix in="shadowBlurOuter1"
type="matrix" values="0 0 0 0 0.88627451 0 0 0 0 0.894117647 0 0 0 0 0.91372549 0 0 0 1 0"></feColorMatrix>
type="matrix"
values="0 0 0 0 0.88627451 0 0 0 0 0.894117647 0 0 0 0 0.91372549 0 0 0 1 0"></feColorMatrix>
</filter>
</defs>
<g fill="none" fill-rule="evenodd" id="File-attributes" stroke="none" stroke-width="1">

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -110,6 +110,7 @@
"superagent-promise": "^1.1.0",
"ts-jest": "26.5.6",
"ts-node": "9.1.1",
"webpack": "^4.18.1",
"typescript": "4.1.4"
}
}

View File

@ -5852,6 +5852,15 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.3.0:
memory-fs "^0.5.0"
tapable "^1.0.0"
enhanced-resolve@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec"
integrity sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==
dependencies:
graceful-fs "^4.1.2"
memory-fs "^0.5.0"
tapable "^1.0.0"
enquirer@^2.3.5, enquirer@^2.3.6, enquirer@~2.3.6:
version "2.3.6"
resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d"
@ -13729,6 +13738,35 @@ webpack@4.44.2:
watchpack "^1.7.4"
webpack-sources "^1.4.1"
webpack@^4.18.1:
version "4.46.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542"
integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==
dependencies:
"@webassemblyjs/ast" "1.9.0"
"@webassemblyjs/helper-module-context" "1.9.0"
"@webassemblyjs/wasm-edit" "1.9.0"
"@webassemblyjs/wasm-parser" "1.9.0"
acorn "^6.4.1"
ajv "^6.10.2"
ajv-keywords "^3.4.1"
chrome-trace-event "^1.0.2"
enhanced-resolve "^4.5.0"
eslint-scope "^4.0.3"
json-parse-better-errors "^1.0.2"
loader-runner "^2.4.0"
loader-utils "^1.2.3"
memory-fs "^0.4.1"
micromatch "^3.1.10"
mkdirp "^0.5.3"
neo-async "^2.6.1"
node-libs-browser "^2.2.1"
schema-utils "^1.0.0"
tapable "^1.1.3"
terser-webpack-plugin "^1.4.3"
watchpack "^1.7.4"
webpack-sources "^1.4.1"
websocket-driver@>=0.5.1, websocket-driver@^0.7.4:
version "0.7.4"
resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760"