fw-webbuilder 1.1.153 → 1.1.154
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 +42 -25
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ declare class webBuilderService {
|
|
|
69
69
|
objects: any;
|
|
70
70
|
/**
|
|
71
71
|
* danh sách freeblock(có nhánh)
|
|
72
|
-
|
|
72
|
+
*/
|
|
73
73
|
freeblocks: any;
|
|
74
74
|
/**
|
|
75
75
|
* chatboxs của trang
|
|
@@ -80,11 +80,17 @@ declare class webBuilderService {
|
|
|
80
80
|
*/
|
|
81
81
|
device: string | 'desktop' | 'tablet_landscape' | 'tablet_portrait' | 'mobile_landscape' | 'mobile_portrait';
|
|
82
82
|
type: string | 'design' | 'preview' | 'build';
|
|
83
|
+
/**
|
|
84
|
+
* loading tổng, true thì toàn bộ giao diện sẽ ko làm được gì
|
|
85
|
+
*/
|
|
83
86
|
loading: boolean;
|
|
84
87
|
group_frames: any;
|
|
85
88
|
group_objects: any;
|
|
86
89
|
toolsBox: any;
|
|
87
90
|
toolsBoxPosition: any;
|
|
91
|
+
/**
|
|
92
|
+
* lúc thiết kế ở freeblock
|
|
93
|
+
*/
|
|
88
94
|
isFreeBlock: boolean;
|
|
89
95
|
header: any;
|
|
90
96
|
footer: any;
|
|
@@ -111,10 +117,14 @@ declare class webBuilderService {
|
|
|
111
117
|
ctrlZ: any;
|
|
112
118
|
ctrlY: any;
|
|
113
119
|
constructor(http: HttpClient, socketService: SocketService, route: ActivatedRoute);
|
|
114
|
-
realTimeUpdate(): void;
|
|
115
120
|
closeConnection(): void;
|
|
116
121
|
onNotifyChange(callback: (data: any) => void): any;
|
|
117
122
|
notifyChange(data: any): void;
|
|
123
|
+
/**
|
|
124
|
+
* dùng trong preview-web
|
|
125
|
+
* @param values
|
|
126
|
+
* @returns
|
|
127
|
+
*/
|
|
118
128
|
findItems_inTree_byType(values: any): any;
|
|
119
129
|
findItemsInTreeByType(tree: any, values: any): any;
|
|
120
130
|
/**
|
|
@@ -123,6 +133,12 @@ declare class webBuilderService {
|
|
|
123
133
|
* @returns
|
|
124
134
|
*/
|
|
125
135
|
findItemById(id: string): any;
|
|
136
|
+
/**
|
|
137
|
+
* Tìm TẤT CẢ đối tượng dù ở currentPage hay freeblocks
|
|
138
|
+
* @param id id của đối tượng cần tìm
|
|
139
|
+
* @returns
|
|
140
|
+
*/
|
|
141
|
+
findItemsById(id: string): any[];
|
|
126
142
|
/**
|
|
127
143
|
* hàm tìm kiếm 1 đối tượng trong tree
|
|
128
144
|
* @param tree khối
|
|
@@ -140,10 +156,13 @@ declare class webBuilderService {
|
|
|
140
156
|
addTemplate(data: any): Promise<any>;
|
|
141
157
|
updateTemplate(id: string, data: any): Promise<any>;
|
|
142
158
|
deleteTemplate(id: string): Promise<any>;
|
|
143
|
-
sortVietnamese(arr:
|
|
159
|
+
sortVietnamese(arr: any[]): any[];
|
|
160
|
+
/**
|
|
161
|
+
* tách ra hàm getHeaderFooter vì lúc đổi thiết bị phải get lại freeblocks
|
|
162
|
+
*/
|
|
144
163
|
getHeaderFooter(): void;
|
|
145
|
-
connectProject(_id: string): Promise<
|
|
146
|
-
setProjectWorking(data: any): void
|
|
164
|
+
connectProject(_id: string): Promise<void>;
|
|
165
|
+
setProjectWorking(data: any): Promise<void>;
|
|
147
166
|
/**
|
|
148
167
|
* Lấy chi tiết trang có tất cả nhánh
|
|
149
168
|
* @param id id trang
|
|
@@ -163,41 +182,32 @@ declare class webBuilderService {
|
|
|
163
182
|
*/
|
|
164
183
|
getFullObjectsForObject(object: any): any;
|
|
165
184
|
addPage(data: any): Promise<any>;
|
|
185
|
+
updatePage(id: string, data: any, code?: any): Promise<any>;
|
|
166
186
|
deletePage(id: string): Promise<any>;
|
|
167
187
|
getPage(id: string): Promise<any>;
|
|
168
|
-
deleteBlockDbAndLocal(id: string):
|
|
169
|
-
deleteObjectDbAndLocal(id: string): Promise<
|
|
188
|
+
deleteBlockDbAndLocal(id: string): Promise<any>;
|
|
189
|
+
deleteObjectDbAndLocal(id: string): Promise<any>;
|
|
170
190
|
/**
|
|
171
191
|
*
|
|
172
192
|
* @param nodes nhánh cần làm phẳng từ page
|
|
173
193
|
*/
|
|
174
194
|
flatNodes(nodes: any): any;
|
|
175
|
-
updatePage(id: string, data: any): Promise<any>;
|
|
176
195
|
getPages(): Promise<any>;
|
|
177
|
-
/**
|
|
178
|
-
*
|
|
179
|
-
* @param data ko cần tính index, hàm từ tính luôn
|
|
180
|
-
* @returns
|
|
181
|
-
*/
|
|
182
196
|
addBlock(data: any, code?: any): Promise<any>;
|
|
183
197
|
updateBlock(id: string, data: any, code?: string): Promise<any>;
|
|
184
198
|
deleteBlock(id: string, code?: any): Promise<any>;
|
|
185
|
-
deleteBlockClone(block: any): Promise<any>;
|
|
186
|
-
/**
|
|
187
|
-
*
|
|
188
|
-
* @param data dữ liệu object tạo mới
|
|
189
|
-
* @param sync đồng bộ giao diện, true thì giao diện sẽ cập nhật ngay, false thì không cập nhật giao diện chỉ add trên db
|
|
190
|
-
* @returns
|
|
191
|
-
*/
|
|
199
|
+
deleteBlockClone(block: any, code?: string): Promise<any>;
|
|
192
200
|
addObject(data: any, code?: any): Promise<any>;
|
|
193
201
|
updateObject(id: string, data: any, code?: string): Promise<any>;
|
|
194
202
|
/**
|
|
195
|
-
* hàm này xóa tất cả object và nhánh con của nó
|
|
203
|
+
* hàm này xóa tất cả object và nhánh con của nó(lưu ý hàm này ko được xóa objectClone nhớ kiểm tra is_clone trước khi sử dụng)
|
|
204
|
+
* trong nhánh có thể có object clone nên phải check
|
|
205
|
+
* nếu xóa item gốc thì tất cả object_clone từ item gốc phải xóa trên DOM luôn
|
|
196
206
|
* @param id id của object cần xóa
|
|
197
207
|
* @returns
|
|
198
208
|
*/
|
|
199
|
-
deleteObject(id: string, code?: any): any
|
|
200
|
-
deleteObjectClone(object: any): Promise<any>;
|
|
209
|
+
deleteObject(id: string, code?: any): Promise<any>;
|
|
210
|
+
deleteObjectClone(object: any, code?: string): Promise<any>;
|
|
201
211
|
uploadFile(file: File, newPath: string, options?: any): Promise<Object>;
|
|
202
212
|
upLoadImage(file: any, oldPath: string, newPath: string, options?: any): Promise<any>;
|
|
203
213
|
upLoadAdminImage(file: any, oldPath: string, newPath: string, options?: any): Promise<any>;
|
|
@@ -265,12 +275,19 @@ declare class webBuilderService {
|
|
|
265
275
|
handleCtrl_V(): any;
|
|
266
276
|
handleCtrl_Z(): Promise<void>;
|
|
267
277
|
handleCtrl_Y(): Promise<void>;
|
|
278
|
+
/**
|
|
279
|
+
* bộ hàm private 2 này giành riêng cho việc ctrl_z
|
|
280
|
+
* trong hàm sẽ cập nhật db, local và DOM
|
|
281
|
+
*/
|
|
268
282
|
private updateObject2;
|
|
269
283
|
private updateBlock2;
|
|
270
284
|
private addObject2;
|
|
271
285
|
private addBlock2;
|
|
286
|
+
private updatePage2;
|
|
272
287
|
private deleteObject2;
|
|
273
288
|
private deleteBlock2;
|
|
289
|
+
private deleteBlockClone2;
|
|
290
|
+
private deleteObjectClone2;
|
|
274
291
|
applyFontLinks(fontLinksFromDB: string): void;
|
|
275
292
|
getFontNames(fontLinkTag: string): string[];
|
|
276
293
|
/**
|
|
@@ -300,13 +317,13 @@ declare class webBuilderService {
|
|
|
300
317
|
* @param block block phải có NHÁNH
|
|
301
318
|
* @returns
|
|
302
319
|
*/
|
|
303
|
-
handleCloneBlock(page: any, block: any): Promise<void>;
|
|
320
|
+
handleCloneBlock(page: any, block: any, codeUpdate: any): Promise<void>;
|
|
304
321
|
/**
|
|
305
322
|
* Chỉ cần dùng hàm này sẽ cập nhật dữ liệu và giao diện
|
|
306
323
|
* @param parent đối tượng cha
|
|
307
324
|
* @param object đối tượng clone
|
|
308
325
|
*/
|
|
309
|
-
handleCloneObject(parent: any, object: any, change_position
|
|
326
|
+
handleCloneObject(parent: any, object: any, change_position: boolean | undefined, codeUpdate: any): Promise<void>;
|
|
310
327
|
handleOrder(customer_info: any, note: any, payment_method: any, id_user: any): Promise<any>;
|
|
311
328
|
getOrders_byFields(query: any, sort: any, page?: number, limit?: number): Promise<any>;
|
|
312
329
|
updateOrder(id: string, data: any): Promise<any>;
|