vhobjects-service 0.5.6 → 0.5.8

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.
@@ -64,6 +64,45 @@ export declare class AnimationsConfigComponent implements OnInit {
64
64
  * @param event
65
65
  */
66
66
  onSearchFont(event: any, item: any): void;
67
+ /**
68
+ * Thêm một phần tử văn bản mặc định vào mảng.
69
+ * Trước khi thêm, hàm sẽ chuẩn hóa toàn bộ các phần tử hiện có về kiểu chuỗi (string).
70
+ * @param {Object} item - Đối tượng chứa dữ liệu cần xử lý.
71
+ * @param {Array} item.value - Mảng các giá trị văn bản.
72
+ * @param {string} item.var - Tên biến định danh dùng cho hiệu ứng animation.
73
+ */
74
+ handleAddText(item: any): void;
75
+ /**
76
+ * Thêm một phần tử văn bản mặc định vào mảng.
77
+ * Trước khi thêm, hàm sẽ chuẩn hóa toàn bộ các phần tử hiện có về kiểu chuỗi (string).
78
+ * @param {Object} item - Đối tượng chứa dữ liệu cần xử lý.
79
+ * @param {Array} item.value - Mảng các giá trị văn bản.
80
+ * @param {string} item.var - Tên biến định danh dùng cho hiệu ứng animation.
81
+ */
82
+ handleAddLangTexts(item: any): void;
83
+ /**
84
+ * Xóa một phần tử khỏi mảng tại vị trí xác định.
85
+ * Sau khi xóa, hàm sẽ kích hoạt hiệu ứng animation để cập nhật giao diện.
86
+ * @param {Object} item - Đối tượng chứa dữ liệu cần xử lý.
87
+ * @param {number} index - Vị trí (chỉ số) của phần tử cần xóa.
88
+ */
89
+ handleRemoveText(item: any, index: any): void;
90
+ /**
91
+ * Xử lý sự kiện kéo thả để thay đổi thứ tự các phần tử trong mảng.
92
+ * @param {Object} item - Đối tượng chứa mảng dữ liệu.
93
+ * @param {CdkDragDrop<string[]>} event - Sự kiện kéo thả từ Angular CDK.
94
+ */
95
+ handleTextPositionDrop(item: any, event: any): void;
96
+ /**
97
+ * Hàm theo dõi (trackBy) cho vòng lặp ngFor trong Angular.
98
+ * Giúp Angular định danh các phần tử trong danh sách dựa trên chỉ số (index)
99
+ * thay vì giá trị của phần tử. Điều này ngăn chặn việc render lại toàn bộ DOM
100
+ * khi giá trị chuỗi thay đổi, từ đó khắc phục lỗi mất focus khi người dùng nhập liệu.
101
+ * @param {number} index - Chỉ số của phần tử hiện tại trong mảng.
102
+ * @param {any} item - Giá trị của phần tử tại vị trí index đó.
103
+ * @returns {number} Trả về index để Angular dùng làm khóa định danh.
104
+ */
105
+ trackTextListByIndex(index: number, item: any): number;
67
106
  handleAnimationPositionShowHide(item: any): void;
68
107
  handleAnimationDisplayShowHide(item: any): void;
69
108
  handleAnimationOverflowShowHide(item: any): void;
@@ -5,6 +5,8 @@ export declare class AnimationTextComponent implements OnInit {
5
5
  private vhQueryAutoWeb;
6
6
  effectHover: any;
7
7
  effectsId: any;
8
+ currentAnimateChangeTextIndex: number;
9
+ animateChangeTextInterval: any;
8
10
  constructor(vhQueryAutoWeb: VhQueryAutoWeb);
9
11
  ngOnInit(): void;
10
12
  /**
@@ -12,6 +14,12 @@ export declare class AnimationTextComponent implements OnInit {
12
14
  * @param event
13
15
  */
14
16
  handleHover(event: MouseEvent): void;
17
+ /**
18
+ * Khởi tạo hiệu ứng thay đổi văn bản tự động theo chu kỳ.
19
+ * Hàm này sẽ cập nhật chỉ số (index) của từ hiển thị dựa trên danh sách từ vựng
20
+ * đã được cấu hình theo ngôn ngữ hiện tại.
21
+ */
22
+ private startAnimateChangeText;
15
23
  static ɵfac: i0.ɵɵFactoryDeclaration<AnimationTextComponent, never>;
16
24
  static ɵcmp: i0.ɵɵComponentDeclaration<AnimationTextComponent, "app-animation-text", never, { "effectHover": "effectHover"; }, {}, never, never>;
17
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vhobjects-service",
3
- "version": "0.5.6",
3
+ "version": "0.5.8",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"