@libs-ui/components-line-clamp 0.2.357-7 → 0.2.357-9
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/README.md +2 -10
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -226,8 +226,8 @@ export class ParentExampleComponent {
|
|
|
226
226
|
|
|
227
227
|
| Output | Type | Mô tả | Handler TS | Binding HTML |
|
|
228
228
|
|---|---|---|---|---|
|
|
229
|
-
| `(outAction)` | `string` | Phát ra chuỗi `'view-more'` khi nhấn nút Xem thêm, hoặc `'hidden-more'` khi nhấn nút Thu gọn | `handlerAction(action: string): void {
|
|
230
|
-
| `(outClick)` | `Event \| TYPE_POPOVER_EVENT` | Phát ra khi người dùng click vào vùng nội dung hoặc Tooltip
|
|
229
|
+
| `(outAction)` | `string` | Phát ra chuỗi `'view-more'` khi nhấn nút Xem thêm, hoặc `'hidden-more'` khi nhấn nút Thu gọn | `handlerAction(action: string): void { console.log(action); }` | `(outAction)="handlerAction($event)"` |
|
|
230
|
+
| `(outClick)` | `Event \| TYPE_POPOVER_EVENT` | Phát ra khi người dùng click vào vùng nội dung (giá trị là `Event`) hoặc khi Tooltip nhận sự kiện click (giá trị là chuỗi `'click'` từ `TYPE_POPOVER_EVENT`) | `handlerClick(event: Event \| string): void { if (event instanceof Event) { event.stopPropagation(); } console.log(event); }` | `(outClick)="handlerClick($event)"` |
|
|
231
231
|
| `(outDisplayLineClamp)` | `boolean` | Phát ra trạng thái thu gọn hiện tại (`true` = đang thu gọn, `false` = đã mở rộng). Kích hoạt khi nội dung vượt `maxHeight` | `handlerDisplayLineClamp(isCollapsed: boolean): void { this.isCollapsed.set(isCollapsed); }` | `(outDisplayLineClamp)="handlerDisplayLineClamp($event)"` |
|
|
232
232
|
| `(outFunctionControl)` | `ILineClampFunctionControlEvent` | Phát ra ngay khi component khởi tạo (`ngOnInit`), cung cấp các method điều khiển để component cha gọi từ bên ngoài | `handlerFunctionControl(control: ILineClampFunctionControlEvent): void { this.lineClampControl = control; }` | `(outFunctionControl)="handlerFunctionControl($event)"` |
|
|
233
233
|
|
|
@@ -290,11 +290,3 @@ export interface ILineClampConfig {
|
|
|
290
290
|
⚠️ **outFunctionControl phát ra khi ngOnInit**: Event `(outFunctionControl)` chỉ phát ra một lần duy nhất khi component khởi tạo. Cần lưu lại reference để dùng sau: `private lineClampControl: ILineClampFunctionControlEvent | undefined`.
|
|
291
291
|
|
|
292
292
|
⚠️ **Resize tự động**: Component lắng nghe sự kiện `window:resize` và tự động gọi `refresh()`. Việc này đảm bảo trạng thái clamp luôn chính xác khi kích thước viewport thay đổi.
|
|
293
|
-
|
|
294
|
-
## Demo
|
|
295
|
-
|
|
296
|
-
```bash
|
|
297
|
-
npx nx serve core-ui
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
Truy cập: http://localhost:4500/components/line-clamp
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libs-ui/components-line-clamp",
|
|
3
|
-
"version": "0.2.357-
|
|
3
|
+
"version": "0.2.357-9",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=18.0.0",
|
|
6
6
|
"@angular/core": ">=18.0.0",
|
|
7
|
-
"@libs-ui/interfaces-types": "0.2.357-
|
|
8
|
-
"@libs-ui/components-buttons-button": "0.2.357-
|
|
9
|
-
"@libs-ui/components-popover": "0.2.357-
|
|
10
|
-
"@libs-ui/pipes-escape-html": "0.2.357-
|
|
11
|
-
"@libs-ui/pipes-security-trust": "0.2.357-
|
|
7
|
+
"@libs-ui/interfaces-types": "0.2.357-9",
|
|
8
|
+
"@libs-ui/components-buttons-button": "0.2.357-9",
|
|
9
|
+
"@libs-ui/components-popover": "0.2.357-9",
|
|
10
|
+
"@libs-ui/pipes-escape-html": "0.2.357-9",
|
|
11
|
+
"@libs-ui/pipes-security-trust": "0.2.357-9",
|
|
12
12
|
"@ngx-translate/core": "^15.0.0",
|
|
13
|
-
"@libs-ui/utils": "0.2.357-
|
|
13
|
+
"@libs-ui/utils": "0.2.357-9"
|
|
14
14
|
},
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"module": "fesm2022/libs-ui-components-line-clamp.mjs",
|