@flusys/ng-storage 9.1.0 → 9.1.2
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,907 +1,642 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
1
|
+
import { t as FileManagerApiService } from "./flusys-ng-storage-file-manager-api.service-DJ9uP3aN.mjs";
|
|
2
|
+
import { t as FolderApiService } from "./flusys-ng-storage-folder-api.service-D_fFEuO6.mjs";
|
|
3
|
+
import { t as StorageConfigApiService } from "./flusys-ng-storage-storage-config-api.service-Bl4asniq.mjs";
|
|
4
|
+
import { t as UploadService } from "./flusys-ng-storage-upload.service-CIcEL_Kr.mjs";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import { DestroyRef, Directive, Service, computed, inject, signal } from "@angular/core";
|
|
7
|
+
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
8
|
+
import { Router } from "@angular/router";
|
|
9
|
+
import { APP_CONFIG, DEFAULT_APP_NAME } from "@flusys/ng-core";
|
|
10
|
+
import { LAYOUT_AUTH_STATE } from "@flusys/ng-layout";
|
|
11
|
+
import { FILE_PERMISSIONS, FILE_PROVIDER, FOLDER_PERMISSIONS, PermissionValidatorService, SHARED_MESSAGES, STORAGE_CONFIG_PERMISSIONS, TranslateService, permissionGuard, resolveTranslationModule } from "@flusys/ng-shared";
|
|
12
|
+
import { ConfirmationService, MessageService } from "@flusys/ng-ui";
|
|
13
|
+
import { from, map } from "rxjs";
|
|
11
14
|
const STORAGE_MESSAGES = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
'storage.empty.folders': 'No folders found',
|
|
152
|
-
'storage.folder.delete.title': 'Delete Folder',
|
|
153
|
-
// pages/folder/folder-form.component.ts
|
|
154
|
-
'storage.folder.edit.folder': 'Edit Folder',
|
|
155
|
-
'storage.folder.new.folder': 'New Folder',
|
|
156
|
-
'storage.folder.name.required': 'Folder Name *',
|
|
157
|
-
'storage.folder.name.placeholder': 'Enter folder name',
|
|
158
|
-
'storage.validation.folder.name.required': 'Folder name is required',
|
|
159
|
-
// utils/base-storage-page.ts
|
|
160
|
-
'storage.delete.this.item': 'this item',
|
|
161
|
-
// utils/storage-utils.ts
|
|
162
|
-
'storage.size.bytes': 'Bytes',
|
|
163
|
-
'storage.size.gb': 'GB',
|
|
15
|
+
"file.create.success": "File created successfully",
|
|
16
|
+
"file.create.many.success": "{{count}} files created successfully",
|
|
17
|
+
"file.get.success": "File retrieved successfully",
|
|
18
|
+
"file.get.by.ids.success": "Files retrieved successfully by Ids",
|
|
19
|
+
"file.get.by.filter.success": "Files retrieved successfully by filter",
|
|
20
|
+
"file.get.all.success": "Files retrieved successfully",
|
|
21
|
+
"file.update.success": "File updated successfully",
|
|
22
|
+
"file.update.many.success": "{{count}} files updated successfully",
|
|
23
|
+
"file.delete.success": "File deleted successfully",
|
|
24
|
+
"file.restore.success": "File restored successfully",
|
|
25
|
+
"file.not.found": "File not found",
|
|
26
|
+
"folder.create.success": "Folder created successfully",
|
|
27
|
+
"folder.create.many.success": "{{count}} folders created successfully",
|
|
28
|
+
"folder.get.success": "Folder retrieved successfully",
|
|
29
|
+
"folder.get.by.ids.success": "Folders retrieved successfully by Ids",
|
|
30
|
+
"folder.get.by.filter.success": "Folders retrieved successfully by filter",
|
|
31
|
+
"folder.get.all.success": "Folders retrieved successfully",
|
|
32
|
+
"folder.update.success": "Folder updated successfully",
|
|
33
|
+
"folder.update.many.success": "{{count}} folders updated successfully",
|
|
34
|
+
"folder.delete.success": "Folder deleted successfully",
|
|
35
|
+
"folder.restore.success": "Folder restored successfully",
|
|
36
|
+
"folder.not.found": "Folder not found",
|
|
37
|
+
"storage.config.create.success": "Storage configuration created successfully",
|
|
38
|
+
"storage.config.create.many.success": "{{count}} storage configurations created successfully",
|
|
39
|
+
"storage.config.get.success": "Storage configuration retrieved successfully",
|
|
40
|
+
"storage.config.get.by.ids.success": "Storage configurations retrieved successfully by Ids",
|
|
41
|
+
"storage.config.get.by.filter.success": "Storage configurations retrieved successfully by filter",
|
|
42
|
+
"storage.config.get.all.success": "Storage configurations retrieved successfully",
|
|
43
|
+
"storage.config.update.success": "Storage configuration updated successfully",
|
|
44
|
+
"storage.config.update.many.success": "{{count}} storage configurations updated successfully",
|
|
45
|
+
"storage.config.delete.success": "Storage configuration deleted successfully",
|
|
46
|
+
"storage.config.restore.success": "Storage configuration restored successfully",
|
|
47
|
+
"upload.success": "File uploaded successfully",
|
|
48
|
+
"upload.many.success": "Files uploaded successfully",
|
|
49
|
+
"upload.file.too.large": "File size ({{fileSize}}MB) exceeds maximum {{maxSize}}MB",
|
|
50
|
+
"upload.invalid.type": "File type \"{{mimeType}}\" not allowed. Allowed: {{allowedTypes}}",
|
|
51
|
+
"upload.no.files.provided": "No files provided",
|
|
52
|
+
"upload.no.file.path": "File path is required",
|
|
53
|
+
"upload.invalid.file.path": "Invalid file path",
|
|
54
|
+
"upload.config.not.found": "Upload configuration not found",
|
|
55
|
+
"storage.title": "Storage",
|
|
56
|
+
"storage.subtitle": "Manage files, folders, and storage configurations",
|
|
57
|
+
"storage.file.title": "Files",
|
|
58
|
+
"storage.folder.title": "Folder Setup",
|
|
59
|
+
"storage.config.title": "Storage Configurations",
|
|
60
|
+
"storage.button.new.configuration": "New Configuration",
|
|
61
|
+
"storage.table.provider": "Provider",
|
|
62
|
+
"storage.table.created": "Created",
|
|
63
|
+
"storage.empty.configs.in.company": "No storage configurations found in current company",
|
|
64
|
+
"storage.empty.configs": "No storage configurations found",
|
|
65
|
+
"storage.config.load.failed": "Failed to load storage configurations",
|
|
66
|
+
"storage.config.delete.title": "Delete Configuration",
|
|
67
|
+
"storage.config.default.delete.forbidden": "Cannot delete the default configuration. Set another as default first.",
|
|
68
|
+
"storage.config.edit.config": "Edit Storage Configuration",
|
|
69
|
+
"storage.config.new.config": "New Configuration",
|
|
70
|
+
"storage.config.config.name.required": "Configuration Name *",
|
|
71
|
+
"storage.config.config.name.placeholder": "e.g., Production AWS S3",
|
|
72
|
+
"storage.config.provider.required": "Storage Provider *",
|
|
73
|
+
"storage.set.as.default": "Set as Default",
|
|
74
|
+
"storage.aws.title": "AWS S3 Configuration",
|
|
75
|
+
"storage.config.region.required": "AWS Region *",
|
|
76
|
+
"storage.aws.region.placeholder": "us-east-1",
|
|
77
|
+
"storage.config.bucket.required": "Bucket Name *",
|
|
78
|
+
"storage.aws.bucket.placeholder": "my-bucket",
|
|
79
|
+
"storage.config.access.key.required": "Access Key ID *",
|
|
80
|
+
"storage.config.secret.key.required": "Secret Access Key *",
|
|
81
|
+
"storage.config.endpoint.optional": "Custom Endpoint (Optional)",
|
|
82
|
+
"storage.config.endpoint.placeholder": "https://s3.custom-endpoint.com",
|
|
83
|
+
"storage.azure.title": "Azure Blob Configuration",
|
|
84
|
+
"storage.azure.account.name.required": "Account Name *",
|
|
85
|
+
"storage.azure.container.name.required": "Container Name *",
|
|
86
|
+
"storage.azure.account.key.required": "Account Key *",
|
|
87
|
+
"storage.sftp.title": "SFTP Configuration",
|
|
88
|
+
"storage.sftp.host.required": "Host *",
|
|
89
|
+
"storage.sftp.host.placeholder": "sftp.example.com",
|
|
90
|
+
"storage.sftp.port.required": "Port *",
|
|
91
|
+
"storage.sftp.port.placeholder": "22",
|
|
92
|
+
"storage.sftp.username.required": "Username *",
|
|
93
|
+
"storage.sftp.password.required": "Password *",
|
|
94
|
+
"storage.sftp.base.path.required": "Base Path *",
|
|
95
|
+
"storage.sftp.base.path.placeholder": "/uploads",
|
|
96
|
+
"storage.local.title": "Local Storage Configuration",
|
|
97
|
+
"storage.local.base.path.required": "Base Path *",
|
|
98
|
+
"storage.local.base.path.placeholder": "/var/www/uploads",
|
|
99
|
+
"storage.config.endpoint": "Endpoint URL",
|
|
100
|
+
"storage.validation.config.name.required": "Configuration name is required",
|
|
101
|
+
"storage.file.manager.title": "File Manager",
|
|
102
|
+
"storage.button.upload.file": "Upload File",
|
|
103
|
+
"storage.table.size": "Size",
|
|
104
|
+
"storage.table.location": "Location",
|
|
105
|
+
"storage.table.config": "Config",
|
|
106
|
+
"storage.table.private": "Private",
|
|
107
|
+
"storage.private": "Private",
|
|
108
|
+
"storage.public": "Public",
|
|
109
|
+
"storage.tooltip.trash": "Trash",
|
|
110
|
+
"storage.empty.files.in.company": "No files found in current company",
|
|
111
|
+
"storage.empty.files": "No files found",
|
|
112
|
+
"storage.file.url.not.available": "File URL is not available",
|
|
113
|
+
"storage.delete.move.to.trash.confirm": "Move \"{{name}}\" to trash? You can recover it later.",
|
|
114
|
+
"storage.delete.move.to.trash": "Move to Trash",
|
|
115
|
+
"storage.delete.permanent.delete.confirm": "Permanently delete \"{{name}}\"? This action CANNOT be undone and will delete the file from storage.",
|
|
116
|
+
"storage.delete.permanent.delete": "Permanent Delete",
|
|
117
|
+
"storage.delete.permanent.delete.button": "Delete Permanently",
|
|
118
|
+
"storage.file.manager.edit.file": "Edit File",
|
|
119
|
+
"storage.file.manager.upload.file": "Upload File",
|
|
120
|
+
"storage.config.select.config": "Select storage configuration...",
|
|
121
|
+
"storage.config.no.configs": "No storage configurations found. Please create one first.",
|
|
122
|
+
"storage.folder.optional": "Folder (Optional)",
|
|
123
|
+
"storage.folder.no.folder": "No folder (root level)",
|
|
124
|
+
"storage.folder.no.folders.available": "No folders available. File will be uploaded to root level.",
|
|
125
|
+
"storage.folder.no.folders.edit": "No folders available.",
|
|
126
|
+
"storage.file.select.required": "Select File *",
|
|
127
|
+
"storage.button.choose.file": "Choose File",
|
|
128
|
+
"storage.upload.drag.drop": "Drag and drop file here or click to browse",
|
|
129
|
+
"storage.upload.max.size": "Maximum file size: {{size}}",
|
|
130
|
+
"storage.upload.please.select": "Please select a file to upload",
|
|
131
|
+
"storage.file.name.required": "File Name *",
|
|
132
|
+
"storage.file.placeholder.edit": "Enter file name",
|
|
133
|
+
"storage.file.placeholder": "Will be auto-filled from selected file",
|
|
134
|
+
"storage.file.private": "Private File",
|
|
135
|
+
"storage.file.private.hint": "Only users with permission can access",
|
|
136
|
+
"storage.file.public.hint": "File is publicly accessible",
|
|
137
|
+
"storage.validation.file.name.required": "File name is required",
|
|
138
|
+
"storage.error.no.file": "Please select a file",
|
|
139
|
+
"storage.error.no.config": "Please select a storage configuration",
|
|
140
|
+
"storage.upload.failed": "Failed to upload file",
|
|
141
|
+
"storage.button.new.folder": "New Folder",
|
|
142
|
+
"storage.table.slug": "Slug",
|
|
143
|
+
"storage.empty.folders.in.company": "No folders found in current company",
|
|
144
|
+
"storage.empty.folders": "No folders found",
|
|
145
|
+
"storage.folder.delete.title": "Delete Folder",
|
|
146
|
+
"storage.folder.edit.folder": "Edit Folder",
|
|
147
|
+
"storage.folder.new.folder": "New Folder",
|
|
148
|
+
"storage.folder.name.required": "Folder Name *",
|
|
149
|
+
"storage.folder.name.placeholder": "Enter folder name",
|
|
150
|
+
"storage.validation.folder.name.required": "Folder name is required",
|
|
151
|
+
"storage.delete.this.item": "this item",
|
|
152
|
+
"storage.size.bytes": "Bytes",
|
|
153
|
+
"storage.size.gb": "GB"
|
|
164
154
|
};
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* File Location Enum
|
|
168
|
-
* Storage provider types (matches backend FileLocationEnum)
|
|
169
|
-
*/
|
|
170
155
|
var FileLocationEnum;
|
|
171
|
-
(function
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
156
|
+
(function(FileLocationEnum) {
|
|
157
|
+
FileLocationEnum["LOCAL"] = "local";
|
|
158
|
+
FileLocationEnum["AWS"] = "aws";
|
|
159
|
+
FileLocationEnum["AZURE"] = "azure";
|
|
160
|
+
FileLocationEnum["SFTP"] = "sftp";
|
|
176
161
|
})(FileLocationEnum || (FileLocationEnum = {}));
|
|
177
|
-
/**
|
|
178
|
-
* Image Format Enum
|
|
179
|
-
* Supported image output formats for compression
|
|
180
|
-
*/
|
|
181
162
|
var ImageFormat;
|
|
182
|
-
(function
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
163
|
+
(function(ImageFormat) {
|
|
164
|
+
ImageFormat["ORIGINAL"] = "original";
|
|
165
|
+
ImageFormat["JPEG"] = "jpeg";
|
|
166
|
+
ImageFormat["PNG"] = "png";
|
|
167
|
+
ImageFormat["WEBP"] = "webp";
|
|
187
168
|
})(ImageFormat || (ImageFormat = {}));
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Provider label translation keys
|
|
191
|
-
*/
|
|
192
169
|
const PROVIDER_LABEL_KEYS = {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
170
|
+
[FileLocationEnum.LOCAL]: "storage.local.title",
|
|
171
|
+
[FileLocationEnum.AWS]: "storage.aws.title",
|
|
172
|
+
[FileLocationEnum.AZURE]: "storage.azure.title",
|
|
173
|
+
[FileLocationEnum.SFTP]: "storage.sftp.title"
|
|
197
174
|
};
|
|
198
|
-
/**
|
|
199
|
-
* Provider configurations for all storage types
|
|
200
|
-
*/
|
|
201
175
|
const PROVIDER_CONFIGS = {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
176
|
+
[FileLocationEnum.LOCAL]: {
|
|
177
|
+
labelKey: "storage.local.title",
|
|
178
|
+
icon: "folder",
|
|
179
|
+
severity: "secondary"
|
|
180
|
+
},
|
|
181
|
+
[FileLocationEnum.AWS]: {
|
|
182
|
+
labelKey: "storage.aws.title",
|
|
183
|
+
icon: "cloud",
|
|
184
|
+
severity: "warn"
|
|
185
|
+
},
|
|
186
|
+
[FileLocationEnum.AZURE]: {
|
|
187
|
+
labelKey: "storage.azure.title",
|
|
188
|
+
icon: "cloud",
|
|
189
|
+
severity: "info"
|
|
190
|
+
},
|
|
191
|
+
[FileLocationEnum.SFTP]: {
|
|
192
|
+
labelKey: "storage.sftp.title",
|
|
193
|
+
icon: "server",
|
|
194
|
+
severity: "contrast"
|
|
195
|
+
}
|
|
222
196
|
};
|
|
223
|
-
/**
|
|
224
|
-
* Get provider label translation key
|
|
225
|
-
*/
|
|
226
197
|
function getProviderLabelKey(storage) {
|
|
227
|
-
|
|
228
|
-
return PROVIDER_CONFIGS[enumValue]?.labelKey ?? storage;
|
|
198
|
+
return PROVIDER_CONFIGS[storage]?.labelKey ?? storage;
|
|
229
199
|
}
|
|
230
|
-
/**
|
|
231
|
-
* Get provider icon class
|
|
232
|
-
*/
|
|
233
200
|
function getProviderIcon(storage) {
|
|
234
|
-
|
|
235
|
-
return PROVIDER_CONFIGS[enumValue]?.icon ?? 'database';
|
|
201
|
+
return PROVIDER_CONFIGS[storage]?.icon ?? "database";
|
|
236
202
|
}
|
|
237
|
-
/**
|
|
238
|
-
* Get provider severity for f-tag
|
|
239
|
-
*/
|
|
240
203
|
function getProviderSeverity(storage) {
|
|
241
|
-
|
|
242
|
-
return PROVIDER_CONFIGS[enumValue]?.severity ?? 'secondary';
|
|
204
|
+
return PROVIDER_CONFIGS[storage]?.severity ?? "secondary";
|
|
243
205
|
}
|
|
244
|
-
/**
|
|
245
|
-
* Get file icon based on content type
|
|
246
|
-
*/
|
|
247
206
|
function getFileIcon(contentType) {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
return 'file-pdf';
|
|
256
|
-
if (contentType.includes('excel') || contentType.includes('spreadsheet'))
|
|
257
|
-
return 'file-excel';
|
|
258
|
-
if (contentType.includes('word') || contentType.includes('document'))
|
|
259
|
-
return 'file-word';
|
|
260
|
-
return 'file';
|
|
207
|
+
if (contentType.startsWith("image/")) return "image";
|
|
208
|
+
if (contentType.startsWith("video/")) return "video";
|
|
209
|
+
if (contentType.startsWith("audio/")) return "volume-up";
|
|
210
|
+
if (contentType.includes("pdf")) return "file-pdf";
|
|
211
|
+
if (contentType.includes("excel") || contentType.includes("spreadsheet")) return "file-excel";
|
|
212
|
+
if (contentType.includes("word") || contentType.includes("document")) return "file-word";
|
|
213
|
+
return "file";
|
|
261
214
|
}
|
|
262
|
-
/** File size unit keys for translation */
|
|
263
215
|
const FILE_SIZE_UNIT_KEYS = [
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
216
|
+
"storage.size.bytes",
|
|
217
|
+
"shared.size.kb",
|
|
218
|
+
"shared.size.mb",
|
|
219
|
+
"storage.size.gb"
|
|
268
220
|
];
|
|
269
|
-
/**
|
|
270
|
-
* Format file size from bytes to human readable format
|
|
271
|
-
* Returns an object with value and unitKey for translation
|
|
272
|
-
*/
|
|
273
221
|
function formatFileSizeWithKey(bytes) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
222
|
+
if (bytes <= 0) return {
|
|
223
|
+
value: "0",
|
|
224
|
+
unitKey: "storage.size.bytes"
|
|
225
|
+
};
|
|
226
|
+
const k = 1024;
|
|
227
|
+
const i = Math.min(Math.floor(Math.log(bytes) / Math.log(k)), FILE_SIZE_UNIT_KEYS.length - 1);
|
|
228
|
+
return {
|
|
229
|
+
value: (Math.round(bytes / Math.pow(k, i) * 100) / 100).toString(),
|
|
230
|
+
unitKey: FILE_SIZE_UNIT_KEYS[i]
|
|
231
|
+
};
|
|
280
232
|
}
|
|
281
|
-
/**
|
|
282
|
-
* Format file size from bytes to human readable string
|
|
283
|
-
* @deprecated Use formatFileSizeWithKey for localization support
|
|
284
|
-
*/
|
|
285
233
|
function formatFileSize(bytes) {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
};
|
|
294
|
-
return `${value} ${unitMap[unitKey]}`;
|
|
234
|
+
const { value, unitKey } = formatFileSizeWithKey(bytes);
|
|
235
|
+
return `${value} ${{
|
|
236
|
+
"storage.size.bytes": "Bytes",
|
|
237
|
+
"shared.size.kb": "KB",
|
|
238
|
+
"shared.size.mb": "MB",
|
|
239
|
+
"storage.size.gb": "GB"
|
|
240
|
+
}[unitKey]}`;
|
|
295
241
|
}
|
|
296
|
-
/**
|
|
297
|
-
* Storage provider options for dropdown selects
|
|
298
|
-
* Labels are translation keys - components should translate them
|
|
299
|
-
*/
|
|
300
242
|
const STORAGE_PROVIDER_OPTIONS = [
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
243
|
+
{
|
|
244
|
+
labelKey: "storage.aws.title",
|
|
245
|
+
value: FileLocationEnum.AWS
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
labelKey: "storage.azure.title",
|
|
249
|
+
value: FileLocationEnum.AZURE
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
labelKey: "storage.sftp.title",
|
|
253
|
+
value: FileLocationEnum.SFTP
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
labelKey: "storage.local.title",
|
|
257
|
+
value: FileLocationEnum.LOCAL
|
|
258
|
+
}
|
|
305
259
|
];
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
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
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
params.append('storageConfigId', configId);
|
|
596
|
-
if (options?.folderPath)
|
|
597
|
-
params.append('folderPath', options.folderPath);
|
|
598
|
-
if (options?.maxWidth)
|
|
599
|
-
params.append('maxWidth', options.maxWidth.toString());
|
|
600
|
-
if (options?.maxHeight)
|
|
601
|
-
params.append('maxHeight', options.maxHeight.toString());
|
|
602
|
-
if (options?.quality)
|
|
603
|
-
params.append('quality', options.quality.toString());
|
|
604
|
-
if (options?.format)
|
|
605
|
-
params.append('format', options.format);
|
|
606
|
-
if (options?.compress !== undefined)
|
|
607
|
-
params.append('compress', options.compress.toString());
|
|
608
|
-
return params.toString();
|
|
609
|
-
}
|
|
610
|
-
buildDeleteBody(data, storageConfigId) {
|
|
611
|
-
const configId = this.resolveConfigId(storageConfigId);
|
|
612
|
-
return { ...data, ...(configId && { storageConfigId: configId }) };
|
|
613
|
-
}
|
|
614
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UploadService, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
615
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: UploadService });
|
|
616
|
-
}
|
|
617
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: UploadService, decorators: [{
|
|
618
|
-
type: Service
|
|
619
|
-
}], ctorParameters: () => [] });
|
|
620
|
-
|
|
621
|
-
class FileProviderAdapter {
|
|
622
|
-
fileManagerApi = inject(FileManagerApiService);
|
|
623
|
-
uploadService = inject(UploadService);
|
|
624
|
-
folderApi = inject(FolderApiService);
|
|
625
|
-
storageConfigApi = inject(StorageConfigApiService);
|
|
626
|
-
loadFiles(filter) {
|
|
627
|
-
const filterObj = this.buildFileFilter(filter);
|
|
628
|
-
return from(this.fileManagerApi
|
|
629
|
-
.getAll({ pagination: { currentPage: filter.page, pageSize: filter.pageSize }, filter: Object.keys(filterObj).length > 0 ? filterObj : undefined }, filter.search || ''))
|
|
630
|
-
.pipe(map((res) => ({ ...res, data: res.data?.map(this.mapToFileBasicInfo) })));
|
|
631
|
-
}
|
|
632
|
-
uploadFile(file, options) {
|
|
633
|
-
return this.uploadService
|
|
634
|
-
.uploadAndRegister(file, options)
|
|
635
|
-
.pipe(map((res) => ({ ...res, data: res.data ? this.mapToUploadedFile(res.data) : undefined })));
|
|
636
|
-
}
|
|
637
|
-
uploadMultipleFiles(files, options) {
|
|
638
|
-
return this.uploadService
|
|
639
|
-
.uploadAndRegisterMultiple(files, options)
|
|
640
|
-
.pipe(map((res) => ({ ...res, data: res.data?.map(this.mapToUploadedFile) })));
|
|
641
|
-
}
|
|
642
|
-
getFileUrls(fileIds) {
|
|
643
|
-
return this.fileManagerApi.getFiles(fileIds).pipe(map((res) => ({
|
|
644
|
-
...res,
|
|
645
|
-
data: res.data?.map((f) => ({ id: f.id, name: f.name, contentType: f.contentType, size: '0', url: f.url })),
|
|
646
|
-
})));
|
|
647
|
-
}
|
|
648
|
-
loadFolders(filter) {
|
|
649
|
-
return from(this.folderApi
|
|
650
|
-
.getAll({ pagination: { currentPage: filter.page, pageSize: filter.pageSize } }, filter.search || ''))
|
|
651
|
-
.pipe(map((res) => ({ ...res, data: res.data?.map((f) => ({ id: f.id, name: f.name, slug: f.slug })) })));
|
|
652
|
-
}
|
|
653
|
-
loadStorageConfigs(filter) {
|
|
654
|
-
return from(this.storageConfigApi
|
|
655
|
-
.getAll({ pagination: { currentPage: filter.page, pageSize: filter.pageSize } }, filter.search || ''))
|
|
656
|
-
.pipe(map((res) => ({ ...res, data: res.data?.map((c) => ({ id: c.id, name: c.name, isDefault: c.isDefault })) })));
|
|
657
|
-
}
|
|
658
|
-
// ─── Private Helpers ────────────────────────────────────────────────────────
|
|
659
|
-
buildFileFilter(filter) {
|
|
660
|
-
const filterObj = {};
|
|
661
|
-
if (filter.folderId)
|
|
662
|
-
filterObj['folderId'] = filter.folderId;
|
|
663
|
-
if (filter.storageConfigId)
|
|
664
|
-
filterObj['storageConfigId'] = filter.storageConfigId;
|
|
665
|
-
if (filter.contentTypes?.length)
|
|
666
|
-
filterObj['contentType'] = filter.contentTypes.join(',');
|
|
667
|
-
return filterObj;
|
|
668
|
-
}
|
|
669
|
-
mapToFileBasicInfo = (f) => ({
|
|
670
|
-
id: f.id,
|
|
671
|
-
name: f.name,
|
|
672
|
-
contentType: f.contentType,
|
|
673
|
-
size: f.size,
|
|
674
|
-
url: f.url,
|
|
675
|
-
});
|
|
676
|
-
mapToUploadedFile = (f) => ({
|
|
677
|
-
id: f.id,
|
|
678
|
-
name: f.name,
|
|
679
|
-
key: f.key,
|
|
680
|
-
size: parseFloat(f.size) * 1024,
|
|
681
|
-
contentType: f.contentType,
|
|
682
|
-
});
|
|
683
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: FileProviderAdapter, deps: [], target: i0.ɵɵFactoryTarget.Service });
|
|
684
|
-
static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.5", ngImport: i0, type: FileProviderAdapter, autoProvided: false });
|
|
685
|
-
}
|
|
686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: FileProviderAdapter, decorators: [{
|
|
687
|
-
type: Service,
|
|
688
|
-
args: [{ autoProvided: false }]
|
|
689
|
-
}] });
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* Provide Storage Providers
|
|
693
|
-
*
|
|
694
|
-
* Registers storage-related provider implementations.
|
|
695
|
-
* Call this in app.config.ts to enable storage features in other packages.
|
|
696
|
-
*
|
|
697
|
-
* @example
|
|
698
|
-
* // In app.config.ts
|
|
699
|
-
* export const appConfig: ApplicationConfig = {
|
|
700
|
-
* providers: [
|
|
701
|
-
* ...provideStorageProviders(),
|
|
702
|
-
* ],
|
|
703
|
-
* };
|
|
704
|
-
*
|
|
705
|
-
* @returns Array of providers for storage functionality
|
|
706
|
-
*/
|
|
260
|
+
var BaseStoragePage = class BaseStoragePage {
|
|
261
|
+
router = inject(Router);
|
|
262
|
+
messageService = inject(MessageService);
|
|
263
|
+
appConfig = inject(APP_CONFIG);
|
|
264
|
+
companyContext = inject(LAYOUT_AUTH_STATE);
|
|
265
|
+
translateAdapter = inject(TranslateService);
|
|
266
|
+
isLoading = signal(false, ...ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []);
|
|
267
|
+
showCompanyInfo = computed(() => this.appConfig.enableCompanyFeature, ...ngDevMode ? [{ debugName: "showCompanyInfo" }] : /* istanbul ignore next */ []);
|
|
268
|
+
currentCompanyName = computed(() => this.companyContext.currentCompanyInfo()?.name ?? DEFAULT_APP_NAME, ...ngDevMode ? [{ debugName: "currentCompanyName" }] : /* istanbul ignore next */ []);
|
|
269
|
+
showSuccess(detail, summaryKey = "shared.success") {
|
|
270
|
+
const summary = this.translateAdapter.translate(summaryKey);
|
|
271
|
+
this.messageService.add({
|
|
272
|
+
severity: "success",
|
|
273
|
+
summary,
|
|
274
|
+
detail
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
showError(detail, summaryKey = "shared.error") {
|
|
278
|
+
const summary = this.translateAdapter.translate(summaryKey);
|
|
279
|
+
this.messageService.add({
|
|
280
|
+
severity: "error",
|
|
281
|
+
summary,
|
|
282
|
+
detail
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
navigateTo(path) {
|
|
286
|
+
this.router.navigate(path);
|
|
287
|
+
}
|
|
288
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
289
|
+
minVersion: "12.0.0",
|
|
290
|
+
version: "22.2.1",
|
|
291
|
+
ngImport: i0,
|
|
292
|
+
type: BaseStoragePage,
|
|
293
|
+
deps: [],
|
|
294
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
295
|
+
});
|
|
296
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
297
|
+
minVersion: "14.0.0",
|
|
298
|
+
version: "22.2.1",
|
|
299
|
+
type: BaseStoragePage,
|
|
300
|
+
isStandalone: true,
|
|
301
|
+
ngImport: i0
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
305
|
+
minVersion: "12.0.0",
|
|
306
|
+
version: "22.2.1",
|
|
307
|
+
ngImport: i0,
|
|
308
|
+
type: BaseStoragePage,
|
|
309
|
+
decorators: [{ type: Directive }]
|
|
310
|
+
});
|
|
311
|
+
var BaseStorageListPage = class BaseStorageListPage {
|
|
312
|
+
router = inject(Router);
|
|
313
|
+
messageService = inject(MessageService);
|
|
314
|
+
appConfig = inject(APP_CONFIG);
|
|
315
|
+
confirmationService = inject(ConfirmationService);
|
|
316
|
+
destroyRef = inject(DestroyRef);
|
|
317
|
+
translateAdapter = inject(TranslateService);
|
|
318
|
+
companyContext = inject(LAYOUT_AUTH_STATE);
|
|
319
|
+
items = signal([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
320
|
+
isLoading = signal(false, ...ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []);
|
|
321
|
+
total = signal(0, ...ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []);
|
|
322
|
+
pageSize = signal(50, ...ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []);
|
|
323
|
+
first = signal(0, ...ngDevMode ? [{ debugName: "first" }] : /* istanbul ignore next */ []);
|
|
324
|
+
currentPage = computed(() => Math.floor(this.first() / this.pageSize()), ...ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []);
|
|
325
|
+
showCompanyInfo = computed(() => this.appConfig.enableCompanyFeature, ...ngDevMode ? [{ debugName: "showCompanyInfo" }] : /* istanbul ignore next */ []);
|
|
326
|
+
totalRecords = this.total;
|
|
327
|
+
currentCompanyName = computed(() => this.companyContext.currentCompanyInfo()?.name ?? DEFAULT_APP_NAME, ...ngDevMode ? [{ debugName: "currentCompanyName" }] : /* istanbul ignore next */ []);
|
|
328
|
+
getDeleteConfirmMessage(item) {
|
|
329
|
+
const name = item.name ?? this.translateAdapter.translate("storage.delete.this.item");
|
|
330
|
+
return this.translateAdapter.translate("shared.confirm.delete.item", { name });
|
|
331
|
+
}
|
|
332
|
+
onCreate() {
|
|
333
|
+
this.router.navigate([this.getResourceRoute(), "new"]);
|
|
334
|
+
}
|
|
335
|
+
onEdit(id) {
|
|
336
|
+
this.router.navigate([this.getResourceRoute(), id]);
|
|
337
|
+
}
|
|
338
|
+
onPageChange(event) {
|
|
339
|
+
this.first.set(event.first ?? 0);
|
|
340
|
+
this.pageSize.set(event.rows ?? 10);
|
|
341
|
+
this.loadData();
|
|
342
|
+
}
|
|
343
|
+
getPaginationParams() {
|
|
344
|
+
return {
|
|
345
|
+
currentPage: this.currentPage(),
|
|
346
|
+
pageSize: this.pageSize()
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
showSuccess(detail, summary) {
|
|
350
|
+
this.messageService.add({
|
|
351
|
+
severity: "success",
|
|
352
|
+
summary: summary ?? this.t("shared.success"),
|
|
353
|
+
detail
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
showError(detail, summary) {
|
|
357
|
+
this.messageService.add({
|
|
358
|
+
severity: "error",
|
|
359
|
+
summary: summary ?? this.t("shared.error"),
|
|
360
|
+
detail
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
showInfo(detail, summary) {
|
|
364
|
+
this.messageService.add({
|
|
365
|
+
severity: "info",
|
|
366
|
+
summary: summary ?? this.t("shared.info"),
|
|
367
|
+
detail
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
showWarn(detail, summary) {
|
|
371
|
+
this.messageService.add({
|
|
372
|
+
severity: "warn",
|
|
373
|
+
summary: summary ?? this.t("shared.warning"),
|
|
374
|
+
detail
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
onDelete(item, idGetter, deleteApiCall, options) {
|
|
378
|
+
this.confirmationService.confirm({
|
|
379
|
+
message: this.getDeleteConfirmMessage(item),
|
|
380
|
+
header: options?.header ?? this.t("shared.confirm.delete.header"),
|
|
381
|
+
icon: "exclamation-triangle",
|
|
382
|
+
acceptButtonStyleClass: "p-button-danger",
|
|
383
|
+
accept: () => {
|
|
384
|
+
from(deleteApiCall(idGetter(item))).pipe(takeUntilDestroyed(this.destroyRef)).subscribe({ next: (res) => {
|
|
385
|
+
const r = res;
|
|
386
|
+
this.showSuccess(r?.messageKey ? this.t(r.messageKey, r.messageVariables) : r?.message ?? "");
|
|
387
|
+
this.loadData();
|
|
388
|
+
} });
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
async onDeleteAsync(item, idGetter, deleteApiCall, options) {
|
|
393
|
+
this.confirmationService.confirm({
|
|
394
|
+
message: this.getDeleteConfirmMessage(item),
|
|
395
|
+
header: options?.header ?? this.t("shared.confirm.delete.header"),
|
|
396
|
+
icon: "exclamation-triangle",
|
|
397
|
+
acceptButtonStyleClass: "p-button-danger",
|
|
398
|
+
accept: async () => {
|
|
399
|
+
const r = await deleteApiCall(idGetter(item));
|
|
400
|
+
this.showSuccess(r?.messageKey ? this.t(r.messageKey, r.messageVariables) : r?.message ?? "");
|
|
401
|
+
await this.loadData();
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
navigateTo(path) {
|
|
406
|
+
this.router.navigate(path);
|
|
407
|
+
}
|
|
408
|
+
t(key, variables) {
|
|
409
|
+
return this.translateAdapter?.translate(key, variables) ?? key;
|
|
410
|
+
}
|
|
411
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
412
|
+
minVersion: "12.0.0",
|
|
413
|
+
version: "22.2.1",
|
|
414
|
+
ngImport: i0,
|
|
415
|
+
type: BaseStorageListPage,
|
|
416
|
+
deps: [],
|
|
417
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
418
|
+
});
|
|
419
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
420
|
+
minVersion: "14.0.0",
|
|
421
|
+
version: "22.2.1",
|
|
422
|
+
type: BaseStorageListPage,
|
|
423
|
+
isStandalone: true,
|
|
424
|
+
ngImport: i0
|
|
425
|
+
});
|
|
426
|
+
};
|
|
427
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
428
|
+
minVersion: "12.0.0",
|
|
429
|
+
version: "22.2.1",
|
|
430
|
+
ngImport: i0,
|
|
431
|
+
type: BaseStorageListPage,
|
|
432
|
+
decorators: [{ type: Directive }]
|
|
433
|
+
});
|
|
434
|
+
var FileProviderAdapter = class FileProviderAdapter {
|
|
435
|
+
fileManagerApi = inject(FileManagerApiService);
|
|
436
|
+
uploadService = inject(UploadService);
|
|
437
|
+
folderApi = inject(FolderApiService);
|
|
438
|
+
storageConfigApi = inject(StorageConfigApiService);
|
|
439
|
+
loadFiles(filter) {
|
|
440
|
+
const filterObj = this.buildFileFilter(filter);
|
|
441
|
+
return from(this.fileManagerApi.getAll({
|
|
442
|
+
pagination: {
|
|
443
|
+
currentPage: filter.page,
|
|
444
|
+
pageSize: filter.pageSize
|
|
445
|
+
},
|
|
446
|
+
filter: Object.keys(filterObj).length > 0 ? filterObj : void 0
|
|
447
|
+
}, filter.search || "")).pipe(map((res) => ({
|
|
448
|
+
...res,
|
|
449
|
+
data: res.data?.map(this.mapToFileBasicInfo)
|
|
450
|
+
})));
|
|
451
|
+
}
|
|
452
|
+
uploadFile(file, options) {
|
|
453
|
+
return this.uploadService.uploadAndRegister(file, options).pipe(map((res) => ({
|
|
454
|
+
...res,
|
|
455
|
+
data: res.data ? this.mapToUploadedFile(res.data) : void 0
|
|
456
|
+
})));
|
|
457
|
+
}
|
|
458
|
+
uploadMultipleFiles(files, options) {
|
|
459
|
+
return this.uploadService.uploadAndRegisterMultiple(files, options).pipe(map((res) => ({
|
|
460
|
+
...res,
|
|
461
|
+
data: res.data?.map(this.mapToUploadedFile)
|
|
462
|
+
})));
|
|
463
|
+
}
|
|
464
|
+
getFileUrls(fileIds) {
|
|
465
|
+
return this.fileManagerApi.getFiles(fileIds).pipe(map((res) => ({
|
|
466
|
+
...res,
|
|
467
|
+
data: res.data?.map((f) => ({
|
|
468
|
+
id: f.id,
|
|
469
|
+
name: f.name,
|
|
470
|
+
contentType: f.contentType,
|
|
471
|
+
size: "0",
|
|
472
|
+
url: f.url
|
|
473
|
+
}))
|
|
474
|
+
})));
|
|
475
|
+
}
|
|
476
|
+
loadFolders(filter) {
|
|
477
|
+
return from(this.folderApi.getAll({ pagination: {
|
|
478
|
+
currentPage: filter.page,
|
|
479
|
+
pageSize: filter.pageSize
|
|
480
|
+
} }, filter.search || "")).pipe(map((res) => ({
|
|
481
|
+
...res,
|
|
482
|
+
data: res.data?.map((f) => ({
|
|
483
|
+
id: f.id,
|
|
484
|
+
name: f.name,
|
|
485
|
+
slug: f.slug
|
|
486
|
+
}))
|
|
487
|
+
})));
|
|
488
|
+
}
|
|
489
|
+
loadStorageConfigs(filter) {
|
|
490
|
+
return from(this.storageConfigApi.getAll({ pagination: {
|
|
491
|
+
currentPage: filter.page,
|
|
492
|
+
pageSize: filter.pageSize
|
|
493
|
+
} }, filter.search || "")).pipe(map((res) => ({
|
|
494
|
+
...res,
|
|
495
|
+
data: res.data?.map((c) => ({
|
|
496
|
+
id: c.id,
|
|
497
|
+
name: c.name,
|
|
498
|
+
isDefault: c.isDefault
|
|
499
|
+
}))
|
|
500
|
+
})));
|
|
501
|
+
}
|
|
502
|
+
buildFileFilter(filter) {
|
|
503
|
+
const filterObj = {};
|
|
504
|
+
if (filter.folderId) filterObj["folderId"] = filter.folderId;
|
|
505
|
+
if (filter.storageConfigId) filterObj["storageConfigId"] = filter.storageConfigId;
|
|
506
|
+
if (filter.contentTypes?.length) filterObj["contentType"] = filter.contentTypes.join(",");
|
|
507
|
+
return filterObj;
|
|
508
|
+
}
|
|
509
|
+
mapToFileBasicInfo = (f) => ({
|
|
510
|
+
id: f.id,
|
|
511
|
+
name: f.name,
|
|
512
|
+
contentType: f.contentType,
|
|
513
|
+
size: f.size,
|
|
514
|
+
url: f.url
|
|
515
|
+
});
|
|
516
|
+
mapToUploadedFile = (f) => ({
|
|
517
|
+
id: f.id,
|
|
518
|
+
name: f.name,
|
|
519
|
+
key: f.key,
|
|
520
|
+
size: parseFloat(f.size) * 1024,
|
|
521
|
+
contentType: f.contentType
|
|
522
|
+
});
|
|
523
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
524
|
+
minVersion: "12.0.0",
|
|
525
|
+
version: "22.2.1",
|
|
526
|
+
ngImport: i0,
|
|
527
|
+
type: FileProviderAdapter,
|
|
528
|
+
deps: [],
|
|
529
|
+
target: i0.ɵɵFactoryTarget.Service
|
|
530
|
+
});
|
|
531
|
+
static ɵprov = i0.ɵɵngDeclareService({
|
|
532
|
+
minVersion: "22.0.0",
|
|
533
|
+
version: "22.2.1",
|
|
534
|
+
ngImport: i0,
|
|
535
|
+
type: FileProviderAdapter,
|
|
536
|
+
autoProvided: false
|
|
537
|
+
});
|
|
538
|
+
};
|
|
539
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
540
|
+
minVersion: "12.0.0",
|
|
541
|
+
version: "22.2.1",
|
|
542
|
+
ngImport: i0,
|
|
543
|
+
type: FileProviderAdapter,
|
|
544
|
+
decorators: [{
|
|
545
|
+
type: Service,
|
|
546
|
+
args: [{ autoProvided: false }]
|
|
547
|
+
}]
|
|
548
|
+
});
|
|
707
549
|
function provideStorageProviders() {
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
},
|
|
713
|
-
];
|
|
550
|
+
return [{
|
|
551
|
+
provide: FILE_PROVIDER,
|
|
552
|
+
useClass: FileProviderAdapter
|
|
553
|
+
}];
|
|
714
554
|
}
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* Resolves which storage tab the current user should land on when navigating
|
|
718
|
-
* to the bare `/storage` route. Mirrors the tab visibility order in
|
|
719
|
-
* StorageContainerComponent.visibleTabs so the redirect never points at a
|
|
720
|
-
* tab the user can't actually see.
|
|
721
|
-
*/
|
|
722
555
|
function resolveStorageDefaultTab() {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
return 'folders';
|
|
729
|
-
}
|
|
730
|
-
if (permissionValidator.hasPermission(STORAGE_CONFIG_PERMISSIONS.READ)) {
|
|
731
|
-
return 'configs';
|
|
732
|
-
}
|
|
733
|
-
return 'files';
|
|
556
|
+
const permissionValidator = inject(PermissionValidatorService);
|
|
557
|
+
if (permissionValidator.hasPermission(FILE_PERMISSIONS.READ)) return "files";
|
|
558
|
+
if (permissionValidator.hasPermission(FOLDER_PERMISSIONS.READ)) return "folders";
|
|
559
|
+
if (permissionValidator.hasPermission(STORAGE_CONFIG_PERMISSIONS.READ)) return "configs";
|
|
560
|
+
return "files";
|
|
734
561
|
}
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
];
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* Storage Container Component
|
|
816
|
-
*
|
|
817
|
-
* Main container for Storage module with tab navigation
|
|
818
|
-
* Routes: Files | Folders | Configurations
|
|
819
|
-
* Tabs are filtered based on user permissions
|
|
820
|
-
*/
|
|
821
|
-
class StorageContainerComponent {
|
|
822
|
-
permissionValidator = inject(PermissionValidatorService);
|
|
823
|
-
translateService = inject(TranslateService);
|
|
824
|
-
/** All available tabs with required permissions */
|
|
825
|
-
allTabs = [
|
|
826
|
-
{
|
|
827
|
-
id: 'files',
|
|
828
|
-
labelKey: 'storage.file.title',
|
|
829
|
-
icon: 'file',
|
|
830
|
-
route: 'files',
|
|
831
|
-
permission: FILE_PERMISSIONS.READ,
|
|
832
|
-
},
|
|
833
|
-
{
|
|
834
|
-
id: 'folders',
|
|
835
|
-
labelKey: 'storage.folder.title',
|
|
836
|
-
icon: 'folder',
|
|
837
|
-
route: 'folders',
|
|
838
|
-
permission: FOLDER_PERMISSIONS.READ,
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
id: 'configs',
|
|
842
|
-
labelKey: 'storage.config.title',
|
|
843
|
-
icon: 'cog',
|
|
844
|
-
route: 'configs',
|
|
845
|
-
permission: STORAGE_CONFIG_PERMISSIONS.READ,
|
|
846
|
-
},
|
|
847
|
-
];
|
|
848
|
-
/** Visible tabs based on user permissions */
|
|
849
|
-
visibleTabs = computed(() => this.allTabs
|
|
850
|
-
.filter((tab) => this.permissionValidator.hasPermission(tab.permission))
|
|
851
|
-
.map((tab) => ({
|
|
852
|
-
id: tab.id,
|
|
853
|
-
label: this.translateService.translate(tab.labelKey),
|
|
854
|
-
icon: tab.icon,
|
|
855
|
-
route: tab.route,
|
|
856
|
-
})), /* @ts-ignore */
|
|
857
|
-
...(ngDevMode ? [{ debugName: "visibleTabs" }] : /* istanbul ignore next */ []));
|
|
858
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: StorageContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
859
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.5", type: StorageContainerComponent, isStandalone: true, selector: "lib-storage-container", ngImport: i0, template: `
|
|
860
|
-
<div class="p-2 sm:p-4">
|
|
861
|
-
<div class="mb-4">
|
|
862
|
-
<h1 class="text-xl sm:text-2xl font-bold m-0">{{ 'storage.title' | translate }}</h1>
|
|
863
|
-
<p class="text-muted-color mt-1 text-sm sm:text-base">{{ 'storage.subtitle' | translate }}</p>
|
|
864
|
-
</div>
|
|
865
|
-
|
|
866
|
-
<lib-router-tabs [tabs]="visibleTabs()" class="mb-4" />
|
|
867
|
-
|
|
868
|
-
<router-outlet />
|
|
869
|
-
</div>
|
|
870
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: RouterTabsComponent, selector: "lib-router-tabs", inputs: ["tabs"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
871
|
-
}
|
|
872
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: StorageContainerComponent, decorators: [{
|
|
873
|
-
type: Component,
|
|
874
|
-
args: [{
|
|
875
|
-
selector: 'lib-storage-container',
|
|
876
|
-
imports: [RouterOutlet, TranslatePipe, RouterTabsComponent],
|
|
877
|
-
template: `
|
|
878
|
-
<div class="p-2 sm:p-4">
|
|
879
|
-
<div class="mb-4">
|
|
880
|
-
<h1 class="text-xl sm:text-2xl font-bold m-0">{{ 'storage.title' | translate }}</h1>
|
|
881
|
-
<p class="text-muted-color mt-1 text-sm sm:text-base">{{ 'storage.subtitle' | translate }}</p>
|
|
882
|
-
</div>
|
|
883
|
-
|
|
884
|
-
<lib-router-tabs [tabs]="visibleTabs()" class="mb-4" />
|
|
885
|
-
|
|
886
|
-
<router-outlet />
|
|
887
|
-
</div>
|
|
888
|
-
`,
|
|
889
|
-
}]
|
|
890
|
-
}] });
|
|
891
|
-
|
|
892
|
-
var storageContainer_component = /*#__PURE__*/Object.freeze({
|
|
893
|
-
__proto__: null,
|
|
894
|
-
StorageContainerComponent: StorageContainerComponent
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
// =============================================================================
|
|
898
|
-
// @flusys/ng-storage - Storage Package
|
|
899
|
-
// =============================================================================
|
|
900
|
-
// Constants
|
|
901
|
-
|
|
902
|
-
/**
|
|
903
|
-
* Generated bundle index. Do not edit.
|
|
904
|
-
*/
|
|
562
|
+
const STORAGE_ROUTES = [{
|
|
563
|
+
path: "",
|
|
564
|
+
resolve: { translations: resolveTranslationModule({
|
|
565
|
+
modules: ["storage"],
|
|
566
|
+
fallbackMessages: {
|
|
567
|
+
...STORAGE_MESSAGES,
|
|
568
|
+
...SHARED_MESSAGES
|
|
569
|
+
}
|
|
570
|
+
}) },
|
|
571
|
+
loadComponent: () => import("./flusys-ng-storage-storage-container.component-EWGNoozU.mjs").then((m) => m.StorageContainerComponent),
|
|
572
|
+
children: [
|
|
573
|
+
{
|
|
574
|
+
path: "files",
|
|
575
|
+
canActivate: [permissionGuard(FILE_PERMISSIONS.READ)],
|
|
576
|
+
children: [
|
|
577
|
+
{
|
|
578
|
+
path: "",
|
|
579
|
+
loadComponent: () => import("./flusys-ng-storage-file-manager-list.component-4_LdJOtH.mjs").then((m) => m.FileManagerListComponent)
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
path: "new",
|
|
583
|
+
canActivate: [permissionGuard(FILE_PERMISSIONS.CREATE)],
|
|
584
|
+
loadComponent: () => import("./flusys-ng-storage-file-manager-form.component-Bvhewt3f.mjs").then((m) => m.FileManagerFormComponent)
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
path: ":id",
|
|
588
|
+
canActivate: [permissionGuard(FILE_PERMISSIONS.UPDATE)],
|
|
589
|
+
loadComponent: () => import("./flusys-ng-storage-file-manager-form.component-Bvhewt3f.mjs").then((m) => m.FileManagerFormComponent)
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
path: "folders",
|
|
595
|
+
canActivate: [permissionGuard(FOLDER_PERMISSIONS.READ)],
|
|
596
|
+
children: [
|
|
597
|
+
{
|
|
598
|
+
path: "",
|
|
599
|
+
loadComponent: () => import("./flusys-ng-storage-folder-list.component-BdSBM_DB.mjs").then((m) => m.FolderListComponent)
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
path: "new",
|
|
603
|
+
canActivate: [permissionGuard(FOLDER_PERMISSIONS.CREATE)],
|
|
604
|
+
loadComponent: () => import("./flusys-ng-storage-folder-form.component-7C2oWijb.mjs").then((m) => m.FolderFormComponent)
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
path: ":id",
|
|
608
|
+
canActivate: [permissionGuard(FOLDER_PERMISSIONS.UPDATE)],
|
|
609
|
+
loadComponent: () => import("./flusys-ng-storage-folder-form.component-7C2oWijb.mjs").then((m) => m.FolderFormComponent)
|
|
610
|
+
}
|
|
611
|
+
]
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
path: "configs",
|
|
615
|
+
canActivate: [permissionGuard(STORAGE_CONFIG_PERMISSIONS.READ)],
|
|
616
|
+
children: [
|
|
617
|
+
{
|
|
618
|
+
path: "",
|
|
619
|
+
loadComponent: () => import("./flusys-ng-storage-storage-config-list.component-Dh9JkuZP.mjs").then((m) => m.StorageConfigListComponent)
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
path: "new",
|
|
623
|
+
canActivate: [permissionGuard(STORAGE_CONFIG_PERMISSIONS.CREATE)],
|
|
624
|
+
loadComponent: () => import("./flusys-ng-storage-storage-config-form.component-De5h8JY-.mjs").then((m) => m.StorageConfigFormComponent)
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
path: ":id",
|
|
628
|
+
canActivate: [permissionGuard(STORAGE_CONFIG_PERMISSIONS.UPDATE)],
|
|
629
|
+
loadComponent: () => import("./flusys-ng-storage-storage-config-form.component-De5h8JY-.mjs").then((m) => m.StorageConfigFormComponent)
|
|
630
|
+
}
|
|
631
|
+
]
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
path: "",
|
|
635
|
+
redirectTo: () => resolveStorageDefaultTab(),
|
|
636
|
+
pathMatch: "full"
|
|
637
|
+
}
|
|
638
|
+
]
|
|
639
|
+
}];
|
|
640
|
+
export { BaseStorageListPage, BaseStoragePage, FILE_SIZE_UNIT_KEYS, FileLocationEnum, FileManagerApiService, FileProviderAdapter, FolderApiService, ImageFormat, PROVIDER_LABEL_KEYS, STORAGE_MESSAGES, STORAGE_PROVIDER_OPTIONS, STORAGE_ROUTES, StorageConfigApiService, UploadService, formatFileSize, formatFileSizeWithKey, getFileIcon, getProviderIcon, getProviderLabelKey, getProviderSeverity, provideStorageProviders };
|
|
905
641
|
|
|
906
|
-
|
|
907
|
-
//# sourceMappingURL=flusys-ng-storage.mjs.map
|
|
642
|
+
//# sourceMappingURL=flusys-ng-storage.mjs.map
|