fw-webbuilder 1.1.285 → 1.1.287
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/fesm2022/fw-webbuilder.mjs +1 -1
- package/index.d.ts +20 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ import { NzImageService } from 'ng-zorro-antd/image';
|
|
|
20
20
|
*/
|
|
21
21
|
declare class webBuilderService {
|
|
22
22
|
private http;
|
|
23
|
+
private modal;
|
|
24
|
+
private translate;
|
|
23
25
|
private pendingObjectUpdates;
|
|
24
26
|
private pendingBlockUpdates;
|
|
25
27
|
private pendingPageUpdates;
|
|
@@ -255,11 +257,15 @@ declare class webBuilderService {
|
|
|
255
257
|
*/
|
|
256
258
|
deleteObject(object: any, code?: any): Promise<any>;
|
|
257
259
|
/**
|
|
258
|
-
*
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
*
|
|
260
|
+
* Chuẩn hóa tên file: chuyển tiếng Việt có dấu thành không dấu, thay khoảng trắng và ký tự lạ bằng '-'
|
|
261
|
+
*/
|
|
262
|
+
sanitizeFileName(fileName: string): string;
|
|
263
|
+
/**
|
|
264
|
+
* Nén ảnh trực tiếp trên trình duyệt bằng HTML5 Canvas trước khi tải lên.
|
|
265
|
+
* - Giữ nguyên ảnh <= 1MB, SVG, GIF
|
|
266
|
+
* - Tự động resize nếu kích thước lớn hơn maxWidth/maxHeight
|
|
267
|
+
* - Chuyển đổi PNG lớn sang WebP để giảm tới 80% dung lượng
|
|
268
|
+
* - Chuẩn hóa tên file sạch sẽ, an toàn
|
|
263
269
|
*/
|
|
264
270
|
compressImage(file: File, maxWidth?: number, maxHeight?: number, quality?: number): Promise<File>;
|
|
265
271
|
uploadFileWithProgress(file: File, newPath: string): Observable<HttpEvent<any>>;
|
|
@@ -462,6 +468,7 @@ declare class webBuilderService {
|
|
|
462
468
|
getDashboard(startDate: string, endDate: string): Promise<Object>;
|
|
463
469
|
private getVisitorId;
|
|
464
470
|
changeTemplate(db: string, id_template: string): Promise<Object>;
|
|
471
|
+
moveToTemplate(id_project: string, data?: any): Promise<Object>;
|
|
465
472
|
pasteFormatStyle(item: any): void;
|
|
466
473
|
exportProjectBackup(type: 'template' | 'content'): Promise<any>;
|
|
467
474
|
importProjectBackup(file: File): Promise<any>;
|
|
@@ -478,6 +485,10 @@ declare class webBuilderService {
|
|
|
478
485
|
* Tự động đồng bộ Font chữ Google, Font chủ đề, Màu chủ đề và Line Height
|
|
479
486
|
*/
|
|
480
487
|
getTinyMceConfig(customOptions?: any): any;
|
|
488
|
+
/**
|
|
489
|
+
* Mở modal Quản lý đa phương tiện (ManageImgsComponent) để chọn ảnh/video cho TinyMCE editor
|
|
490
|
+
*/
|
|
491
|
+
openManageImgsForEditor(callback: (url: string, meta?: any) => void): void;
|
|
481
492
|
/**
|
|
482
493
|
* hàm chuyển tên thành slug
|
|
483
494
|
* vd: "Giới thieu" => "gioi-thieu"
|
|
@@ -3046,6 +3057,9 @@ declare class ManageImgsComponent implements OnInit {
|
|
|
3046
3057
|
typeImgs: any;
|
|
3047
3058
|
typeVideos: any;
|
|
3048
3059
|
typeFiles: any;
|
|
3060
|
+
isImg(extension: string): boolean;
|
|
3061
|
+
isVideo(extension: string): boolean;
|
|
3062
|
+
isDocFile(extension: string): boolean;
|
|
3049
3063
|
constructor(webbuilderService: webBuilderService, msg: NzMessageService, translate: TranslateService, modal: NzModalService, modalRef: NzModalRef<ManageImgsComponent>);
|
|
3050
3064
|
ngOnInit(): void;
|
|
3051
3065
|
getFiles(): void;
|
|
@@ -3059,6 +3073,7 @@ declare class ManageImgsComponent implements OnInit {
|
|
|
3059
3073
|
onDelete(item: any): void;
|
|
3060
3074
|
onChangePath(item: any): void;
|
|
3061
3075
|
onSelectFile(item: any, event: MouseEvent): void;
|
|
3076
|
+
onKeydown(event: KeyboardEvent): void;
|
|
3062
3077
|
deleteMany(): void;
|
|
3063
3078
|
handleRename(e: any, item: any): void;
|
|
3064
3079
|
onBackgroundClick(): void;
|