@flusys/ng-storage 9.1.0-rc.1 → 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.
Files changed (33) hide show
  1. package/fesm2022/flusys-ng-storage-file-manager-api.service-DJ9uP3aN.mjs +43 -0
  2. package/fesm2022/flusys-ng-storage-file-manager-api.service-DJ9uP3aN.mjs.map +1 -0
  3. package/fesm2022/{flusys-ng-storage-file-manager-form.component-DaO-9wKM.mjs → flusys-ng-storage-file-manager-form.component-Bvhewt3f.mjs} +411 -231
  4. package/fesm2022/flusys-ng-storage-file-manager-form.component-Bvhewt3f.mjs.map +1 -0
  5. package/fesm2022/{flusys-ng-storage-file-manager-list.component-a7YHw1Gz.mjs → flusys-ng-storage-file-manager-list.component-4_LdJOtH.mjs} +355 -145
  6. package/fesm2022/flusys-ng-storage-file-manager-list.component-4_LdJOtH.mjs.map +1 -0
  7. package/fesm2022/flusys-ng-storage-folder-api.service-D_fFEuO6.mjs +33 -0
  8. package/fesm2022/flusys-ng-storage-folder-api.service-D_fFEuO6.mjs.map +1 -0
  9. package/fesm2022/flusys-ng-storage-folder-form.component-7C2oWijb.mjs +298 -0
  10. package/fesm2022/flusys-ng-storage-folder-form.component-7C2oWijb.mjs.map +1 -0
  11. package/fesm2022/{flusys-ng-storage-folder-list.component-BDrBAcCS.mjs → flusys-ng-storage-folder-list.component-BdSBM_DB.mjs} +284 -77
  12. package/fesm2022/flusys-ng-storage-folder-list.component-BdSBM_DB.mjs.map +1 -0
  13. package/fesm2022/flusys-ng-storage-storage-config-api.service-Bl4asniq.mjs +33 -0
  14. package/fesm2022/flusys-ng-storage-storage-config-api.service-Bl4asniq.mjs.map +1 -0
  15. package/fesm2022/{flusys-ng-storage-storage-config-form.component-B4wBfzVs.mjs → flusys-ng-storage-storage-config-form.component-De5h8JY-.mjs} +369 -214
  16. package/fesm2022/flusys-ng-storage-storage-config-form.component-De5h8JY-.mjs.map +1 -0
  17. package/fesm2022/{flusys-ng-storage-storage-config-list.component-CCkZY--j.mjs → flusys-ng-storage-storage-config-list.component-Dh9JkuZP.mjs} +303 -83
  18. package/fesm2022/flusys-ng-storage-storage-config-list.component-Dh9JkuZP.mjs.map +1 -0
  19. package/fesm2022/flusys-ng-storage-storage-container.component-EWGNoozU.mjs +124 -0
  20. package/fesm2022/flusys-ng-storage-storage-container.component-EWGNoozU.mjs.map +1 -0
  21. package/fesm2022/flusys-ng-storage-upload.service-CIcEL_Kr.mjs +113 -0
  22. package/fesm2022/flusys-ng-storage-upload.service-CIcEL_Kr.mjs.map +1 -0
  23. package/fesm2022/flusys-ng-storage.mjs +611 -876
  24. package/fesm2022/flusys-ng-storage.mjs.map +1 -1
  25. package/package.json +5 -5
  26. package/types/flusys-ng-storage.d.ts +254 -292
  27. package/fesm2022/flusys-ng-storage-file-manager-form.component-DaO-9wKM.mjs.map +0 -1
  28. package/fesm2022/flusys-ng-storage-file-manager-list.component-a7YHw1Gz.mjs.map +0 -1
  29. package/fesm2022/flusys-ng-storage-folder-form.component-BCzVzmRn.mjs +0 -225
  30. package/fesm2022/flusys-ng-storage-folder-form.component-BCzVzmRn.mjs.map +0 -1
  31. package/fesm2022/flusys-ng-storage-folder-list.component-BDrBAcCS.mjs.map +0 -1
  32. package/fesm2022/flusys-ng-storage-storage-config-form.component-B4wBfzVs.mjs.map +0 -1
  33. package/fesm2022/flusys-ng-storage-storage-config-list.component-CCkZY--j.mjs.map +0 -1
@@ -1,55 +1,65 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, signal, Component } from '@angular/core';
3
- import { DatePipe } from '@angular/common';
4
- import * as i1 from '@angular/forms';
5
- import { FormsModule } from '@angular/forms';
6
- import { FOLDER_PERMISSIONS, TranslateService, HasPermissionDirective, TranslatePipe } from '@flusys/ng-shared';
7
- import { BaseStorageListPage, FolderApiService } from './flusys-ng-storage.mjs';
8
- import { FButtonDirective, IconFieldComponent, InputIconComponent, InputTextDirective, TableComponent, TooltipDirective, UiIconComponent } from '@flusys/ng-ui';
9
-
10
- class FolderListComponent extends BaseStorageListPage {
11
- FOLDER_PERMISSIONS = FOLDER_PERMISSIONS;
12
- folderService = inject(FolderApiService);
13
- translateService = inject(TranslateService);
14
- folders = this.items;
15
- _searchTerm = signal('', /* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "_searchTerm" }] : /* istanbul ignore next */ []));
17
- searchTerm = this._searchTerm.asReadonly();
18
- getResourceRoute() {
19
- return '/storage/folders';
20
- }
21
- getDeleteConfirmMessage(folder) {
22
- return this.translateService.translate('shared.confirm.delete.item', {
23
- name: folder.name,
24
- });
25
- }
26
- async loadData() {
27
- this.isLoading.set(true);
28
- try {
29
- const response = await this.folderService.getAll({
30
- pagination: this.getPaginationParams(),
31
- }, this.searchTerm());
32
- if (response.success) {
33
- this.items.set(response.data ?? []);
34
- this.total.set(response.meta?.total ?? 0);
35
- }
36
- }
37
- finally {
38
- this.isLoading.set(false);
39
- }
40
- }
41
- onSearchChange(term) {
42
- this._searchTerm.set(term);
43
- this.first.set(0);
44
- this.loadData();
45
- }
46
- onDeleteFolder(folder) {
47
- this.onDeleteAsync(folder, (f) => f.id, (id) => this.folderService.delete({ id, type: 'delete' }), {
48
- header: this.translateService.translate('storage.folder.delete.title'),
49
- });
50
- }
51
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: FolderListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
52
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: FolderListComponent, isStandalone: true, selector: "lib-folder-list", usesInheritance: true, ngImport: i0, template: `
1
+ import { t as FolderApiService } from "./flusys-ng-storage-folder-api.service-D_fFEuO6.mjs";
2
+ import { BaseStorageListPage } from "./flusys-ng-storage.mjs";
3
+ import * as i0 from "@angular/core";
4
+ import { Component, inject, signal } from "@angular/core";
5
+ import { FOLDER_PERMISSIONS, HasPermissionDirective, TranslatePipe, TranslateService } from "@flusys/ng-shared";
6
+ import { FButtonDirective, IconFieldComponent, InputIconComponent, InputTextDirective, TableComponent, TooltipDirective, UiIconComponent } from "@flusys/ng-ui";
7
+ import { DatePipe } from "@angular/common";
8
+ import * as i1 from "@angular/forms";
9
+ import { FormsModule } from "@angular/forms";
10
+ var FolderListComponent = class FolderListComponent extends BaseStorageListPage {
11
+ FOLDER_PERMISSIONS = FOLDER_PERMISSIONS;
12
+ folderService = inject(FolderApiService);
13
+ translateService = inject(TranslateService);
14
+ folders = this.items;
15
+ _searchTerm = signal("", ...ngDevMode ? [{ debugName: "_searchTerm" }] : /* istanbul ignore next */ []);
16
+ searchTerm = this._searchTerm.asReadonly();
17
+ getResourceRoute() {
18
+ return "/storage/folders";
19
+ }
20
+ getDeleteConfirmMessage(folder) {
21
+ return this.translateService.translate("shared.confirm.delete.item", { name: folder.name });
22
+ }
23
+ async loadData() {
24
+ this.isLoading.set(true);
25
+ try {
26
+ const response = await this.folderService.getAll({ pagination: this.getPaginationParams() }, this.searchTerm());
27
+ if (response.success) {
28
+ this.items.set(response.data ?? []);
29
+ this.total.set(response.meta?.total ?? 0);
30
+ }
31
+ } finally {
32
+ this.isLoading.set(false);
33
+ }
34
+ }
35
+ onSearchChange(term) {
36
+ this._searchTerm.set(term);
37
+ this.first.set(0);
38
+ this.loadData();
39
+ }
40
+ onDeleteFolder(folder) {
41
+ this.onDeleteAsync(folder, (f) => f.id, (id) => this.folderService.delete({
42
+ id,
43
+ type: "delete"
44
+ }), { header: this.translateService.translate("storage.folder.delete.title") });
45
+ }
46
+ static ɵfac = i0.ɵɵngDeclareFactory({
47
+ minVersion: "12.0.0",
48
+ version: "22.2.1",
49
+ ngImport: i0,
50
+ type: FolderListComponent,
51
+ deps: null,
52
+ target: i0.ɵɵFactoryTarget.Component
53
+ });
54
+ static ɵcmp = i0.ɵɵngDeclareComponent({
55
+ minVersion: "17.0.0",
56
+ version: "22.2.1",
57
+ type: FolderListComponent,
58
+ isStandalone: true,
59
+ selector: "lib-folder-list",
60
+ usesInheritance: true,
61
+ ngImport: i0,
62
+ template: `
53
63
  <div class="card">
54
64
  <div
55
65
  class="flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3 mb-4"
@@ -169,26 +179,222 @@ class FolderListComponent extends BaseStorageListPage {
169
179
  </f-table>
170
180
  </div>
171
181
  </div>
172
- `, isInline: true, dependencies: [{ kind: "directive", type: FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "variant", "rounded", "raised", "fluid", "disabled", "loading", "loadingIcon", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: IconFieldComponent, selector: "f-iconfield", inputs: ["iconPosition", "styleClass"] }, { kind: "component", type: InputIconComponent, selector: "f-inputicon", inputs: ["icon", "position", "styleClass", "style"] }, { kind: "directive", type: InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched", "variant", "size", "fluid"] }, { kind: "component", type: TableComponent, selector: "f-table", inputs: ["value", "lazy", "loading", "rows", "totalRecords", "rowHover", "dataKey", "scrollable", "scrollHeight", "paginator", "first", "rowsPerPageOptions", "showCurrentPageReport", "currentPageReportTemplate", "tableStyle", "styleClass", "globalFilterFields", "filterDelay", "responsiveLayout", "selectionMode", "sortMode", "rowExpandMode", "resizableColumns", "rowStyleClass", "virtualScroll", "virtualScrollItemSize", "sortField", "sortOrder", "multiSortMeta", "filters", "selection", "expandedRowKeys", "contextMenuSelection"], outputs: ["sortFieldChange", "sortOrderChange", "multiSortMetaChange", "filtersChange", "selectionChange", "expandedRowKeysChange", "contextMenuSelectionChange", "onLazyLoad", "onSort", "onFilter", "onRowSelect", "onRowUnselect", "onSelectAllChange", "onRowExpand", "onRowCollapse", "onColResize", "onRowContextMenu"] }, { kind: "directive", type: TooltipDirective, selector: "[fTooltip]", inputs: ["fTooltip", "tooltipPosition", "positionStyle", "tooltipStyleClass", "disabled", "tooltipEvent", "showDelay", "hideDelay", "life", "autoHide", "positionTop", "positionLeft", "escape"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill", "severity"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: HasPermissionDirective, selector: "[hasPermission]", inputs: ["hasPermission"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
173
- }
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: FolderListComponent, decorators: [{
175
- type: Component,
176
- args: [{
177
- selector: 'lib-folder-list',
178
- imports: [
179
- DatePipe,
180
- FButtonDirective,
181
- IconFieldComponent,
182
- InputIconComponent,
183
- InputTextDirective,
184
- TableComponent,
185
- TooltipDirective,
186
- UiIconComponent,
187
- FormsModule,
188
- HasPermissionDirective,
189
- TranslatePipe,
190
- ],
191
- template: `
182
+ `,
183
+ isInline: true,
184
+ dependencies: [
185
+ {
186
+ kind: "directive",
187
+ type: FButtonDirective,
188
+ selector: "[fButton]",
189
+ inputs: [
190
+ "severity",
191
+ "text",
192
+ "outlined",
193
+ "link",
194
+ "variant",
195
+ "rounded",
196
+ "raised",
197
+ "fluid",
198
+ "disabled",
199
+ "loading",
200
+ "loadingIcon",
201
+ "size",
202
+ "label",
203
+ "icon",
204
+ "iconPos",
205
+ "ariaLabel",
206
+ "plain"
207
+ ]
208
+ },
209
+ {
210
+ kind: "component",
211
+ type: IconFieldComponent,
212
+ selector: "f-iconfield",
213
+ inputs: ["iconPosition", "styleClass"]
214
+ },
215
+ {
216
+ kind: "component",
217
+ type: InputIconComponent,
218
+ selector: "f-inputicon",
219
+ inputs: [
220
+ "icon",
221
+ "position",
222
+ "styleClass",
223
+ "style"
224
+ ]
225
+ },
226
+ {
227
+ kind: "directive",
228
+ type: InputTextDirective,
229
+ selector: "[fInputText]",
230
+ inputs: [
231
+ "invalid",
232
+ "touched",
233
+ "variant",
234
+ "size",
235
+ "fluid"
236
+ ]
237
+ },
238
+ {
239
+ kind: "component",
240
+ type: TableComponent,
241
+ selector: "f-table",
242
+ inputs: [
243
+ "value",
244
+ "lazy",
245
+ "loading",
246
+ "rows",
247
+ "totalRecords",
248
+ "rowHover",
249
+ "dataKey",
250
+ "scrollable",
251
+ "scrollHeight",
252
+ "paginator",
253
+ "first",
254
+ "rowsPerPageOptions",
255
+ "showCurrentPageReport",
256
+ "currentPageReportTemplate",
257
+ "tableStyle",
258
+ "styleClass",
259
+ "globalFilterFields",
260
+ "filterDelay",
261
+ "responsiveLayout",
262
+ "selectionMode",
263
+ "sortMode",
264
+ "rowExpandMode",
265
+ "resizableColumns",
266
+ "rowStyleClass",
267
+ "virtualScroll",
268
+ "virtualScrollItemSize",
269
+ "sortField",
270
+ "sortOrder",
271
+ "multiSortMeta",
272
+ "filters",
273
+ "selection",
274
+ "expandedRowKeys",
275
+ "contextMenuSelection"
276
+ ],
277
+ outputs: [
278
+ "sortFieldChange",
279
+ "sortOrderChange",
280
+ "multiSortMetaChange",
281
+ "filtersChange",
282
+ "selectionChange",
283
+ "expandedRowKeysChange",
284
+ "contextMenuSelectionChange",
285
+ "onLazyLoad",
286
+ "onSort",
287
+ "onFilter",
288
+ "onRowSelect",
289
+ "onRowUnselect",
290
+ "onSelectAllChange",
291
+ "onRowExpand",
292
+ "onRowCollapse",
293
+ "onColResize",
294
+ "onRowContextMenu"
295
+ ]
296
+ },
297
+ {
298
+ kind: "directive",
299
+ type: TooltipDirective,
300
+ selector: "[fTooltip]",
301
+ inputs: [
302
+ "fTooltip",
303
+ "tooltipPosition",
304
+ "positionStyle",
305
+ "tooltipStyleClass",
306
+ "disabled",
307
+ "tooltipEvent",
308
+ "showDelay",
309
+ "hideDelay",
310
+ "life",
311
+ "autoHide",
312
+ "positionTop",
313
+ "positionLeft",
314
+ "escape"
315
+ ]
316
+ },
317
+ {
318
+ kind: "component",
319
+ type: UiIconComponent,
320
+ selector: "ui-icon",
321
+ inputs: [
322
+ "name",
323
+ "size",
324
+ "spin",
325
+ "fill",
326
+ "severity"
327
+ ]
328
+ },
329
+ {
330
+ kind: "ngmodule",
331
+ type: FormsModule
332
+ },
333
+ {
334
+ kind: "directive",
335
+ type: i1.DefaultValueAccessor,
336
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
337
+ },
338
+ {
339
+ kind: "directive",
340
+ type: i1.NgControlStatus,
341
+ selector: "[formControlName],[ngModel],[formControl]"
342
+ },
343
+ {
344
+ kind: "directive",
345
+ type: i1.NgModel,
346
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
347
+ inputs: [
348
+ "name",
349
+ "disabled",
350
+ "ngModel",
351
+ "ngModelOptions"
352
+ ],
353
+ outputs: ["ngModelChange"],
354
+ exportAs: ["ngModel"]
355
+ },
356
+ {
357
+ kind: "directive",
358
+ type: HasPermissionDirective,
359
+ selector: "[hasPermission]",
360
+ inputs: ["hasPermission"]
361
+ },
362
+ {
363
+ kind: "pipe",
364
+ type: DatePipe,
365
+ name: "date"
366
+ },
367
+ {
368
+ kind: "pipe",
369
+ type: TranslatePipe,
370
+ name: "translate"
371
+ }
372
+ ]
373
+ });
374
+ };
375
+ i0.ɵɵngDeclareClassMetadata({
376
+ minVersion: "12.0.0",
377
+ version: "22.2.1",
378
+ ngImport: i0,
379
+ type: FolderListComponent,
380
+ decorators: [{
381
+ type: Component,
382
+ args: [{
383
+ selector: "lib-folder-list",
384
+ imports: [
385
+ DatePipe,
386
+ FButtonDirective,
387
+ IconFieldComponent,
388
+ InputIconComponent,
389
+ InputTextDirective,
390
+ TableComponent,
391
+ TooltipDirective,
392
+ UiIconComponent,
393
+ FormsModule,
394
+ HasPermissionDirective,
395
+ TranslatePipe
396
+ ],
397
+ template: `
192
398
  <div class="card">
193
399
  <div
194
400
  class="flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3 mb-4"
@@ -308,9 +514,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
308
514
  </f-table>
309
515
  </div>
310
516
  </div>
311
- `,
312
- }]
313
- }] });
314
-
517
+ `
518
+ }]
519
+ }]
520
+ });
315
521
  export { FolderListComponent };
316
- //# sourceMappingURL=flusys-ng-storage-folder-list.component-BDrBAcCS.mjs.map
522
+
523
+ //# sourceMappingURL=flusys-ng-storage-folder-list.component-BdSBM_DB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flusys-ng-storage-folder-list.component-BdSBM_DB.mjs","names":[],"sources":["../../../projects/ng-storage/pages/folder/folder-list.component.ts"],"sourcesContent":["import { Component, inject, signal } from '@angular/core';\nimport { DatePipe } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport {\n FOLDER_PERMISSIONS,\n HasPermissionDirective,\n TranslatePipe,\n TranslateService,\n} from '@flusys/ng-shared';\nimport { IFolder } from '../../interfaces/folder.interface';\nimport { FolderApiService } from '../../services/folder-api.service';\nimport { BaseStorageListPage } from '../../utils/base-storage-page';\nimport {\n FButtonDirective,\n IconFieldComponent,\n InputIconComponent,\n InputTextDirective,\n TableComponent,\n TooltipDirective,\n UiIconComponent,\n} from '@flusys/ng-ui';\n\n@Component({\n selector: 'lib-folder-list',\n imports: [\n DatePipe,\n FButtonDirective,\n IconFieldComponent,\n InputIconComponent,\n InputTextDirective,\n TableComponent,\n TooltipDirective,\n UiIconComponent,\n FormsModule,\n HasPermissionDirective,\n TranslatePipe,\n ],\n template: `\n <div class=\"card\">\n <div\n class=\"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3 mb-4\"\n >\n <div>\n <h3 class=\"text-lg sm:text-xl font-semibold\">\n {{ 'storage.folder.title' | translate }}\n </h3>\n @if (showCompanyInfo()) {\n <p class=\"text-sm text-muted-color mt-1\">\n {{ 'shared.company' | translate }}: {{ currentCompanyName() }}\n </p>\n }\n </div>\n <div\n class=\"flex flex-col sm:flex-row items-stretch sm:items-center gap-2 w-full sm:w-auto\"\n >\n <f-iconfield class=\"w-full sm:w-64\">\n <f-inputicon icon=\"search\" />\n <input\n fInputText\n type=\"text\"\n [ngModel]=\"searchTerm()\"\n (ngModelChange)=\"onSearchChange($event)\"\n [ngModelOptions]=\"{ standalone: true }\"\n [placeholder]=\"'shared.search' | translate\"\n class=\"w-full\"\n />\n </f-iconfield>\n <button\n fButton\n *hasPermission=\"FOLDER_PERMISSIONS.CREATE\"\n (click)=\"onCreate()\"\n class=\"w-full sm:w-auto\"\n >\n <ui-icon pButtonIcon name=\"plus\"></ui-icon>\n <span pButtonLabel>{{ 'storage.button.new.folder' | translate }}</span>\n </button>\n </div>\n </div>\n\n <div class=\"overflow-x-auto\">\n <f-table\n [value]=\"folders()\"\n [loading]=\"isLoading()\"\n [paginator]=\"totalRecords() > 0\"\n [rows]=\"pageSize()\"\n [totalRecords]=\"totalRecords()\"\n [lazy]=\"true\"\n (onLazyLoad)=\"onPageChange($event)\"\n [rowsPerPageOptions]=\"[10, 25, 50]\"\n [scrollable]=\"true\"\n >\n <ng-template #header>\n <tr>\n <th>{{ 'shared.name' | translate }}</th>\n <th>{{ 'storage.table.slug' | translate }}</th>\n <th class=\"hidden sm:table-cell\">\n {{ 'storage.table.created' | translate }}\n </th>\n <th class=\"w-[120px]\">\n {{ 'shared.actions' | translate }}\n </th>\n </tr>\n </ng-template>\n <ng-template #body let-folder>\n <tr>\n <td>\n <ui-icon name=\"folder\" class=\"mr-2\"></ui-icon>\n {{ folder.name }}\n </td>\n <td>{{ folder.slug }}</td>\n <td class=\"hidden sm:table-cell\">\n {{ folder.createdAt | date: 'short' }}\n </td>\n <td>\n <div class=\"flex gap-1\">\n <button\n fButton\n *hasPermission=\"FOLDER_PERMISSIONS.UPDATE\"\n [text]=\"true\"\n severity=\"secondary\"\n size=\"small\"\n (click)=\"onEdit(folder.id)\"\n [fTooltip]=\"'shared.edit' | translate\"\n tooltipPosition=\"top\"\n >\n <ui-icon pButtonIcon name=\"pencil\"></ui-icon>\n </button>\n <button\n fButton\n *hasPermission=\"FOLDER_PERMISSIONS.DELETE\"\n [text]=\"true\"\n severity=\"danger\"\n size=\"small\"\n (click)=\"onDeleteFolder(folder)\"\n [fTooltip]=\"'shared.delete' | translate\"\n tooltipPosition=\"top\"\n >\n <ui-icon pButtonIcon name=\"trash\"></ui-icon>\n </button>\n </div>\n </td>\n </tr>\n </ng-template>\n <ng-template #emptymessage>\n <tr>\n <td colspan=\"4\" class=\"text-center py-4 text-muted-color\">\n @if (showCompanyInfo()) {\n {{ 'storage.empty.folders.in.company' | translate }}\n } @else {\n {{ 'storage.empty.folders' | translate }}\n }\n </td>\n </tr>\n </ng-template>\n </f-table>\n </div>\n </div>\n `,\n})\nexport class FolderListComponent extends BaseStorageListPage<IFolder> {\n readonly FOLDER_PERMISSIONS = FOLDER_PERMISSIONS;\n\n private readonly folderService = inject(FolderApiService);\n private readonly translateService = inject(TranslateService);\n\n readonly folders = this.items;\n\n private readonly _searchTerm = signal('');\n readonly searchTerm = this._searchTerm.asReadonly();\n\n getResourceRoute(): string {\n return '/storage/folders';\n }\n\n override getDeleteConfirmMessage(folder: IFolder): string {\n return this.translateService.translate('shared.confirm.delete.item', {\n name: folder.name,\n });\n }\n\n async loadData(): Promise<void> {\n this.isLoading.set(true);\n try {\n const response = await this.folderService.getAll(\n {\n pagination: this.getPaginationParams(),\n },\n this.searchTerm(),\n );\n if (response.success) {\n this.items.set(response.data ?? []);\n this.total.set(response.meta?.total ?? 0);\n }\n } finally {\n this.isLoading.set(false);\n }\n }\n\n onSearchChange(term: string): void {\n this._searchTerm.set(term);\n this.first.set(0);\n this.loadData();\n }\n\n onDeleteFolder(folder: IFolder): void {\n this.onDeleteAsync(\n folder,\n (f) => f.id,\n (id) => this.folderService.delete({ id, type: 'delete' }),\n {\n header: this.translateService.translate('storage.folder.delete.title'),\n },\n );\n }\n}\n"],"mappings":";;;;;;;;;AA+JA,IAAa,sBAAb,MAAa,4BAA4B,oBAA4B;CAC1D,qBAAqB;CAEb,gBAAgB,OAAO,gBAAgB;CACvC,mBAAmB,OAAO,gBAAgB;CAElD,UAAU,KAAK;CAEP,cAAc,OAAO,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAChC,aAAa,KAAK,YAAY,WAAU;CAEjD,mBAAgB;EACd,OAAO;CACT;CAES,wBAAwB,QAAe;EAC9C,OAAO,KAAK,iBAAiB,UAAU,8BAA8B,EACnE,MAAM,OAAO,KACd,CAAA;CACH;CAEA,MAAM,WAAQ;EACZ,KAAK,UAAU,IAAI,IAAI;EACvB,IAAI;GACF,MAAM,WAAW,MAAM,KAAK,cAAc,OACxC,EACE,YAAY,KAAK,oBAAmB,EACrC,GACD,KAAK,WAAU,CAAE;GAEnB,IAAI,SAAS,SAAS;IACpB,KAAK,MAAM,IAAI,SAAS,QAAQ,CAAA,CAAE;IAClC,KAAK,MAAM,IAAI,SAAS,MAAM,SAAS,CAAC;GAC1C;EACF,UAAU;GACR,KAAK,UAAU,IAAI,KAAK;EAC1B;CACF;CAEA,eAAe,MAAY;EACzB,KAAK,YAAY,IAAI,IAAI;EACzB,KAAK,MAAM,IAAI,CAAC;EAChB,KAAK,SAAQ;CACf;CAEA,eAAe,QAAe;EAC5B,KAAK,cACH,SACC,MAAM,EA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yHX,CAAA"}
@@ -0,0 +1,33 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Service } from "@angular/core";
3
+ import { ApiResourceService } from "@flusys/ng-shared";
4
+ var StorageConfigApiService = class StorageConfigApiService extends ApiResourceService {
5
+ constructor() {
6
+ super("storage-config", "storage");
7
+ }
8
+ static ɵfac = i0.ɵɵngDeclareFactory({
9
+ minVersion: "12.0.0",
10
+ version: "22.2.1",
11
+ ngImport: i0,
12
+ type: StorageConfigApiService,
13
+ deps: [],
14
+ target: i0.ɵɵFactoryTarget.Service
15
+ });
16
+ static ɵprov = i0.ɵɵngDeclareService({
17
+ minVersion: "22.0.0",
18
+ version: "22.2.1",
19
+ ngImport: i0,
20
+ type: StorageConfigApiService
21
+ });
22
+ };
23
+ i0.ɵɵngDeclareClassMetadata({
24
+ minVersion: "12.0.0",
25
+ version: "22.2.1",
26
+ ngImport: i0,
27
+ type: StorageConfigApiService,
28
+ decorators: [{ type: Service }],
29
+ ctorParameters: () => []
30
+ });
31
+ export { StorageConfigApiService as t };
32
+
33
+ //# sourceMappingURL=flusys-ng-storage-storage-config-api.service-Bl4asniq.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flusys-ng-storage-storage-config-api.service-Bl4asniq.mjs","names":[],"sources":["../../../projects/ng-storage/services/storage-config-api.service.ts"],"sourcesContent":["import { Service } from '@angular/core';\nimport { ApiResourceService } from '@flusys/ng-shared';\nimport {\n ICreateStorageConfigDto,\n IStorageConfig,\n IUpdateStorageConfigDto,\n} from '../interfaces/storage-config.interface';\n\n/**\n * Storage Config API Service\n * Handles storage configuration CRUD operations\n * Endpoint: POST /storage/storage-config/*\n *\n * Note: Company feature enabled - all queries automatically scoped to user's company\n */\n@Service()\nexport class StorageConfigApiService extends ApiResourceService<\n ICreateStorageConfigDto | IUpdateStorageConfigDto,\n IStorageConfig\n> {\n constructor() {\n super('storage-config', 'storage');\n }\n}\n"],"mappings":";;;AAgBA,IAAa,0BAAb,MAAa,gCAAgC,mBAG5C;CACC,cAAA;EACE,MAAM,kBAAkB,SAAS;CACnC;CANW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAuB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAvB,OAAA,QAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;CAAuB,CAAA;;AAAvB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA,EADnC,MAAA,QAAA,CAAA"}