vhobjects-config 0.5.4 → 0.5.6

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.
@@ -48,6 +48,9 @@ export declare class AtwFrameProductsConfig implements OnInit {
48
48
  private classUpdates;
49
49
  private configUpdates;
50
50
  effect_hover_data: any;
51
+ labelSectorMap: {
52
+ [key: string]: string;
53
+ };
51
54
  constructor(vhQueryAutoWeb: VhQueryAutoWeb, nzModalService: NzModalService, languageService: LanguageService, vhAlgorithm: VhAlgorithm, vhEventMediator: VhEventMediator, http: HttpClient, platformId: Object, functionService: FunctionService);
52
55
  ngOnInit(): void;
53
56
  ngOnChanges(changes: SimpleChanges): void;
@@ -30,6 +30,7 @@ export declare class AtwTextNewsTitleConfig implements OnInit {
30
30
  text_style: any;
31
31
  /** Danh sách giải thích loại văn bản tương ứng SEO */
32
32
  seoTextTypes: any;
33
+ hasSelectedCell: boolean;
33
34
  constructor(vhQueryAutoWeb: VhQueryAutoWeb, http: HttpClient, vhEventMediator: VhEventMediator, platformId: Object, functionService: FunctionService);
34
35
  ngOnInit(): void;
35
36
  ngOnChanges(): void;
@@ -4,16 +4,17 @@ import * as i2 from "./newField-select-config/newField-select-config.component";
4
4
  import * as i3 from "./newField-text-config/newField-text-config.component";
5
5
  import * as i4 from "./newField-radio-button-config/newField-radio-button-config.component";
6
6
  import * as i5 from "./customize-newField-config.component";
7
- import * as i6 from "@angular/common";
8
- import * as i7 from "ngx-color-picker";
9
- import * as i8 from "vhobjects-service";
10
- import * as i9 from "@angular/forms";
11
- import * as i10 from "@ckeditor/ckeditor5-angular";
12
- import * as i11 from "../../../../../vh-language.pipe";
13
- import * as i12 from "@ngx-translate/core";
14
- import * as i13 from "../../../../../vhstringpercent.pipe";
7
+ import * as i6 from "./newField-image-config/newField-image-config.component";
8
+ import * as i7 from "@angular/common";
9
+ import * as i8 from "ngx-color-picker";
10
+ import * as i9 from "vhobjects-service";
11
+ import * as i10 from "@angular/forms";
12
+ import * as i11 from "@ckeditor/ckeditor5-angular";
13
+ import * as i12 from "../../../../../vh-language.pipe";
14
+ import * as i13 from "@ngx-translate/core";
15
+ import * as i14 from "../../../../../vhstringpercent.pipe";
15
16
  export declare class CustomizeNewFieldConfigModule {
16
17
  static ɵfac: i0.ɵɵFactoryDeclaration<CustomizeNewFieldConfigModule, never>;
17
- static ɵmod: i0.ɵɵNgModuleDeclaration<CustomizeNewFieldConfigModule, [typeof i1.AtwNewFieldInputConfig, typeof i2.AtwNewFieldSelectConfig, typeof i3.AtwNewFieldTextConfig, typeof i4.AtwNewFieldRadioButtonConfig, typeof i5.AtwCustomizeNewFieldConfig], [typeof i6.CommonModule, typeof i7.ColorPickerModule, typeof i8.MaterialModule, typeof i8.NgZorroAntModule, typeof i9.ReactiveFormsModule, typeof i10.CKEditorModule, typeof i11.VhLanguagePipeModule, typeof i9.FormsModule, typeof i8.WidthHeightConfigModule, typeof i8.PositionOutConfigModule, typeof i8.LinkPageModule, typeof i8.ChooseAnimationsConfigModule, typeof i8.RotateConfigModule, typeof i8.TextStyleConfigModule, typeof i8.BordersConfigModule, typeof i8.BordersRadiusConfigModule, typeof i8.TextFormatConfigModule, typeof i12.TranslateModule, typeof i8.ShadowConfigModule, typeof i8.AnimationsConfigModule, typeof i8.HideShowConfigModule, typeof i8.SymbolConfigModule, typeof i13.VhStringPercentPipeModule, typeof i8.PaddingConfigModule, typeof i8.LetterSpacingConfigModule, typeof i8.LineHeightConfigModule], never>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CustomizeNewFieldConfigModule, [typeof i1.AtwNewFieldInputConfig, typeof i2.AtwNewFieldSelectConfig, typeof i3.AtwNewFieldTextConfig, typeof i4.AtwNewFieldRadioButtonConfig, typeof i5.AtwCustomizeNewFieldConfig, typeof i6.AtwNewFieldImageConfig], [typeof i7.CommonModule, typeof i8.ColorPickerModule, typeof i9.MaterialModule, typeof i9.NgZorroAntModule, typeof i10.ReactiveFormsModule, typeof i11.CKEditorModule, typeof i12.VhLanguagePipeModule, typeof i10.FormsModule, typeof i9.WidthHeightConfigModule, typeof i9.PositionOutConfigModule, typeof i9.LinkPageModule, typeof i9.ChooseAnimationsConfigModule, typeof i9.RotateConfigModule, typeof i9.TextStyleConfigModule, typeof i9.BordersConfigModule, typeof i9.BordersRadiusConfigModule, typeof i9.TextFormatConfigModule, typeof i13.TranslateModule, typeof i9.ShadowConfigModule, typeof i9.AnimationsConfigModule, typeof i9.HideShowConfigModule, typeof i9.SymbolConfigModule, typeof i14.VhStringPercentPipeModule, typeof i9.PaddingConfigModule, typeof i9.LetterSpacingConfigModule, typeof i9.LineHeightConfigModule, typeof i9.ObjectFitConfigModule, typeof i9.BrightnessContrastConfigModule], never>;
18
19
  static ɵinj: i0.ɵɵInjectorDeclaration<CustomizeNewFieldConfigModule>;
19
20
  }
@@ -0,0 +1,222 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { OnInit, SimpleChanges } from '@angular/core';
3
+ import { MatDialog } from '@angular/material/dialog';
4
+ import { NzImageService } from 'ng-zorro-antd/image';
5
+ import { VhEventMediator, VhImage, VhQueryAutoWeb } from 'vhautowebdb';
6
+ import { FunctionService, LanguageService } from 'vhobjects-service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class AtwNewFieldImageConfig implements OnInit {
9
+ vhQueryAutoWeb: VhQueryAutoWeb;
10
+ private dialog;
11
+ private http;
12
+ private vhEventMediator;
13
+ private vhImage;
14
+ private matdialog;
15
+ functionService: FunctionService;
16
+ private platformId;
17
+ private languageService;
18
+ private nzImageService;
19
+ isCollapsed: boolean;
20
+ isShowConfirmPopup: boolean;
21
+ isConfirmLoading: boolean;
22
+ isViewAll: boolean;
23
+ currentViewAll: any;
24
+ objectChoosing: any;
25
+ type: any;
26
+ device: any;
27
+ class: any;
28
+ staticdata: any;
29
+ config: any;
30
+ blocks_of_page?: any;
31
+ effect_hover: any[];
32
+ isApplyShadow: boolean;
33
+ effect_hover_data: any;
34
+ visible_config_tool: boolean;
35
+ previewUploadUrl: string | null;
36
+ dragging: boolean;
37
+ customize: any[];
38
+ style_fields: ({
39
+ title: string;
40
+ index: number;
41
+ isDrop: boolean;
42
+ } | {
43
+ title: string;
44
+ index: number;
45
+ isDrop?: undefined;
46
+ })[];
47
+ shadow_styles: any;
48
+ /** Có nên mở nút cập nhật kích thước ảnh cho bằng kích thước thiết kế hay không */
49
+ isDesignImageSizeValid: boolean;
50
+ id_subproject: any;
51
+ imageDeviceWidthMax: string;
52
+ widthImageMax: number;
53
+ heightImageMax: number;
54
+ subproject: any;
55
+ resolution: any;
56
+ constructor(vhQueryAutoWeb: VhQueryAutoWeb, dialog: MatDialog, http: HttpClient, vhEventMediator: VhEventMediator, vhImage: VhImage, matdialog: MatDialog, functionService: FunctionService, platformId: Object, languageService: LanguageService, nzImageService: NzImageService);
57
+ ngOnInit(): Promise<void>;
58
+ ngOnChanges(changes: SimpleChanges): Promise<void>;
59
+ handleOpenFullscreenPreview(): void;
60
+ /**
61
+ * lấy width height của ảnh của từng thiết bị
62
+ lấy width height của ảnh của thiết bị có width lớn nhất
63
+ */
64
+ getWidthHeightImage(): void;
65
+ /** Xử lí xoay lật
66
+ * @param axis : Lật theo trục 'x' | 'y' | 'z' | '-z'
67
+ */
68
+ handleSetTransform(axis: any): void;
69
+ SetTransform(): void;
70
+ changeImgType(): void;
71
+ /**
72
+ * Cập nhật staticdata vào database.
73
+ */
74
+ updateStaticData(): void;
75
+ /**
76
+ * Cập nhật Setups vào database.
77
+ */
78
+ updateSetups(): void;
79
+ /** UPLOAD IMAGE */
80
+ openUpload(): void;
81
+ /**
82
+ * no-compress': Không nén ảnh sau khi tải lên
83
+ 'compress-screen': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi thiết bị
84
+ 'compress-frame': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi khung hình thiết bị
85
+ */
86
+ onUpload(e: any): void;
87
+ /**
88
+ * Hàm xử lý khi người dùng kéo và thả (drop) một tệp vào vùng upload.
89
+ * @param event
90
+ */
91
+ onFileDropped_upload(event: DragEvent): void;
92
+ /**
93
+ * Hàm xử lý tệp hình ảnh lên server
94
+ * - Tải lên
95
+ * - Kéo thả vào
96
+ *
97
+ * Nén ảnh:
98
+ * - 'no-compress': Không nén ảnh sau khi tải lên
99
+ * - 'compress-screen': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi thiết bị
100
+ * - 'compress-frame': Nén ảnh sau khi tải lên, nén ảnh theo tỉ lệ màn hình của mỗi khung hình thiết bị
101
+ * @param file File được kéo thả vào hoặc được tải lên
102
+ */
103
+ processImageUpload(file: File): void;
104
+ /**
105
+ * Hành động khi người dùng kéo file qua vùng upload (chưa thả).
106
+ * @param event
107
+ */
108
+ onDragOver_upload(event: DragEvent): void;
109
+ /**
110
+ * Hành động khi người dùng rời con trỏ khỏi vùng upload mà chưa thả.
111
+ */
112
+ onDragLeave_upload(): void;
113
+ /**
114
+ * Hàm mở ra hộp thoại chọn hình ảnh miễn phí
115
+ */
116
+ openImageFree(): void;
117
+ /**
118
+ * Hàm mở ra hộp thoại chỉnh sửa hình ảnh
119
+ */
120
+ openEditImage(): void;
121
+ /**
122
+ *Hàm update config vào database.
123
+ */
124
+ updateConfig(): void;
125
+ /**
126
+ * Hàm update object vào database.
127
+ */
128
+ updateFields(value: any): void;
129
+ /**
130
+ *Hàm update class vào database.
131
+ */
132
+ updateClass(): void;
133
+ /**
134
+ * Hàm này dùng để cho phép mở menu config .
135
+ * Khi mở ở vị trí menu[0] thì các menu khác (menu[n]) đóng lại.
136
+ * @param: value
137
+ */
138
+ openMap: {
139
+ [name: string]: boolean;
140
+ };
141
+ openMapSub: {
142
+ [name: string]: boolean;
143
+ };
144
+ openHandler(value: string, isSub?: boolean): void;
145
+ /** Áp dụng đổ bóng
146
+ * * -> xử lí dữ liệu bóng -> css: box-shadow: `x y blur color`
147
+ */
148
+ handleSetShadow(): void;
149
+ /** Xử lí đổ bóng
150
+ * -> xử lí dữ liệu bóng -> css: object-position: `x y blur color`
151
+ */
152
+ handleSetPositionShadow(): void;
153
+ /**
154
+ * Hàm này dùng để mở rộng phần cấu hình.
155
+ * @param field_text : trả về phần tử được chọn của mảng style_field
156
+ */
157
+ openViewAll(field_text: any): void;
158
+ /**
159
+ * remove link khi click vào nút x
160
+ */
161
+ removeLink(): void;
162
+ urlBackgroundImage: string;
163
+ /** Hàm thực hiện xử lí khi chuyển lựa chon background
164
+ *
165
+ * @param event
166
+ */
167
+ handleSetBackground(event: any): void;
168
+ /** Hàm thực hiện gán giá trị background-image khi có thay đổi
169
+ *
170
+ */
171
+ handleSetBackgroundImage(): void;
172
+ path: string;
173
+ /**
174
+ * Hàm xử lý lấy ảnh ở thư viện
175
+ */
176
+ openLibrary(): void;
177
+ /** Xử lí lưu vị trí ảnh
178
+ * -> xử lí dữ liệu bóng -> css: object-position: `x y`
179
+ */
180
+ handleSetPositionImage(): void;
181
+ scale(): void;
182
+ /**
183
+ * Hàm này set customize mở phần mở rộng của config từ choose-animations-config truyền về
184
+ * @param event customize sau khi thay đổi
185
+ */
186
+ openAnimationDetail(event: any): void;
187
+ /**
188
+ * hàm này nhận sk thay đổi width height từ component app-width-height-config truyền về
189
+ * @param event width hieght của element sau khi thay đổi
190
+ */
191
+ changeWidthHeight(event: any): void;
192
+ handleCancelConfirm(): void;
193
+ /**
194
+ * Lấy hình ảnh từ url đẩy lên server với kích thước hình thay đổi
195
+ * */
196
+ handleOkConfirm(): void;
197
+ changeUrl(): void;
198
+ updateClassAndConfig(): void;
199
+ /**
200
+ * Lấy ra tên file và đuôi file
201
+ * @param url Đường dẫn ảnh
202
+ * @example const { fileName, fileExtension } = getFileInfo("https://115.78.228.208:20350/autowebapp/67c1b593b1344364462b082b/images/design/objects/3-1-768x768%20(3).png");
203
+ */
204
+ getFileInfo(url: string): {
205
+ fullFileName: string;
206
+ fileName: string;
207
+ fileExtension: string;
208
+ folderPath: string;
209
+ };
210
+ /**
211
+ * Sao chép đường dẫn hình ảnh vào bộ nhớ tạm
212
+ */
213
+ copyLinkImg(text?: string): void;
214
+ /** Hàm kiểm tra có cần phải hiển thị nút cập nhật không */
215
+ private checkDesignImageSize;
216
+ /**
217
+ * Hàm update kích thước ảnh phù hợp cho từng kích thước thiết kế của từng thiết bị
218
+ */
219
+ updateDesignImageSize(): Promise<void>;
220
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtwNewFieldImageConfig, never>;
221
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtwNewFieldImageConfig, "atw-newField-image-config", never, { "objectChoosing": "objectChoosing"; "type": "type"; "device": "device"; "class": "class"; "staticdata": "staticdata"; "config": "config"; "blocks_of_page": "blocks_of_page"; "visible_config_tool": "visible_config_tool"; }, {}, never, never>;
222
+ }
@@ -25,7 +25,7 @@ export declare class AtwNewFieldRadioButtonConfig implements OnInit {
25
25
  }[];
26
26
  constructor(vhQueryAutoWeb: VhQueryAutoWeb, http: HttpClient);
27
27
  ngOnInit(): void;
28
- getNewFileds(): void;
28
+ getNewFields(): void;
29
29
  /**
30
30
  * Hàm này dùng để cho phép mở menu config .
31
31
  * Khi mở ở vị trí menu[0] thì các menu khác (menu[n]) đóng lại.
@@ -53,11 +53,8 @@ export declare class AtwNewFieldRadioButtonConfig implements OnInit {
53
53
  updateStaticData(): void;
54
54
  changeLookupGroup(event: any): void;
55
55
  onChangeFieldCustom(selectedValue: any): void;
56
- /** Chọn kiểu units
57
- * @param index : Xác định kiểu unit
58
- * Ví dụ: kiểu 1 hoặc kiểu 2
59
- */
60
- chooseRadio(index: any): void;
56
+ onRadioChange(): void;
57
+ onRadioItemChange(): void;
61
58
  /**
62
59
  * Hàm này dùng để mở rộng phần cấu hình.
63
60
  * @param field_text : trả về phần tử được chọn của mảng style_field
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vhobjects-config",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^12.2.0",
6
6
  "@angular/core": "^12.2.0"