vhobjects-user 1.0.9 → 1.1.1

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.
@@ -83,7 +83,10 @@ export declare class AtwFrameCategories implements OnInit {
83
83
  hanldleProcessResizeOffset: EventEmitter<any>;
84
84
  isComponentExist: ElementRef<HTMLDivElement>;
85
85
  changeDetection: ChangeDetectionStrategy.OnPush;
86
+ /** Tập hợp key của các ô đang ở trạng thái hover (chuột), dùng để chống gọi trùng. */
86
87
  private hovering;
88
+ /** Phần tử đang được chạm giữ hiện tại, null nếu không có. */
89
+ private activeTouchItem;
87
90
  constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, vhEventMediator: VhEventMediator, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
88
91
  platformId: Object, router: Router, zone: NgZone);
89
92
  ngOnInit(): void;
@@ -168,7 +171,50 @@ export declare class AtwFrameCategories implements OnInit {
168
171
  * Trả về URL đầy đủ của trang hiện tại kèm query param page, dùng cho href hiển thị khi hover
169
172
  */
170
173
  pageUrl(page: number): string;
174
+ /**
175
+ * Xử lý sự kiện hover (chuột vào/ra) của một ô và đồng bộ sang các vật thể con.
176
+ *
177
+ * Hàm so sánh trạng thái mới với trạng thái đã lưu trong `hovering` để biết
178
+ * hover có thật sự thay đổi hay không. Chỉ khi có thay đổi mới chạy vào
179
+ * NgZone và gọi `functionService.setHover`, nhờ vậy tránh kích hoạt
180
+ * change detection thừa (quan trọng khi dùng OnPush).
181
+ *
182
+ * @param key Định danh của ô cần cập nhật hover.
183
+ * @param v `true` khi bắt đầu hover, `false` khi kết thúc hover.
184
+ */
171
185
  onCellHover(key: string, v: boolean): void;
186
+ /**
187
+ * Kiểm tra thiết bị hiện tại có phải thiết bị cảm ứng hay không.
188
+ *
189
+ * Dựa vào media query `(hover: none), (pointer: coarse)`, tức thiết bị không
190
+ * hỗ trợ hover hoặc dùng con trỏ kém chính xác như ngón tay. Trả về `false`
191
+ * khi không chạy trên trình duyệt (ví dụ SSR) vì không có `window`.
192
+ *
193
+ * @returns `true` nếu là thiết bị cảm ứng, ngược lại `false`.
194
+ */
195
+ private isTouchDevice;
196
+ /**
197
+ * Xử lý sự kiện bắt đầu chạm (touchstart) trên các thiết bị cảm ứng.
198
+ * Tìm phần tử ô (`cell_frame_`) gần nhất với điểm chạm, kích hoạt trạng thái
199
+ * tương tác (thêm class `is-touching` và gọi service hover).
200
+ *
201
+ * @param e - Sự kiện TouchEvent chứa thông tin về các điểm chạm.
202
+ * @remarks Không sử dụng `e.preventDefault()` để tránh làm mất khả năng cuộn trang (scroll) trên iOS.
203
+ */
204
+ onTouchStart(e: TouchEvent): void;
205
+ /**
206
+ * Xử lý sự kiện kết thúc chạm (touchend).
207
+ * Gỡ bỏ trạng thái tương tác (`is-touching` và reset hover service)
208
+ * khỏi phần tử đang được kích hoạt trước đó.
209
+ */
210
+ onTouchEnd(e: TouchEvent): void;
211
+ /**
212
+ * Xử lý sự kiện hủy chạm (touchcancel), ví dụ như khi có cuộc gọi đến
213
+ * hoặc cử chỉ hệ thống làm gián đoạn thao tác.
214
+ * Tương đương với hành động kết thúc chạm (`onTouchEnd`).
215
+ */
216
+ onTouchCancel(e: TouchEvent): void;
217
+ private clearTouch;
172
218
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameCategories, never>;
173
219
  static ɵcmp: i0.ɵɵComponentDeclaration<AtwFrameCategories, "atw-frame-categories", never, { "array_object_selected": "array_object_selected"; "resolution": "resolution"; "data": "data"; "id_subproject": "id_subproject"; "type": "type"; "objectChoosing": "objectChoosing"; "device": "device"; "blockChoosing": "blockChoosing"; "isPressingShift": "isPressingShift"; "isClone": "isClone"; }, { "showToolBarObject": "showToolBarObject"; "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
174
220
  }
@@ -1,6 +1,5 @@
1
- import { ChangeDetectionStrategy, EventEmitter, NgZone, OnInit } from '@angular/core';
1
+ import { ChangeDetectionStrategy, EventEmitter, NgZone, OnInit, ElementRef } from '@angular/core';
2
2
  import { VhEventMediator, VhQueryAutoWeb } from 'vhautowebdb';
3
- import { ElementRef } from '@angular/core';
4
3
  import { PipeFrameService } from '../../../../../services/pipe-frame.service';
5
4
  import { FunctionService } from 'vhobjects-service/src/services';
6
5
  import { ActivatedRoute, Router } from '@angular/router';
@@ -83,7 +82,10 @@ export declare class AtwFrameProducts implements OnInit {
83
82
  private isItemVisible;
84
83
  private link_object;
85
84
  changeDetection: ChangeDetectionStrategy.OnPush;
85
+ /** Tập hợp key của các ô đang ở trạng thái hover (chuột), dùng để chống gọi trùng. */
86
86
  private hovering;
87
+ /** Phần tử đang được chạm giữ hiện tại, null nếu không có. */
88
+ private activeTouchItem;
87
89
  constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
88
90
  vhEventMediator: VhEventMediator, platformId: Object, router: Router, route: ActivatedRoute, zone: NgZone);
89
91
  ngOnInit(): void;
@@ -173,7 +175,50 @@ export declare class AtwFrameProducts implements OnInit {
173
175
  * Trả về URL đầy đủ của trang hiện tại kèm query param page, dùng cho href hiển thị khi hover
174
176
  */
175
177
  pageUrl(page: number): string;
178
+ /**
179
+ * Xử lý sự kiện hover (chuột vào/ra) của một ô và đồng bộ sang các vật thể con.
180
+ *
181
+ * Hàm so sánh trạng thái mới với trạng thái đã lưu trong `hovering` để biết
182
+ * hover có thật sự thay đổi hay không. Chỉ khi có thay đổi mới chạy vào
183
+ * NgZone và gọi `functionService.setHover`, nhờ vậy tránh kích hoạt
184
+ * change detection thừa (quan trọng khi dùng OnPush).
185
+ *
186
+ * @param key Định danh của ô cần cập nhật hover.
187
+ * @param v `true` khi bắt đầu hover, `false` khi kết thúc hover.
188
+ */
176
189
  onCellHover(key: string, v: boolean): void;
190
+ /**
191
+ * Kiểm tra thiết bị hiện tại có phải thiết bị cảm ứng hay không.
192
+ *
193
+ * Dựa vào media query `(hover: none), (pointer: coarse)`, tức thiết bị không
194
+ * hỗ trợ hover hoặc dùng con trỏ kém chính xác như ngón tay. Trả về `false`
195
+ * khi không chạy trên trình duyệt (ví dụ SSR) vì không có `window`.
196
+ *
197
+ * @returns `true` nếu là thiết bị cảm ứng, ngược lại `false`.
198
+ */
199
+ private isTouchDevice;
200
+ /**
201
+ * Xử lý sự kiện bắt đầu chạm (touchstart) trên các thiết bị cảm ứng.
202
+ * Tìm phần tử ô (`cell_frame_`) gần nhất với điểm chạm, kích hoạt trạng thái
203
+ * tương tác (thêm class `is-touching` và gọi service hover).
204
+ *
205
+ * @param e - Sự kiện TouchEvent chứa thông tin về các điểm chạm.
206
+ * @remarks Không sử dụng `e.preventDefault()` để tránh làm mất khả năng cuộn trang (scroll) trên iOS.
207
+ */
208
+ onTouchStart(e: TouchEvent): void;
209
+ /**
210
+ * Xử lý sự kiện kết thúc chạm (touchend).
211
+ * Gỡ bỏ trạng thái tương tác (`is-touching` và reset hover service)
212
+ * khỏi phần tử đang được kích hoạt trước đó.
213
+ */
214
+ onTouchEnd(e: TouchEvent): void;
215
+ /**
216
+ * Xử lý sự kiện hủy chạm (touchcancel), ví dụ như khi có cuộc gọi đến
217
+ * hoặc cử chỉ hệ thống làm gián đoạn thao tác.
218
+ * Tương đương với hành động kết thúc chạm (`onTouchEnd`).
219
+ */
220
+ onTouchCancel(e: TouchEvent): void;
221
+ private clearTouch;
177
222
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameProducts, never>;
178
223
  static ɵcmp: i0.ɵɵComponentDeclaration<AtwFrameProducts, "atw-frame-products", never, { "array_object_selected": "array_object_selected"; "resolution": "resolution"; "data": "data"; "id_subproject": "id_subproject"; "type": "type"; "objectChoosing": "objectChoosing"; "device": "device"; "blockChoosing": "blockChoosing"; "isPressingShift": "isPressingShift"; "isClone": "isClone"; }, { "showToolBarObject": "showToolBarObject"; "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
179
224
  }
@@ -88,7 +88,10 @@ export declare class AtwFrameRepeat implements OnInit {
88
88
  searchValue: string;
89
89
  private searchDebounce;
90
90
  changeDetection: ChangeDetectionStrategy.OnPush;
91
+ /** Tập hợp key của các ô đang ở trạng thái hover (chuột), dùng để chống gọi trùng. */
91
92
  private hovering;
93
+ /** Phần tử đang được chạm giữ hiện tại, null nếu không có. */
94
+ private activeTouchItem;
92
95
  constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
93
96
  vhEventMediator: VhEventMediator, vhAlgorithm: VhAlgorithm, platformId: Object, router: Router, languageService: LanguageService, zone: NgZone);
94
97
  ngOnInit(): void;
@@ -96,6 +99,7 @@ export declare class AtwFrameRepeat implements OnInit {
96
99
  showToolBarObject: (event: any) => void;
97
100
  };
98
101
  ngOnChange(): void;
102
+ ngAfterViewInit(): void;
99
103
  getDetailObject(): Promise<void>;
100
104
  private fetchDataList;
101
105
  private setHeight;
@@ -177,7 +181,54 @@ export declare class AtwFrameRepeat implements OnInit {
177
181
  */
178
182
  pageUrl(page: number): string;
179
183
  private migrateStaticDataToBasics;
184
+ /**
185
+ * Xử lý sự kiện hover (chuột vào/ra) của một ô và đồng bộ sang các vật thể con.
186
+ *
187
+ * Hàm so sánh trạng thái mới với trạng thái đã lưu trong `hovering` để biết
188
+ * hover có thật sự thay đổi hay không. Chỉ khi có thay đổi mới chạy vào
189
+ * NgZone và gọi `functionService.setHover`, nhờ vậy tránh kích hoạt
190
+ * change detection thừa (quan trọng khi dùng OnPush).
191
+ *
192
+ * @param key Định danh của ô cần cập nhật hover.
193
+ * @param v `true` khi bắt đầu hover, `false` khi kết thúc hover.
194
+ */
180
195
  onCellHover(key: string, v: boolean): void;
196
+ /**
197
+ * Kiểm tra thiết bị hiện tại có phải thiết bị cảm ứng hay không.
198
+ *
199
+ * Dựa vào media query `(hover: none), (pointer: coarse)`, tức thiết bị không
200
+ * hỗ trợ hover hoặc dùng con trỏ kém chính xác như ngón tay. Trả về `false`
201
+ * khi không chạy trên trình duyệt (ví dụ SSR) vì không có `window`.
202
+ *
203
+ * @returns `true` nếu là thiết bị cảm ứng, ngược lại `false`.
204
+ */
205
+ private isTouchDevice;
206
+ /**
207
+ * Xử lý sự kiện bắt đầu chạm (touchstart) trên các thiết bị cảm ứng.
208
+ * Tìm phần tử ô (`cell_frame_`) gần nhất với điểm chạm, kích hoạt trạng thái
209
+ * tương tác (thêm class `is-touching` và gọi service hover).
210
+ *
211
+ * @param e - Sự kiện TouchEvent chứa thông tin về các điểm chạm.
212
+ * @remarks Không sử dụng `e.preventDefault()` để tránh làm mất khả năng cuộn trang (scroll) trên iOS.
213
+ */
214
+ onTouchStart(e: TouchEvent): void;
215
+ /**
216
+ * Xử lý sự kiện kết thúc chạm (touchend).
217
+ * Gỡ bỏ trạng thái tương tác (`is-touching` và reset hover service)
218
+ * khỏi phần tử đang được kích hoạt trước đó.
219
+ */
220
+ onTouchEnd(e: TouchEvent): void;
221
+ /**
222
+ * Xử lý sự kiện hủy chạm (touchcancel), ví dụ như khi có cuộc gọi đến
223
+ * hoặc cử chỉ hệ thống làm gián đoạn thao tác.
224
+ * Tương đương với hành động kết thúc chạm (`onTouchEnd`).
225
+ */
226
+ onTouchCancel(e: TouchEvent): void;
227
+ private clearTouch;
228
+ private resizeObserver;
229
+ private lastObservedSize;
230
+ private setupResizeObserver;
231
+ private handleResize;
181
232
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameRepeat, never>;
182
233
  static ɵcmp: i0.ɵɵComponentDeclaration<AtwFrameRepeat, "atw-frame-repeat", never, { "array_object_selected": "array_object_selected"; "resolution": "resolution"; "data": "data"; "id_subproject": "id_subproject"; "type": "type"; "objectChoosing": "objectChoosing"; "device": "device"; "blockChoosing": "blockChoosing"; "isPressingShift": "isPressingShift"; "isClone": "isClone"; }, { "showToolBarObject": "showToolBarObject"; "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
183
234
  }
@@ -50,12 +50,13 @@ export declare class AtwFrameSearchByKeyword implements OnInit {
50
50
  /** biến này giới hạn số sp hiển thị */
51
51
  private limit;
52
52
  private animation;
53
- private mainSectorMap;
54
53
  private priceFrom;
55
54
  private priceTo;
56
55
  private observer;
57
56
  private subscription;
58
57
  private mapType;
58
+ /** Bảng ánh xạ chuyển đổi giá trị từ giao diện (none/desc/asc) sang cấu hình Object gửi xuống Database */
59
+ private sortDateMapping;
59
60
  constructor(vhQueryAutoWeb: VhQueryAutoWeb, activatedRoute: ActivatedRoute, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
60
61
  router: Router, vhAlgorithm: VhAlgorithm, functionService: FunctionService, changeDetectorRef: ChangeDetectorRef, pipeFrameService: PipeFrameService, platformId: Object);
61
62
  ngOnDestroy(): void;
@@ -89,7 +90,27 @@ export declare class AtwFrameSearchByKeyword implements OnInit {
89
90
  gotoNextPage(): void;
90
91
  private isShowToolBarObject;
91
92
  array_object_selected: any[];
93
+ /**
94
+ * hàm này để kiểm tra objectChoosing có nằm trong mảng array_object_select hay ko để set lại zIndex cho object cho mục đích virtual_select
95
+ * @return boolean
96
+ */
97
+ private checkZindex;
92
98
  private onSearch;
99
+ /**
100
+ * Trả về danh sách tên trường thật trong DB.
101
+ * - Phần tử đầu tiên luôn là trường mặc định của sector (cố định, luôn được tìm).
102
+ * - Các phần tử sau là trường tuỳ chọn lấy từ staticdata.search_fields.
103
+ * - Trường bình thường: `${key}_${selectedLanguageCode}`
104
+ * - Trường nằm trong sector.rawFields (vd: brand): giữ nguyên
105
+ */
106
+ private getSearchFieldNames;
107
+ /**
108
+ * Gộp kết quả của nhiều trường, loại trùng theo _id (trường được chọn trước xếp trước).
109
+ * Mỗi query đã sort riêng nên cần sort lại toàn bộ nếu có cấu hình sort theo ngày.
110
+ */
111
+ private mergeSearchResults;
112
+ /** Xử lý chung kết quả tìm kiếm (cả ai_search lẫn regular_search) */
113
+ private handleSearchResult;
93
114
  private handlePaginateLocal;
94
115
  private setHeight;
95
116
  /** Hàm này trả về một chuỗi để chia layout cho grid
@@ -127,6 +148,10 @@ export declare class AtwFrameSearchByKeyword implements OnInit {
127
148
  * @param event
128
149
  */
129
150
  onDrop(event: DragEvent): void;
151
+ /**
152
+ * Trả về URL đầy đủ của trang hiện tại kèm query param page, dùng cho href hiển thị khi hover
153
+ */
154
+ pageUrl(page: number): string;
130
155
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameSearchByKeyword, never>;
131
156
  static ɵcmp: i0.ɵɵComponentDeclaration<AtwFrameSearchByKeyword, "atw-frame-search-by-keyword", never, { "resolution": "resolution"; "data": "data"; "id_subproject": "id_subproject"; "type": "type"; "objectChoosing": "objectChoosing"; "device": "device"; "blockChoosing": "blockChoosing"; "isPressingShift": "isPressingShift"; "isClone": "isClone"; "array_object_selected": "array_object_selected"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; "showToolBarObject": "showToolBarObject"; }, never, never>;
132
157
  }
@@ -1,4 +1,4 @@
1
- import { ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core';
1
+ import { ElementRef, EventEmitter, NgZone, OnInit, Renderer2 } from '@angular/core';
2
2
  import { VhQueryAutoWeb, VhEventMediator } from 'vhautowebdb';
3
3
  import { Subscription } from 'rxjs';
4
4
  import { PipeBlockPopupHoverService } from '../../../../../../services/pipe-block-popup-hover.service';
@@ -22,7 +22,10 @@ export declare class AtwButtonShowModal implements OnInit {
22
22
  private platformId;
23
23
  private drawerService;
24
24
  private element;
25
+ private ngZone;
25
26
  data: any;
27
+ index: any;
28
+ product: any;
26
29
  type: any;
27
30
  device: any;
28
31
  id_subproject: any;
@@ -63,10 +66,11 @@ export declare class AtwButtonShowModal implements OnInit {
63
66
  private previousUrl;
64
67
  /** Subscription để theo dõi sự kiện thay đổi ngôn ngữ */
65
68
  languageChangedSubscription: any;
66
- constructor(vhQueryAutoWeb: VhQueryAutoWeb, functionService: FunctionService, vhEventMediator: VhEventMediator, pipeBlockPopupHoverService: PipeBlockPopupHoverService, router: Router, renderer: Renderer2, platformId: Object, drawerService: DrawerService, element: ElementRef);
69
+ subProject: any;
70
+ constructor(vhQueryAutoWeb: VhQueryAutoWeb, functionService: FunctionService, vhEventMediator: VhEventMediator, pipeBlockPopupHoverService: PipeBlockPopupHoverService, router: Router, renderer: Renderer2, platformId: Object, drawerService: DrawerService, element: ElementRef, ngZone: NgZone);
67
71
  ngOnInit(): void;
68
72
  getDetailObject(): void;
69
- ngAfterViewInit(): void;
73
+ ngAfterViewInit(): Promise<void>;
70
74
  ngOnDestroy(): void;
71
75
  /**
72
76
  * Hàm set lại chiều cao, chiều rộng, và id của block
@@ -82,11 +86,28 @@ export declare class AtwButtonShowModal implements OnInit {
82
86
  * @param isClickMask: boolean - biến kiểm tra xem có phải click vào mask không
83
87
  */
84
88
  handleShowDialog(isOpen: boolean, isClickMask?: boolean): void;
89
+ ngOnChanges(): void;
85
90
  handleClick(): void;
86
91
  /**
87
92
  * Hàm xử lý sự kiện click ra ngoài để đóng popup
88
93
  */
89
94
  onClickOutside(event: Event): void;
95
+ /**
96
+ * Đăng ký component vào ComponentBridgeRegistry để embedded script
97
+ * có thể truy cập biến của component này qua `object('id').property`.
98
+ *
99
+ * Chỉ chạy trong môi trường:
100
+ * - Browser (không chạy khi SSR)
101
+ * - Loại trang là 'api' (không chạy ở 'page' hoặc 'admin')
102
+ *
103
+ * Biến được expose:
104
+ * - `product`: cho phép script đọc/ghi dữ liệu sản phẩm của button này
105
+ *
106
+ * Nếu component nằm trong *ngFor, `index` được truyền vào để
107
+ * registry phân biệt các bản sao (vd: `object('myBtn_0')`, `object('myBtn_1')`).
108
+ */
109
+ handleRegistertDataFromScript(): void;
110
+ runScript(eventName: string): Promise<void>;
90
111
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwButtonShowModal, never>;
91
- static ɵcmp: i0.ɵɵComponentDeclaration<AtwButtonShowModal, "atw-button-show-modal", never, { "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; "objectChoosing": "objectChoosing"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
112
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwButtonShowModal, "atw-button-show-modal", never, { "data": "data"; "index": "index"; "product": "product"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; "objectChoosing": "objectChoosing"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
92
113
  }
@@ -19,8 +19,14 @@ export declare class AtwButtonQuantityCart implements OnInit {
19
19
  * lưu tạm để khi người dùng nhập số lượng vào input mà nhập sai thì sẽ set lại số lượng về giá trị này
20
20
  */
21
21
  tempQuantity: number;
22
+ /** tồn kho mới nhất của sản phẩm (null = không giới hạn / không lấy được) */
23
+ stock: number | null;
22
24
  constructor(cartService: CartService, functionService: FunctionService, matdialog: MatDialog);
23
25
  ngOnInit(): void;
26
+ /**
27
+ * Lấy tồn kho mới nhất từ server
28
+ */
29
+ refreshStock(): Promise<void>;
24
30
  /**
25
31
  * Biến khi giảm số lượng xuống 0 hiện lên message
26
32
  * @param product
@@ -31,10 +37,18 @@ export declare class AtwButtonQuantityCart implements OnInit {
31
37
  */
32
38
  decAmount(): void;
33
39
  /**
34
- * click vào nút tăng số lượng
35
- */
40
+ * click vào nút tăng số lượng
41
+ */
36
42
  incAmount(): void;
43
+ /**
44
+ * Gõ trực tiếp vào ô số lượng (dùng stock đã lưu để phản hồi ngay)
45
+ */
46
+ onInput(event: Event): void;
37
47
  onUpdateDb(): void;
48
+ /**
49
+ * Giới hạn trên theo tồn kho; dưới 0 hoặc không hợp lệ thì trả 0 để hiện confirm xoá
50
+ */
51
+ private clamp;
38
52
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwButtonQuantityCart, never>;
39
53
  static ɵcmp: i0.ɵɵComponentDeclaration<AtwButtonQuantityCart, "atw-button-quantity-cart", never, { "product": "product"; "device": "device"; "data": "data"; "type": "type"; }, {}, never, never>;
40
54
  }
@@ -30,6 +30,7 @@ export declare class AtwListOrder implements OnInit {
30
30
  loginLogoutStateChangedSubscription: any;
31
31
  constructor(vhAlgorithm: VhAlgorithm, dialog: MatDialog, dialogRefInstance: MatDialogRef<any>, vhQueryAutoWeb: VhQueryAutoWeb, route: ActivatedRoute, vhEventMediator: VhEventMediator, functionService: FunctionService);
32
32
  ngOnInit(): void;
33
+ getDetailObject(): void;
33
34
  getBill(): void;
34
35
  bill_details: any;
35
36
  openModalBill(item: any): void;
@@ -1,7 +1,8 @@
1
- import { ElementRef, EventEmitter, OnInit } from '@angular/core';
1
+ import { ChangeDetectionStrategy, ElementRef, EventEmitter, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { Router, ActivatedRoute } from '@angular/router';
3
3
  import { VhAlgorithm, VhEventMediator, VhQueryAutoWeb } from 'vhautowebdb';
4
4
  import { FunctionService } from 'vhobjects-service/src/services';
5
+ import { Observable } from 'rxjs';
5
6
  import * as i0 from "@angular/core";
6
7
  export declare class AtwTextCategoryName implements OnInit {
7
8
  private router;
@@ -19,6 +20,7 @@ export declare class AtwTextCategoryName implements OnInit {
19
20
  index: any;
20
21
  id_subproject: any;
21
22
  componentChoosing: any;
23
+ hoverKey?: string;
22
24
  hanldleProcessResizeOffset: EventEmitter<any>;
23
25
  isComponentExist: ElementRef<HTMLDivElement>;
24
26
  config: any;
@@ -30,9 +32,12 @@ export declare class AtwTextCategoryName implements OnInit {
30
32
  private subscription;
31
33
  private languageChangedSubscription;
32
34
  prevHeight: any;
35
+ isParentHover$: Observable<boolean>;
36
+ changeDetection: ChangeDetectionStrategy.OnPush;
33
37
  constructor(router: Router, route: ActivatedRoute, vhQueryAutoWeb: VhQueryAutoWeb, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
34
38
  platformId: Object, vhAlgorithm: VhAlgorithm, vhEventMediator: VhEventMediator);
35
39
  ngOnInit(): void;
40
+ ngOnChanges(changes: SimpleChanges): void;
36
41
  ngOnDestroy(): void;
37
42
  ngAfterViewInit(): void;
38
43
  navigate(event: any): void;
@@ -42,5 +47,5 @@ export declare class AtwTextCategoryName implements OnInit {
42
47
  */
43
48
  textToArray(text: any): any[];
44
49
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwTextCategoryName, never>;
45
- static ɵcmp: i0.ɵɵComponentDeclaration<AtwTextCategoryName, "atw-text-category-name", never, { "category": "category"; "data": "data"; "type": "type"; "device": "device"; "index": "index"; "id_subproject": "id_subproject"; "componentChoosing": "componentChoosing"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwTextCategoryName, "atw-text-category-name", never, { "category": "category"; "data": "data"; "type": "type"; "device": "device"; "index": "index"; "id_subproject": "id_subproject"; "componentChoosing": "componentChoosing"; "hoverKey": "hoverKey"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
46
51
  }
@@ -30,7 +30,6 @@ export declare class AtwInputAddress implements OnInit {
30
30
  ngOnInit(): void;
31
31
  ngAfterViewInit(): void;
32
32
  ngOnDestroy(): void;
33
- getDataConfig(): void;
34
33
  initFormLogin(): void;
35
34
  get controlForm(): {
36
35
  [key: string]: import("@angular/forms").AbstractControl;
@@ -34,7 +34,6 @@ export declare class AtwInputConfirmPassword implements OnInit {
34
34
  ngOnInit(): void;
35
35
  ngAfterViewInit(): void;
36
36
  ngOnDestroy(): void;
37
- getDataConfig(): void;
38
37
  initForm(): void;
39
38
  /**
40
39
  *
@@ -32,10 +32,6 @@ export declare class AtwInputEmail implements OnInit {
32
32
  ngOnInit(): void;
33
33
  ngAfterViewInit(): void;
34
34
  ngOnDestroy(): void;
35
- /**
36
- * Hàm lấy ra data của config theo id object
37
- */
38
- getDataConfig(): void;
39
35
  initFormLogin(): void;
40
36
  get controlForm(): {
41
37
  [key: string]: import("@angular/forms").AbstractControl;
@@ -31,10 +31,6 @@ export declare class AtwInputName implements OnInit {
31
31
  ngOnInit(): void;
32
32
  ngAfterViewInit(): void;
33
33
  ngOnDestroy(): void;
34
- /**
35
- * Lấy dữ liệu config
36
- */
37
- getDataConfig(): void;
38
34
  /**
39
35
  * Bắt lỗi required ...
40
36
  */
@@ -66,7 +66,7 @@ export declare class AtwBtnBooking implements OnInit {
66
66
  getDeviceData(): void;
67
67
  /** Điểm vào duy nhất khi click — rẽ nhánh theo actionType */
68
68
  handleClick(e?: Event): void;
69
- handleShowDialog(isOpen: boolean, isClickMask?: boolean): void;
69
+ handleShowDialog(isOpen: boolean, isClickMask?: boolean, skipNavigation?: boolean): void;
70
70
  onClickOutside(event: Event): void;
71
71
  private buildQueryParams;
72
72
  /** Điều hướng tới link hoặc hyper_link dựa hoàn toàn vào staticdata config */
@@ -113,7 +113,7 @@ export declare class AtwReview implements OnInit {
113
113
  private deleteReview;
114
114
  removeImage(i: number): void;
115
115
  resetForm(): void;
116
- /** ----------------- COMMENTS (nested replies, Facebook-style) --------------------- */
116
+ /** ----------------- BÌNH LUẬN (reply lồng nhau, kiểu Facebook) --------------------- */
117
117
  toggleReplyInput(target: ReviewComment): void;
118
118
  toggleShowAllComments(review: Review): void;
119
119
  visibleComments(review: Review): ReviewComment[];
@@ -123,7 +123,7 @@ export declare class AtwReview implements OnInit {
123
123
  postCommentReply(review: Review, parent: ReviewComment): Promise<void>;
124
124
  private persistComment;
125
125
  deleteComment(review: any, comment: ReviewComment): Promise<void>;
126
- /** ----------------- PAGINATION --------------------- */
126
+ /** ----------------- PHÂN TRANG --------------------- */
127
127
  /** Chuyển trang -----------------
128
128
  *
129
129
  * @param value
@@ -146,6 +146,6 @@ export declare class AtwReview implements OnInit {
146
146
  private loadParentInfo;
147
147
  private checkHasPurchased;
148
148
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwReview, never>;
149
- static ɵcmp: i0.ɵɵComponentDeclaration<AtwReview, "app-review", never, { "data": "data"; "device": "device"; "type": "type"; "componentChoosing": "componentChoosing"; "resolution": "resolution"; "id_subproject": "id_subproject"; "blockChoosing": "blockChoosing"; "product": "product"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
149
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwReview, "atw-review", never, { "data": "data"; "device": "device"; "type": "type"; "componentChoosing": "componentChoosing"; "resolution": "resolution"; "id_subproject": "id_subproject"; "blockChoosing": "blockChoosing"; "product": "product"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
150
150
  }
151
151
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vhobjects-user",
3
- "version": "1.0.9",
3
+ "version": "1.1.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"
@@ -154,6 +154,18 @@ export declare class CartService {
154
154
  * @returns null nếu sản phẩm không quản lý tồn kho (không giới hạn)
155
155
  */
156
156
  getMaxQuantityCanAdd(product: any): number | null;
157
+ /**
158
+ * Lấy tồn kho MỚI NHẤT của 1 dòng trong giỏ
159
+ * @returns null nếu không lấy được hoặc không quản lý tồn kho
160
+ */
161
+ getStockOfCartItem(item: any): Promise<number | null>;
162
+ /**
163
+ * Số lượng tối đa cho 1 dòng trong giỏ = tồn kho - số lượng ở các dòng khác cùng sản phẩm
164
+ * @param stock tồn kho lấy từ getStockOfCartItem
165
+ * @returns null nếu không giới hạn
166
+ */
167
+ getMaxQuantityForCartItem(item: any, stock: number | null): number | null;
168
+ isOutOfStock(product: any): boolean;
157
169
  static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
158
170
  static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
159
171
  }