newportsite 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/newportsite-1.1.3.tgz +0 -0
- package/ng-package.json +7 -0
- package/obfuscate.js +70 -0
- package/package.json +15 -0
- package/src/lib/app.component.ts +47 -0
- package/src/lib/app.routing.ts +38 -0
- package/src/lib/auth/alert.component.html +5 -0
- package/src/lib/auth/alert.component.ts +24 -0
- package/src/lib/auth/auth.component.html +1 -0
- package/src/lib/auth/auth.component.ts +10 -0
- package/src/lib/auth/auth.routes.ts +16 -0
- package/src/lib/auth/index.ts +4 -0
- package/src/lib/auth/login.component.html +87 -0
- package/src/lib/auth/login.component.ts +158 -0
- package/src/lib/auth/models/index.ts +1 -0
- package/src/lib/auth/models/user.ts +25 -0
- package/src/lib/auth/register.component.html +157 -0
- package/src/lib/auth/register.component.ts +219 -0
- package/src/lib/auth/services/alert.service.ts +47 -0
- package/src/lib/auth/services/auth.service.ts +28 -0
- package/src/lib/auth/services/index.ts +3 -0
- package/src/lib/auth/services/user.service.spec.ts +112 -0
- package/src/lib/auth/services/user.service.ts +47 -0
- package/src/lib/common/card.component.html +72 -0
- package/src/lib/common/card.component.ts +102 -0
- package/src/lib/common/commands.component.html +8 -0
- package/src/lib/common/commands.component.ts +42 -0
- package/src/lib/common/context.component.html +9 -0
- package/src/lib/common/context.component.ts +38 -0
- package/src/lib/common/grid.component.html +20 -0
- package/src/lib/common/grid.component.ts +747 -0
- package/src/lib/common/index.ts +9 -0
- package/src/lib/common/loader.component.html +5 -0
- package/src/lib/common/loader.component.ts +27 -0
- package/src/lib/common/lookup.component.html +29 -0
- package/src/lib/common/lookup.component.ts +115 -0
- package/src/lib/common/messagebox.component.html +39 -0
- package/src/lib/common/messagebox.component.ts +74 -0
- package/src/lib/common/theme-toggle.component.ts +139 -0
- package/src/lib/config.ts +62 -0
- package/src/lib/containers/default-layout/default-layout.component.html +191 -0
- package/src/lib/containers/default-layout/default-layout.component.ts +158 -0
- package/src/lib/containers/default-layout/index.ts +1 -0
- package/src/lib/containers/index.ts +1 -0
- package/src/lib/directives/component.draggable.ts +80 -0
- package/src/lib/directives/index.ts +2 -0
- package/src/lib/directives/input.directive.spec.ts +158 -0
- package/src/lib/directives/input.directive.ts +210 -0
- package/src/lib/home/dashboard/dashboard.component.html +38 -0
- package/src/lib/home/dashboard/dashboard.component.ts +50 -0
- package/src/lib/home/dashboard/index.ts +1 -0
- package/src/lib/home/index.component.html +1 -0
- package/src/lib/home/index.component.ts +10 -0
- package/src/lib/home/index.routes.ts +29 -0
- package/src/lib/home/index.ts +1 -0
- package/src/lib/home/info/index.ts +1 -0
- package/src/lib/home/info/info.component.css +476 -0
- package/src/lib/home/info/info.component.html +174 -0
- package/src/lib/home/info/info.component.ts +287 -0
- package/src/lib/home/model/article.component.html +10 -0
- package/src/lib/home/model/article.component.ts +50 -0
- package/src/lib/home/model/barchart.component.html +8 -0
- package/src/lib/home/model/barchart.component.ts +59 -0
- package/src/lib/home/model/index.ts +7 -0
- package/src/lib/home/model/itemdetail.component.html +25 -0
- package/src/lib/home/model/itemdetail.component.ts +93 -0
- package/src/lib/home/model/itemtab.component.html +25 -0
- package/src/lib/home/model/itemtab.component.ts +105 -0
- package/src/lib/home/model/model.component.html +121 -0
- package/src/lib/home/model/model.component.ts +510 -0
- package/src/lib/home/model/modeltoolbar.component.html +111 -0
- package/src/lib/home/model/modeltoolbar.component.ts +157 -0
- package/src/lib/home/model/navigation.component.html +86 -0
- package/src/lib/home/model/navigation.component.ts +247 -0
- package/src/lib/home/model/services/index.ts +1 -0
- package/src/lib/home/model/services/model.service.spec.ts +423 -0
- package/src/lib/home/model/services/model.service.ts +319 -0
- package/src/lib/home/modelsearch/index.ts +1 -0
- package/src/lib/home/modelsearch/modelsearch.component.html +124 -0
- package/src/lib/home/modelsearch/modelsearch.component.ts +453 -0
- package/src/lib/interfaces/data.interface.ts +131 -0
- package/src/lib/interfaces/index.ts +2 -0
- package/src/lib/interfaces/item.interface.ts +438 -0
- package/src/lib/players/lookup/lookup.directive.ts +6 -0
- package/src/lib/players/lookup/lookup.item.component.ts +37 -0
- package/src/lib/players/lookup/lookup.item.ts +9 -0
- package/src/lib/players/lookup/lookup.player.component.ts +59 -0
- package/src/lib/players/lookup/lookup.selector.component.ts +41 -0
- package/src/lib/players/model/model.directive.ts +6 -0
- package/src/lib/players/model/model.item.component.spec.ts +311 -0
- package/src/lib/players/model/model.item.component.ts +3457 -0
- package/src/lib/players/model/model.item.ts +9 -0
- package/src/lib/players/model/model.player.component.ts +109 -0
- package/src/lib/players/model/model.selector.component.ts +59 -0
- package/src/lib/scheduler/scheduler.component.html +13 -0
- package/src/lib/scheduler/scheduler.component.scss +6 -0
- package/src/lib/scheduler/scheduler.component.ts +296 -0
- package/src/lib/scheduler/scheduler.routes.ts +15 -0
- package/src/lib/scheduler/schedulerdialog.component.html +72 -0
- package/src/lib/scheduler/schedulerdialog.component.ts +208 -0
- package/src/lib/scheduler/services/scheduler.service.ts +133 -0
- package/src/lib/services/auth-state.service.ts +129 -0
- package/src/lib/services/auth.interceptor.spec.ts +144 -0
- package/src/lib/services/auth.interceptor.ts +44 -0
- package/src/lib/services/cache.service.spec.ts +143 -0
- package/src/lib/services/cache.service.ts +71 -0
- package/src/lib/services/global-error-handler.spec.ts +39 -0
- package/src/lib/services/global-error-handler.ts +28 -0
- package/src/lib/services/global.service.spec.ts +801 -0
- package/src/lib/services/global.service.ts +724 -0
- package/src/lib/services/message.service.ts +556 -0
- package/src/lib/services/theme.service.ts +96 -0
- package/src/lib/template/authtemplate.component.html +6 -0
- package/src/lib/template/authtemplate.component.ts +13 -0
- package/src/lib/template/basetemplate.component.html +7 -0
- package/src/lib/template/basetemplate.component.ts +13 -0
- package/src/lib/template/index.ts +3 -0
- package/src/lib/template/modeltemplate.component.html +7 -0
- package/src/lib/template/modeltemplate.component.ts +21 -0
- package/src/lib/utils/piva.spec.ts +56 -0
- package/src/lib/utils/piva.ts +29 -0
- package/src/lib/validators/email.validator.spec.ts +57 -0
- package/src/lib/validators/email.validator.ts +17 -0
- package/src/lib/validators/equalPasswords.validator.spec.ts +54 -0
- package/src/lib/validators/equalPasswords.validator.ts +17 -0
- package/src/lib/validators/index.ts +2 -0
- package/src/lib/version.ts +1 -0
- package/src/public-api.ts +64 -0
- package/src/typings.d.ts +2 -0
- package/tsconfig.lib.json +18 -0
- package/tsconfig.lib.prod.json +9 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
OnInit,
|
|
5
|
+
computed,
|
|
6
|
+
inject,
|
|
7
|
+
input,
|
|
8
|
+
output,
|
|
9
|
+
signal,
|
|
10
|
+
} from '@angular/core';
|
|
11
|
+
import {
|
|
12
|
+
trigger,
|
|
13
|
+
state,
|
|
14
|
+
style,
|
|
15
|
+
transition,
|
|
16
|
+
animate,
|
|
17
|
+
} from '@angular/animations';
|
|
18
|
+
import { GlobalService } from '../services/global.service';
|
|
19
|
+
import { AppMessageService } from '../services/message.service';
|
|
20
|
+
import { DataInterface, ItemState } from '../interfaces';
|
|
21
|
+
import { NgClass } from '@angular/common';
|
|
22
|
+
|
|
23
|
+
@Component({
|
|
24
|
+
selector: 'card',
|
|
25
|
+
templateUrl: './card.component.html',
|
|
26
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
+
animations: [
|
|
28
|
+
trigger('flipState', [
|
|
29
|
+
state(
|
|
30
|
+
'back',
|
|
31
|
+
style({
|
|
32
|
+
transform: 'rotateY(179deg)',
|
|
33
|
+
})
|
|
34
|
+
),
|
|
35
|
+
state(
|
|
36
|
+
'front',
|
|
37
|
+
style({
|
|
38
|
+
transform: 'rotateY(0)',
|
|
39
|
+
})
|
|
40
|
+
),
|
|
41
|
+
transition('front => back', animate('750ms ease-out')),
|
|
42
|
+
transition('back => front', animate('750ms ease-in')),
|
|
43
|
+
]),
|
|
44
|
+
],
|
|
45
|
+
imports: [NgClass],
|
|
46
|
+
})
|
|
47
|
+
export class CardComponent implements OnInit {
|
|
48
|
+
gsv = inject(GlobalService);
|
|
49
|
+
msg = inject(AppMessageService);
|
|
50
|
+
|
|
51
|
+
item = input.required<DataInterface>();
|
|
52
|
+
|
|
53
|
+
activate = output<string>();
|
|
54
|
+
delete = output<string>();
|
|
55
|
+
print = output<string>();
|
|
56
|
+
flipflop = output<string[]>();
|
|
57
|
+
|
|
58
|
+
itemState = ItemState;
|
|
59
|
+
printHidden = false;
|
|
60
|
+
summaryHidden = false;
|
|
61
|
+
|
|
62
|
+
flip = signal<'front' | 'back'>('front');
|
|
63
|
+
|
|
64
|
+
stateClass = computed(() => ({
|
|
65
|
+
'dot-success': this.item().state_id === this.itemState.Valid,
|
|
66
|
+
'triangle-error': this.item().state_id === this.itemState.Error,
|
|
67
|
+
'rectangle-warning': this.item().state_id === this.itemState.Warning,
|
|
68
|
+
}));
|
|
69
|
+
|
|
70
|
+
/** Lifecycle: resolves print and summary visibility from the project schema. */
|
|
71
|
+
ngOnInit() {
|
|
72
|
+
this.printHidden = !this.gsv
|
|
73
|
+
.getSchemaJson(this.gsv.getProject().project + '.' + this.gsv.getYear())
|
|
74
|
+
.entities.find((_: any) => _.printable)?.printable;
|
|
75
|
+
this.summaryHidden = !this.gsv.getProject().summary;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Flips the card between front and back face; emits the new state. */
|
|
79
|
+
toggleFlip(id: string | undefined): void {
|
|
80
|
+
if (!id) return;
|
|
81
|
+
this.flip.set(this.flip() === 'front' ? 'back' : 'front');
|
|
82
|
+
this.flipflop.emit([id, this.flip()]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Emits the activate event for the given record id. */
|
|
86
|
+
activateitem(id: string | undefined): void {
|
|
87
|
+
if (!id) return;
|
|
88
|
+
this.activate.emit(id);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Emits the delete event for the given record id. */
|
|
92
|
+
deleteitem(id: string | undefined): void {
|
|
93
|
+
if (!id) return;
|
|
94
|
+
this.delete.emit(id);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Emits the print event for the given record id. */
|
|
98
|
+
printitem(id: string | undefined): void {
|
|
99
|
+
if (!id) return;
|
|
100
|
+
this.print.emit(id);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
input,
|
|
6
|
+
model,
|
|
7
|
+
output,
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import { NgStyle } from '@angular/common';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'commands',
|
|
13
|
+
templateUrl: 'commands.component.html',
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
imports: [NgStyle],
|
|
16
|
+
})
|
|
17
|
+
export class CommandsComponent {
|
|
18
|
+
show = model(false);
|
|
19
|
+
text = input('');
|
|
20
|
+
title = input('');
|
|
21
|
+
width = input(0);
|
|
22
|
+
height = input(0);
|
|
23
|
+
top = input(0);
|
|
24
|
+
left = input(0);
|
|
25
|
+
commandsResult = output<any>();
|
|
26
|
+
|
|
27
|
+
contextStyle = computed(() => ({
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
top: this.top() + 'px',
|
|
30
|
+
left: this.left() + 'px',
|
|
31
|
+
width: this.width() + 'px',
|
|
32
|
+
height: this.height() + 'px',
|
|
33
|
+
fontWeight: 'bold',
|
|
34
|
+
pointerEvents: 'auto',
|
|
35
|
+
}));
|
|
36
|
+
|
|
37
|
+
/** Hides the commands overlay and emits the commandsResult event. */
|
|
38
|
+
click() {
|
|
39
|
+
this.show.set(false);
|
|
40
|
+
this.commandsResult.emit({});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
input,
|
|
6
|
+
model,
|
|
7
|
+
output,
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import { NgStyle } from '@angular/common';
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'context',
|
|
13
|
+
templateUrl: 'context.component.html',
|
|
14
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
+
imports: [NgStyle],
|
|
16
|
+
})
|
|
17
|
+
export class ContextComponent {
|
|
18
|
+
show = model(false);
|
|
19
|
+
mouseevent = input<MouseEvent | null>(null);
|
|
20
|
+
commands = input<string[] | null>(null);
|
|
21
|
+
raiseCommand = output<any>();
|
|
22
|
+
|
|
23
|
+
contextStyle = computed(() => {
|
|
24
|
+
const ev = this.mouseevent();
|
|
25
|
+
if (!ev) return {};
|
|
26
|
+
return {
|
|
27
|
+
position: 'absolute',
|
|
28
|
+
top: ev.clientY + 'px',
|
|
29
|
+
left: ev.clientX + 'px',
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** Hides the context menu and emits the selected command. */
|
|
34
|
+
onClick(command: string) {
|
|
35
|
+
this.show.set(false);
|
|
36
|
+
this.raiseCommand.emit({ value: command });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- section.component -->
|
|
2
|
+
<div [ngClass]="gridThemeClass()">
|
|
3
|
+
<ag-grid-angular
|
|
4
|
+
#agGrid
|
|
5
|
+
[defaultColDef]="defaultColDef"
|
|
6
|
+
[rowSelection]="rowSelection"
|
|
7
|
+
[gridOptions]="gridOptions"
|
|
8
|
+
[columnDefs]="columnDefs()"
|
|
9
|
+
[rowData]="rowData()"
|
|
10
|
+
(rowClicked)="onRowClicked($event)"
|
|
11
|
+
(rowDataChanged)="onRowDataChanged($event)"
|
|
12
|
+
(gridReady)="onGridReady($event)"
|
|
13
|
+
[pagination]="true"
|
|
14
|
+
[paginationAutoPageSize]="true"
|
|
15
|
+
[suppressPaginationPanel]="loading()!"
|
|
16
|
+
(filterChanged)="onFilterChanged($event)"
|
|
17
|
+
[localeText]="localeText">
|
|
18
|
+
</ag-grid-angular>
|
|
19
|
+
</div>
|
|
20
|
+
<!-- fine section.component -->
|