angular-dumb-lib 0.0.5 → 0.0.8
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/esm2022/angular-dumb-lib.mjs +5 -0
- package/esm2022/lib/angular-dumb-lib.component.mjs +20 -0
- package/esm2022/lib/angular-dumb-lib.module.mjs +32 -0
- package/esm2022/lib/angular-dumb-lib.service.mjs +15 -0
- package/esm2022/lib/components/atoms/button/button.component.mjs +34 -0
- package/esm2022/lib/components/atoms/input/input.component.mjs +57 -0
- package/esm2022/lib/components/molecules/content-design/content-design.component.mjs +32 -0
- package/esm2022/lib/shared/enums/enum.mjs +69 -0
- package/esm2022/lib/shared/interfaces/interface.mjs +2 -0
- package/esm2022/public-api.mjs +10 -0
- package/fesm2022/angular-dumb-lib.mjs +243 -0
- package/fesm2022/angular-dumb-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/angular-dumb-lib.component.d.ts +5 -0
- package/lib/angular-dumb-lib.module.d.ts +9 -0
- package/lib/angular-dumb-lib.service.d.ts +6 -0
- package/lib/components/atoms/button/button.component.d.ts +12 -0
- package/lib/components/atoms/input/input.component.d.ts +19 -0
- package/lib/components/molecules/content-design/content-design.component.d.ts +12 -0
- package/lib/shared/enums/enum.d.ts +59 -0
- package/lib/shared/interfaces/interface.d.ts +58 -0
- package/package.json +16 -3
- package/{src/public-api.ts → public-api.d.ts} +1 -5
- package/ng-package.json +0 -7
- package/src/lib/angular-dumb-lib.component.spec.ts +0 -21
- package/src/lib/angular-dumb-lib.component.ts +0 -15
- package/src/lib/angular-dumb-lib.module.ts +0 -19
- package/src/lib/angular-dumb-lib.service.spec.ts +0 -16
- package/src/lib/angular-dumb-lib.service.ts +0 -9
- package/src/lib/components/atoms/button/button.component.html +0 -15
- package/src/lib/components/atoms/button/button.component.scss +0 -76
- package/src/lib/components/atoms/button/button.component.ts +0 -33
- package/src/lib/components/atoms/datetime-picker/datetime-picker.component.html +0 -7
- package/src/lib/components/atoms/datetime-picker/datetime-picker.component.scss +0 -24
- package/src/lib/components/atoms/datetime-picker/datetime-picker.component.ts +0 -59
- package/src/lib/components/atoms/file-selection/file-selection.component.html +0 -24
- package/src/lib/components/atoms/file-selection/file-selection.component.scss +0 -35
- package/src/lib/components/atoms/file-selection/file-selection.component.ts +0 -86
- package/src/lib/components/atoms/input/input.component.html +0 -28
- package/src/lib/components/atoms/input/input.component.scss +0 -64
- package/src/lib/components/atoms/input/input.component.ts +0 -57
- package/src/lib/components/atoms/loading/loading.component.html +0 -3
- package/src/lib/components/atoms/loading/loading.component.scss +0 -36
- package/src/lib/components/atoms/loading/loading.component.ts +0 -21
- package/src/lib/components/atoms/selection/selection.component.html +0 -38
- package/src/lib/components/atoms/selection/selection.component.scss +0 -65
- package/src/lib/components/atoms/selection/selection.component.ts +0 -84
- package/src/lib/components/atoms/slider/slider.component.html +0 -14
- package/src/lib/components/atoms/slider/slider.component.scss +0 -50
- package/src/lib/components/atoms/slider/slider.component.ts +0 -37
- package/src/lib/components/atoms/tags/tags.component.html +0 -25
- package/src/lib/components/atoms/tags/tags.component.scss +0 -58
- package/src/lib/components/atoms/tags/tags.component.ts +0 -62
- package/src/lib/components/molecules/cards/cards.component.html +0 -12
- package/src/lib/components/molecules/cards/cards.component.scss +0 -14
- package/src/lib/components/molecules/cards/cards.component.ts +0 -19
- package/src/lib/components/molecules/content-design/content-design.component.html +0 -14
- package/src/lib/components/molecules/content-design/content-design.component.scss +0 -68
- package/src/lib/components/molecules/content-design/content-design.component.ts +0 -32
- package/src/lib/components/molecules/form/form.component.html +0 -22
- package/src/lib/components/molecules/form/form.component.scss +0 -17
- package/src/lib/components/molecules/form/form.component.ts +0 -64
- package/src/lib/components/molecules/modal/modal.component.html +0 -16
- package/src/lib/components/molecules/modal/modal.component.scss +0 -83
- package/src/lib/components/molecules/modal/modal.component.ts +0 -48
- package/src/lib/components/molecules/paginator/paginator.component.html +0 -25
- package/src/lib/components/molecules/paginator/paginator.component.scss +0 -27
- package/src/lib/components/molecules/paginator/paginator.component.ts +0 -126
- package/src/lib/components/molecules/table/table.component.html +0 -45
- package/src/lib/components/molecules/table/table.component.scss +0 -169
- package/src/lib/components/molecules/table/table.component.ts +0 -40
- package/src/lib/components/pages/footer/footer.component.html +0 -32
- package/src/lib/components/pages/footer/footer.component.scss +0 -69
- package/src/lib/components/pages/footer/footer.component.ts +0 -16
- package/src/lib/components/pages/login/login.component.html +0 -10
- package/src/lib/components/pages/login/login.component.scss +0 -32
- package/src/lib/components/pages/login/login.component.ts +0 -32
- package/src/lib/components/pages/menu/menu.component.html +0 -18
- package/src/lib/components/pages/menu/menu.component.scss +0 -87
- package/src/lib/components/pages/menu/menu.component.ts +0 -26
- package/src/lib/components/pages/version/version.component.html +0 -3
- package/src/lib/components/pages/version/version.component.scss +0 -0
- package/src/lib/components/pages/version/version.component.ts +0 -28
- package/src/lib/shared/constants/constant.ts +0 -7
- package/src/lib/shared/enums/enum.ts +0 -68
- package/src/lib/shared/interfaces/interface.ts +0 -64
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
3
|
-
import { IButtonConfig, IDropdownOption, IInputConfig, IPaginator } from '../../../shared/interfaces/interface';
|
|
4
|
-
import { ButtonType, InputDirection } from '../../../shared/enums/enum';
|
|
5
|
-
import { ButtonComponent, InputComponent } from 'angular-dumb-lib';
|
|
6
|
-
import { SelectionComponent } from '../../atoms/selection/selection.component';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'app-paginator',
|
|
10
|
-
standalone: true,
|
|
11
|
-
templateUrl: './paginator.component.html',
|
|
12
|
-
styleUrls: ['./paginator.component.scss'],
|
|
13
|
-
imports: [CommonModule, ButtonComponent, SelectionComponent, InputComponent]
|
|
14
|
-
})
|
|
15
|
-
export class PaginatorComponent implements OnInit {
|
|
16
|
-
itemsPerPageList: IDropdownOption[] = [];
|
|
17
|
-
inputConfig: IInputConfig = {
|
|
18
|
-
label: 'Go to page',
|
|
19
|
-
direction: InputDirection.horizontal,
|
|
20
|
-
name: 'inputConfig',
|
|
21
|
-
required: false
|
|
22
|
-
}
|
|
23
|
-
previousButtonConfig: IButtonConfig = {
|
|
24
|
-
iconValue: 'chevron_left',
|
|
25
|
-
type: ButtonType.button,
|
|
26
|
-
isDisabled: true
|
|
27
|
-
}
|
|
28
|
-
nextButtonConfig: IButtonConfig = {
|
|
29
|
-
iconValue: 'chevron_right',
|
|
30
|
-
type: ButtonType.button,
|
|
31
|
-
isDisabled: false
|
|
32
|
-
}
|
|
33
|
-
numberOfPage: number = 0;
|
|
34
|
-
itemsPerPage: number = 0;
|
|
35
|
-
selectedPage: number = 0;
|
|
36
|
-
buttonType!: ButtonType;
|
|
37
|
-
inputDirection!: InputDirection;
|
|
38
|
-
|
|
39
|
-
@Input() totalRecords: number = 0;
|
|
40
|
-
|
|
41
|
-
@Output() paginator = new EventEmitter<IPaginator>();
|
|
42
|
-
|
|
43
|
-
constructor() {}
|
|
44
|
-
|
|
45
|
-
get pageNumbers(): number[] {
|
|
46
|
-
return Array.from({ length: this.numberOfPage }, (_, i) => i + 1);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
ngOnInit() {
|
|
50
|
-
this.itemsPerPageList = [
|
|
51
|
-
{
|
|
52
|
-
label: "3",
|
|
53
|
-
value: 1
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
label: "5",
|
|
57
|
-
value: 2
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
label: "20",
|
|
61
|
-
value: 3
|
|
62
|
-
}
|
|
63
|
-
];
|
|
64
|
-
this.selectedPage = 1;
|
|
65
|
-
this.buttonType = ButtonType.button;
|
|
66
|
-
this.inputDirection = InputDirection.horizontal;
|
|
67
|
-
this.itemsPerPage = parseInt(this.itemsPerPageList[0].label);
|
|
68
|
-
this.calculateNumberOfPage(this.totalRecords, this.itemsPerPage);
|
|
69
|
-
this.updateButtonConfigs();
|
|
70
|
-
this.emitPaging();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
ngOnChanges(): void {
|
|
74
|
-
this.calculateNumberOfPage(this.totalRecords, this.itemsPerPage);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
selectPage(i: number) {
|
|
78
|
-
this.selectedPage = i;
|
|
79
|
-
this.updateButtonConfigs();
|
|
80
|
-
this.emitPaging();
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
onChangeNumberOfPage(itemsPerPageId: string) {
|
|
84
|
-
this.selectedPage = 1;
|
|
85
|
-
this.itemsPerPage = parseInt(this.itemsPerPageList.find(i=> i.value === parseInt(itemsPerPageId))?.label??
|
|
86
|
-
this.itemsPerPage.toString());
|
|
87
|
-
|
|
88
|
-
this.calculateNumberOfPage(this.totalRecords, this.itemsPerPage);
|
|
89
|
-
this.updateButtonConfigs();
|
|
90
|
-
this.emitPaging();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
private emitPaging() {
|
|
94
|
-
let paging: IPaginator = {
|
|
95
|
-
itemsPerPage: this.itemsPerPage,
|
|
96
|
-
selectedPage: this.selectedPage
|
|
97
|
-
}
|
|
98
|
-
this.paginator.emit(paging);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
private calculateNumberOfPage (totalRecords: number, itemsPerPage: number): number {
|
|
102
|
-
return this.numberOfPage = Math.ceil(totalRecords/itemsPerPage);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
private updateButtonConfigs() {
|
|
106
|
-
// Re-assign the button configuration to trigger change detection
|
|
107
|
-
this.previousButtonConfig = {
|
|
108
|
-
...this.previousButtonConfig,
|
|
109
|
-
isDisabled: this.selectedPage <= 1
|
|
110
|
-
};
|
|
111
|
-
this.nextButtonConfig = {
|
|
112
|
-
...this.nextButtonConfig,
|
|
113
|
-
isDisabled: this.selectedPage >= this.numberOfPage
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Method to return config for page number buttons
|
|
118
|
-
getPageButtonConfig(page: number): IButtonConfig {
|
|
119
|
-
return {
|
|
120
|
-
label: page.toString(),
|
|
121
|
-
type: ButtonType.button,
|
|
122
|
-
isActive: page === this.selectedPage, // Set active state based on selectedPage
|
|
123
|
-
isDisabled: false // Page buttons are never disabled
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<div class="container-xl table-wrapper">
|
|
2
|
-
<div class="table-title">
|
|
3
|
-
<h2><b>{{tableName }}</b></h2>
|
|
4
|
-
</div>
|
|
5
|
-
<div class="loading-wrapper">
|
|
6
|
-
<ng-container *ngIf="!(loadingState | async); else loading; then table">
|
|
7
|
-
</ng-container>
|
|
8
|
-
</div>
|
|
9
|
-
<app-paginator [totalRecords] = "totalRecords" (paginator)="changePaginator($event)"></app-paginator>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<ng-template #loading>
|
|
13
|
-
<div class="loading-wrapper">
|
|
14
|
-
<app-loading></app-loading>
|
|
15
|
-
</div>
|
|
16
|
-
</ng-template>
|
|
17
|
-
|
|
18
|
-
<ng-template #table>
|
|
19
|
-
<ng-container *ngIf="totalRecords == 0; then emptyContent; else tableContent">
|
|
20
|
-
</ng-container>
|
|
21
|
-
</ng-template>
|
|
22
|
-
|
|
23
|
-
<ng-template #tableContent>
|
|
24
|
-
<p-table [value]="items" class="table table-striped table-hover">
|
|
25
|
-
<ng-template pTemplate="header">
|
|
26
|
-
<tr>
|
|
27
|
-
<th>
|
|
28
|
-
<ng-content select="[selectAllCheckbox]"></ng-content>
|
|
29
|
-
</th>
|
|
30
|
-
<ng-container *ngFor=" let col of columns">
|
|
31
|
-
<th>{{col.name }}</th>
|
|
32
|
-
</ng-container>
|
|
33
|
-
</tr>
|
|
34
|
-
</ng-template>
|
|
35
|
-
<ng-template pTemplate="body" let-item>
|
|
36
|
-
<ng-container [ngTemplateOutlet]="bodyTemplate" [ngTemplateOutletContext]="{item:item}"></ng-container>
|
|
37
|
-
</ng-template>
|
|
38
|
-
</p-table>
|
|
39
|
-
</ng-template>
|
|
40
|
-
|
|
41
|
-
<ng-template #emptyContent>
|
|
42
|
-
<div class="no-record-message">
|
|
43
|
-
<div>No records</div>
|
|
44
|
-
</div>
|
|
45
|
-
</ng-template>
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
width: 100%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
body {
|
|
6
|
-
color: #566787;
|
|
7
|
-
background: #f5f5f5;
|
|
8
|
-
font-family: 'Varela Round', sans-serif;
|
|
9
|
-
font-size: 13px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.table-responsive {
|
|
13
|
-
margin: 30px 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.table-wrapper {
|
|
17
|
-
background: #fff;
|
|
18
|
-
border-radius: 3px;
|
|
19
|
-
min-width: 1000px;
|
|
20
|
-
box-shadow: 0 1px 1px rgba(0,0,0,.05);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.table-title {
|
|
24
|
-
background: #435d7d;
|
|
25
|
-
color: #fff;
|
|
26
|
-
border-radius: 3px 3px 0 0;
|
|
27
|
-
padding: 0px 12px;
|
|
28
|
-
display: flex;
|
|
29
|
-
.table-name {
|
|
30
|
-
width: 70%;
|
|
31
|
-
};
|
|
32
|
-
.table-add {
|
|
33
|
-
width: 30%;
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
justify-content: flex-end;
|
|
37
|
-
a {
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
h2 {
|
|
42
|
-
font-size: 24px;
|
|
43
|
-
}
|
|
44
|
-
.btn-group {
|
|
45
|
-
float: right;
|
|
46
|
-
}
|
|
47
|
-
.btn {
|
|
48
|
-
color: #fff;
|
|
49
|
-
float: right;
|
|
50
|
-
font-size: 13px;
|
|
51
|
-
border: none;
|
|
52
|
-
min-width: 50px;
|
|
53
|
-
border-radius: 2px;
|
|
54
|
-
border: none;
|
|
55
|
-
outline: none !important;
|
|
56
|
-
margin-left: 10px;
|
|
57
|
-
i {
|
|
58
|
-
float: left;
|
|
59
|
-
font-size: 21px;
|
|
60
|
-
margin-right: 5px;
|
|
61
|
-
}
|
|
62
|
-
span {
|
|
63
|
-
float: left;
|
|
64
|
-
margin-top: 2px;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
::ng-deep .table tr th, ::ng-deep .table tr td {
|
|
70
|
-
border-color: #e9e9e9;
|
|
71
|
-
padding: 12px 15px;
|
|
72
|
-
vertical-align: middle;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
::ng-deep .table tr th:first-child {
|
|
76
|
-
width: 60px;
|
|
77
|
-
display: flex;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
::ng-deep .table tr th:last-child {
|
|
81
|
-
width: 150px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
table.table-striped tbody tr:nth-of-type(odd) {
|
|
85
|
-
background-color: #fcfcfc;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
table.table-striped.table-hover tbody tr:hover {
|
|
89
|
-
background: #f5f5f5;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
::ng-deep .table th {
|
|
93
|
-
text-align: left;
|
|
94
|
-
i {
|
|
95
|
-
font-size: 13px;
|
|
96
|
-
margin: 0 5px;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
::ng-deep .table td:last-child i {
|
|
103
|
-
opacity: 0.9;
|
|
104
|
-
font-size: 22px;
|
|
105
|
-
margin: 0 5px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
::ng-deep .table td a {
|
|
109
|
-
font-weight: bold;
|
|
110
|
-
color: #566787;
|
|
111
|
-
display: inline-block;
|
|
112
|
-
text-decoration: none;
|
|
113
|
-
outline: none !important;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.hint-text {
|
|
117
|
-
float: left;
|
|
118
|
-
margin-top: 10px;
|
|
119
|
-
font-size: 13px;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.no-record-message {
|
|
123
|
-
width: 100%;
|
|
124
|
-
display: flex;
|
|
125
|
-
flex-direction: column;
|
|
126
|
-
align-items: center;
|
|
127
|
-
justify-content: center;
|
|
128
|
-
height: 100%;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.excel {
|
|
132
|
-
display: flex;
|
|
133
|
-
a {
|
|
134
|
-
display: inline-flex;
|
|
135
|
-
align-items: center;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.loading-wrapper {
|
|
140
|
-
height: calc(100vh - 220px);
|
|
141
|
-
display: flex;
|
|
142
|
-
flex-direction: column;
|
|
143
|
-
width: 100%;
|
|
144
|
-
overflow-y: auto; /* Scroll vertically when content overflows */
|
|
145
|
-
overflow-x: hidden; /* Hide horizontal scrollbar */
|
|
146
|
-
|
|
147
|
-
/* Custom Scrollbar for WebKit-based Browsers */
|
|
148
|
-
&::-webkit-scrollbar {
|
|
149
|
-
width: 12px; /* Adjusted width for a more standard look */
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
&::-webkit-scrollbar-track {
|
|
153
|
-
background: #f1f1f1; /* Light gray background for the track */
|
|
154
|
-
border-radius: 10px; /* Rounded corners for the track */
|
|
155
|
-
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for a polished look */
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&::-webkit-scrollbar-thumb {
|
|
159
|
-
background: #888; /* Neutral gray color for the thumb */
|
|
160
|
-
border-radius: 10px; /* Rounded corners for the thumb */
|
|
161
|
-
border: 3px solid #f1f1f1; /* Creates a gap between the thumb and track */
|
|
162
|
-
transition: background 0.3s; /* Smooth transition for hover effect */
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
166
|
-
background: #555; /* Darker gray for the thumb on hover */
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Component, ContentChild, EventEmitter, Input, OnInit, Output, TemplateRef } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { IDataColumnConfig, IPaginator } from '../../../shared/interfaces/interface';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { TableModule} from 'primeng/table';
|
|
6
|
-
import { LoadingComponent } from '../../atoms/loading/loading.component';
|
|
7
|
-
import { PaginatorComponent } from '../paginator/paginator.component';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'app-table',
|
|
11
|
-
standalone: true,
|
|
12
|
-
templateUrl: './table.component.html',
|
|
13
|
-
styleUrls: ['./table.component.scss'],
|
|
14
|
-
imports: [CommonModule, TableModule, LoadingComponent, PaginatorComponent]
|
|
15
|
-
})
|
|
16
|
-
export class TableComponent<T> implements OnInit {
|
|
17
|
-
@Input() items: T[] = [];
|
|
18
|
-
@Input() columns: IDataColumnConfig[] = [];
|
|
19
|
-
@Input() totalRecords: number = 0;
|
|
20
|
-
@Input() tableName: string = '';
|
|
21
|
-
@Input() loadingState!: Observable<boolean>;
|
|
22
|
-
|
|
23
|
-
@Output() paginator = new EventEmitter<IPaginator>()
|
|
24
|
-
|
|
25
|
-
@ContentChild('bodyTemplate') bodyTemplate!: TemplateRef<any>;
|
|
26
|
-
|
|
27
|
-
allSelected = false;
|
|
28
|
-
|
|
29
|
-
constructor(private cdRef: ChangeDetectorRef) { }
|
|
30
|
-
|
|
31
|
-
ngOnInit() {
|
|
32
|
-
this.loadingState.subscribe(() => {
|
|
33
|
-
this.cdRef.detectChanges(); // Explicitly mark for change detection
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
changePaginator(paging: IPaginator) {
|
|
38
|
-
this.paginator.emit(paging);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<footer class="footer">
|
|
2
|
-
<div class="footer-container">
|
|
3
|
-
<div class="footer-section">
|
|
4
|
-
<h3>About Us</h3>
|
|
5
|
-
<p>We are a company dedicated to providing excellent services and products to our customers.</p>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<div class="footer-section">
|
|
9
|
-
<h3>Quick Links</h3>
|
|
10
|
-
<ul>
|
|
11
|
-
<li><a href="#">Home</a></li>
|
|
12
|
-
<li><a href="#">Services</a></li>
|
|
13
|
-
<li><a href="#">Contact</a></li>
|
|
14
|
-
<li><a href="#">Privacy Policy</a></li>
|
|
15
|
-
</ul>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<div class="footer-section">
|
|
19
|
-
<h3>Follow Us</h3>
|
|
20
|
-
<div class="social-icons">
|
|
21
|
-
<a href="#" aria-label="Facebook"><i class="fab fa-facebook-f"></i></a>
|
|
22
|
-
<a href="#" aria-label="Twitter"><i class="fab fa-twitter"></i></a>
|
|
23
|
-
<a href="#" aria-label="Instagram"><i class="fab fa-instagram"></i></a>
|
|
24
|
-
<a href="#" aria-label="LinkedIn"><i class="fab fa-linkedin-in"></i></a>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<div class="footer-bottom">
|
|
30
|
-
<p>© 2024 Your Company. All Rights Reserved.</p>
|
|
31
|
-
</div>
|
|
32
|
-
</footer>
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
.footer {
|
|
2
|
-
background-color: #333;
|
|
3
|
-
color: #fff;
|
|
4
|
-
padding: 20px 0;
|
|
5
|
-
text-align: center;
|
|
6
|
-
font-family: 'Roboto', sans-serif;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.footer-container {
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: space-around;
|
|
12
|
-
flex-wrap: wrap;
|
|
13
|
-
max-width: 1200px;
|
|
14
|
-
margin: 0 auto;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.footer-section {
|
|
18
|
-
flex: 1;
|
|
19
|
-
margin: 15px;
|
|
20
|
-
min-width: 200px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.footer-section h3 {
|
|
24
|
-
margin-bottom: 15px;
|
|
25
|
-
font-size: 18px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.footer-section p,
|
|
29
|
-
.footer-section ul,
|
|
30
|
-
.footer-section a {
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
color: #ccc;
|
|
33
|
-
text-decoration: none;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.footer-section ul {
|
|
37
|
-
list-style: none;
|
|
38
|
-
padding: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.footer-section ul li {
|
|
42
|
-
margin: 5px 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.footer-section ul li a:hover {
|
|
46
|
-
color: #fff;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.social-icons {
|
|
50
|
-
margin-top: 10px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.social-icons a {
|
|
54
|
-
display: inline-block;
|
|
55
|
-
color: #ccc;
|
|
56
|
-
margin: 0 10px;
|
|
57
|
-
font-size: 20px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.social-icons a:hover {
|
|
61
|
-
color: #fff;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.footer-bottom {
|
|
65
|
-
margin-top: 20px;
|
|
66
|
-
border-top: 1px solid #444;
|
|
67
|
-
padding-top: 10px;
|
|
68
|
-
font-size: 12px;
|
|
69
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'app-footer',
|
|
5
|
-
standalone: true,
|
|
6
|
-
templateUrl: './footer.component.html',
|
|
7
|
-
styleUrls: ['./footer.component.scss']
|
|
8
|
-
})
|
|
9
|
-
export class FooterComponent implements OnInit {
|
|
10
|
-
|
|
11
|
-
constructor() { }
|
|
12
|
-
|
|
13
|
-
ngOnInit() {
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.login-button {
|
|
2
|
-
width: 100%;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
display: flex;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.login-page {
|
|
9
|
-
height: 100%;
|
|
10
|
-
width: 100%;
|
|
11
|
-
flex-direction: row;
|
|
12
|
-
display: flex;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.icon-area {
|
|
16
|
-
width: 38%;
|
|
17
|
-
background-color: #2a76d7;
|
|
18
|
-
height: 100%;
|
|
19
|
-
display: flex;;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.icon {
|
|
23
|
-
width: 100%;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
display: flex;
|
|
27
|
-
span {
|
|
28
|
-
color: white;
|
|
29
|
-
font-size: xxx-large;
|
|
30
|
-
font-family: fantasy;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, Input, OnInit, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app-login',
|
|
6
|
-
standalone: true,
|
|
7
|
-
templateUrl: './login.component.html',
|
|
8
|
-
styleUrls: ['./login.component.scss'],
|
|
9
|
-
imports: [CommonModule]
|
|
10
|
-
})
|
|
11
|
-
export class LoginComponent implements OnInit {
|
|
12
|
-
// Input property to accept a TemplateRef from the parent component
|
|
13
|
-
@Input() buttonTemplate!: TemplateRef<any>;
|
|
14
|
-
@ViewChild('buttonContainer', { read: ViewContainerRef }) buttonContainer!: ViewContainerRef;
|
|
15
|
-
|
|
16
|
-
constructor() {
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
ngOnInit(): void {
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// After the view initializes, we render the button
|
|
23
|
-
ngAfterViewInit(): void {
|
|
24
|
-
// Clear any existing content in the container
|
|
25
|
-
this.buttonContainer.clear();
|
|
26
|
-
|
|
27
|
-
// Render the provided button template inside the container
|
|
28
|
-
if (this.buttonTemplate) {
|
|
29
|
-
this.buttonContainer.createEmbeddedView(this.buttonTemplate);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<nav class="menu" [ngClass]="{'vertical': isVertical, 'horizontal': !isVertical}">
|
|
2
|
-
<div class="logo">
|
|
3
|
-
<img src="{{logoUrl}}" alt="Logo" />
|
|
4
|
-
</div>
|
|
5
|
-
<ul>
|
|
6
|
-
<li *ngFor="let item of menuItems">
|
|
7
|
-
<a [href]="item.route">{{ item.label }}</a>
|
|
8
|
-
</li>
|
|
9
|
-
</ul>
|
|
10
|
-
<div class="actions">
|
|
11
|
-
<div class="language">
|
|
12
|
-
<span class="material-icons" aria-hidden="true">language</span>
|
|
13
|
-
</div>
|
|
14
|
-
<div class="login">
|
|
15
|
-
<span class="material-icons" aria-hidden="true">person</span>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</nav>
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: flex;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.menu {
|
|
6
|
-
background-color: #f8f9fa;
|
|
7
|
-
padding: 10px;
|
|
8
|
-
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
9
|
-
|
|
10
|
-
&.vertical {
|
|
11
|
-
display: flex;
|
|
12
|
-
justify-content: space-between;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
width: 200px;
|
|
15
|
-
|
|
16
|
-
ul {
|
|
17
|
-
list-style-type: none;
|
|
18
|
-
padding: 0;
|
|
19
|
-
height: 100%;
|
|
20
|
-
|
|
21
|
-
li {
|
|
22
|
-
padding: 8px 0;
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
background-color: #e9ecef;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.actions {
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: column;
|
|
34
|
-
align-items: baseline;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.horizontal {
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: row;
|
|
41
|
-
width: 100%;
|
|
42
|
-
height: 80px;
|
|
43
|
-
|
|
44
|
-
ul {
|
|
45
|
-
display: flex;
|
|
46
|
-
list-style-type: none;
|
|
47
|
-
padding: 0;
|
|
48
|
-
margin: 0;
|
|
49
|
-
flex-grow: 1;
|
|
50
|
-
align-items: center;
|
|
51
|
-
|
|
52
|
-
li {
|
|
53
|
-
padding: 8px 16px; /* Adjust for horizontal spacing */
|
|
54
|
-
|
|
55
|
-
&:hover {
|
|
56
|
-
background-color: #e9ecef;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.logo {
|
|
64
|
-
img {
|
|
65
|
-
width: 100%;
|
|
66
|
-
height: 100%; /* Maintain aspect ratio */
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.actions {
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
|
|
74
|
-
.language,
|
|
75
|
-
.login {
|
|
76
|
-
margin-left: 10px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
a {
|
|
82
|
-
text-decoration: none; // Remove the underline from links
|
|
83
|
-
color: inherit; // Inherit color from parent element
|
|
84
|
-
display: block; // Make the link block-level so it fills the entire list item
|
|
85
|
-
padding: 10px; // Add some padding for clickable area
|
|
86
|
-
transition: background-color 0.3s ease; // Optional: smooth background color transition
|
|
87
|
-
}
|