fw-webbuilder 1.1.269 → 1.1.271
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 +28 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
1
|
+
import { HttpClient, HttpEvent } from '@angular/common/http';
|
|
2
2
|
import { Subject, Observable, Subscription } from 'rxjs';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { OnInit, ElementRef, Renderer2, SimpleChanges, OnDestroy, OnChanges, DoCheck, ChangeDetectorRef, AfterViewInit, InjectionToken } from '@angular/core';
|
|
@@ -245,6 +245,15 @@ declare class webBuilderService {
|
|
|
245
245
|
* @returns
|
|
246
246
|
*/
|
|
247
247
|
deleteObject(object: any, code?: any): Promise<any>;
|
|
248
|
+
/**
|
|
249
|
+
* Nén ảnh thông minh trước khi upload:
|
|
250
|
+
* - Bỏ qua file không phải ảnh hoặc file svg, gif
|
|
251
|
+
* - Bỏ qua ảnh <= 1MB
|
|
252
|
+
* - Giới hạn kích thước tối đa 2560px (chuẩn 2K)
|
|
253
|
+
* - Nén chất lượng 85% giữ độ sắc nét hoàn hảo
|
|
254
|
+
*/
|
|
255
|
+
compressImage(file: File, maxWidth?: number, maxHeight?: number, quality?: number): Promise<File>;
|
|
256
|
+
uploadFileWithProgress(file: File, newPath: string): Observable<HttpEvent<any>>;
|
|
248
257
|
uploadFile(file: File, newPath: string, options?: any): Promise<Object>;
|
|
249
258
|
upLoadImage(file: any, oldPath: string, newPath: string, options?: any): Promise<any>;
|
|
250
259
|
addCategory(data: any): Promise<any>;
|
|
@@ -2929,6 +2938,17 @@ declare class SelectLanguageComponent implements OnInit {
|
|
|
2929
2938
|
static ɵcmp: i0.ɵɵComponentDeclaration<SelectLanguageComponent, "app-select-language", never, { "availableLanguage": { "alias": "availableLanguage"; "required": false; }; }, {}, never, never, true, never>;
|
|
2930
2939
|
}
|
|
2931
2940
|
|
|
2941
|
+
interface UploadTask {
|
|
2942
|
+
id: string;
|
|
2943
|
+
file: File;
|
|
2944
|
+
previewUrl: string;
|
|
2945
|
+
progress: number;
|
|
2946
|
+
loaded: number;
|
|
2947
|
+
total: number;
|
|
2948
|
+
status: 'uploading' | 'success' | 'error';
|
|
2949
|
+
errorMsg?: string;
|
|
2950
|
+
serverData?: any;
|
|
2951
|
+
}
|
|
2932
2952
|
declare class ManageImgsComponent implements OnInit {
|
|
2933
2953
|
webbuilderService: webBuilderService;
|
|
2934
2954
|
private msg;
|
|
@@ -2936,6 +2956,11 @@ declare class ManageImgsComponent implements OnInit {
|
|
|
2936
2956
|
private modal;
|
|
2937
2957
|
modalRef: NzModalRef<ManageImgsComponent>;
|
|
2938
2958
|
files: any;
|
|
2959
|
+
uploadTasks: UploadTask[];
|
|
2960
|
+
isUploadDrawerOpen: boolean;
|
|
2961
|
+
isUploadDrawerVisible: boolean;
|
|
2962
|
+
get completedUploadCount(): number;
|
|
2963
|
+
get activeUploadingTasks(): UploadTask[];
|
|
2939
2964
|
private searchSubject;
|
|
2940
2965
|
path: any;
|
|
2941
2966
|
currentTab: any;
|
|
@@ -2969,7 +2994,7 @@ declare class ManageImgsComponent implements OnInit {
|
|
|
2969
2994
|
onDragLeave(event: DragEvent): void;
|
|
2970
2995
|
onDrop(event: DragEvent): void;
|
|
2971
2996
|
onFilesChange(e: any): void;
|
|
2972
|
-
handleUploadFiles(selectedFiles: FileList | File[], fileInputTarget?: any): void
|
|
2997
|
+
handleUploadFiles(selectedFiles: FileList | File[], fileInputTarget?: any): Promise<void>;
|
|
2973
2998
|
onDelete(item: any): void;
|
|
2974
2999
|
onChangePath(item: any): void;
|
|
2975
3000
|
onSelectFile(item: any, event: MouseEvent): void;
|
|
@@ -3119,3 +3144,4 @@ declare class WbStyleDirective implements DoCheck {
|
|
|
3119
3144
|
declare const WEBBUILDER_API_URL: InjectionToken<string>;
|
|
3120
3145
|
|
|
3121
3146
|
export { AuthService, COUNTRY_CODES, CartService, CommonConfigMapService, ComponentConfigMapService, ComponentMapService, DEVICES, DrawerService, FONTS, FunctionService, LIST_LANGUAGES, MAIN_SECTOR, ManageImgsComponent, PAYMENT_METHODS, SelectLanguageComponent, TOOLS, TOOLS_BLOCK, TOOLS_OBJECT, WEBBUILDER_API_URL, WbAnimationConfig, WbBackgroundColorConfig, WbBannerAnimationConfig, WbBlockBlank, WbBlockBlankConfig, WbBorderConfig, WbBorderRadiusConfig, WbBreadcumb, WbBreadcumbConfig, WbButton, WbButtonConfig, WbButtonQuantity, WbButtonQuantityConfig, WbButtonSetDefaultAddress, WbButtonSetDefaultAddressConfig, WbCheckboxConfig, WbCheckboxFilter, WbCheckboxFilterConfig, WbCkeditorConfig, WbDialogConfig, WbDragDrop, WbFilterConfig, WbFilterImageConfig, WbFixedConfig, WbFrameBanner, WbFrameBannerConfig, WbFrameBlank, WbFrameBlankConfig, WbFrameCart, WbFrameCartConfig, WbFrameCollapse, WbFrameCollapseConfig, WbFrameContentConfig, WbFrameProductDetail, WbFrameProductDetailConfig, WbFrameProducts, WbFrameProductsAdmin, WbFrameProductsByCategory, WbFrameProductsByCategoryConfig, WbFrameProductsConfig, WbFrameTab, WbFrameTabConfig, WbFreeblockConfig, WbGoogleMap, WbGoogleMapConfig, WbGridConfig, WbHideShowConfig, WbIconConfig, WbImage, WbImageConfig, WbImageListNumberConfig, WbInput, WbInputConfig, WbLine, WbLineConfig, WbLinkPageConfig, WbMapConfig, WbMaskImageConfig, WbMenuContentConfig, WbMenuHorizontal, WbMenuHorizontalConfig, WbMenuMobile, WbMenuMobileConfig, WbObjectFitConfig, WbOrdinalConfig, WbPaddingConfig, WbPageConfig, WbPaginationConfig, WbPositionConfig, WbPositionInConfig, WbPositionOutConfig, WbProductImageList, WbProductImageListConfig, WbProductSelectAttribute, WbProductSelectAttributeConfig, WbRotateConfig, WbScrollbarConfig, WbSelectCountry, WbSelectCountryConfig, WbSelectProvinceDistrictWard, WbSelectProvinceDistrictWardConfig, WbShadowConfig, WbSlideConfig, WbStickyConfig, WbStyleDirective, WbText, WbTextConfig, WbTextFormatConfig, WbTextParagraph, WbTextParagraphConfig, WbToolTipConfig, WbUploadImageConfig, WbVideo, WbVideoConfig, WbVirtualSelected, WbWidthHeightConfig, webBuilderService };
|
|
3147
|
+
export type { UploadTask };
|