@goat-bravos/intern-hub-layout 1.2.0 → 1.2.1
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/fesm2022/goat-bravos-intern-hub-layout.mjs +826 -0
- package/fesm2022/goat-bravos-intern-hub-layout.mjs.map +1 -0
- package/package.json +16 -23
- package/types/goat-bravos-intern-hub-layout.d.ts +317 -0
- package/.editorconfig +0 -17
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/mcp.json +0 -9
- package/.vscode/tasks.json +0 -42
- package/angular.json +0 -40
- package/ng-package.json +0 -11
- package/src/libs/layouts/header/header.component.html +0 -58
- package/src/libs/layouts/header/header.component.scss +0 -108
- package/src/libs/layouts/header/header.component.ts +0 -70
- package/src/libs/layouts/sidebar/sidebar.component.html +0 -28
- package/src/libs/layouts/sidebar/sidebar.component.scss +0 -44
- package/src/libs/layouts/sidebar/sidebar.component.ts +0 -55
- package/src/libs/shared/components/approval/approval-list/approval-list.component.html +0 -19
- package/src/libs/shared/components/approval/approval-list/approval-list.component.scss +0 -24
- package/src/libs/shared/components/approval/approval-list/approval-list.component.ts +0 -19
- package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.html +0 -21
- package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.scss +0 -28
- package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.ts +0 -20
- package/src/libs/shared/components/approval/approval-list-item/approval-list-item.model.ts +0 -8
- package/src/libs/shared/components/button/button-container/button-container.component.html +0 -20
- package/src/libs/shared/components/button/button-container/button-container.component.scss +0 -49
- package/src/libs/shared/components/button/button-container/button-container.component.ts +0 -34
- package/src/libs/shared/components/button/button-container/button-container.model.ts +0 -58
- package/src/libs/shared/components/button/label-button/label-button.component.html +0 -11
- package/src/libs/shared/components/button/label-button/label-button.component.scss +0 -13
- package/src/libs/shared/components/button/label-button/label-button.component.ts +0 -18
- package/src/libs/shared/components/functional-label/functional-label.component.html +0 -36
- package/src/libs/shared/components/functional-label/functional-label.component.scss +0 -56
- package/src/libs/shared/components/functional-label/functional-label.component.ts +0 -141
- package/src/libs/shared/components/icon/icon.component.html +0 -12
- package/src/libs/shared/components/icon/icon.component.scss +0 -11
- package/src/libs/shared/components/icon/icon.component.ts +0 -61
- package/src/libs/shared/components/input/input-calendar/input-calendar.component.html +0 -52
- package/src/libs/shared/components/input/input-calendar/input-calendar.component.scss +0 -98
- package/src/libs/shared/components/input/input-calendar/input-calendar.component.ts +0 -126
- package/src/libs/shared/components/input/input-label/input-label.component.html +0 -0
- package/src/libs/shared/components/input/input-label/input-label.component.scss +0 -0
- package/src/libs/shared/components/input/input-label/input-label.component.ts +0 -0
- package/src/libs/shared/components/input/input-stepper/input-stepper.component.html +0 -62
- package/src/libs/shared/components/input/input-stepper/input-stepper.component.scss +0 -211
- package/src/libs/shared/components/input/input-stepper/input-stepper.component.ts +0 -73
- package/src/libs/shared/components/input/input-text/input-text.component.html +0 -40
- package/src/libs/shared/components/input/input-text/input-text.component.scss +0 -143
- package/src/libs/shared/components/input/input-text/input-text.component.ts +0 -63
- package/src/libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component.html +0 -15
- package/src/libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component.scss +0 -70
- package/src/libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component.ts +0 -29
- package/src/libs/shared/components/table/table-body/table-body.component.html +0 -18
- package/src/libs/shared/components/table/table-body/table-body.component.scss +0 -6
- package/src/libs/shared/components/table/table-body/table-body.component.ts +0 -17
- package/src/libs/shared/components/table/table-header/table-header.component.html +0 -27
- package/src/libs/shared/components/table/table-header/table-header.component.scss +0 -91
- package/src/libs/shared/components/table/table-header/table-header.component.ts +0 -25
- package/src/public-api.ts +0 -34
- package/tsconfig.json +0 -38
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
package/.vscode/tasks.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"tasks": [
|
|
5
|
-
{
|
|
6
|
-
"type": "npm",
|
|
7
|
-
"script": "start",
|
|
8
|
-
"isBackground": true,
|
|
9
|
-
"problemMatcher": {
|
|
10
|
-
"owner": "typescript",
|
|
11
|
-
"pattern": "$tsc",
|
|
12
|
-
"background": {
|
|
13
|
-
"activeOnStart": true,
|
|
14
|
-
"beginsPattern": {
|
|
15
|
-
"regexp": "Changes detected"
|
|
16
|
-
},
|
|
17
|
-
"endsPattern": {
|
|
18
|
-
"regexp": "bundle generation (complete|failed)"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "npm",
|
|
25
|
-
"script": "test",
|
|
26
|
-
"isBackground": true,
|
|
27
|
-
"problemMatcher": {
|
|
28
|
-
"owner": "typescript",
|
|
29
|
-
"pattern": "$tsc",
|
|
30
|
-
"background": {
|
|
31
|
-
"activeOnStart": true,
|
|
32
|
-
"beginsPattern": {
|
|
33
|
-
"regexp": "Changes detected"
|
|
34
|
-
},
|
|
35
|
-
"endsPattern": {
|
|
36
|
-
"regexp": "bundle generation (complete|failed)"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
}
|
package/angular.json
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
-
"version": 1,
|
|
4
|
-
"cli": {
|
|
5
|
-
"packageManager": "npm",
|
|
6
|
-
"analytics": false
|
|
7
|
-
},
|
|
8
|
-
"newProjectRoot": "projects",
|
|
9
|
-
"projects": {
|
|
10
|
-
"intern-hub-layout": {
|
|
11
|
-
"projectType": "library",
|
|
12
|
-
"root": "",
|
|
13
|
-
"sourceRoot": "src",
|
|
14
|
-
"prefix": "lib",
|
|
15
|
-
"architect": {
|
|
16
|
-
"build": {
|
|
17
|
-
"builder": "@angular/build:ng-packagr",
|
|
18
|
-
"options": {
|
|
19
|
-
"project": "ng-package.json"
|
|
20
|
-
},
|
|
21
|
-
"configurations": {
|
|
22
|
-
"production": {
|
|
23
|
-
"tsConfig": "tsconfig.lib.prod.json"
|
|
24
|
-
},
|
|
25
|
-
"development": {
|
|
26
|
-
"tsConfig": "tsconfig.lib.json"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"defaultConfiguration": "production"
|
|
30
|
-
},
|
|
31
|
-
"test": {
|
|
32
|
-
"builder": "@angular/build:unit-test",
|
|
33
|
-
"options": {
|
|
34
|
-
"tsConfig": "tsconfig.spec.json"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
package/ng-package.json
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<header class="app-header">
|
|
2
|
-
<div class="header-left">
|
|
3
|
-
<img
|
|
4
|
-
class="logo"
|
|
5
|
-
[src]="data.logo || 'assets/FPT-IS-Logo.png'"
|
|
6
|
-
alt="Logo"
|
|
7
|
-
/>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div class="header-right">
|
|
11
|
-
@for (item of data.headerItems; track $index) {
|
|
12
|
-
<button
|
|
13
|
-
class="header-btn"
|
|
14
|
-
[attr.aria-label]="item.content"
|
|
15
|
-
(click)="handleActionClick(item, $event)"
|
|
16
|
-
>
|
|
17
|
-
<app-icon
|
|
18
|
-
[iconData]="
|
|
19
|
-
getIconData(
|
|
20
|
-
item.icon,
|
|
21
|
-
item.colorIcon,
|
|
22
|
-
item.width || '16px',
|
|
23
|
-
item.height || '16px'
|
|
24
|
-
)
|
|
25
|
-
"
|
|
26
|
-
></app-icon>
|
|
27
|
-
@if (item.badge) {
|
|
28
|
-
<span class="badge">{{ item.badge }}</span>
|
|
29
|
-
}
|
|
30
|
-
</button>
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
<div class="header-user">
|
|
34
|
-
<button class="user-btn">
|
|
35
|
-
@if (data.userIcon) {
|
|
36
|
-
<app-icon
|
|
37
|
-
[iconData]="
|
|
38
|
-
getIconData(data.userIcon, data.userIconColor, '16px', '16px')
|
|
39
|
-
"
|
|
40
|
-
></app-icon>
|
|
41
|
-
}
|
|
42
|
-
<span class="user-name">{{ data.userName }}</span>
|
|
43
|
-
@if (data.dropdownIcon) {
|
|
44
|
-
<app-icon
|
|
45
|
-
[iconData]="
|
|
46
|
-
getIconData(
|
|
47
|
-
data.dropdownIcon,
|
|
48
|
-
data.dropdownIconColor,
|
|
49
|
-
'16px',
|
|
50
|
-
'16px'
|
|
51
|
-
)
|
|
52
|
-
"
|
|
53
|
-
></app-icon>
|
|
54
|
-
}
|
|
55
|
-
</button>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</header>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
// Header Component - Optimized for Intern-Hub Shell
|
|
2
|
-
:host {
|
|
3
|
-
width: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
$padding-header: 16px 8px;
|
|
9
|
-
|
|
10
|
-
.app-header {
|
|
11
|
-
height: 70px;
|
|
12
|
-
width: 1370px;
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: space-between;
|
|
16
|
-
padding: $padding-header;
|
|
17
|
-
background-color: transparent;
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.header-left {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
|
|
25
|
-
.logo {
|
|
26
|
-
height: 40px;
|
|
27
|
-
width: auto;
|
|
28
|
-
object-fit: contain;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.header-right {
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
gap: 12px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.header-btn {
|
|
40
|
-
position: relative;
|
|
41
|
-
width: 28px;
|
|
42
|
-
height: 28px;
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
justify-content: center;
|
|
46
|
-
background: transparent;
|
|
47
|
-
border-radius: var(--radius-full);
|
|
48
|
-
border: none;
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
color: var(--brand-600);
|
|
51
|
-
transition: all 0.2s ease-in-out;
|
|
52
|
-
|
|
53
|
-
&:hover {
|
|
54
|
-
background-color: var(--neutral-color-100);
|
|
55
|
-
color: var(--primary-color);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.badge {
|
|
59
|
-
position: absolute;
|
|
60
|
-
top: -4px;
|
|
61
|
-
right: -4px;
|
|
62
|
-
min-width: 16px;
|
|
63
|
-
height: 16px;
|
|
64
|
-
padding: $padding-header;
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
background-color: var(-utility-500);
|
|
69
|
-
color: var(--neutral-color-100);
|
|
70
|
-
border-radius: 8px;
|
|
71
|
-
font-size: 10px;
|
|
72
|
-
font-weight: 600;
|
|
73
|
-
line-height: 1;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// User Section
|
|
78
|
-
.header-user {
|
|
79
|
-
margin-left: 4px;
|
|
80
|
-
padding-left: $padding-header;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.user-btn {
|
|
84
|
-
display: flex;
|
|
85
|
-
align-items: center;
|
|
86
|
-
justify-content: space-between;
|
|
87
|
-
gap: 10px;
|
|
88
|
-
padding: $padding-header;
|
|
89
|
-
background: transparent;
|
|
90
|
-
border: none;
|
|
91
|
-
border-radius: 8px;
|
|
92
|
-
cursor: pointer;
|
|
93
|
-
transition: background-color 0.2s ease;
|
|
94
|
-
|
|
95
|
-
&:hover {
|
|
96
|
-
background-color: var(--neutral-color-100);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.user-name {
|
|
100
|
-
font-size: 14px;
|
|
101
|
-
font-weight: 700;
|
|
102
|
-
color: var(--brand-600);
|
|
103
|
-
white-space: nowrap;
|
|
104
|
-
max-width: 150px;
|
|
105
|
-
overflow: hidden;
|
|
106
|
-
text-overflow: ellipsis;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
4
|
-
IconComponent,
|
|
5
|
-
IconData,
|
|
6
|
-
} from '../../shared/components/icon/icon.component';
|
|
7
|
-
|
|
8
|
-
export interface HeaderAction {
|
|
9
|
-
icon: IconData | string;
|
|
10
|
-
content: string;
|
|
11
|
-
method?: () => void;
|
|
12
|
-
badge?: string;
|
|
13
|
-
colorIcon?: string;
|
|
14
|
-
width?: string;
|
|
15
|
-
height?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface HeaderData {
|
|
19
|
-
headerItems: HeaderAction[];
|
|
20
|
-
userName: string;
|
|
21
|
-
userIcon?: IconData | string;
|
|
22
|
-
userIconColor?: string;
|
|
23
|
-
dropdownIcon?: IconData | string;
|
|
24
|
-
dropdownIconColor?: string;
|
|
25
|
-
logo?: string;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@Component({
|
|
29
|
-
selector: 'app-header-component',
|
|
30
|
-
standalone: true,
|
|
31
|
-
imports: [CommonModule, IconComponent],
|
|
32
|
-
templateUrl: './header.component.html',
|
|
33
|
-
styleUrls: ['./header.component.scss'],
|
|
34
|
-
})
|
|
35
|
-
export class HeaderComponent {
|
|
36
|
-
@Input() data: HeaderData = {
|
|
37
|
-
headerItems: [],
|
|
38
|
-
userName: 'Guest',
|
|
39
|
-
userIcon: 'dsi-user-01-line',
|
|
40
|
-
dropdownIcon: 'dsi-arrow-down-solid',
|
|
41
|
-
logo: 'assets/FPT-IS-Logo.png',
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
handleActionClick(item: HeaderAction, event: Event): void {
|
|
45
|
-
if (item.method) {
|
|
46
|
-
event.preventDefault();
|
|
47
|
-
item.method();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
getIconData(
|
|
52
|
-
icon: IconData | string | undefined,
|
|
53
|
-
colorIcon?: string,
|
|
54
|
-
width?: string,
|
|
55
|
-
height?: string,
|
|
56
|
-
): IconData | undefined {
|
|
57
|
-
if (!icon) return undefined;
|
|
58
|
-
|
|
59
|
-
if (typeof icon === 'string') {
|
|
60
|
-
return {
|
|
61
|
-
icon,
|
|
62
|
-
colorIcon,
|
|
63
|
-
width,
|
|
64
|
-
height,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return icon;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<div class="sidebar-wrapper">
|
|
2
|
-
<aside
|
|
3
|
-
class="sidebar"
|
|
4
|
-
[style.background-color]="!isSidebarExpanded ? data.backgroundColor : null"
|
|
5
|
-
>
|
|
6
|
-
@for (item of data.menuItems; track $index) {
|
|
7
|
-
<app-functional-label
|
|
8
|
-
class="sidebar-item"
|
|
9
|
-
[isSidebarExpanded]="isSidebarExpanded"
|
|
10
|
-
[iconLeft]="item.iconLeft"
|
|
11
|
-
[iconRight]="item.iconRight"
|
|
12
|
-
[content]="item.content"
|
|
13
|
-
[routerLink]="item.url"
|
|
14
|
-
[colorIconLeft]="item.colorIconLeft"
|
|
15
|
-
[colorIconRight]="item.colorIconRight"
|
|
16
|
-
[colorContent]="item.colorContent"
|
|
17
|
-
[backgroundColor]="item.backgroundColor"
|
|
18
|
-
[borderRadius]="item.borderRadius"
|
|
19
|
-
(clicked)="onMenuItemClick(item, $event)"
|
|
20
|
-
[colorIconLeftHover]="item.colorIconLeftHover"
|
|
21
|
-
[colorIconRightHover]="item.colorIconRightHover"
|
|
22
|
-
[backgroundColorHover]="item.backgroundColorHover"
|
|
23
|
-
[width]="item.width"
|
|
24
|
-
[height]="item.height"
|
|
25
|
-
></app-functional-label>
|
|
26
|
-
}
|
|
27
|
-
</aside>
|
|
28
|
-
</div>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
height: 100vh;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.sidebar-wrapper {
|
|
7
|
-
width: 44px;
|
|
8
|
-
height: 100vh;
|
|
9
|
-
transition: width 0.3s ease;
|
|
10
|
-
background-color: transparent;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.sidebar {
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
gap: 8px;
|
|
17
|
-
|
|
18
|
-
width: 44px;
|
|
19
|
-
height: 100%;
|
|
20
|
-
padding: 8px;
|
|
21
|
-
box-sizing: border-box;
|
|
22
|
-
border-radius: 16px;
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
|
|
25
|
-
transition:
|
|
26
|
-
width 0.3s ease,
|
|
27
|
-
padding 0.3s ease,
|
|
28
|
-
background-color 0.3s ease;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.sidebar a {
|
|
32
|
-
text-decoration: none;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.sidebar-wrapper:hover {
|
|
36
|
-
width: 344px;
|
|
37
|
-
|
|
38
|
-
.sidebar {
|
|
39
|
-
width: 344px;
|
|
40
|
-
padding: 16px 8px;
|
|
41
|
-
border-radius: 16px;
|
|
42
|
-
background-color: var(--theme-neutral-light-100);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Component, HostListener, Input } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { FunctionalLabelComponent } from '../../shared/components/functional-label/functional-label.component';
|
|
4
|
-
import { IconData } from '../../shared/components/icon/icon.component';
|
|
5
|
-
|
|
6
|
-
export interface SidebarItem {
|
|
7
|
-
iconLeft?: IconData | string;
|
|
8
|
-
iconRight?: IconData | string;
|
|
9
|
-
content: string;
|
|
10
|
-
url?: string;
|
|
11
|
-
colorIconLeft?: string;
|
|
12
|
-
colorIconLeftHover?: string;
|
|
13
|
-
colorIconRight?: string;
|
|
14
|
-
colorIconRightHover?: string;
|
|
15
|
-
colorContent?: string;
|
|
16
|
-
colorContentHover?: string;
|
|
17
|
-
backgroundColor?: string;
|
|
18
|
-
backgroundColorHover?: string;
|
|
19
|
-
borderRadius?: string;
|
|
20
|
-
borderRadiusHover?: string;
|
|
21
|
-
width?: string;
|
|
22
|
-
height?: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface SidebarData {
|
|
26
|
-
menuItems: SidebarItem[];
|
|
27
|
-
backgroundColor?: string;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@Component({
|
|
31
|
-
selector: 'app-sidebar',
|
|
32
|
-
standalone: true,
|
|
33
|
-
imports: [CommonModule, FunctionalLabelComponent],
|
|
34
|
-
templateUrl: './sidebar.component.html',
|
|
35
|
-
styleUrls: ['./sidebar.component.scss'],
|
|
36
|
-
})
|
|
37
|
-
export class SidebarComponent {
|
|
38
|
-
@Input() data: SidebarData = { menuItems: [] };
|
|
39
|
-
|
|
40
|
-
isSidebarExpanded = false;
|
|
41
|
-
|
|
42
|
-
@HostListener('mouseenter')
|
|
43
|
-
onMouseEnter() {
|
|
44
|
-
this.isSidebarExpanded = true;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@HostListener('mouseleave')
|
|
48
|
-
onMouseLeave() {
|
|
49
|
-
this.isSidebarExpanded = false;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
onMenuItemClick(item: SidebarItem, event: Event): void {
|
|
53
|
-
console.log('Menu item clicked:', item, event);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<div class="approval-list" [style.width]="width">
|
|
2
|
-
<div class="approval-list-header">
|
|
3
|
-
<span class="approval-list-header-left">{{ headerContentLeft }}</span>
|
|
4
|
-
<div>
|
|
5
|
-
<p>{{ headerContentRight }}</p>
|
|
6
|
-
</div>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<div class="approval-list-content" [style.width]="width">
|
|
10
|
-
<app-approval-list-item
|
|
11
|
-
*ngFor="let row of rows"
|
|
12
|
-
[name]="row.name"
|
|
13
|
-
[date]="row.date"
|
|
14
|
-
[rightTemplate]="row.rightTemplate"
|
|
15
|
-
[rightContext]="row.rightContext"
|
|
16
|
-
>
|
|
17
|
-
</app-approval-list-item>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.approval-list {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
background-color: var(--theme-neutral-light-100);
|
|
5
|
-
border-radius: 16px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.approval-list-header {
|
|
9
|
-
display: flex;
|
|
10
|
-
justify-content: space-between;
|
|
11
|
-
align-items: center;
|
|
12
|
-
padding: 16px 8px;
|
|
13
|
-
height: fit-content;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.approval-list-header span {
|
|
17
|
-
font-size: 20px;
|
|
18
|
-
color: var(--brand-600);
|
|
19
|
-
font-weight: bold;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.approval-list-header p {
|
|
23
|
-
font-size: var(--font-sm);
|
|
24
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { ApprovalListItemInterface } from '../approval-list-item/approval-list-item.model';
|
|
4
|
-
import { ApprovalListItemComponent } from '../approval-list-item/approval-list-item.component';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'app-approval-list',
|
|
8
|
-
standalone: true,
|
|
9
|
-
imports: [CommonModule, ApprovalListItemComponent],
|
|
10
|
-
templateUrl: './approval-list.component.html',
|
|
11
|
-
styleUrls: ['./approval-list.component.scss'],
|
|
12
|
-
})
|
|
13
|
-
export class ApprovalListComponent {
|
|
14
|
-
@Input() rows: ApprovalListItemInterface[] = [];
|
|
15
|
-
|
|
16
|
-
@Input() headerContentRight!: string;
|
|
17
|
-
@Input() headerContentLeft!: string;
|
|
18
|
-
@Input() width!: string;
|
|
19
|
-
}
|
package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.html
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<div class="approval-item">
|
|
2
|
-
<!-- LEFT -->
|
|
3
|
-
<div class="approval-item-left">
|
|
4
|
-
<span class="approval-item-left-name">{{ name }}</span>
|
|
5
|
-
<span class="approval-item-left-date">
|
|
6
|
-
<span class="approval-item-left-date-title">Ngày tạo đơn:</span>
|
|
7
|
-
{{ date | date: 'dd/MM/yyyy' }}
|
|
8
|
-
</span>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div class="approval-item-right">
|
|
12
|
-
<ng-container *ngIf="rightTemplate; else defaultRight">
|
|
13
|
-
<ng-container *ngTemplateOutlet="rightTemplate; context: rightContext">
|
|
14
|
-
</ng-container>
|
|
15
|
-
</ng-container>
|
|
16
|
-
|
|
17
|
-
<ng-template #defaultRight>
|
|
18
|
-
<span class="text-gray-400">—</span>
|
|
19
|
-
</ng-template>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.scss
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
.approval-item {
|
|
2
|
-
display: flex;
|
|
3
|
-
justify-content: space-between;
|
|
4
|
-
min-width: 400px;
|
|
5
|
-
height: fit-content;
|
|
6
|
-
align-items: center;
|
|
7
|
-
padding: 16px 8px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.approval-item-left-date-title {
|
|
11
|
-
color: var(--theme-neutral-500);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.approval-item-right p {
|
|
15
|
-
color: var(--secondary-800);
|
|
16
|
-
font-weight: 500;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.approval-item-left {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
gap: 8px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
span,
|
|
26
|
-
p {
|
|
27
|
-
font-size: var(--font-sm);
|
|
28
|
-
}
|
package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { Component, Input, TemplateRef } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
@Component({
|
|
5
|
-
selector: 'app-approval-list-item',
|
|
6
|
-
templateUrl: './approval-list-item.component.html',
|
|
7
|
-
styleUrls: ['./approval-list-item.component.scss'],
|
|
8
|
-
imports: [CommonModule],
|
|
9
|
-
standalone: true
|
|
10
|
-
})
|
|
11
|
-
export class ApprovalListItemComponent {
|
|
12
|
-
@Input() name!: string;
|
|
13
|
-
@Input() date!: Date;
|
|
14
|
-
@Input() rightTemplate?: TemplateRef<any>;
|
|
15
|
-
@Input() rightContext: any = {};
|
|
16
|
-
|
|
17
|
-
get parsedDate(): Date {
|
|
18
|
-
return new Date(this.date);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<button class="button-container" [style.minWidth]="sizeStyle.minWidth" [style.minHeight]="sizeStyle.minHeight" [style.color]="color"
|
|
2
|
-
[style.backgroundColor]="backgroundColor" [style.borderColor]="borderColor" (click)="handleClick()">
|
|
3
|
-
|
|
4
|
-
@if(leftIcon){
|
|
5
|
-
<i class="button-icon" [style.width]="sizeStyle.iconSize" [style.height]="sizeStyle.iconSize" [style.fontSize]="sizeStyle.iconSize">
|
|
6
|
-
{{leftIcon}}
|
|
7
|
-
</i>
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
<span class="button-content" [style.minWidth]="sizeStyle.contentWidth" [style.minHeight]="sizeStyle.contentHeight"
|
|
11
|
-
[style.fontSize]="fontSize || sizeStyle.fontSize" [style.color]="color">
|
|
12
|
-
{{ content }}
|
|
13
|
-
</span>
|
|
14
|
-
|
|
15
|
-
@if(rightIcon){
|
|
16
|
-
<i class="button-icon" [style.width]="sizeStyle.iconSize" [style.height]="sizeStyle.iconSize" [style.fontSize]="sizeStyle.iconSize" [style.color]="color">
|
|
17
|
-
{{rightIcon}}
|
|
18
|
-
</i>
|
|
19
|
-
}
|
|
20
|
-
</button>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// Button Container Component - System Design Format
|
|
2
|
-
|
|
3
|
-
.button-container {
|
|
4
|
-
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
align-items: center;
|
|
7
|
-
gap: 8px;
|
|
8
|
-
border-radius: var(--radius-md);
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
padding: 8px 16px;
|
|
11
|
-
border: none;
|
|
12
|
-
font-weight: 500;
|
|
13
|
-
transition:
|
|
14
|
-
filter 0.15s ease,
|
|
15
|
-
transform 0.1s ease;
|
|
16
|
-
|
|
17
|
-
// Hover: sáng hơn một chút
|
|
18
|
-
&:hover {
|
|
19
|
-
filter: brightness(1.1);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Active/Pressing: tối hơn một chút
|
|
23
|
-
&:active {
|
|
24
|
-
filter: brightness(0.9);
|
|
25
|
-
transform: scale(0.98);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Focus state
|
|
29
|
-
&:focus {
|
|
30
|
-
outline: 2px solid var(--brand-600);
|
|
31
|
-
outline-offset: 2px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.button-content {
|
|
36
|
-
display: flex;
|
|
37
|
-
align-items: center;
|
|
38
|
-
justify-content: center;
|
|
39
|
-
white-space: nowrap;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
text-overflow: ellipsis;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.button-icon {
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
flex-shrink: 0;
|
|
49
|
-
}
|