@libs-ui/components-pages-template-detail 0.2.355-9 → 0.2.356-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.
Files changed (2) hide show
  1. package/README.md +131 -2
  2. package/package.json +12 -12
package/README.md CHANGED
@@ -1,3 +1,132 @@
1
- # pages-template-detail
1
+ # @libs-ui/components-pages-template-detail
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ > Template trang chi tiết chuẩn Mobio UI, tích hợp đầy đủ header, navigation và các action phổ biến.
4
+
5
+ ## Giới thiệu
6
+
7
+ `LibsUiComponentsPagesTemplateDetailComponent` là một standalone Angular component cung cấp khung layout cho các trang chi tiết. Nó giúp chuẩn hóa giao diện và trải nghiệm người dùng (UX) cho các tác vụ như xem/sửa thông tin thực thể.
8
+
9
+ ### Tính năng
10
+
11
+ - ✅ **Header chuẩn hóa**: Tích hợp nút quay lại, tiêu đề và mô tả.
12
+ - ✅ **Actions linh hoạt**: Hỗ trợ nhiều loại nút (button, switch, dropdown, radio group) ở bên phải header.
13
+ - ✅ **Layout tùy biến**: Hỗ trợ chia tỉ lệ header (24/52/24) cho các trang cần hiển thị thông tin ở giữa.
14
+ - ✅ **Scroll Overlay**: Tích hợp sẵn directive xử lý cuộn nội dung mượt mà.
15
+ - ✅ **Angular Signals**: Sử dụng các tính năng mới nhất của Angular 18 (Input, Model).
16
+
17
+ ## Khi nào sử dụng
18
+
19
+ - Khi xây dựng trang chi tiết cho một thực thể (ví dụ: Chi tiết khách hàng, Chi tiết đơn hàng).
20
+ - Cần một header thống nhất có đầy đủ các nút chức năng (Lưu, Hủy, Thao tác khác).
21
+ - Phù hợp cho các layout yêu cầu sự tập trung vào nội dung chính nhưng vẫn cần truy cập nhanh các hành động quản lý.
22
+
23
+ ## Cài đặt
24
+
25
+ ```bash
26
+ # npm
27
+ npm install @libs-ui/components-pages-template-detail
28
+
29
+ # yarn
30
+ yarn add @libs-ui/components-pages-template-detail
31
+ ```
32
+
33
+ ## Import
34
+
35
+ ```typescript
36
+ import { LibsUiComponentsPagesTemplateDetailComponent } from '@libs-ui/components-pages-template-detail';
37
+
38
+ @Component({
39
+ standalone: true,
40
+ imports: [LibsUiComponentsPagesTemplateDetailComponent],
41
+ // ...
42
+ })
43
+ export class YourDetailComponent {}
44
+ ```
45
+
46
+ ## Ví dụ
47
+
48
+ ### Cấu hình cơ bản
49
+
50
+ ```html
51
+ <libs_ui-components-pages_template-detail
52
+ [configTitle]="{
53
+ config: { content: 'Chi tiết khách hàng' },
54
+ isShowBackToListLabel: true
55
+ }"
56
+ [configRight]="[
57
+ {
58
+ key: 'button',
59
+ configButton: { label: 'Lưu thay đổi', type: 'button-primary' }
60
+ }
61
+ ]"
62
+ (outClose)="onBack()">
63
+ <div class="p-6">
64
+ <!-- Nội dung chi tiết ở đây -->
65
+ <app-user-form></app-user-form>
66
+ </div>
67
+ </libs_ui-components-pages_template-detail>
68
+ ```
69
+
70
+ ## API
71
+
72
+ ### libs_ui-components-pages_template-detail
73
+
74
+ #### Inputs
75
+
76
+ | Property | Type | Default | Description |
77
+ | ---------------------- | ---------------------------------------- | ----------- | -------------------------------------------------- |
78
+ | `[classIncludeBody]` | `string` | `undefined` | Custom class cho phần thân trang. |
79
+ | `[classIncludeHeader]` | `string` | `undefined` | Custom class cho phần header. |
80
+ | `[configCenter]` | `IPagesTemplateDetailConfigCenter` | `undefined` | Cấu hình phần nội dung giữa header. |
81
+ | `[configRight]` | `Array<IPagesTemplateDetailConfigRight>` | `undefined` | Danh sách các action group ở bên phải header. |
82
+ | `[configTitle]` | `IPagesTemplateDetailConfigTitle` | `undefined` | Cấu hình tiêu đề, mô tả và nút quay lại. |
83
+ | `[disable]` | `boolean` (model) | `false` | Trạng thái vô hiệu hóa toàn bộ action trên header. |
84
+ | `[isSplitHeaderRatio]` | `boolean` | `false` | Bật tỉ lệ chia header 24/52/24. |
85
+ | `[zIndex]` | `number` | `1000` | Thứ tự hiển thị lớp phủ. |
86
+
87
+ #### Outputs
88
+
89
+ | Property | Type | Description |
90
+ | ----------------------------------- | -------------------------------------------- | ---------------------------------------------------- |
91
+ | `(outClose)` | `EventEmitter<boolean>` | Phát ra khi người dùng click nút quay lại hoặc đóng. |
92
+ | `(outFunctionControl)` | `EventEmitter<IPageDetailFunctionControl>` | Cung cấp hàm điều khiển trạng thái component. |
93
+ | `(outScroll)` | `EventEmitter<Event>` | Phát ra khi thực hiện cuộn trong trang. |
94
+ | `(outSelectedButtonDropdown)` | `EventEmitter<IEmitSelectKey>` | Phát ra khi chọn item từ Button Dropdown. |
95
+ | `(outSelectedMenuDropdown)` | `EventEmitter<IEmitSelectKey \| undefined>` | Phát ra khi chọn item từ Menu Dropdown. |
96
+ | `(outSelectedRadio)` | `EventEmitter<IRadioEvent>` | Phát ra khi thay đổi giá trị Radio Group. |
97
+ | `(outStateDisable)` | `EventEmitter<boolean>` | Phát ra khi trạng thái disable thay đổi. |
98
+ | `(outTooltipButtonFunctionControl)` | `EventEmitter<IPopoverFunctionControlEvent>` | Cung cấp hàm điều khiển cho nút tooltip/popover. |
99
+
100
+ ## Types & Interfaces
101
+
102
+ ```typescript
103
+ export interface IPagesTemplateDetailConfigTitle extends IPopover {
104
+ ignoreButtonBack?: boolean;
105
+ isShowBackToListLabel?: boolean;
106
+ configDescription?: {
107
+ innerView?: string;
108
+ config: IPopoverOverlay;
109
+ };
110
+ }
111
+
112
+ export interface IPagesTemplateDetailConfigRight {
113
+ key: 'button' | 'swicth' | 'radio-group' | 'button-dropdown' | 'menu-dropdown' | 'tooltip-button';
114
+ configButton?: IButton;
115
+ configSwicth?: ISwitch;
116
+ configDropdown?: IDropdown;
117
+ // ...
118
+ }
119
+ ```
120
+
121
+ ## Công nghệ
122
+
123
+ | Technology | Purpose |
124
+ | --------------- | ---------------------- |
125
+ | Angular 18 | Framework chính |
126
+ | Angular Signals | Quản lý state phản ứng |
127
+ | Mobio UI Kit | Hệ thống design gốc |
128
+ | SCSS | Styling chuyên biệt |
129
+
130
+ ## License
131
+
132
+ MIT
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@libs-ui/components-pages-template-detail",
3
- "version": "0.2.355-9",
3
+ "version": "0.2.356-0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
7
- "@libs-ui/components-buttons-button": "0.2.355-9",
8
- "@libs-ui/components-buttons-dropdown": "0.2.355-9",
9
- "@libs-ui/components-dropdown": "0.2.355-9",
10
- "@libs-ui/components-popover": "0.2.355-9",
11
- "@libs-ui/components-radio-group": "0.2.355-9",
12
- "@libs-ui/components-radio-single": "0.2.355-9",
13
- "@libs-ui/components-scroll-overlay": "0.2.355-9",
14
- "@libs-ui/components-switch": "0.2.355-9",
15
- "@libs-ui/pipes-escape-html": "0.2.355-9",
16
- "@libs-ui/utils": "0.2.355-9",
7
+ "@libs-ui/components-buttons-button": "0.2.356-0",
8
+ "@libs-ui/components-buttons-dropdown": "0.2.356-0",
9
+ "@libs-ui/components-dropdown": "0.2.356-0",
10
+ "@libs-ui/components-popover": "0.2.356-0",
11
+ "@libs-ui/components-radio-group": "0.2.356-0",
12
+ "@libs-ui/components-radio-single": "0.2.356-0",
13
+ "@libs-ui/components-scroll-overlay": "0.2.356-0",
14
+ "@libs-ui/components-switch": "0.2.356-0",
15
+ "@libs-ui/pipes-escape-html": "0.2.356-0",
16
+ "@libs-ui/utils": "0.2.356-0",
17
17
  "@ngx-translate/core": "^15.0.0",
18
- "@libs-ui/interfaces-types": "0.2.355-9"
18
+ "@libs-ui/interfaces-types": "0.2.356-0"
19
19
  },
20
20
  "sideEffects": false,
21
21
  "module": "fesm2022/libs-ui-components-pages-template-detail.mjs",