@libs-ui/components-scroll-measure-items-direction-horizontal 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.
Files changed (2) hide show
  1. package/README.md +1 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -324,7 +324,7 @@ export class ProgrammaticScrollComponent {
324
324
 
325
325
  | Output | Type | Mô tả | Handler TS | Binding HTML |
326
326
  |---|---|---|---|---|
327
- | `(outViewPortItem)` | `Array<any>` | Emit danh sách item cần render trong viewport (kèm buffer 3 item). Consumer dùng mảng này cho `@for`. | `handlerViewPortItem(items: T_Item[]): void { items.stopPropagation?.(); this.viewPortItems.set(items); }` | `(outViewPortItem)="handlerViewPortItem($event)"` |
327
+ | `(outViewPortItem)` | `Array<any>` | Emit danh sách item cần render trong viewport (kèm buffer 3 item). Consumer dùng mảng này cho `@for`. | `handlerViewPortItem(items: T_Item[]): void { this.viewPortItems.set(items); }` | `(outViewPortItem)="handlerViewPortItem($event)"` |
328
328
  | `(outFunctionControl)` | `IScrollMeasureItemDirectionHorizontalFunctionsControl` | Emit object chứa các hàm điều khiển scroll. Lưu lại để gọi `scrollToIndex`, `scrollInto`,... theo chương trình. | `handlerFunctionControl(ctrl: IScrollMeasureItemDirectionHorizontalFunctionsControl): void { this.scrollControl = ctrl; }` | `(outFunctionControl)="handlerFunctionControl($event)"` |
329
329
  | `(outDivVirtual)` | `HTMLDivElement` | Emit element ảo (invisible) được chèn vào container để duy trì tổng chiều rộng scroll. Ít khi cần dùng trực tiếp. | `handlerDivVirtual(el: HTMLDivElement): void { this.virtualEl = el; }` | `(outDivVirtual)="handlerDivVirtual($event)"` |
330
330
  | `(outPaddingLeft)` | `number` | Emit giá trị `paddingLeft` (px) hiện tại của inner container — bù cho các item đã scroll qua khỏi viewport bên trái. | `handlerPaddingLeft(value: number): void { this.currentPaddingLeft = value; }` | `(outPaddingLeft)="handlerPaddingLeft($event)"` |
@@ -388,11 +388,3 @@ interface IScrollMeasureStoreItemConvert {
388
388
  ⚠️ **Element ảo `divVirtual` được chèn vào outer container**: Directive tự tạo và quản lý một `<div>` ẩn bên trong `elementScroll` để giữ đúng tổng chiều rộng scroll. Không cần tạo thủ công. Element này tự xóa khi directive destroy.
389
389
 
390
390
  ⚠️ **`items` thay đổi reference mới kích hoạt đo lại**: Mỗi khi `items` signal thay đổi, toàn bộ width được đo lại song song qua `Promise.all`. Với list rất lớn (> 5000 item) và hàm đo nặng, cân nhắc debounce ở phía consumer trước khi cập nhật `items`.
391
-
392
- ## Demo
393
-
394
- ```bash
395
- npx nx serve core-ui
396
- ```
397
-
398
- Truy cập: http://localhost:4500/components/scroll-measure-items/direction-horizontal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libs-ui/components-scroll-measure-items-direction-horizontal",
3
- "version": "0.2.357-7",
3
+ "version": "0.2.357-9",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=18.0.0",
6
6
  "rxjs": "~7.8.0"