@flusys/ng-storage 9.1.0 → 9.1.1
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/flusys-ng-storage-file-manager-api.service-DJ9uP3aN.mjs +43 -0
- package/fesm2022/flusys-ng-storage-file-manager-api.service-DJ9uP3aN.mjs.map +1 -0
- package/fesm2022/{flusys-ng-storage-file-manager-form.component-DaO-9wKM.mjs → flusys-ng-storage-file-manager-form.component-Bvhewt3f.mjs} +411 -231
- package/fesm2022/flusys-ng-storage-file-manager-form.component-Bvhewt3f.mjs.map +1 -0
- package/fesm2022/{flusys-ng-storage-file-manager-list.component-a7YHw1Gz.mjs → flusys-ng-storage-file-manager-list.component-4_LdJOtH.mjs} +355 -145
- package/fesm2022/flusys-ng-storage-file-manager-list.component-4_LdJOtH.mjs.map +1 -0
- package/fesm2022/flusys-ng-storage-folder-api.service-D_fFEuO6.mjs +33 -0
- package/fesm2022/flusys-ng-storage-folder-api.service-D_fFEuO6.mjs.map +1 -0
- package/fesm2022/flusys-ng-storage-folder-form.component-7C2oWijb.mjs +298 -0
- package/fesm2022/flusys-ng-storage-folder-form.component-7C2oWijb.mjs.map +1 -0
- package/fesm2022/{flusys-ng-storage-folder-list.component-BDrBAcCS.mjs → flusys-ng-storage-folder-list.component-BdSBM_DB.mjs} +284 -77
- package/fesm2022/flusys-ng-storage-folder-list.component-BdSBM_DB.mjs.map +1 -0
- package/fesm2022/flusys-ng-storage-storage-config-api.service-Bl4asniq.mjs +33 -0
- package/fesm2022/flusys-ng-storage-storage-config-api.service-Bl4asniq.mjs.map +1 -0
- package/fesm2022/{flusys-ng-storage-storage-config-form.component-B4wBfzVs.mjs → flusys-ng-storage-storage-config-form.component-De5h8JY-.mjs} +369 -214
- package/fesm2022/flusys-ng-storage-storage-config-form.component-De5h8JY-.mjs.map +1 -0
- package/fesm2022/{flusys-ng-storage-storage-config-list.component-CCkZY--j.mjs → flusys-ng-storage-storage-config-list.component-Dh9JkuZP.mjs} +303 -83
- package/fesm2022/flusys-ng-storage-storage-config-list.component-Dh9JkuZP.mjs.map +1 -0
- package/fesm2022/flusys-ng-storage-storage-container.component-EWGNoozU.mjs +124 -0
- package/fesm2022/flusys-ng-storage-storage-container.component-EWGNoozU.mjs.map +1 -0
- package/fesm2022/flusys-ng-storage-upload.service-CIcEL_Kr.mjs +113 -0
- package/fesm2022/flusys-ng-storage-upload.service-CIcEL_Kr.mjs.map +1 -0
- package/fesm2022/flusys-ng-storage.mjs +611 -876
- package/fesm2022/flusys-ng-storage.mjs.map +1 -1
- package/package.json +5 -5
- package/types/flusys-ng-storage.d.ts +254 -292
- package/fesm2022/flusys-ng-storage-file-manager-form.component-DaO-9wKM.mjs.map +0 -1
- package/fesm2022/flusys-ng-storage-file-manager-list.component-a7YHw1Gz.mjs.map +0 -1
- package/fesm2022/flusys-ng-storage-folder-form.component-BCzVzmRn.mjs +0 -225
- package/fesm2022/flusys-ng-storage-folder-form.component-BCzVzmRn.mjs.map +0 -1
- package/fesm2022/flusys-ng-storage-folder-list.component-BDrBAcCS.mjs.map +0 -1
- package/fesm2022/flusys-ng-storage-storage-config-form.component-B4wBfzVs.mjs.map +0 -1
- package/fesm2022/flusys-ng-storage-storage-config-list.component-CCkZY--j.mjs.map +0 -1
|
@@ -1,304 +1,292 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import { DestroyRef, Provider } from
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { Observable } from 'rxjs';
|
|
10
|
-
|
|
11
|
-
declare const STORAGE_MESSAGES: Record<string, string>;
|
|
12
|
-
|
|
1
|
+
import { ApiResourceService, IBaseEntity, IBulkResponse, IFileBasicInfo, IFileProvider, IFileSelectFilter, IFileUploadOptions, IFolderBasicInfo, IListResponse, ISelectFilter, ISingleResponse, IStorageConfigBasicInfo, IUploadedFile, TranslateService } from "@flusys/ng-shared";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { DestroyRef, Provider } from "@angular/core";
|
|
4
|
+
import { Router, Routes } from "@angular/router";
|
|
5
|
+
import { ConfirmationService, MessageService } from "@flusys/ng-ui";
|
|
6
|
+
import { Observable } from "rxjs";
|
|
7
|
+
import { BaseApiService } from "@flusys/ng-core";
|
|
8
|
+
export declare const STORAGE_MESSAGES: Record<string, string>;
|
|
13
9
|
/**
|
|
14
10
|
* File Location Enum
|
|
15
11
|
* Storage provider types (matches backend FileLocationEnum)
|
|
16
12
|
*/
|
|
17
|
-
declare enum FileLocationEnum {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
export declare enum FileLocationEnum {
|
|
14
|
+
LOCAL = "local",
|
|
15
|
+
AWS = "aws",
|
|
16
|
+
AZURE = "azure",
|
|
17
|
+
SFTP = "sftp"
|
|
22
18
|
}
|
|
23
19
|
/**
|
|
24
20
|
* Image Format Enum
|
|
25
21
|
* Supported image output formats for compression
|
|
26
22
|
*/
|
|
27
|
-
declare enum ImageFormat {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
export declare enum ImageFormat {
|
|
24
|
+
ORIGINAL = "original",
|
|
25
|
+
JPEG = "jpeg",
|
|
26
|
+
PNG = "png",
|
|
27
|
+
WEBP = "webp"
|
|
32
28
|
}
|
|
33
|
-
|
|
34
29
|
/**
|
|
35
30
|
* File Manager Interface (matches backend IFileManager)
|
|
36
31
|
*/
|
|
37
|
-
interface IFileManager extends IBaseEntity {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
export interface IFileManager extends IBaseEntity {
|
|
33
|
+
name: string;
|
|
34
|
+
contentType: string;
|
|
35
|
+
size: string;
|
|
36
|
+
key: string;
|
|
37
|
+
url: string | null;
|
|
38
|
+
location: FileLocationEnum;
|
|
39
|
+
storageConfigId: string | null;
|
|
40
|
+
providerName?: string;
|
|
41
|
+
isPrivate: boolean;
|
|
42
|
+
companyId?: string;
|
|
43
|
+
folderId?: string | null;
|
|
49
44
|
}
|
|
50
45
|
/**
|
|
51
46
|
* Create File Manager DTO
|
|
52
47
|
*/
|
|
53
|
-
interface ICreateFileManagerDto {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
48
|
+
export interface ICreateFileManagerDto {
|
|
49
|
+
name: string;
|
|
50
|
+
key: string;
|
|
51
|
+
size: string;
|
|
52
|
+
contentType: string;
|
|
53
|
+
isPrivate: boolean;
|
|
54
|
+
folderId?: string;
|
|
55
|
+
storageConfigId?: string;
|
|
56
|
+
location?: FileLocationEnum;
|
|
62
57
|
}
|
|
63
58
|
/**
|
|
64
59
|
* Update File Manager DTO
|
|
65
60
|
*/
|
|
66
|
-
interface IUpdateFileManagerDto {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
61
|
+
export interface IUpdateFileManagerDto {
|
|
62
|
+
id: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
isPrivate?: boolean;
|
|
65
|
+
folderId?: string | null;
|
|
71
66
|
}
|
|
72
67
|
/**
|
|
73
68
|
* Get Files Request DTO (for fetching files with valid URLs)
|
|
74
69
|
*/
|
|
75
|
-
interface IGetFilesRequestDto {
|
|
76
|
-
|
|
70
|
+
export interface IGetFilesRequestDto {
|
|
71
|
+
id: string;
|
|
77
72
|
}
|
|
78
73
|
/**
|
|
79
74
|
* Files Response DTO (file with valid URL)
|
|
80
75
|
*/
|
|
81
|
-
interface IFilesResponseDto {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
76
|
+
export interface IFilesResponseDto {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
contentType: string;
|
|
80
|
+
url: string;
|
|
81
|
+
location?: string;
|
|
82
|
+
storageConfigId?: string;
|
|
83
|
+
providerName?: string;
|
|
89
84
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
companyId?: string | null;
|
|
85
|
+
export interface IFolder extends IBaseEntity {
|
|
86
|
+
name: string;
|
|
87
|
+
slug: string;
|
|
88
|
+
companyId?: string | null;
|
|
95
89
|
}
|
|
96
|
-
interface ICreateFolderDto {
|
|
97
|
-
|
|
90
|
+
export interface ICreateFolderDto {
|
|
91
|
+
name: string;
|
|
98
92
|
}
|
|
99
|
-
interface IUpdateFolderDto extends Partial<ICreateFolderDto> {
|
|
100
|
-
|
|
93
|
+
export interface IUpdateFolderDto extends Partial<ICreateFolderDto> {
|
|
94
|
+
id: string;
|
|
101
95
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
companyId?: string | null;
|
|
96
|
+
export interface IStorageConfig extends IBaseEntity {
|
|
97
|
+
name: string;
|
|
98
|
+
storage: FileLocationEnum;
|
|
99
|
+
config: Record<string, unknown>;
|
|
100
|
+
isActive: boolean;
|
|
101
|
+
isDefault: boolean;
|
|
102
|
+
companyId?: string | null;
|
|
110
103
|
}
|
|
111
|
-
interface ICreateStorageConfigDto {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
104
|
+
export interface ICreateStorageConfigDto {
|
|
105
|
+
name: string;
|
|
106
|
+
storage: FileLocationEnum;
|
|
107
|
+
config: Record<string, unknown>;
|
|
108
|
+
isActive?: boolean;
|
|
109
|
+
isDefault?: boolean;
|
|
117
110
|
}
|
|
118
|
-
interface IUpdateStorageConfigDto extends Partial<ICreateStorageConfigDto> {
|
|
119
|
-
|
|
111
|
+
export interface IUpdateStorageConfigDto extends Partial<ICreateStorageConfigDto> {
|
|
112
|
+
id: string;
|
|
120
113
|
}
|
|
121
|
-
interface IAwsS3Config {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
114
|
+
export interface IAwsS3Config {
|
|
115
|
+
region: string;
|
|
116
|
+
bucket: string;
|
|
117
|
+
accessKeyId: string;
|
|
118
|
+
secretAccessKey: string;
|
|
119
|
+
endpoint?: string;
|
|
127
120
|
}
|
|
128
|
-
interface IAzureBlobConfig {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
121
|
+
export interface IAzureBlobConfig {
|
|
122
|
+
accountName: string;
|
|
123
|
+
accountKey: string;
|
|
124
|
+
containerName: string;
|
|
132
125
|
}
|
|
133
|
-
interface ISftpConfig {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
126
|
+
export interface ISftpConfig {
|
|
127
|
+
host: string;
|
|
128
|
+
port: number;
|
|
129
|
+
username: string;
|
|
130
|
+
password?: string;
|
|
131
|
+
privateKey?: string;
|
|
132
|
+
basePath: string;
|
|
140
133
|
}
|
|
141
|
-
interface ILocalStorageConfig {
|
|
142
|
-
|
|
134
|
+
export interface ILocalStorageConfig {
|
|
135
|
+
basePath: string;
|
|
143
136
|
}
|
|
144
|
-
|
|
145
137
|
/**
|
|
146
138
|
* Upload Options DTO (matches backend UploadOptionsDto)
|
|
147
139
|
*/
|
|
148
|
-
interface IUploadOptionsDto {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
140
|
+
export interface IUploadOptionsDto {
|
|
141
|
+
storageConfigId?: string;
|
|
142
|
+
folderPath?: string;
|
|
143
|
+
maxWidth?: number;
|
|
144
|
+
maxHeight?: number;
|
|
145
|
+
quality?: number;
|
|
146
|
+
format?: ImageFormat;
|
|
147
|
+
compress?: boolean;
|
|
156
148
|
}
|
|
157
149
|
/**
|
|
158
150
|
* Uploaded File Info (response from upload)
|
|
159
151
|
*/
|
|
160
|
-
interface IUploadedFileInfo {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
152
|
+
export interface IUploadedFileInfo {
|
|
153
|
+
name: string;
|
|
154
|
+
key: string;
|
|
155
|
+
size: number;
|
|
156
|
+
contentType: string;
|
|
157
|
+
location?: string;
|
|
158
|
+
storageConfigId?: string;
|
|
167
159
|
}
|
|
168
|
-
|
|
169
160
|
/**
|
|
170
161
|
* Provider label translation keys
|
|
171
162
|
*/
|
|
172
|
-
declare const PROVIDER_LABEL_KEYS: Record<FileLocationEnum, string>;
|
|
163
|
+
export declare const PROVIDER_LABEL_KEYS: Record<FileLocationEnum, string>;
|
|
173
164
|
/**
|
|
174
165
|
* Get provider label translation key
|
|
175
166
|
*/
|
|
176
|
-
declare function getProviderLabelKey(storage: FileLocationEnum | string): string;
|
|
167
|
+
export declare function getProviderLabelKey(storage: FileLocationEnum | string): string;
|
|
177
168
|
/**
|
|
178
169
|
* Get provider icon class
|
|
179
170
|
*/
|
|
180
|
-
declare function getProviderIcon(storage: FileLocationEnum | string): string;
|
|
171
|
+
export declare function getProviderIcon(storage: FileLocationEnum | string): string;
|
|
181
172
|
/**
|
|
182
173
|
* Get provider severity for f-tag
|
|
183
174
|
*/
|
|
184
|
-
declare function getProviderSeverity(storage: FileLocationEnum | string): 'success' | 'info' | 'warn' | 'danger' | 'secondary' | 'contrast';
|
|
175
|
+
export declare function getProviderSeverity(storage: FileLocationEnum | string): 'success' | 'info' | 'warn' | 'danger' | 'secondary' | 'contrast';
|
|
185
176
|
/**
|
|
186
177
|
* Get file icon based on content type
|
|
187
178
|
*/
|
|
188
|
-
declare function getFileIcon(contentType: string): string;
|
|
179
|
+
export declare function getFileIcon(contentType: string): string;
|
|
189
180
|
/** File size unit keys for translation */
|
|
190
|
-
declare const FILE_SIZE_UNIT_KEYS: readonly ["storage.size.bytes", "shared.size.kb", "shared.size.mb", "storage.size.gb"];
|
|
181
|
+
export declare const FILE_SIZE_UNIT_KEYS: readonly ["storage.size.bytes", "shared.size.kb", "shared.size.mb", "storage.size.gb"];
|
|
191
182
|
/**
|
|
192
183
|
* Format file size from bytes to human readable format
|
|
193
184
|
* Returns an object with value and unitKey for translation
|
|
194
185
|
*/
|
|
195
|
-
declare function formatFileSizeWithKey(bytes: number): {
|
|
196
|
-
|
|
197
|
-
|
|
186
|
+
export declare function formatFileSizeWithKey(bytes: number): {
|
|
187
|
+
value: string;
|
|
188
|
+
unitKey: string;
|
|
198
189
|
};
|
|
199
190
|
/**
|
|
200
191
|
* Format file size from bytes to human readable string
|
|
201
192
|
* @deprecated Use formatFileSizeWithKey for localization support
|
|
202
193
|
*/
|
|
203
|
-
declare function formatFileSize(bytes: number): string;
|
|
194
|
+
export declare function formatFileSize(bytes: number): string;
|
|
204
195
|
/**
|
|
205
196
|
* Storage provider options for dropdown selects
|
|
206
197
|
* Labels are translation keys - components should translate them
|
|
207
198
|
*/
|
|
208
|
-
declare const STORAGE_PROVIDER_OPTIONS: readonly [{
|
|
209
|
-
|
|
210
|
-
|
|
199
|
+
export declare const STORAGE_PROVIDER_OPTIONS: readonly [{
|
|
200
|
+
readonly labelKey: "storage.aws.title";
|
|
201
|
+
readonly value: FileLocationEnum.AWS;
|
|
211
202
|
}, {
|
|
212
|
-
|
|
213
|
-
|
|
203
|
+
readonly labelKey: "storage.azure.title";
|
|
204
|
+
readonly value: FileLocationEnum.AZURE;
|
|
214
205
|
}, {
|
|
215
|
-
|
|
216
|
-
|
|
206
|
+
readonly labelKey: "storage.sftp.title";
|
|
207
|
+
readonly value: FileLocationEnum.SFTP;
|
|
217
208
|
}, {
|
|
218
|
-
|
|
219
|
-
|
|
209
|
+
readonly labelKey: "storage.local.title";
|
|
210
|
+
readonly value: FileLocationEnum.LOCAL;
|
|
220
211
|
}];
|
|
221
|
-
type StorageProviderOption = (typeof STORAGE_PROVIDER_OPTIONS)[number];
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseStoragePage, never, never, {}, {}, never, never, true, never>;
|
|
212
|
+
export type StorageProviderOption = (typeof STORAGE_PROVIDER_OPTIONS)[number];
|
|
213
|
+
export declare abstract class BaseStoragePage {
|
|
214
|
+
protected readonly router: Router;
|
|
215
|
+
protected readonly messageService: MessageService;
|
|
216
|
+
protected readonly appConfig: import("@flusys/ng-core").IAppConfig;
|
|
217
|
+
protected readonly companyContext: import("@flusys/ng-layout").ILayoutAuthState;
|
|
218
|
+
protected readonly translateAdapter: TranslateService;
|
|
219
|
+
readonly isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
220
|
+
readonly showCompanyInfo: import("@angular/core").Signal<boolean>;
|
|
221
|
+
readonly currentCompanyName: import("@angular/core").Signal<string>;
|
|
222
|
+
protected showSuccess(detail: string, summaryKey?: string): void;
|
|
223
|
+
protected showError(detail: string, summaryKey?: string): void;
|
|
224
|
+
protected navigateTo(path: string[]): void;
|
|
225
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseStoragePage, never>;
|
|
226
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseStoragePage, never, never, {}, {}, never, never, true, never>;
|
|
237
227
|
}
|
|
238
|
-
declare abstract class BaseStorageListPage<T> {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
228
|
+
export declare abstract class BaseStorageListPage<T> {
|
|
229
|
+
protected readonly router: Router;
|
|
230
|
+
protected readonly messageService: MessageService;
|
|
231
|
+
protected readonly appConfig: import("@flusys/ng-core").IAppConfig;
|
|
232
|
+
protected readonly confirmationService: ConfirmationService;
|
|
233
|
+
protected readonly destroyRef: DestroyRef;
|
|
234
|
+
protected readonly translateAdapter: TranslateService;
|
|
235
|
+
protected readonly companyContext: import("@flusys/ng-layout").ILayoutAuthState;
|
|
236
|
+
readonly items: import("@angular/core").WritableSignal<T[]>;
|
|
237
|
+
readonly isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
238
|
+
readonly total: import("@angular/core").WritableSignal<number>;
|
|
239
|
+
readonly pageSize: import("@angular/core").WritableSignal<number>;
|
|
240
|
+
readonly first: import("@angular/core").WritableSignal<number>;
|
|
241
|
+
readonly currentPage: import("@angular/core").Signal<number>;
|
|
242
|
+
readonly showCompanyInfo: import("@angular/core").Signal<boolean>;
|
|
243
|
+
readonly totalRecords: import("@angular/core").WritableSignal<number>;
|
|
244
|
+
readonly currentCompanyName: import("@angular/core").Signal<string>;
|
|
245
|
+
abstract loadData(): Promise<void>;
|
|
246
|
+
abstract getResourceRoute(): string;
|
|
247
|
+
getDeleteConfirmMessage(item: T): string;
|
|
248
|
+
onCreate(): void;
|
|
249
|
+
onEdit(id: string): void;
|
|
250
|
+
onPageChange(event: {
|
|
251
|
+
first?: number | null;
|
|
252
|
+
rows?: number | null;
|
|
253
|
+
}): void;
|
|
254
|
+
protected getPaginationParams(): {
|
|
255
|
+
currentPage: number;
|
|
256
|
+
pageSize: number;
|
|
257
|
+
};
|
|
258
|
+
protected showSuccess(detail: string, summary?: string): void;
|
|
259
|
+
protected showError(detail: string, summary?: string): void;
|
|
260
|
+
protected showInfo(detail: string, summary?: string): void;
|
|
261
|
+
protected showWarn(detail: string, summary?: string): void;
|
|
262
|
+
onDelete(item: T, idGetter: (item: T) => string, deleteApiCall: (id: string) => Observable<unknown> | Promise<unknown>, options?: {
|
|
263
|
+
header?: string;
|
|
264
|
+
}): void;
|
|
265
|
+
onDeleteAsync(item: T, idGetter: (item: T) => string, deleteApiCall: (id: string) => Promise<unknown>, options?: {
|
|
266
|
+
header?: string;
|
|
267
|
+
}): Promise<void>;
|
|
268
|
+
protected navigateTo(path: string[]): void;
|
|
269
|
+
protected t(key: string, variables?: Record<string, string | number>): string;
|
|
270
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseStorageListPage<any>, never>;
|
|
271
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseStorageListPage<any>, never, never, {}, {}, never, never, true, never>;
|
|
282
272
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FileProviderAdapter>;
|
|
273
|
+
export declare class FileProviderAdapter implements IFileProvider {
|
|
274
|
+
private readonly fileManagerApi;
|
|
275
|
+
private readonly uploadService;
|
|
276
|
+
private readonly folderApi;
|
|
277
|
+
private readonly storageConfigApi;
|
|
278
|
+
loadFiles(filter: IFileSelectFilter): Observable<IListResponse<IFileBasicInfo>>;
|
|
279
|
+
uploadFile(file: File, options?: IFileUploadOptions): Observable<ISingleResponse<IUploadedFile>>;
|
|
280
|
+
uploadMultipleFiles(files: File[], options?: IFileUploadOptions): Observable<ISingleResponse<IUploadedFile[]>>;
|
|
281
|
+
getFileUrls(fileIds: string[]): Observable<ISingleResponse<IFileBasicInfo[]>>;
|
|
282
|
+
loadFolders(filter: ISelectFilter): Observable<IListResponse<IFolderBasicInfo>>;
|
|
283
|
+
loadStorageConfigs(filter: ISelectFilter): Observable<IListResponse<IStorageConfigBasicInfo>>;
|
|
284
|
+
private buildFileFilter;
|
|
285
|
+
private mapToFileBasicInfo;
|
|
286
|
+
private mapToUploadedFile;
|
|
287
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileProviderAdapter, never>;
|
|
288
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
300
289
|
}
|
|
301
|
-
|
|
302
290
|
/**
|
|
303
291
|
* Provide Storage Providers
|
|
304
292
|
*
|
|
@@ -315,17 +303,15 @@ declare class FileProviderAdapter implements IFileProvider {
|
|
|
315
303
|
*
|
|
316
304
|
* @returns Array of providers for storage functionality
|
|
317
305
|
*/
|
|
318
|
-
declare function provideStorageProviders(): Provider[];
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FileManagerApiService>;
|
|
306
|
+
export declare function provideStorageProviders(): Provider[];
|
|
307
|
+
export declare class FileManagerApiService extends ApiResourceService<IUpdateFileManagerDto, IFileManager> {
|
|
308
|
+
constructor();
|
|
309
|
+
getFiles(fileIds: string[]): Observable<ISingleResponse<IFilesResponseDto[]>>;
|
|
310
|
+
createFile(dto: ICreateFileManagerDto): Observable<ISingleResponse<IFileManager>>;
|
|
311
|
+
createFiles(dtos: ICreateFileManagerDto[]): Observable<IBulkResponse<IFileManager>>;
|
|
312
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileManagerApiService, never>;
|
|
313
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
327
314
|
}
|
|
328
|
-
|
|
329
315
|
/**
|
|
330
316
|
* Folder API Service
|
|
331
317
|
* Handles folder CRUD operations
|
|
@@ -333,12 +319,11 @@ declare class FileManagerApiService extends ApiResourceService<IUpdateFileManage
|
|
|
333
319
|
*
|
|
334
320
|
* Note: Company feature enabled - all queries automatically scoped to user's company
|
|
335
321
|
*/
|
|
336
|
-
declare class FolderApiService extends ApiResourceService<ICreateFolderDto | IUpdateFolderDto, IFolder> {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
322
|
+
export declare class FolderApiService extends ApiResourceService<ICreateFolderDto | IUpdateFolderDto, IFolder> {
|
|
323
|
+
constructor();
|
|
324
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FolderApiService, never>;
|
|
325
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
340
326
|
}
|
|
341
|
-
|
|
342
327
|
/**
|
|
343
328
|
* Storage Config API Service
|
|
344
329
|
* Handles storage configuration CRUD operations
|
|
@@ -346,73 +331,50 @@ declare class FolderApiService extends ApiResourceService<ICreateFolderDto | IUp
|
|
|
346
331
|
*
|
|
347
332
|
* Note: Company feature enabled - all queries automatically scoped to user's company
|
|
348
333
|
*/
|
|
349
|
-
declare class StorageConfigApiService extends ApiResourceService<ICreateStorageConfigDto | IUpdateStorageConfigDto, IStorageConfig> {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
334
|
+
export declare class StorageConfigApiService extends ApiResourceService<ICreateStorageConfigDto | IUpdateStorageConfigDto, IStorageConfig> {
|
|
335
|
+
constructor();
|
|
336
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StorageConfigApiService, never>;
|
|
337
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
353
338
|
}
|
|
354
|
-
|
|
355
339
|
/**
|
|
356
340
|
* Upload Service - File upload/delete operations
|
|
357
341
|
* Endpoint: POST /storage/upload/*
|
|
358
342
|
*/
|
|
359
|
-
declare class UploadService extends BaseApiService {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
343
|
+
export declare class UploadService extends BaseApiService {
|
|
344
|
+
private readonly fileManagerApi;
|
|
345
|
+
constructor();
|
|
346
|
+
/** Get default storage config ID from app config */
|
|
347
|
+
getDefaultConfigId(): string | undefined;
|
|
348
|
+
/** Upload single file - POST /storage/upload/single-file */
|
|
349
|
+
uploadSingleFile(file: File, options?: IUploadOptionsDto): Observable<ISingleResponse<IUploadedFileInfo>>;
|
|
350
|
+
/** Upload multiple files (max 50) - POST /storage/upload/multiple-file */
|
|
351
|
+
uploadMultipleFiles(files: File[], options?: IUploadOptionsDto): Observable<ISingleResponse<IUploadedFileInfo[]>>;
|
|
352
|
+
/** Delete single file - POST /storage/upload/delete-single-file */
|
|
353
|
+
deleteSingleFile(key: string, storageConfigId?: string): Observable<ISingleResponse<void>>;
|
|
354
|
+
/** Delete multiple files - POST /storage/upload/delete-multiple-file */
|
|
355
|
+
deleteMultipleFiles(keys: string[], storageConfigId?: string): Observable<ISingleResponse<void>>;
|
|
356
|
+
/** Get file download URL - GET /storage/upload/file/:filePath */
|
|
357
|
+
getFileUrl(key: string): string;
|
|
358
|
+
/** Upload file and register in file manager - returns file manager ID (UUID) */
|
|
359
|
+
uploadAndRegister(file: File, options?: IUploadOptionsDto & {
|
|
360
|
+
isPrivate?: boolean;
|
|
361
|
+
folderId?: string;
|
|
362
|
+
}): Observable<ISingleResponse<IFileManager>>;
|
|
363
|
+
/** Upload multiple files and register in file manager - batch upload (2 API calls total) */
|
|
364
|
+
uploadAndRegisterMultiple(files: File[], options?: IUploadOptionsDto & {
|
|
365
|
+
isPrivate?: boolean;
|
|
366
|
+
folderId?: string;
|
|
367
|
+
}): Observable<ISingleResponse<IFileManager[]>>;
|
|
368
|
+
private resolveConfigId;
|
|
369
|
+
private toCreateFileDto;
|
|
370
|
+
private buildUploadUrl;
|
|
371
|
+
private buildQueryParams;
|
|
372
|
+
private buildDeleteBody;
|
|
373
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UploadService, never>;
|
|
374
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
391
375
|
}
|
|
392
|
-
|
|
393
376
|
/**
|
|
394
377
|
* Storage Module Routes
|
|
395
378
|
* All routes protected by permission guards
|
|
396
379
|
*/
|
|
397
|
-
declare const STORAGE_ROUTES: Routes;
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* Storage Container Component
|
|
401
|
-
*
|
|
402
|
-
* Main container for Storage module with tab navigation
|
|
403
|
-
* Routes: Files | Folders | Configurations
|
|
404
|
-
* Tabs are filtered based on user permissions
|
|
405
|
-
*/
|
|
406
|
-
declare class StorageContainerComponent {
|
|
407
|
-
private readonly permissionValidator;
|
|
408
|
-
private readonly translateService;
|
|
409
|
-
/** All available tabs with required permissions */
|
|
410
|
-
private readonly allTabs;
|
|
411
|
-
/** Visible tabs based on user permissions */
|
|
412
|
-
readonly visibleTabs: i0.Signal<RouterTabItem[]>;
|
|
413
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StorageContainerComponent, never>;
|
|
414
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<StorageContainerComponent, "lib-storage-container", never, {}, {}, never, never, true, never>;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
export { BaseStorageListPage, BaseStoragePage, FILE_SIZE_UNIT_KEYS, FileLocationEnum, FileManagerApiService, FileProviderAdapter, FolderApiService, ImageFormat, PROVIDER_LABEL_KEYS, STORAGE_MESSAGES, STORAGE_PROVIDER_OPTIONS, STORAGE_ROUTES, StorageConfigApiService, StorageContainerComponent, UploadService, formatFileSize, formatFileSizeWithKey, getFileIcon, getProviderIcon, getProviderLabelKey, getProviderSeverity, provideStorageProviders };
|
|
418
|
-
export type { IAwsS3Config, IAzureBlobConfig, ICreateFileManagerDto, ICreateFolderDto, ICreateStorageConfigDto, IFileManager, IFilesResponseDto, IFolder, IGetFilesRequestDto, ILocalStorageConfig, ISftpConfig, IStorageConfig, IUpdateFileManagerDto, IUpdateFolderDto, IUpdateStorageConfigDto, IUploadOptionsDto, IUploadedFileInfo, StorageProviderOption };
|
|
380
|
+
export declare const STORAGE_ROUTES: Routes;
|