@aseansc/ui 5.10.0 → 5.12.0
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/CHANGELOG.md +41 -0
- package/fesm2022/aseansc-ui.mjs +516 -168
- package/fesm2022/aseansc-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens/layout/_menu.scss +29 -1
- package/tokens/layout/_responsive.scss +64 -0
- package/tokens/layout/variables/_common.scss +1 -0
- package/tokens/preset.css +69 -1
- package/types/aseansc-ui.d.ts +75 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aseansc/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.0",
|
|
4
4
|
"description": "ASC Internal UI Component Library — Angular 22 + PrimeNG 21 + TailwindCSS 4 (PrimeNG capped at 21.x — 22.x requires a paid PrimeUI license key, xem README.md)",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ASC Team",
|
package/tokens/layout/_menu.scss
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
left: var(--layout-sidebar-gap);
|
|
15
15
|
transition:
|
|
16
16
|
transform var(--layout-section-transition-duration),
|
|
17
|
-
left var(--layout-section-transition-duration)
|
|
17
|
+
left var(--layout-section-transition-duration),
|
|
18
|
+
width var(--layout-section-transition-duration);
|
|
18
19
|
background-color: var(--asc-surface-translucent);
|
|
19
20
|
border-radius: 20px;
|
|
20
21
|
// Padding sidebar theo design: dọc 16px, ngang 12px
|
|
@@ -29,6 +30,33 @@
|
|
|
29
30
|
padding: 0 0 var(--layout-sidebar-padding-y, 16px); // khoảng cách logo – menu
|
|
30
31
|
}
|
|
31
32
|
|
|
33
|
+
// Logo thu gọn (sideBarLogoCollapsed) chỉ hiện ở dạng dải — xem _responsive.scss
|
|
34
|
+
.layout-sidebar-logo-collapsed {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Chữ cái đầu thay icon (mục không có icon) chỉ hiện ở dạng dải. Dạng đầy đủ giữ đúng khoảng
|
|
39
|
+
// như icon rỗng trước đây: rộng 0, chỉ còn margin-right của .layout-menuitem-icon.
|
|
40
|
+
.layout-menuitem-initial {
|
|
41
|
+
width: 0;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Popup menu con khi sidebar dạng dải — Figma: rộng 200, item 184×36 (gắn vào body)
|
|
46
|
+
.asc-sidebar-rail-popup.p-menu {
|
|
47
|
+
width: 200px;
|
|
48
|
+
min-width: 200px;
|
|
49
|
+
|
|
50
|
+
.p-menu-list {
|
|
51
|
+
padding: 8px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.p-menu-item-link-active {
|
|
55
|
+
background-color: var(--asc-sidebar-item-active-bg);
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
32
60
|
.layout-sidebar-content {
|
|
33
61
|
flex: 1 1 auto;
|
|
34
62
|
min-height: 0;
|
|
@@ -66,6 +66,70 @@
|
|
|
66
66
|
padding-left: var(--layout-content-gap);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
// Thu gọn dạng dải icon (layout.sidebarCollapse = 'rail') — Figma "Trạng thái Thu gọn":
|
|
71
|
+
// dải 84px, item 60×40, icon 20, ẩn chữ / tiêu đề / mũi tên; nhóm mở popup (app.menuitem).
|
|
72
|
+
&.layout-sidebar-rail {
|
|
73
|
+
// Khai lại offset ở đây: biến tính ở :root không tự tính lại theo width mới
|
|
74
|
+
--layout-sidebar-width: var(--layout-sidebar-rail-width);
|
|
75
|
+
--layout-sidebar-offset: calc(var(--layout-sidebar-gap) + var(--layout-sidebar-width));
|
|
76
|
+
|
|
77
|
+
.layout-sidebar-logo {
|
|
78
|
+
justify-content: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.layout-sidebar-logo--has-collapsed {
|
|
82
|
+
.layout-sidebar-logo-full {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.layout-sidebar-logo-collapsed {
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.layout-sidebar-content {
|
|
93
|
+
overflow-x: hidden;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.layout-menu {
|
|
97
|
+
.layout-menuitem-root-text,
|
|
98
|
+
.layout-menuitem-text,
|
|
99
|
+
.layout-submenu-toggler {
|
|
100
|
+
display: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Menu con nằm trong popup, không xổ trên dải
|
|
104
|
+
.layout-root-menuitem ul ul {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
ul a {
|
|
109
|
+
justify-content: center;
|
|
110
|
+
height: 40px;
|
|
111
|
+
padding: 10px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.layout-menuitem-icon {
|
|
115
|
+
margin-right: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.layout-menuitem-initial {
|
|
119
|
+
width: 20px;
|
|
120
|
+
overflow: visible;
|
|
121
|
+
text-align: center;
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
line-height: 20px;
|
|
124
|
+
font-weight: 600;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Nhóm chứa trang đang mở: nền như mục active
|
|
128
|
+
.layout-root-menuitem > ul > li:has(.active-route) > a {
|
|
129
|
+
background-color: var(--asc-sidebar-item-active-bg);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
69
133
|
}
|
|
70
134
|
|
|
71
135
|
.layout-mask {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
--content-border-radius: var(--p-content-border-radius);
|
|
13
13
|
--layout-section-transition-duration: 0.2s;
|
|
14
14
|
--layout-sidebar-width: 212px;
|
|
15
|
+
--layout-sidebar-rail-width: 84px; // sidebar thu gọn dạng dải icon (layout.sidebarCollapse = 'rail')
|
|
15
16
|
--layout-sidebar-gap: 12px; // khoảng hở giữa sidebar nổi và mép viewport
|
|
16
17
|
// Khoảng cách layout viết bằng px: html font-size 14px nên rem ra số lẻ (14, 21, 28…). App ghi đè được.
|
|
17
18
|
--layout-topbar-height: 64px;
|
package/tokens/preset.css
CHANGED
|
@@ -696,6 +696,7 @@
|
|
|
696
696
|
--content-border-radius: var(--p-content-border-radius);
|
|
697
697
|
--layout-section-transition-duration: 0.2s;
|
|
698
698
|
--layout-sidebar-width: 212px;
|
|
699
|
+
--layout-sidebar-rail-width: 84px;
|
|
699
700
|
--layout-sidebar-gap: 12px;
|
|
700
701
|
--layout-topbar-height: 64px;
|
|
701
702
|
--layout-content-gap: 16px;
|
|
@@ -987,7 +988,7 @@ img {
|
|
|
987
988
|
user-select: none;
|
|
988
989
|
top: var(--layout-sidebar-gap);
|
|
989
990
|
left: var(--layout-sidebar-gap);
|
|
990
|
-
transition: transform var(--layout-section-transition-duration), left var(--layout-section-transition-duration);
|
|
991
|
+
transition: transform var(--layout-section-transition-duration), left var(--layout-section-transition-duration), width var(--layout-section-transition-duration);
|
|
991
992
|
background-color: var(--asc-surface-translucent);
|
|
992
993
|
border-radius: 20px;
|
|
993
994
|
padding: var(--layout-sidebar-padding-y, 16px) var(--layout-sidebar-padding-x, 12px);
|
|
@@ -1000,6 +1001,29 @@ img {
|
|
|
1000
1001
|
padding: 0 0 var(--layout-sidebar-padding-y, 16px);
|
|
1001
1002
|
}
|
|
1002
1003
|
|
|
1004
|
+
.layout-sidebar-logo-collapsed {
|
|
1005
|
+
display: none;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.layout-menuitem-initial {
|
|
1009
|
+
width: 0;
|
|
1010
|
+
overflow: hidden;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.asc-sidebar-rail-popup.p-menu {
|
|
1014
|
+
width: 200px;
|
|
1015
|
+
min-width: 200px;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
.asc-sidebar-rail-popup.p-menu .p-menu-list {
|
|
1019
|
+
padding: 8px;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
.asc-sidebar-rail-popup.p-menu .p-menu-item-link-active {
|
|
1023
|
+
background-color: var(--asc-sidebar-item-active-bg);
|
|
1024
|
+
font-weight: 500;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1003
1027
|
.layout-sidebar-content {
|
|
1004
1028
|
flex: 1 1 auto;
|
|
1005
1029
|
min-height: 0;
|
|
@@ -1163,6 +1187,50 @@ img {
|
|
|
1163
1187
|
margin-left: 0;
|
|
1164
1188
|
padding-left: var(--layout-content-gap);
|
|
1165
1189
|
}
|
|
1190
|
+
.layout-wrapper.layout-static.layout-sidebar-rail {
|
|
1191
|
+
--layout-sidebar-width: var(--layout-sidebar-rail-width);
|
|
1192
|
+
--layout-sidebar-offset: calc(var(--layout-sidebar-gap) + var(--layout-sidebar-width));
|
|
1193
|
+
}
|
|
1194
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-sidebar-logo {
|
|
1195
|
+
justify-content: center;
|
|
1196
|
+
}
|
|
1197
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-sidebar-logo--has-collapsed .layout-sidebar-logo-full {
|
|
1198
|
+
display: none;
|
|
1199
|
+
}
|
|
1200
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-sidebar-logo--has-collapsed .layout-sidebar-logo-collapsed {
|
|
1201
|
+
display: flex;
|
|
1202
|
+
justify-content: center;
|
|
1203
|
+
}
|
|
1204
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-sidebar-content {
|
|
1205
|
+
overflow-x: hidden;
|
|
1206
|
+
}
|
|
1207
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-menu .layout-menuitem-root-text,
|
|
1208
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-menu .layout-menuitem-text,
|
|
1209
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-menu .layout-submenu-toggler {
|
|
1210
|
+
display: none;
|
|
1211
|
+
}
|
|
1212
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-menu .layout-root-menuitem ul ul {
|
|
1213
|
+
display: none;
|
|
1214
|
+
}
|
|
1215
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-menu ul a {
|
|
1216
|
+
justify-content: center;
|
|
1217
|
+
height: 40px;
|
|
1218
|
+
padding: 10px;
|
|
1219
|
+
}
|
|
1220
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-menu .layout-menuitem-icon {
|
|
1221
|
+
margin-right: 0;
|
|
1222
|
+
}
|
|
1223
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-menu .layout-menuitem-initial {
|
|
1224
|
+
width: 20px;
|
|
1225
|
+
overflow: visible;
|
|
1226
|
+
text-align: center;
|
|
1227
|
+
font-size: 14px;
|
|
1228
|
+
line-height: 20px;
|
|
1229
|
+
font-weight: 600;
|
|
1230
|
+
}
|
|
1231
|
+
.layout-wrapper.layout-static.layout-sidebar-rail .layout-menu .layout-root-menuitem > ul > li:has(.active-route) > a {
|
|
1232
|
+
background-color: var(--asc-sidebar-item-active-bg);
|
|
1233
|
+
}
|
|
1166
1234
|
.layout-wrapper .layout-mask {
|
|
1167
1235
|
display: none;
|
|
1168
1236
|
}
|
package/types/aseansc-ui.d.ts
CHANGED
|
@@ -241,7 +241,32 @@ interface AscUILayoutConfig {
|
|
|
241
241
|
* @default true
|
|
242
242
|
*/
|
|
243
243
|
showFooter?: boolean;
|
|
244
|
-
|
|
244
|
+
/**
|
|
245
|
+
* Kiểu thu gọn sidebar khi bấm nút menu ở desktop (≥ 992px):
|
|
246
|
+
* - `'hidden'`: ẩn hẳn sidebar (hành vi cũ).
|
|
247
|
+
* - `'rail'`: còn dải hẹp 84px chỉ có icon; nhóm có menu con mở popup cạnh dải.
|
|
248
|
+
* Trạng thái thu gọn được lưu vào localStorage.
|
|
249
|
+
* Override riêng từng layout qua input `[sidebarCollapse]`.
|
|
250
|
+
* @default 'hidden'
|
|
251
|
+
*/
|
|
252
|
+
sidebarCollapse?: AscSidebarCollapseMode;
|
|
253
|
+
/**
|
|
254
|
+
* Cách sáng mục menu sidebar theo URL hiện tại:
|
|
255
|
+
* - `'exact'`: chỉ sáng khi URL trùng đúng `routerLink` (hành vi cũ).
|
|
256
|
+
* - `'longest-prefix'`: sáng mục có `routerLink` là tiền tố dài nhất (theo segment, bỏ
|
|
257
|
+
* query / fragment / matrix) của URL — trang con như `/config/fees/new` sáng "Quản lý biểu phí"
|
|
258
|
+
* và tự mở nhóm cha (kể cả F5 / vào thẳng link); `/issuers/securities` chỉ sáng "Danh mục CK",
|
|
259
|
+
* không sáng `/issuers`.
|
|
260
|
+
* Mục có `routerLinkActiveOptions` riêng vẫn dùng options đó.
|
|
261
|
+
* Override riêng từng layout qua input `[menuActiveMatch]`.
|
|
262
|
+
* @default 'exact'
|
|
263
|
+
*/
|
|
264
|
+
menuActiveMatch?: AscMenuActiveMatch;
|
|
265
|
+
}
|
|
266
|
+
/** Kiểu thu gọn sidebar desktop — xem `AscUILayoutConfig.sidebarCollapse`. */
|
|
267
|
+
type AscSidebarCollapseMode = 'hidden' | 'rail';
|
|
268
|
+
/** Cách sáng mục menu sidebar — xem `AscUILayoutConfig.menuActiveMatch`. */
|
|
269
|
+
type AscMenuActiveMatch = 'exact' | 'longest-prefix';
|
|
245
270
|
interface AscUIButtonConfig {
|
|
246
271
|
/**
|
|
247
272
|
* Size mặc định khi không truyền input [size].
|
|
@@ -439,7 +464,7 @@ declare abstract class BaseControlAccessor<T> implements ControlValueAccessor, O
|
|
|
439
464
|
* dạng text thay vì form control). AscFormFieldComponent tự đọc giá trị này
|
|
440
465
|
* qua ContentChild để đồng bộ style label — không cần set mode ở cả 2 nơi.
|
|
441
466
|
*/
|
|
442
|
-
readonly mode: _angular_core.InputSignal<"
|
|
467
|
+
readonly mode: _angular_core.InputSignal<"edit" | "view">;
|
|
443
468
|
/** Giá trị hiện tại của control */
|
|
444
469
|
readonly value: _angular_core.WritableSignal<T | null>;
|
|
445
470
|
/** Trạng thái disabled từ FormControl/NgModel */
|
|
@@ -745,7 +770,7 @@ declare class AscFormFieldComponent implements AfterContentInit {
|
|
|
745
770
|
* 'FloatLabel' → PrimeNG FloatLabel
|
|
746
771
|
* 'IftaLabel' → PrimeNG IftaLabel
|
|
747
772
|
*/
|
|
748
|
-
readonly typeLabel: _angular_core.InputSignal<"
|
|
773
|
+
readonly typeLabel: _angular_core.InputSignal<"default" | "FloatLabel" | "IftaLabel">;
|
|
749
774
|
/** Layout tổng thể */
|
|
750
775
|
readonly layout: _angular_core.InputSignal<AscFormLayout>;
|
|
751
776
|
/**
|
|
@@ -788,7 +813,7 @@ declare class AscFormFieldComponent implements AfterContentInit {
|
|
|
788
813
|
* (xem `resolvedMode`). Input này chỉ cần dùng khi muốn ép label view riêng
|
|
789
814
|
* (vd: control bên trong không hỗ trợ mode, hoặc không có control nào cả).
|
|
790
815
|
*/
|
|
791
|
-
readonly mode: _angular_core.InputSignal<"
|
|
816
|
+
readonly mode: _angular_core.InputSignal<"edit" | "view">;
|
|
792
817
|
/** Đồng bộ từ control.errors — trigger CD khi form validate */
|
|
793
818
|
protected readonly controlErrors: _angular_core.WritableSignal<Record<string, unknown> | null>;
|
|
794
819
|
/** true khi control có validator required */
|
|
@@ -804,7 +829,7 @@ declare class AscFormFieldComponent implements AfterContentInit {
|
|
|
804
829
|
* 'view' nếu tự set `mode="view"` HOẶC control bên trong đang mode="view".
|
|
805
830
|
* → chỉ cần set ở 1 trong 2 nơi (thường là ngay trên control), không cần lặp lại.
|
|
806
831
|
*/
|
|
807
|
-
protected readonly resolvedMode: _angular_core.Signal<"
|
|
832
|
+
protected readonly resolvedMode: _angular_core.Signal<"edit" | "view">;
|
|
808
833
|
protected readonly resolvedLabelSuffixIcon: _angular_core.Signal<string>;
|
|
809
834
|
/** Dấu * bắt buộc — ẩn ở mode view (chỉ đọc, không cần nhập) */
|
|
810
835
|
protected readonly showRequiredMark: _angular_core.Signal<boolean>;
|
|
@@ -1485,7 +1510,7 @@ declare class AscUpload extends BaseControlAccessor<File | File[] | null> {
|
|
|
1485
1510
|
}
|
|
1486
1511
|
|
|
1487
1512
|
/** Tên icon dựng sẵn trong thư viện. */
|
|
1488
|
-
type AscBuiltinIconName = 'approve' | 'view' | 'edit' | 'delete' | 'search' | 'more' | 'caret-down' | 'caret-right';
|
|
1513
|
+
type AscBuiltinIconName = 'approve' | 'view' | 'edit' | 'delete' | 'search' | 'more' | 'caret-down' | 'caret-right' | 'calendar-dots';
|
|
1489
1514
|
/** viewBox mặc định của icon dựng sẵn. */
|
|
1490
1515
|
declare const ASC_BUILTIN_ICON_DEFAULT_VIEWBOX = "0 0 20 20";
|
|
1491
1516
|
/** viewBox riêng của icon không theo lưới 20 (icon Phosphor lưới 256). */
|
|
@@ -2711,6 +2736,7 @@ declare class AscCardFooterDirective {
|
|
|
2711
2736
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AscCardFooterDirective, "[ascCardFooter]", never, {}, {}, never, never, true, never>;
|
|
2712
2737
|
}
|
|
2713
2738
|
type AscCardShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2739
|
+
type AscCardVariant = 'default' | 'flat';
|
|
2714
2740
|
type AscCardRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
2715
2741
|
declare class AscCardComponent {
|
|
2716
2742
|
protected readonly _headerTpl: _angular_core.Signal<AscCardHeaderDirective | undefined>;
|
|
@@ -2723,6 +2749,11 @@ declare class AscCardComponent {
|
|
|
2723
2749
|
readonly shadow: _angular_core.InputSignal<AscCardShadow>;
|
|
2724
2750
|
/** Border radius — none · xs · sm · md · lg (mặc định) · xl · 2xl · 3xl · full */
|
|
2725
2751
|
readonly rounded: _angular_core.InputSignal<AscCardRadius>;
|
|
2752
|
+
/**
|
|
2753
|
+
* Kiểu card: `default` (nền + shadow) · `flat` (bỏ nền, shadow, padding thân — dùng cho card lồng
|
|
2754
|
+
* trong trang, tiêu đề + nội dung thẳng hàng với nội dung trang).
|
|
2755
|
+
*/
|
|
2756
|
+
readonly variant: _angular_core.InputSignal<AscCardVariant>;
|
|
2726
2757
|
/** CSS class bổ sung vào host */
|
|
2727
2758
|
readonly styleClass: _angular_core.InputSignal<string>;
|
|
2728
2759
|
protected readonly _simpleTitle: _angular_core.Signal<string>;
|
|
@@ -2730,7 +2761,7 @@ declare class AscCardComponent {
|
|
|
2730
2761
|
protected readonly _innerCls: _angular_core.Signal<string>;
|
|
2731
2762
|
protected readonly _hostCls: _angular_core.Signal<string>;
|
|
2732
2763
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AscCardComponent, never>;
|
|
2733
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscCardComponent, "asc-card", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, {}, ["_headerTpl", "_footerTpl"], ["*"], true, never>;
|
|
2764
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscCardComponent, "asc-card", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "shadow": { "alias": "shadow"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, {}, ["_headerTpl", "_footerTpl"], ["*"], true, never>;
|
|
2734
2765
|
}
|
|
2735
2766
|
|
|
2736
2767
|
type AscDividerLayout = 'horizontal' | 'vertical';
|
|
@@ -3071,7 +3102,25 @@ declare class LayoutService {
|
|
|
3071
3102
|
getPrimary: _angular_core.Signal<string | undefined>;
|
|
3072
3103
|
getSurface: _angular_core.Signal<string | null | undefined>;
|
|
3073
3104
|
isOverlay: _angular_core.Signal<boolean>;
|
|
3105
|
+
/** Kiểu thu gọn sidebar desktop — AscLayout đặt theo input / config `layout.sidebarCollapse`. */
|
|
3106
|
+
sidebarCollapse: _angular_core.WritableSignal<"hidden" | "rail">;
|
|
3107
|
+
/**
|
|
3108
|
+
* Sidebar đang thu gọn dạng dải icon (menu static + đã bấm thu gọn + kiểu 'rail').
|
|
3109
|
+
* Chỉ có hiệu lực giao diện ở desktop (CSS trong media ≥ 992px) — logic click dùng kèm `isDesktop()`.
|
|
3110
|
+
*/
|
|
3111
|
+
isRail: _angular_core.Signal<boolean>;
|
|
3074
3112
|
transitionComplete: _angular_core.WritableSignal<boolean>;
|
|
3113
|
+
/** Cách xác định mục menu active — AscLayout đặt theo input / config `layout.menuActiveMatch`. */
|
|
3114
|
+
menuActiveMatch: _angular_core.WritableSignal<"exact" | "longest-prefix">;
|
|
3115
|
+
/** Đường dẫn (theo segment) của mọi mục menu có `routerLink` đang hiển thị — AppMenu cập nhật theo model. */
|
|
3116
|
+
menuLinkPaths: _angular_core.WritableSignal<string[][]>;
|
|
3117
|
+
/** URL hiện tại (AppMenu cập nhật sau mỗi lần điều hướng) — để template mục menu tính lại active. */
|
|
3118
|
+
menuUrl: _angular_core.WritableSignal<string>;
|
|
3119
|
+
/**
|
|
3120
|
+
* Chế độ 'longest-prefix': `linkPath` có phải mục menu khớp dài nhất với `urlPath` không.
|
|
3121
|
+
* Khớp = `linkPath` là tiền tố (theo segment) của `urlPath`; mục gốc (`/`, không segment) chỉ khớp đúng `/`.
|
|
3122
|
+
*/
|
|
3123
|
+
isLongestMenuPrefix(linkPath: string[], urlPath: string[]): boolean;
|
|
3075
3124
|
isDesktop(): boolean;
|
|
3076
3125
|
isMobile(): boolean;
|
|
3077
3126
|
onConfigUpdate(): void;
|
|
@@ -3087,6 +3136,8 @@ declare class AscLayout implements OnDestroy {
|
|
|
3087
3136
|
router: Router;
|
|
3088
3137
|
menuItems: _angular_core.InputSignal<AscMenuItem[]>;
|
|
3089
3138
|
sideBarLogo: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
3139
|
+
/** Logo nhỏ hiện khi sidebar thu gọn dạng dải ('rail'). Không truyền → vẫn dùng `sideBarLogo`. */
|
|
3140
|
+
sideBarLogoCollapsed: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
3090
3141
|
topBarLogo: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
3091
3142
|
iconToggle: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
3092
3143
|
breadCrumb: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
@@ -3096,11 +3147,25 @@ declare class AscLayout implements OnDestroy {
|
|
|
3096
3147
|
showFooter: _angular_core.InputSignal<boolean | undefined>;
|
|
3097
3148
|
private readonly config;
|
|
3098
3149
|
protected readonly resolvedShowFooter: _angular_core.Signal<boolean>;
|
|
3150
|
+
/**
|
|
3151
|
+
* Kiểu thu gọn sidebar desktop: 'hidden' (ẩn hẳn) | 'rail' (dải icon 84px).
|
|
3152
|
+
* Không truyền thì fallback về config.layout.sidebarCollapse → 'hidden'.
|
|
3153
|
+
*/
|
|
3154
|
+
sidebarCollapse: _angular_core.InputSignal<AscSidebarCollapseMode | undefined>;
|
|
3155
|
+
protected readonly resolvedSidebarCollapse: _angular_core.Signal<AscSidebarCollapseMode>;
|
|
3156
|
+
/**
|
|
3157
|
+
* Cách sáng mục menu: 'exact' | 'longest-prefix' (trang con sáng mục cha + mở nhóm).
|
|
3158
|
+
* Không truyền thì fallback về config.layout.menuActiveMatch → 'exact'.
|
|
3159
|
+
*/
|
|
3160
|
+
menuActiveMatch: _angular_core.InputSignal<AscMenuActiveMatch | undefined>;
|
|
3161
|
+
protected readonly resolvedMenuActiveMatch: _angular_core.Signal<AscMenuActiveMatch>;
|
|
3162
|
+
private collapsedRestored;
|
|
3099
3163
|
constructor(layoutService: LayoutService, renderer: Renderer2, router: Router);
|
|
3100
3164
|
get containerClass(): {
|
|
3101
3165
|
'layout-overlay': boolean;
|
|
3102
3166
|
'layout-static': boolean;
|
|
3103
|
-
'layout-static-inactive': boolean
|
|
3167
|
+
'layout-static-inactive': boolean;
|
|
3168
|
+
'layout-sidebar-rail': boolean;
|
|
3104
3169
|
'layout-overlay-active': boolean | undefined;
|
|
3105
3170
|
'layout-mobile-active': boolean | undefined;
|
|
3106
3171
|
};
|
|
@@ -3112,7 +3177,7 @@ declare class AscLayout implements OnDestroy {
|
|
|
3112
3177
|
overlayMenuOpenSubscription: Subscription;
|
|
3113
3178
|
menuOutsideClickListener: (() => void) | null;
|
|
3114
3179
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AscLayout, never>;
|
|
3115
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscLayout, "asc-layout", never, { "menuItems": { "alias": "menuItems"; "required": true; "isSignal": true; }; "sideBarLogo": { "alias": "sideBarLogo"; "required": false; "isSignal": true; }; "topBarLogo": { "alias": "topBarLogo"; "required": false; "isSignal": true; }; "iconToggle": { "alias": "iconToggle"; "required": false; "isSignal": true; }; "breadCrumb": { "alias": "breadCrumb"; "required": false; "isSignal": true; }; "dropdownTpl": { "alias": "dropdownTpl"; "required": false; "isSignal": true; }; "footerSidebarTpl": { "alias": "footerSidebarTpl"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
3180
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscLayout, "asc-layout", never, { "menuItems": { "alias": "menuItems"; "required": true; "isSignal": true; }; "sideBarLogo": { "alias": "sideBarLogo"; "required": false; "isSignal": true; }; "sideBarLogoCollapsed": { "alias": "sideBarLogoCollapsed"; "required": false; "isSignal": true; }; "topBarLogo": { "alias": "topBarLogo"; "required": false; "isSignal": true; }; "iconToggle": { "alias": "iconToggle"; "required": false; "isSignal": true; }; "breadCrumb": { "alias": "breadCrumb"; "required": false; "isSignal": true; }; "dropdownTpl": { "alias": "dropdownTpl"; "required": false; "isSignal": true; }; "footerSidebarTpl": { "alias": "footerSidebarTpl"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "sidebarCollapse": { "alias": "sidebarCollapse"; "required": false; "isSignal": true; }; "menuActiveMatch": { "alias": "menuActiveMatch"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
3116
3181
|
}
|
|
3117
3182
|
|
|
3118
3183
|
declare class AscBreadcrumb {
|
|
@@ -3345,4 +3410,4 @@ declare class AscTrimSpaceDirective {
|
|
|
3345
3410
|
}
|
|
3346
3411
|
|
|
3347
3412
|
export { ASC_BASE_CONTROL, ASC_BUILTIN_ICONS, ASC_BUILTIN_ICON_DEFAULT_VIEWBOX, ASC_BUILTIN_ICON_VIEWBOX, ASC_MESSAGES_EN_US, ASC_MESSAGES_VI_VN, ASC_PRESET, ASC_UI_CONFIG, ASC_UI_DEFAULT_CONFIG, ASC_UI_MESSAGES, AscAccordionComponent, AscAccordionItemComponent, AscAlertComponent, AscAutoCompleteComponent, AscAvatarComponent, AscAvatarGroupComponent, AscBadgeComponent, AscBoxDirective, AscBreadcrumb, AscButtonComponent, AscCardComponent, AscCardFooterDirective, AscCardHeaderDirective, AscCheckboxComponent, AscConfirmDialog, AscConfirmPopup, AscConfirmService, AscDatepickerComponent, AscDialogComponent, AscDialogFooterDirective, AscDialogHeaderDirective, AscDividerComponent, AscEmptyStateComponent, AscFormFieldComponent, AscIconComponent, AscIconService, AscInputComponent, AscInputMaskComponent, AscInputNumberComponent, AscLayout, AscLoadingBarComponent, AscLoadingOverlayComponent, AscLocaleService, AscMessageErrorPipe, AscPaginatorComponent, AscPasswordComponent, AscPicklistComponent, AscPopoverComponent, AscProgressBarComponent, AscRadioComponent, AscSelectButtonComponent, AscSelectComponent, AscSidebarComponent, AscSidebarFooterDirective, AscSidebarHeaderDirective, AscSkeletonComponent, AscSpinnerComponent, AscStepComponent, AscStepContentDirective, AscStepperComponent, AscSvgIconComponent, AscTabComponent, AscTableCaptionDirective, AscTableCellDirective, AscTableComponent, AscTableEmptyDirective, AscTableExpandDirective, AscTabsComponent, AscTextDirective, AscTextareaComponent, AscThemeService, AscTimelineComponent, AscToast, AscToastService, AscToggleSwitchComponent, AscTooltipDirective, AscTrimSpaceDirective, AscTypographyDirective, AscUpload, BaseControlAccessor, ascCls, ascUniqueId, coerceArray, coerceBooleanProperty, coerceNumberProperty, coerceStringProperty, isAscSeverity, isAscSize, provideAscUI, resolveAscBuiltinIcon };
|
|
3348
|
-
export type { AscAlertSeverity, AscAutoCompleteItem, AscAutoCompleteLazyLoadEvent, AscAvatarShape, AscAvatarSize, AscBadgeConfig, AscBadgeSeverity, AscBgColor, AscBorderColor, AscBorderStyle, AscBorderWidth, AscBoxHeight, AscBoxRadius, AscBoxWidth, AscBuiltinIconName, AscButtonVariant, AscCardRadius, AscCardShadow, AscCheckboxOption, AscColumnFormat, AscColumnVisibility, AscConfirmOptions, AscConfirmPopupOptions, AscDateSelectionMode, AscDateValue, AscDateView, AscDividerAlign, AscDividerLayout, AscDividerType, AscFontWeight, AscFormLayout, AscHourFormat, AscIconPosition, AscInputVariant, AscLeading, AscLocale, AscMenuItem, AscNumberType, AscProgressBarMode, AscSelectOption, AscSelectionMode, AscSeverity, AscSize, AscSkeletonPreset, AscSkeletonShape, AscSpinnerSize, AscTableAction, AscTableCellContext, AscTableColumn, AscTableColumnType, AscTableExpandContext, AscTableFilterMeta, AscTableLazyLoadEvent, AscTablePageEvent, AscTableSortEvent, AscTableSortMeta, AscTabsOrientation, AscTextAlign, AscTextColor, AscTextSize, AscTimelineAlign, AscTimelineItem, AscTimelineLayout, AscTimelineStatus, AscToastOptions, AscToastSeverity, AscTooltipPosition, AscTypographyToken, AscTypographyType, AscUIButtonConfig, AscUIConfig, AscUIInputConfig, AscUILayoutConfig, AscUIMessages, AscUITableConfig, AscUIThemeConfig, AscUIToastConfig, AscUIValidationConfig, AscValidationMessageFn, AscValidationMessages };
|
|
3413
|
+
export type { AscAlertSeverity, AscAutoCompleteItem, AscAutoCompleteLazyLoadEvent, AscAvatarShape, AscAvatarSize, AscBadgeConfig, AscBadgeSeverity, AscBgColor, AscBorderColor, AscBorderStyle, AscBorderWidth, AscBoxHeight, AscBoxRadius, AscBoxWidth, AscBuiltinIconName, AscButtonVariant, AscCardRadius, AscCardShadow, AscCardVariant, AscCheckboxOption, AscColumnFormat, AscColumnVisibility, AscConfirmOptions, AscConfirmPopupOptions, AscDateSelectionMode, AscDateValue, AscDateView, AscDividerAlign, AscDividerLayout, AscDividerType, AscFontWeight, AscFormLayout, AscHourFormat, AscIconPosition, AscInputVariant, AscLeading, AscLocale, AscMenuActiveMatch, AscMenuItem, AscNumberType, AscProgressBarMode, AscSelectOption, AscSelectionMode, AscSeverity, AscSidebarCollapseMode, AscSize, AscSkeletonPreset, AscSkeletonShape, AscSpinnerSize, AscTableAction, AscTableCellContext, AscTableColumn, AscTableColumnType, AscTableExpandContext, AscTableFilterMeta, AscTableLazyLoadEvent, AscTablePageEvent, AscTableSortEvent, AscTableSortMeta, AscTabsOrientation, AscTextAlign, AscTextColor, AscTextSize, AscTimelineAlign, AscTimelineItem, AscTimelineLayout, AscTimelineStatus, AscToastOptions, AscToastSeverity, AscTooltipPosition, AscTypographyToken, AscTypographyType, AscUIButtonConfig, AscUIConfig, AscUIInputConfig, AscUILayoutConfig, AscUIMessages, AscUITableConfig, AscUIThemeConfig, AscUIToastConfig, AscUIValidationConfig, AscValidationMessageFn, AscValidationMessages };
|