vhobjects-user 1.0.2 → 1.0.4

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.
@@ -1,5 +1,5 @@
1
1
  import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
- import { ActivatedRoute } from '@angular/router';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
3
  import { VhQueryAutoWeb, VhEventMediator } from 'vhautowebdb';
4
4
  import { PipeFrameService } from '../../../../../services/pipe-frame.service';
5
5
  import { FunctionService } from 'vhobjects-service/src/services';
@@ -7,6 +7,7 @@ import * as i0 from "@angular/core";
7
7
  export declare class AtwFrameProductRelate implements OnInit {
8
8
  private vhQueryAutoWeb;
9
9
  private route;
10
+ private router;
10
11
  private vhEventMediator;
11
12
  functionService: FunctionService;
12
13
  private element;
@@ -90,7 +91,7 @@ export declare class AtwFrameProductRelate implements OnInit {
90
91
  loading: boolean;
91
92
  /** Các kiểu sort */
92
93
  private sortQueryMap;
93
- constructor(vhQueryAutoWeb: VhQueryAutoWeb, route: ActivatedRoute, vhEventMediator: VhEventMediator, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
94
+ constructor(vhQueryAutoWeb: VhQueryAutoWeb, route: ActivatedRoute, router: Router, vhEventMediator: VhEventMediator, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
94
95
  pipeFrameService: PipeFrameService, platformId: Object);
95
96
  ngOnInit(): void;
96
97
  outputs: {
@@ -173,6 +174,10 @@ export declare class AtwFrameProductRelate implements OnInit {
173
174
  *
174
175
  */
175
176
  private calcSpaceGrid;
177
+ /**
178
+ * 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
179
+ */
180
+ pageUrl(page: number): string;
176
181
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameProductRelate, never>;
177
182
  static ɵcmp: i0.ɵɵComponentDeclaration<AtwFrameProductRelate, "atw-frame-product-relate", 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"; }, { "showToolBarObject": "showToolBarObject"; "hanldleProcessResizeOffset": "hanldleProcessResizeOffset"; }, never, never>;
178
183
  }
@@ -5,6 +5,7 @@ import { Subscription } from 'rxjs';
5
5
  import { FunctionService } from 'vhobjects-service/src/services';
6
6
  import { PipeFrameService } from '../../../../../services/pipe-frame.service';
7
7
  import { Router } from '@angular/router';
8
+ import { LanguageService } from 'vhobjects-service';
8
9
  import * as i0 from "@angular/core";
9
10
  export declare class AtwFrameRepeat implements OnInit {
10
11
  private vhQueryAutoWeb;
@@ -15,6 +16,7 @@ export declare class AtwFrameRepeat implements OnInit {
15
16
  vhAlgorithm: VhAlgorithm;
16
17
  private platformId;
17
18
  router: Router;
19
+ private languageService;
18
20
  array_object_selected: any[];
19
21
  resolution: any;
20
22
  data: any;
@@ -83,7 +85,7 @@ export declare class AtwFrameRepeat implements OnInit {
83
85
  isComponentExist: ElementRef<HTMLDivElement>;
84
86
  isItemVisible: boolean;
85
87
  constructor(vhQueryAutoWeb: VhQueryAutoWeb, pipeFrameService: PipeFrameService, functionService: FunctionService, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
86
- vhEventMediator: VhEventMediator, vhAlgorithm: VhAlgorithm, platformId: Object, router: Router);
88
+ vhEventMediator: VhEventMediator, vhAlgorithm: VhAlgorithm, platformId: Object, router: Router, languageService: LanguageService);
87
89
  ngOnInit(): void;
88
90
  outputs: {
89
91
  showToolBarObject: (event: any) => void;
@@ -162,6 +164,10 @@ export declare class AtwFrameRepeat implements OnInit {
162
164
  */
163
165
  onDrop(event: DragEvent): void;
164
166
  get frameProductsStyles(): any;
167
+ /**
168
+ * 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
+ */
170
+ pageUrl(page: number): string;
165
171
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwFrameRepeat, never>;
166
172
  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>;
167
173
  }
@@ -1,5 +1,6 @@
1
1
  import { ElementRef, EventEmitter, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { MatDialog } from '@angular/material/dialog';
3
+ import { DomSanitizer } from '@angular/platform-browser';
3
4
  import { ActivatedRoute, Router } from '@angular/router';
4
5
  import { Subscription } from 'rxjs';
5
6
  import { VhEventMediator, VhImage, VhQueryAutoWeb } from 'vhautowebdb';
@@ -15,6 +16,7 @@ export declare class AtwImageDetailRepeat implements OnInit {
15
16
  private element;
16
17
  private vhEventMediator;
17
18
  private platformId;
19
+ private sanitizer;
18
20
  product: any;
19
21
  resolution: any;
20
22
  data: any;
@@ -61,8 +63,10 @@ export declare class AtwImageDetailRepeat implements OnInit {
61
63
  observer: IntersectionObserver;
62
64
  subscription: Subscription;
63
65
  dataItem: any;
66
+ loadingVideo: boolean;
67
+ srcIframe: any;
64
68
  constructor(router: Router, route: ActivatedRoute, vhImage: VhImage, matDialog: MatDialog, functionService: FunctionService, vhQueryAutoWeb: VhQueryAutoWeb, element: ElementRef, // Dùng cho hàm setAnimationVisible trong functionService
65
- vhEventMediator: VhEventMediator, platformId: Object);
69
+ vhEventMediator: VhEventMediator, platformId: Object, sanitizer: DomSanitizer);
66
70
  ngOnInit(): void;
67
71
  ngOnChanges(change: SimpleChanges): void;
68
72
  ngAfterViewInit(): void;
@@ -101,6 +105,17 @@ export declare class AtwImageDetailRepeat implements OnInit {
101
105
  * Hàm chờ khối xuất hiện và cuộn đến
102
106
  * */
103
107
  private scrollToBlockWhenAvailable;
108
+ /** Định nghĩa pattern lấy ID từ link embed (hỗ trợ cả nocookie) */
109
+ private youtubeEmbedPattern;
110
+ isYoutubeLink(src: string): boolean;
111
+ /**
112
+ * Lấy link ảnh
113
+ * - Nếu là ảnh thật thì trực tiếp trả về chính nó không cần xử lý thêm
114
+ * - Nếu là link youtube thì xử lý lấy id và dùng với link thumbnail
115
+ * @param src link ảnh/link youtube
116
+ */
117
+ getUrlImage(src: string): string;
118
+ private initVideoIframe;
104
119
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwImageDetailRepeat, never>;
105
120
  static ɵcmp: i0.ɵɵComponentDeclaration<AtwImageDetailRepeat, "atw-image-detail-repeat", never, { "product": "product"; "resolution": "resolution"; "data": "data"; "type": "type"; "device": "device"; "id_subproject": "id_subproject"; "index": "index"; }, { "onSomething": "onSomething"; "addObjectDuplicate": "addObjectDuplicate"; "save": "save"; "deleteTools": "deleteTools"; }, never, never>;
106
121
  }
@@ -87,7 +87,6 @@ export declare class AtwImageRepeat implements OnInit {
87
87
  * - Tối ưu LCP trong SEO
88
88
  */
89
89
  private addPreload;
90
- private handleSrcImg;
91
90
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwImageRepeat, never>;
92
91
  static ɵcmp: i0.ɵɵComponentDeclaration<AtwImageRepeat, "atw-image-repeat", never, { "data": "data"; "type": "type"; "device": "device"; "index": "index"; "id_subproject": "id_subproject"; "product": "product"; }, {}, never, never>;
93
92
  }
@@ -1,8 +1,9 @@
1
- import { OnInit } from '@angular/core';
2
- import { DomSanitizer } from '@angular/platform-browser';
1
+ import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
3
3
  import { FunctionService } from 'vhobjects-service/src/services';
4
4
  import * as i0 from "@angular/core";
5
- export declare class AtwVideoRepeat implements OnInit {
5
+ declare type EmbedPlatform = 'tiktok' | 'instagram';
6
+ export declare class AtwVideoRepeat implements OnInit, OnChanges {
6
7
  private sanitizer;
7
8
  functionService: FunctionService;
8
9
  device: any;
@@ -16,10 +17,29 @@ export declare class AtwVideoRepeat implements OnInit {
16
17
  loading: boolean;
17
18
  private staticdata;
18
19
  SrcIframe: any;
20
+ safeHtmlContent: SafeHtml;
19
21
  dataItem: any;
22
+ typeVideo: string;
20
23
  constructor(sanitizer: DomSanitizer, functionService: FunctionService);
21
24
  ngOnInit(): void;
25
+ ngOnChanges(changes: SimpleChanges): void;
22
26
  private getDetailObject;
27
+ /** Phát hiện value có phải HTML embed (tiktok/instagram) đã dựng sẵn hay không */
28
+ private detectEmbedHtmlPlatform;
29
+ /** Nhận link gốc (youtube/facebook/instagram), trả về link embed phù hợp */
30
+ private formatEmbedUrl;
31
+ private toYoutubeEmbed;
32
+ private toFacebookEmbed;
33
+ private toInstagramEmbed;
34
+ /** TikTok: dùng oEmbed API để lấy HTML embed chính thức khi value chỉ là URL thuần */
35
+ private loadTiktokEmbed;
36
+ private embedScriptId;
37
+ /**
38
+ * Nhận HTML embed sẵn (tiktok hoặc instagram), gán qua innerHTML rồi tự tạo lại thẻ script
39
+ * tương ứng vì script nằm trong chuỗi HTML gán qua innerHTML sẽ không tự thực thi.
40
+ */
41
+ receiveEmbedHtml(rawHtmlFromConfig: string, platform: EmbedPlatform): void;
23
42
  static ɵfac: i0.ɵɵFactoryDeclaration<AtwVideoRepeat, never>;
24
43
  static ɵcmp: i0.ɵɵComponentDeclaration<AtwVideoRepeat, "atw-video-repeat", never, { "device": "device"; "data": "data"; "type": "type"; "product": "product"; "index": "index"; }, {}, never, never>;
25
44
  }
45
+ export {};
@@ -1,4 +1,4 @@
1
- import { ElementRef, EventEmitter, OnInit } from '@angular/core';
1
+ import { ElementRef, EventEmitter, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { VhEventMediator, VhAlgorithm, VhQueryAutoWeb } from 'vhautowebdb';
3
3
  import { FunctionService } from 'vhobjects-service/src/services';
4
4
  import * as i0 from "@angular/core";
@@ -34,6 +34,7 @@ export declare class AtwCustomizeNewField implements OnInit {
34
34
  configChangeSub: any;
35
35
  constructor(vhQueryAutoWeb: VhQueryAutoWeb, vhAlgorithm: VhAlgorithm, functionService: FunctionService, vhEventMediator: VhEventMediator);
36
36
  ngOnInit(): void;
37
+ ngOnChanges(changes: SimpleChanges): void;
37
38
  ngOnDestroy(): void;
38
39
  getNewField(): void;
39
40
  hanldleProcessResizeOffsetNewField(event: any): void;
@@ -1,4 +1,4 @@
1
- import { ElementRef, EventEmitter, OnInit, SimpleChanges } from '@angular/core';
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { VhEventMediator } from 'vhautowebdb';
4
4
  import { FunctionService } from 'vhobjects-service/src/services';
@@ -7,6 +7,7 @@ export declare class AtwNewFieldCkeditor implements OnInit {
7
7
  functionService: FunctionService;
8
8
  private vhEventMediator;
9
9
  private platformId;
10
+ private cdf;
10
11
  product: any;
11
12
  data: any;
12
13
  type: any;
@@ -69,7 +70,7 @@ export declare class AtwNewFieldCkeditor implements OnInit {
69
70
  icon_name: string;
70
71
  };
71
72
  };
72
- constructor(functionService: FunctionService, vhEventMediator: VhEventMediator, platformId: Object);
73
+ constructor(functionService: FunctionService, vhEventMediator: VhEventMediator, platformId: Object, cdf: ChangeDetectorRef);
73
74
  ngOnInit(): void;
74
75
  ngAfterViewInit(): void;
75
76
  ngOnChanges(changes: SimpleChanges): void;
@@ -89,7 +90,7 @@ export declare class AtwNewFieldCkeditor implements OnInit {
89
90
  updateContentHeight(element: HTMLElement, init?: boolean): void;
90
91
  initForm(): void;
91
92
  /**
92
- * Set trường content theo ngôn ngữ, dựa trên this.product và ngôn ngữ được chọn trong functionService.selectedLanguageCode, nếu không có thì hiện 'Đang cập nhật'
93
+ * Set trường content theo ngôn ngữ, dựa trên this.product và ngôn ngữ được chọn trong functionService.selectedLanguageCode, nếu không có thì hiện ''
93
94
  */
94
95
  setDataContentValue(code?: string): void;
95
96
  /**
@@ -35,6 +35,7 @@ export declare class AtwNewFieldFrameGridDetail implements OnInit {
35
35
  } | null;
36
36
  /** Biến chứa danh sách dữ liệu */
37
37
  dataList: Record<string, string>[];
38
+ itemHeight: string;
38
39
  constructor(functionService: FunctionService, platformId: Object, vhEventMediator: VhEventMediator, vhQueryAutoWeb: VhQueryAutoWeb, cdr: ChangeDetectorRef);
39
40
  ngOnInit(): void;
40
41
  ngOnChanges(change: SimpleChanges): void;
@@ -80,7 +80,7 @@ export declare class AtwDetailedDescription implements OnInit {
80
80
  ngOnDestroy(): void;
81
81
  initForm(): void;
82
82
  /**
83
- * Set trường content theo ngôn ngữ, dựa trên this.product và ngôn ngữ được chọn trong functionService.selectedLanguageCode, nếu không có thì hiện 'Đang cập nhật'
83
+ * Set trường content theo ngôn ngữ, dựa trên this.product và ngôn ngữ được chọn trong functionService.selectedLanguageCode, nếu không có thì hiện ''
84
84
  * đặc tả kỹ thuật, hậu mãi, khuyến mãi, khác dùng chung component náy
85
85
  *
86
86
  */
@@ -95,7 +95,7 @@ export declare class AtwTextShortDescription implements OnInit {
95
95
  updateContentHeight(element: HTMLElement, init?: boolean): void;
96
96
  initForm(): void;
97
97
  /**
98
- * Set trường content theo ngôn ngữ, dựa trên this.product và ngôn ngữ được chọn trong functionService.selectedLanguageCode, nếu không có thì hiện 'Đang cập nhật'
98
+ * Set trường content theo ngôn ngữ, dựa trên this.product và ngôn ngữ được chọn trong functionService.selectedLanguageCode, nếu không có thì hiện ''
99
99
  */
100
100
  setDataContentValue(code?: string): void;
101
101
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vhobjects-user",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"