fw-webbuilder 1.1.279 → 1.1.280
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 +21 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -154,11 +154,13 @@ declare class webBuilderService {
|
|
|
154
154
|
findItemInTree(tree: any, id: string): any;
|
|
155
155
|
private wrapApiCall;
|
|
156
156
|
addProject(data: any): Promise<any>;
|
|
157
|
+
addBlockTemplate(data: any): Promise<any>;
|
|
157
158
|
copyProject(data: any): Promise<any>;
|
|
158
159
|
checkDomainAvailability(params: any): Promise<any>;
|
|
159
160
|
updateProject(id: string, data: any): Promise<any>;
|
|
160
161
|
deleteProject(id: string): Promise<any>;
|
|
161
162
|
getProjects_byFields(query: any, sort: any, page?: number, limit?: number): Promise<any>;
|
|
163
|
+
getBlockTemplates_byFields(query: any, sort: any, page?: number, limit?: number): Promise<any>;
|
|
162
164
|
/**
|
|
163
165
|
* dùng route khác vì route này không cần đăng nhập
|
|
164
166
|
*/
|
|
@@ -193,15 +195,18 @@ declare class webBuilderService {
|
|
|
193
195
|
/**
|
|
194
196
|
* hàm lấy full nhánh objects con cho block, lấy luôn danh dánh object nhân bản
|
|
195
197
|
* @param block
|
|
198
|
+
* @param sourceObjects
|
|
199
|
+
* @param sourceBlocks
|
|
196
200
|
* @returns
|
|
197
201
|
*/
|
|
198
|
-
getFullObjectsForBlock(block: any): any;
|
|
202
|
+
getFullObjectsForBlock(block: any, sourceObjects?: any[], sourceBlocks?: any[]): any;
|
|
199
203
|
/**
|
|
200
204
|
* hàm lấy full nhánh objects con cho object, lấy luôn danh dánh object nhân bản
|
|
201
205
|
* @param object
|
|
206
|
+
* @param sourceObjects
|
|
202
207
|
* @returns
|
|
203
208
|
*/
|
|
204
|
-
getFullObjectsForObject(object: any): any;
|
|
209
|
+
getFullObjectsForObject(object: any, sourceObjects?: any[]): any;
|
|
205
210
|
addPage(data: any): Promise<any>;
|
|
206
211
|
updatePage(id: string, data: any, code?: any): Promise<any>;
|
|
207
212
|
deletePage(id: string): Promise<any>;
|
|
@@ -216,6 +221,8 @@ declare class webBuilderService {
|
|
|
216
221
|
getPages(): Promise<any>;
|
|
217
222
|
addBlock(data: any, code?: any): Promise<any>;
|
|
218
223
|
addBlankBlockAtPosition(targetBlockId: string, position: 'above' | 'below'): Promise<any>;
|
|
224
|
+
private remapFreeblockIdsInTree;
|
|
225
|
+
insertBlockTemplateAtPosition(templateId: string, targetBlockId?: string, position?: 'above' | 'below' | 'end'): Promise<any>;
|
|
219
226
|
/**
|
|
220
227
|
* các hàm raw không xử lý dữ liệu đầu vào trước khi gửi đi
|
|
221
228
|
*/
|
|
@@ -364,11 +371,16 @@ declare class webBuilderService {
|
|
|
364
371
|
private deleteObject2;
|
|
365
372
|
private deleteBlock2;
|
|
366
373
|
/**
|
|
367
|
-
* hàm này dùng để copy block
|
|
374
|
+
* hàm này dùng để copy block (hỗ trợ chèn tại vị trí chỉ định và copy template)
|
|
368
375
|
* @param page _id của page chứa block
|
|
369
376
|
* @param block block có NHÁNH(objects) cần copy
|
|
377
|
+
* @param code mã code nhóm (cho Ctrl+Z)
|
|
378
|
+
* @param isClone có phải copy dạng clone không
|
|
379
|
+
* @param targetBlockId ID của block mục tiêu (nếu chèn above/below)
|
|
380
|
+
* @param position vị trí chèn ('above' | 'below' | 'end')
|
|
381
|
+
* @param isTemplate có phải lấy từ khối mẫu không (để giữ nguyên tên gốc)
|
|
370
382
|
*/
|
|
371
|
-
handleCopyBlock(page: any, block: any, code: any, isClone?: boolean): Promise<
|
|
383
|
+
handleCopyBlock(page: any, block: any, code: any, isClone?: boolean, targetBlockId?: string, position?: 'above' | 'below' | 'end', isTemplate?: boolean): Promise<any>;
|
|
372
384
|
/**
|
|
373
385
|
* Hàm này dùng để copy object
|
|
374
386
|
* khi copy page thì cần mọi object nằm ở vị trí cũ,
|
|
@@ -377,7 +389,7 @@ declare class webBuilderService {
|
|
|
377
389
|
* @param object object có NHÁNH(objects) cần copy
|
|
378
390
|
* @param change_position
|
|
379
391
|
*/
|
|
380
|
-
handleCopyObject(parent: any, object: any, change_position: boolean | undefined, code: any, isClone?: boolean): Promise<void>;
|
|
392
|
+
handleCopyObject(parent: any, object: any, change_position: boolean | undefined, code: any, isClone?: boolean, isTemplate?: boolean): Promise<void>;
|
|
381
393
|
/**
|
|
382
394
|
* hàm này copy page, page truyền vào phải có nhánh
|
|
383
395
|
* @param page page phải có NHÁNH
|
|
@@ -429,6 +441,10 @@ declare class webBuilderService {
|
|
|
429
441
|
getContactSupports_byFields(query: any, sort: any, page?: number, limit?: number): Promise<any>;
|
|
430
442
|
getAdminUsers_byFields(query: any, sort: any, page?: number, limit?: number): Promise<any>;
|
|
431
443
|
addAdminUser(data: any): Promise<any>;
|
|
444
|
+
/**
|
|
445
|
+
* Lấy danh sách tất cả website trong hệ thống cho Super Admin
|
|
446
|
+
*/
|
|
447
|
+
getAllProjects_byAdmin(query?: any, sort?: any, page?: number, limit?: number): Promise<any>;
|
|
432
448
|
/**
|
|
433
449
|
* Biến dữ liệu thô AI (data.txt) thành danh sách các khỏi (block) có chứa objects
|
|
434
450
|
* @param rawData Mảng data thô chứa thông tin layout từ AI
|