vhobjects-user 1.1.0 → 1.1.2
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/fesm2015/vhobjects-user.js +1 -1
- package/fesm2015/vhobjects-user.js.map +1 -1
- package/lib/frames/frame-categories/user/frame-categories/frame-categories.component.d.ts +17 -54
- package/lib/frames/frame-products/user/frame-products/frame-products.component.d.ts +17 -54
- package/lib/frames/frame-repeat/user/frame-repeat/frame-repeat.component.d.ts +23 -55
- package/lib/frames/frame-search-by-keyword/user/frame-search-by-keyword/frame-search-by-keyword.component.d.ts +26 -1
- package/lib/objects/basic/button-show-modal/user/button-show-modal/button-show-modal.component.d.ts +25 -4
- package/lib/objects/basic/chatbox-ai/user/chatbox-ai/chatbox-ai.component.d.ts +79 -0
- package/lib/objects/basic/chatbox-ai/user/chatbox-ai/chatbox-ai.service.d.ts +342 -0
- package/lib/objects/cart/list-order/user/list-order.component.d.ts +1 -0
- package/lib/objects/hotel/btn-booking/user/btn-booking.component.d.ts +1 -1
- package/lib/objects/review/user/review/review.component.d.ts +3 -3
- package/lib/vhautoweb-objects.module.d.ts +31 -30
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/services/cart.service.d.ts +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy,
|
|
1
|
+
import { ChangeDetectionStrategy, ElementRef, EventEmitter, NgZone, OnInit } from '@angular/core';
|
|
2
2
|
import { VhEventMediator, VhQueryAutoWeb } from 'vhautowebdb';
|
|
3
3
|
import { PipeFrameService } from '../../../../../services/pipe-frame.service';
|
|
4
4
|
import { Subscription } from 'rxjs';
|
|
@@ -14,8 +14,6 @@ export declare class AtwFrameCategories implements OnInit {
|
|
|
14
14
|
private platformId;
|
|
15
15
|
router: Router;
|
|
16
16
|
private zone;
|
|
17
|
-
private elementRef;
|
|
18
|
-
private cdr;
|
|
19
17
|
array_object_selected: any[];
|
|
20
18
|
resolution: any;
|
|
21
19
|
data: any;
|
|
@@ -87,16 +85,10 @@ export declare class AtwFrameCategories implements OnInit {
|
|
|
87
85
|
changeDetection: ChangeDetectionStrategy.OnPush;
|
|
88
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. */
|
|
89
87
|
private hovering;
|
|
90
|
-
/** Map lưu các handler touch đã gắn cho từng phần tử, phục vụ gỡ listener khi hủy. */
|
|
91
|
-
private touchListenersMap;
|
|
92
88
|
/** Phần tử đang được chạm giữ hiện tại, null nếu không có. */
|
|
93
89
|
private activeTouchItem;
|
|
94
|
-
/** Handler touchend ở cấp document, dùng để dọn trạng thái khi nhả tay ngoài phần tử. */
|
|
95
|
-
private docTouchEndHandler;
|
|
96
|
-
/** Handler touchcancel ở cấp document, dùng để dọn trạng thái khi thao tác chạm bị hủy. */
|
|
97
|
-
private docTouchCancelHandler;
|
|
98
90
|
constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, vhEventMediator: VhEventMediator, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
99
|
-
platformId: Object, router: Router, zone: NgZone
|
|
91
|
+
platformId: Object, router: Router, zone: NgZone);
|
|
100
92
|
ngOnInit(): void;
|
|
101
93
|
outputs: {
|
|
102
94
|
showToolBarObject: (event: any) => void;
|
|
@@ -202,56 +194,27 @@ export declare class AtwFrameCategories implements OnInit {
|
|
|
202
194
|
*/
|
|
203
195
|
private isTouchDevice;
|
|
204
196
|
/**
|
|
205
|
-
*
|
|
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).
|
|
206
200
|
*
|
|
207
|
-
*
|
|
208
|
-
* `
|
|
209
|
-
* `activeTouchItem` về null. Thường được gọi từ handler touchend/touchcancel
|
|
210
|
-
* ở cấp document để đảm bảo không bị kẹt hiệu ứng khi tay nhả ra ngoài phần tử.
|
|
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.
|
|
211
203
|
*/
|
|
212
|
-
|
|
204
|
+
onTouchStart(e: TouchEvent): void;
|
|
213
205
|
/**
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
* `cell_frame_{data._id}_{index}`. Bỏ qua nếu không tìm thấy hoặc phần tử đã
|
|
218
|
-
* được gắn listener trước đó (tránh gắn trùng). Sau đó gắn 3 sự kiện:
|
|
219
|
-
* - `touchstart`: chặn hành vi mặc định, đánh dấu phần tử active, thêm class
|
|
220
|
-
* `is-touching` và bật hover để các vật thể con chạy animation cùng lúc.
|
|
221
|
-
* - `touchend` / `touchcancel`: gỡ class, reset phần tử active (nếu đúng phần
|
|
222
|
-
* tử này) và tắt hover.
|
|
223
|
-
*
|
|
224
|
-
* Các handler được lưu vào `touchListenersMap` để `removeTouchEffect` có thể
|
|
225
|
-
* gỡ sạch sau này. `touchstart` đăng ký với `passive: false` vì có gọi
|
|
226
|
-
* `preventDefault()`.
|
|
227
|
-
*/
|
|
228
|
-
private initTouchEffect;
|
|
229
|
-
/**
|
|
230
|
-
* Gỡ toàn bộ listener touch đã gắn bởi `initTouchEffect`.
|
|
231
|
-
*
|
|
232
|
-
* Duyệt qua `touchListenersMap`, gỡ lần lượt các listener `touchstart`,
|
|
233
|
-
* `touchmove` (nếu có), `touchend`, `touchcancel` khỏi từng phần tử, sau đó
|
|
234
|
-
* xóa sạch map. Nên gọi khi component bị hủy (ví dụ trong `ngOnDestroy`)
|
|
235
|
-
* hoặc trước khi khởi tạo lại để tránh rò rỉ bộ nhớ và gắn listener trùng.
|
|
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 đó.
|
|
236
209
|
*/
|
|
237
|
-
|
|
210
|
+
onTouchEnd(e: TouchEvent): void;
|
|
238
211
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
* của component. Nếu đã đủ số lượng ngay từ đầu thì gọi `callback` luôn. Nếu chưa đủ,
|
|
243
|
-
* hàm tạo một `MutationObserver` theo dõi mọi thay đổi cây DOM (thêm/bớt node, kể cả
|
|
244
|
-
* node con cháu) và kiểm tra lại sau mỗi lần thay đổi. Khi đủ số lượng, observer được
|
|
245
|
-
* ngắt và `callback` được gọi đúng một lần.
|
|
246
|
-
*
|
|
247
|
-
* Hàm này hữu ích khi các ô được render bất đồng bộ (ví dụ `*ngFor` chờ dữ liệu), cần
|
|
248
|
-
* đảm bảo phần tử đã tồn tại trước khi thao tác như gọi `initTouchEffect`.
|
|
249
|
-
*
|
|
250
|
-
* @param expectedCount Số lượng ô tối thiểu cần có trong DOM.
|
|
251
|
-
* @param callback Hàm được gọi khi số lượng ô đã đủ.
|
|
252
|
-
* @param timeout Thời gian chờ tối đa (ms) trước khi tự ngắt observer, mặc định 2000ms.
|
|
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`).
|
|
253
215
|
*/
|
|
254
|
-
|
|
216
|
+
onTouchCancel(e: TouchEvent): void;
|
|
217
|
+
private clearTouch;
|
|
255
218
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameCategories, never>;
|
|
256
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>;
|
|
257
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';
|
|
@@ -15,7 +14,6 @@ export declare class AtwFrameProducts implements OnInit {
|
|
|
15
14
|
private router;
|
|
16
15
|
private route;
|
|
17
16
|
private zone;
|
|
18
|
-
private elementRef;
|
|
19
17
|
array_object_selected: any[];
|
|
20
18
|
resolution: any;
|
|
21
19
|
data: any;
|
|
@@ -86,16 +84,10 @@ export declare class AtwFrameProducts implements OnInit {
|
|
|
86
84
|
changeDetection: ChangeDetectionStrategy.OnPush;
|
|
87
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. */
|
|
88
86
|
private hovering;
|
|
89
|
-
/** Map lưu các handler touch đã gắn cho từng phần tử, phục vụ gỡ listener khi hủy. */
|
|
90
|
-
private touchListenersMap;
|
|
91
87
|
/** Phần tử đang được chạm giữ hiện tại, null nếu không có. */
|
|
92
88
|
private activeTouchItem;
|
|
93
|
-
/** Handler touchend ở cấp document, dùng để dọn trạng thái khi nhả tay ngoài phần tử. */
|
|
94
|
-
private docTouchEndHandler;
|
|
95
|
-
/** Handler touchcancel ở cấp document, dùng để dọn trạng thái khi thao tác chạm bị hủy. */
|
|
96
|
-
private docTouchCancelHandler;
|
|
97
89
|
constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
98
|
-
vhEventMediator: VhEventMediator, platformId: Object, router: Router, route: ActivatedRoute, zone: NgZone
|
|
90
|
+
vhEventMediator: VhEventMediator, platformId: Object, router: Router, route: ActivatedRoute, zone: NgZone);
|
|
99
91
|
ngOnInit(): void;
|
|
100
92
|
outputs: {
|
|
101
93
|
showToolBarObject: (event: any) => void;
|
|
@@ -206,56 +198,27 @@ export declare class AtwFrameProducts implements OnInit {
|
|
|
206
198
|
*/
|
|
207
199
|
private isTouchDevice;
|
|
208
200
|
/**
|
|
209
|
-
*
|
|
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).
|
|
210
204
|
*
|
|
211
|
-
*
|
|
212
|
-
* `
|
|
213
|
-
* `activeTouchItem` về null. Thường được gọi từ handler touchend/touchcancel
|
|
214
|
-
* ở cấp document để đảm bảo không bị kẹt hiệu ứng khi tay nhả ra ngoài phần tử.
|
|
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.
|
|
215
207
|
*/
|
|
216
|
-
|
|
208
|
+
onTouchStart(e: TouchEvent): void;
|
|
217
209
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* `cell_frame_{data._id}_{index}`. Bỏ qua nếu không tìm thấy hoặc phần tử đã
|
|
222
|
-
* được gắn listener trước đó (tránh gắn trùng). Sau đó gắn 3 sự kiện:
|
|
223
|
-
* - `touchstart`: chặn hành vi mặc định, đánh dấu phần tử active, thêm class
|
|
224
|
-
* `is-touching` và bật hover để các vật thể con chạy animation cùng lúc.
|
|
225
|
-
* - `touchend` / `touchcancel`: gỡ class, reset phần tử active (nếu đúng phần
|
|
226
|
-
* tử này) và tắt hover.
|
|
227
|
-
*
|
|
228
|
-
* Các handler được lưu vào `touchListenersMap` để `removeTouchEffect` có thể
|
|
229
|
-
* gỡ sạch sau này. `touchstart` đăng ký với `passive: false` vì có gọi
|
|
230
|
-
* `preventDefault()`.
|
|
231
|
-
*/
|
|
232
|
-
private initTouchEffect;
|
|
233
|
-
/**
|
|
234
|
-
* Gỡ toàn bộ listener touch đã gắn bởi `initTouchEffect`.
|
|
235
|
-
*
|
|
236
|
-
* Duyệt qua `touchListenersMap`, gỡ lần lượt các listener `touchstart`,
|
|
237
|
-
* `touchmove` (nếu có), `touchend`, `touchcancel` khỏi từng phần tử, sau đó
|
|
238
|
-
* xóa sạch map. Nên gọi khi component bị hủy (ví dụ trong `ngOnDestroy`)
|
|
239
|
-
* hoặc trước khi khởi tạo lại để tránh rò rỉ bộ nhớ và gắn listener trùng.
|
|
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 đó.
|
|
240
213
|
*/
|
|
241
|
-
|
|
214
|
+
onTouchEnd(e: TouchEvent): void;
|
|
242
215
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
* của component. Nếu đã đủ số lượng ngay từ đầu thì gọi `callback` luôn. Nếu chưa đủ,
|
|
247
|
-
* hàm tạo một `MutationObserver` theo dõi mọi thay đổi cây DOM (thêm/bớt node, kể cả
|
|
248
|
-
* node con cháu) và kiểm tra lại sau mỗi lần thay đổi. Khi đủ số lượng, observer được
|
|
249
|
-
* ngắt và `callback` được gọi đúng một lần.
|
|
250
|
-
*
|
|
251
|
-
* Hàm này hữu ích khi các ô được render bất đồng bộ (ví dụ `*ngFor` chờ dữ liệu), cần
|
|
252
|
-
* đảm bảo phần tử đã tồn tại trước khi thao tác như gọi `initTouchEffect`.
|
|
253
|
-
*
|
|
254
|
-
* @param expectedCount Số lượng ô tối thiểu cần có trong DOM.
|
|
255
|
-
* @param callback Hàm được gọi khi số lượng ô đã đủ.
|
|
256
|
-
* @param timeout Thời gian chờ tối đa (ms) trước khi tự ngắt observer, mặc định 2000ms.
|
|
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`).
|
|
257
219
|
*/
|
|
258
|
-
|
|
220
|
+
onTouchCancel(e: TouchEvent): void;
|
|
221
|
+
private clearTouch;
|
|
259
222
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameProducts, never>;
|
|
260
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>;
|
|
261
224
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy,
|
|
1
|
+
import { ChangeDetectionStrategy, EventEmitter, NgZone, OnInit } from '@angular/core';
|
|
2
2
|
import { VhAlgorithm, VhEventMediator, VhQueryAutoWeb } from 'vhautowebdb';
|
|
3
3
|
import { ElementRef } from '@angular/core';
|
|
4
4
|
import { Subscription } from 'rxjs';
|
|
@@ -18,8 +18,6 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
18
18
|
router: Router;
|
|
19
19
|
private languageService;
|
|
20
20
|
private zone;
|
|
21
|
-
private elementRef;
|
|
22
|
-
private cdr;
|
|
23
21
|
array_object_selected: any[];
|
|
24
22
|
resolution: any;
|
|
25
23
|
data: any;
|
|
@@ -92,21 +90,16 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
92
90
|
changeDetection: ChangeDetectionStrategy.OnPush;
|
|
93
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. */
|
|
94
92
|
private hovering;
|
|
95
|
-
/** Map lưu các handler touch đã gắn cho từng phần tử, phục vụ gỡ listener khi hủy. */
|
|
96
|
-
private touchListenersMap;
|
|
97
93
|
/** Phần tử đang được chạm giữ hiện tại, null nếu không có. */
|
|
98
94
|
private activeTouchItem;
|
|
99
|
-
/** Handler touchend ở cấp document, dùng để dọn trạng thái khi nhả tay ngoài phần tử. */
|
|
100
|
-
private docTouchEndHandler;
|
|
101
|
-
/** Handler touchcancel ở cấp document, dùng để dọn trạng thái khi thao tác chạm bị hủy. */
|
|
102
|
-
private docTouchCancelHandler;
|
|
103
95
|
constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
|
|
104
|
-
vhEventMediator: VhEventMediator, vhAlgorithm: VhAlgorithm, platformId: Object, router: Router, languageService: LanguageService, zone: NgZone
|
|
96
|
+
vhEventMediator: VhEventMediator, vhAlgorithm: VhAlgorithm, platformId: Object, router: Router, languageService: LanguageService, zone: NgZone);
|
|
105
97
|
ngOnInit(): void;
|
|
106
98
|
outputs: {
|
|
107
99
|
showToolBarObject: (event: any) => void;
|
|
108
100
|
};
|
|
109
101
|
ngOnChange(): void;
|
|
102
|
+
ngAfterViewInit(): void;
|
|
110
103
|
getDetailObject(): Promise<void>;
|
|
111
104
|
private fetchDataList;
|
|
112
105
|
private setHeight;
|
|
@@ -211,56 +204,31 @@ export declare class AtwFrameRepeat implements OnInit {
|
|
|
211
204
|
*/
|
|
212
205
|
private isTouchDevice;
|
|
213
206
|
/**
|
|
214
|
-
*
|
|
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).
|
|
215
210
|
*
|
|
216
|
-
*
|
|
217
|
-
* `
|
|
218
|
-
* `activeTouchItem` về null. Thường được gọi từ handler touchend/touchcancel
|
|
219
|
-
* ở cấp document để đảm bảo không bị kẹt hiệu ứng khi tay nhả ra ngoài phần tử.
|
|
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.
|
|
220
213
|
*/
|
|
221
|
-
|
|
214
|
+
onTouchStart(e: TouchEvent): void;
|
|
222
215
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
* `cell_frame_{data._id}_{index}`. Bỏ qua nếu không tìm thấy hoặc phần tử đã
|
|
227
|
-
* được gắn listener trước đó (tránh gắn trùng). Sau đó gắn 3 sự kiện:
|
|
228
|
-
* - `touchstart`: chặn hành vi mặc định, đánh dấu phần tử active, thêm class
|
|
229
|
-
* `is-touching` và bật hover để các vật thể con chạy animation cùng lúc.
|
|
230
|
-
* - `touchend` / `touchcancel`: gỡ class, reset phần tử active (nếu đúng phần
|
|
231
|
-
* tử này) và tắt hover.
|
|
232
|
-
*
|
|
233
|
-
* Các handler được lưu vào `touchListenersMap` để `removeTouchEffect` có thể
|
|
234
|
-
* gỡ sạch sau này. `touchstart` đăng ký với `passive: false` vì có gọi
|
|
235
|
-
* `preventDefault()`.
|
|
236
|
-
*/
|
|
237
|
-
private initTouchEffect;
|
|
238
|
-
/**
|
|
239
|
-
* Gỡ toàn bộ listener touch đã gắn bởi `initTouchEffect`.
|
|
240
|
-
*
|
|
241
|
-
* Duyệt qua `touchListenersMap`, gỡ lần lượt các listener `touchstart`,
|
|
242
|
-
* `touchmove` (nếu có), `touchend`, `touchcancel` khỏi từng phần tử, sau đó
|
|
243
|
-
* xóa sạch map. Nên gọi khi component bị hủy (ví dụ trong `ngOnDestroy`)
|
|
244
|
-
* hoặc trước khi khởi tạo lại để tránh rò rỉ bộ nhớ và gắn listener trùng.
|
|
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 đó.
|
|
245
219
|
*/
|
|
246
|
-
|
|
220
|
+
onTouchEnd(e: TouchEvent): void;
|
|
247
221
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
*
|
|
259
|
-
* @param expectedCount Số lượng ô tối thiểu cần có trong DOM.
|
|
260
|
-
* @param callback Hàm được gọi khi số lượng ô đã đủ.
|
|
261
|
-
* @param timeout Thời gian chờ tối đa (ms) trước khi tự ngắt observer, mặc định 2000ms.
|
|
262
|
-
*/
|
|
263
|
-
private waitForCells;
|
|
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;
|
|
264
232
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameRepeat, never>;
|
|
265
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>;
|
|
266
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
|
}
|
package/lib/objects/basic/button-show-modal/user/button-show-modal/button-show-modal.component.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { FunctionService } from 'vhobjects-service/src/services';
|
|
3
|
+
import { ChatboxAIService, ChatTextPart } from './chatbox-ai.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface ChatMessage {
|
|
6
|
+
role: 'user' | 'bot';
|
|
7
|
+
text: Record<string, string>;
|
|
8
|
+
error?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class AtwChatboxAI implements OnInit {
|
|
11
|
+
functionService: FunctionService;
|
|
12
|
+
private platformId;
|
|
13
|
+
private chatboxAIService;
|
|
14
|
+
data: any;
|
|
15
|
+
type: any;
|
|
16
|
+
device: any;
|
|
17
|
+
index: any;
|
|
18
|
+
id_subproject: any;
|
|
19
|
+
hanldleProcessResizeOffset: EventEmitter<any>;
|
|
20
|
+
isComponentExist: ElementRef<HTMLDivElement>;
|
|
21
|
+
scroller: ElementRef<HTMLElement>;
|
|
22
|
+
input: ElementRef<HTMLTextAreaElement>;
|
|
23
|
+
prevHeight: any;
|
|
24
|
+
class: {
|
|
25
|
+
'chatbox-ai': {};
|
|
26
|
+
'chatbox-ai__header': {};
|
|
27
|
+
'chatbox-ai__avatar': {};
|
|
28
|
+
'chatbox-ai__avatar--icon': {};
|
|
29
|
+
'chatbox-ai__heading': {};
|
|
30
|
+
'chatbox-ai__title': {};
|
|
31
|
+
'chatbox-ai__subtitle': {};
|
|
32
|
+
'chatbox-ai__close': {};
|
|
33
|
+
'chatbox-ai__close--icon': {};
|
|
34
|
+
'chatbox-ai__body': {};
|
|
35
|
+
'chatbox-ai__message': {};
|
|
36
|
+
'chatbox-ai__message--bot': {};
|
|
37
|
+
'chatbox-ai__message--typing': {};
|
|
38
|
+
'chatbox-ai__typing-dot': {};
|
|
39
|
+
'chatbox-ai__suggestions': {};
|
|
40
|
+
'chatbox-ai__suggestion': {};
|
|
41
|
+
'chatbox-ai__footer': {};
|
|
42
|
+
'chatbox-ai__input': {};
|
|
43
|
+
'chatbox-ai__send': {};
|
|
44
|
+
'chatbox-ai__send--icon': {};
|
|
45
|
+
};
|
|
46
|
+
config: any;
|
|
47
|
+
staticdata: any;
|
|
48
|
+
isLoading: boolean;
|
|
49
|
+
draft: string;
|
|
50
|
+
messages: ChatMessage[];
|
|
51
|
+
suggestions: string[];
|
|
52
|
+
private partsCache;
|
|
53
|
+
status: string;
|
|
54
|
+
private statusSub?;
|
|
55
|
+
constructor(functionService: FunctionService, platformId: Object, chatboxAIService: ChatboxAIService);
|
|
56
|
+
ngOnInit(): void;
|
|
57
|
+
ngOnDestroy(): void;
|
|
58
|
+
private getDetailObject;
|
|
59
|
+
onKeydown(event: KeyboardEvent): void;
|
|
60
|
+
send(text?: string): Promise<void>;
|
|
61
|
+
/** Đổi danh sách tin nhắn của giao diện sang dạng backend nhận (bỏ tin báo lỗi, bot -> assistant). */
|
|
62
|
+
private toRequestMessages;
|
|
63
|
+
private scrollToBottom;
|
|
64
|
+
getParts(message: ChatMessage): ChatTextPart[];
|
|
65
|
+
/**
|
|
66
|
+
* Theo dõi dựa trên vị trí, không quan tâm nội dung chuỗi thay đổi
|
|
67
|
+
* @param index
|
|
68
|
+
* @param item
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
trackByIndex(index: number, item: any): number;
|
|
72
|
+
/** Đang ở trang thiết kế: phủ lớp trong suốt để tránh bấm nhầm. */
|
|
73
|
+
get isDesign(): boolean;
|
|
74
|
+
get lockTitle(): string;
|
|
75
|
+
get lockText(): string;
|
|
76
|
+
private text;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AtwChatboxAI, never>;
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AtwChatboxAI, "atw-chatbox-ai", never, { "data": "data"; "type": "type"; "device": "device"; "index": "index"; "id_subproject": "id_subproject"; }, { "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
|
|
79
|
+
}
|