@yuuvis/app-drive 2.1.26 → 2.2.0
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/yuuvis-app-drive-extensions.mjs +3 -3
- package/fesm2022/yuuvis-app-drive-extensions.mjs.map +1 -1
- package/fesm2022/yuuvis-app-drive.mjs +679 -819
- package/fesm2022/yuuvis-app-drive.mjs.map +1 -1
- package/index.d.ts +5 -4
- package/lib/actions/manage-versions/component/manage-versions.component.d.ts +10 -10
- package/lib/assets/i18n/de.json +1 -1
- package/lib/assets/i18n/en.json +1 -1
- package/lib/components/drive-search/drive-search-overlay/drive-search-overlay.component.d.ts +1 -0
- package/lib/components/drive-search/drive-search.component.d.ts +4 -3
- package/lib/components/versions-list/versions-list.component.d.ts +6 -4
- package/lib/container/drive/drive.component.d.ts +1 -1
- package/lib/pages/files/files.component.d.ts +15 -15
- package/lib/pages/object/object.component.d.ts +4 -3
- package/lib/services/drive/drive.service.d.ts +2 -1
- package/package.json +5 -5
- package/public-api.d.ts +4 -0
- package/yuv-manifest.json +4 -7
|
@@ -8,14 +8,14 @@ import { FormBuilder, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
|
8
8
|
import * as i1$3 from '@angular/router';
|
|
9
9
|
import { Router, NavigationStart, ActivatedRoute, RouterModule, NavigationEnd } from '@angular/router';
|
|
10
10
|
import * as i2 from '@yuuvis/client-core';
|
|
11
|
-
import { SystemType, ClipboardService, TranslateService, TranslateModule, BaseObjectTypeField, EventService, DmsService, SearchService, BackendService, YuvEventType, ContentStreamField, NotificationService, Utils, RetentionService,
|
|
11
|
+
import { SystemType, ClipboardService, TranslateService, TranslateModule, BaseObjectTypeField, EventService, DmsService, SearchService, BackendService, YuvEventType, ContentStreamField, NotificationService, Utils, RetentionService, SystemService, Situation, Operator, SearchUtils, UserService, ObjectConfigService, DeviceService, AppCacheService } from '@yuuvis/client-core';
|
|
12
12
|
import { ActionsService, BASE_ACTION, AbstractContextAction, SelectionRange, ContextmenuComponent, YuvContextMenuTriggerDirective } from '@yuuvis/client-framework/actions';
|
|
13
13
|
import { UploadProgressComponent } from '@yuuvis/client-framework/upload-progress';
|
|
14
14
|
import * as i2$5 from '@yuuvis/client-shell';
|
|
15
15
|
import { YuvClientShellModule } from '@yuuvis/client-shell';
|
|
16
16
|
import { OverflowMenuComponent } from '@yuuvis/client-framework/overflow-menu';
|
|
17
17
|
import { switchMap as switchMap$1, map as map$1, finalize as finalize$1, filter as filter$1 } from 'rxjs/operators';
|
|
18
|
-
import { tap, Subject, filter, switchMap, of, forkJoin, map, catchError, finalize, timer, from } from 'rxjs';
|
|
18
|
+
import { tap, Subject, filter, switchMap, of, forkJoin, map, catchError, finalize, timer, from, debounceTime } from 'rxjs';
|
|
19
19
|
import { MAT_DIALOG_DATA, MatDialogRef, MatDialog, MatDialogContent, MatDialogActions, MatDialogTitle, MatDialogClose, MatDialogConfig } from '@angular/material/dialog';
|
|
20
20
|
import { signalState, patchState } from '@ngrx/signals';
|
|
21
21
|
import { marker } from '@colsen1991/ngx-translate-extract-marker';
|
|
@@ -177,27 +177,21 @@ var DRIVE_ACTION_MODE;
|
|
|
177
177
|
* copied or moved.
|
|
178
178
|
*/
|
|
179
179
|
class ResolveNameConflictsComponent {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
#dialogData;
|
|
198
|
-
#dialogRef;
|
|
199
|
-
#drive;
|
|
200
|
-
#clipboard;
|
|
180
|
+
#dialogData = inject(MAT_DIALOG_DATA);
|
|
181
|
+
#dialogRef = inject((MatDialogRef));
|
|
182
|
+
#drive = inject(DriveService);
|
|
183
|
+
#clipboard = inject(ClipboardService);
|
|
184
|
+
translate = inject(TranslateService);
|
|
185
|
+
payload = this.#dialogData;
|
|
186
|
+
validItems = [];
|
|
187
|
+
existingFileNames = this.payload?.existingFileNames || [];
|
|
188
|
+
invalidFileNames = this.payload?.invalidFileNames || [];
|
|
189
|
+
content = {
|
|
190
|
+
headline: '',
|
|
191
|
+
message: '',
|
|
192
|
+
messageValid: '',
|
|
193
|
+
proceed: ''
|
|
194
|
+
};
|
|
201
195
|
proceed() {
|
|
202
196
|
if (!this.payload)
|
|
203
197
|
return;
|
|
@@ -311,10 +305,10 @@ class ResolveNameConflictsComponent {
|
|
|
311
305
|
this.#setupValidItems();
|
|
312
306
|
this.#setupContent();
|
|
313
307
|
}
|
|
314
|
-
static
|
|
315
|
-
static
|
|
308
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ResolveNameConflictsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
309
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ResolveNameConflictsComponent, isStandalone: true, selector: "ymd-resolve-name-conflicts", ngImport: i0, template: "<yuv-dialog [headertitel]=\"content.headline\">\n <main>\n <p>{{ content.message }}</p>\n\n <ul>\n @for (ef of existingFileNames; track $index) {\n <li>{{ ef }}</li>\n }\n </ul>\n\n @if (validItems.length) {\n <p>{{ content.messageValid }}</p>\n <ul>\n @for (f of validItems; track $index) {\n <li>{{ f.name }}</li>\n }\n </ul>\n }\n </main>\n <footer>\n @if (validItems.length) {\n <button ymtButton=\"primary\" (click)=\"proceed()\">{{ content.proceed }}</button>\n }\n <button ymtButton=\"secondary\" (click)=\"cancel()\">{{ 'yuv.app.drive.name.conflict.cancel' | translate }}</button>\n </footer>\n</yuv-dialog>\n", styles: ["@charset \"UTF-8\";:host main{padding:var(--ymt-spacing-m)}:host ul{font-weight:700;list-style:none;padding:0 1em}:host ul li{padding:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ul li:before{content:\"\\2022\";margin-inline-end:.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: DialogComponent, selector: "yuv-dialog", inputs: ["headertitel"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }] });
|
|
316
310
|
}
|
|
317
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ResolveNameConflictsComponent, decorators: [{
|
|
318
312
|
type: Component,
|
|
319
313
|
args: [{ selector: 'ymd-resolve-name-conflicts', standalone: true, imports: [CommonModule, TranslateModule, DialogComponent, YmtButtonDirective], template: "<yuv-dialog [headertitel]=\"content.headline\">\n <main>\n <p>{{ content.message }}</p>\n\n <ul>\n @for (ef of existingFileNames; track $index) {\n <li>{{ ef }}</li>\n }\n </ul>\n\n @if (validItems.length) {\n <p>{{ content.messageValid }}</p>\n <ul>\n @for (f of validItems; track $index) {\n <li>{{ f.name }}</li>\n }\n </ul>\n }\n </main>\n <footer>\n @if (validItems.length) {\n <button ymtButton=\"primary\" (click)=\"proceed()\">{{ content.proceed }}</button>\n }\n <button ymtButton=\"secondary\" (click)=\"cancel()\">{{ 'yuv.app.drive.name.conflict.cancel' | translate }}</button>\n </footer>\n</yuv-dialog>\n", styles: ["@charset \"UTF-8\";:host main{padding:var(--ymt-spacing-m)}:host ul{font-weight:700;list-style:none;padding:0 1em}:host ul li{padding:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ul li:before{content:\"\\2022\";margin-inline-end:.5rem}\n"] }]
|
|
320
314
|
}] });
|
|
@@ -360,58 +354,49 @@ const mapSearchResult = (res) => {
|
|
|
360
354
|
};
|
|
361
355
|
|
|
362
356
|
class DriveService {
|
|
363
|
-
#actionsService;
|
|
364
|
-
#eventService;
|
|
365
|
-
#router;
|
|
366
|
-
#dmsService;
|
|
367
|
-
#searchService;
|
|
368
|
-
#dialog;
|
|
369
|
-
#backend;
|
|
370
|
-
#clipboardService;
|
|
371
|
-
|
|
372
|
-
|
|
357
|
+
#actionsService = inject(ActionsService);
|
|
358
|
+
#eventService = inject(EventService);
|
|
359
|
+
#router = inject(Router);
|
|
360
|
+
#dmsService = inject(DmsService);
|
|
361
|
+
#searchService = inject(SearchService);
|
|
362
|
+
#dialog = inject(MatDialog);
|
|
363
|
+
#backend = inject(BackendService);
|
|
364
|
+
#clipboardService = inject(ClipboardService);
|
|
365
|
+
MAX_DEPTH = inject(DRIVE_APP_BREADCRUMB_MAX_DEPTH);
|
|
366
|
+
breadcrumbCache = new Map();
|
|
367
|
+
#eventSource = new Subject();
|
|
368
|
+
events$ = this.#eventSource.asObservable();
|
|
369
|
+
#defaultSort = {
|
|
370
|
+
property: FS_PROPERTIES.name,
|
|
371
|
+
order: 'asc'
|
|
372
|
+
};
|
|
373
|
+
initialState = {
|
|
374
|
+
currentFolder: null,
|
|
375
|
+
query: null,
|
|
376
|
+
queryTitle: null,
|
|
377
|
+
extendedQuery: false,
|
|
378
|
+
selection: [],
|
|
379
|
+
actions: [],
|
|
380
|
+
busy: false,
|
|
381
|
+
sort: this.#defaultSort,
|
|
382
|
+
breadcrumb: {
|
|
383
|
+
loading: false,
|
|
384
|
+
partial: false,
|
|
385
|
+
items: [],
|
|
386
|
+
folder: null
|
|
387
|
+
},
|
|
388
|
+
versions: {
|
|
389
|
+
versionsList: [],
|
|
390
|
+
selectedVersion: null
|
|
391
|
+
},
|
|
392
|
+
selectedDmsObject: null
|
|
393
|
+
};
|
|
394
|
+
state$ = signalState(this.initialState);
|
|
395
|
+
breadcrumbFolderPreview = this.state$.breadcrumb.folder;
|
|
396
|
+
_busyTaskCount = 0;
|
|
397
|
+
_defaultRibbonActions = [];
|
|
398
|
+
lastRouteURL;
|
|
373
399
|
constructor() {
|
|
374
|
-
this.#actionsService = inject(ActionsService);
|
|
375
|
-
this.#eventService = inject(EventService);
|
|
376
|
-
this.#router = inject(Router);
|
|
377
|
-
this.#dmsService = inject(DmsService);
|
|
378
|
-
this.#searchService = inject(SearchService);
|
|
379
|
-
this.#dialog = inject(MatDialog);
|
|
380
|
-
this.#backend = inject(BackendService);
|
|
381
|
-
this.#clipboardService = inject(ClipboardService);
|
|
382
|
-
this.MAX_DEPTH = inject(DRIVE_APP_BREADCRUMB_MAX_DEPTH);
|
|
383
|
-
this.breadcrumbCache = new Map();
|
|
384
|
-
this.#eventSource = new Subject();
|
|
385
|
-
this.events$ = this.#eventSource.asObservable();
|
|
386
|
-
this.#defaultSort = {
|
|
387
|
-
property: FS_PROPERTIES.name,
|
|
388
|
-
order: 'asc'
|
|
389
|
-
};
|
|
390
|
-
this.initialState = {
|
|
391
|
-
currentFolder: null,
|
|
392
|
-
query: null,
|
|
393
|
-
queryTitle: null,
|
|
394
|
-
extendedQuery: false,
|
|
395
|
-
selection: [],
|
|
396
|
-
actions: [],
|
|
397
|
-
busy: false,
|
|
398
|
-
sort: this.#defaultSort,
|
|
399
|
-
breadcrumb: {
|
|
400
|
-
loading: false,
|
|
401
|
-
partial: false,
|
|
402
|
-
items: [],
|
|
403
|
-
folder: null
|
|
404
|
-
},
|
|
405
|
-
versions: {
|
|
406
|
-
versionsList: [],
|
|
407
|
-
selectedVersion: null
|
|
408
|
-
},
|
|
409
|
-
selectedDmsObject: null
|
|
410
|
-
};
|
|
411
|
-
this.state$ = signalState(this.initialState);
|
|
412
|
-
this.breadcrumbFolderPreview = this.state$.breadcrumb.folder;
|
|
413
|
-
this._busyTaskCount = 0;
|
|
414
|
-
this._defaultRibbonActions = [];
|
|
415
400
|
this.#router.events
|
|
416
401
|
.pipe(takeUntilDestroyed(), filter((e) => this.state$.selection().length > 0 && e instanceof NavigationStart))
|
|
417
402
|
// clear selection on route chnages
|
|
@@ -778,10 +763,10 @@ class DriveService {
|
|
|
778
763
|
clearVersions() {
|
|
779
764
|
patchState(this.state$, { versions: this.initialState.versions });
|
|
780
765
|
}
|
|
781
|
-
static
|
|
782
|
-
static
|
|
766
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DriveService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
767
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DriveService, providedIn: 'root' });
|
|
783
768
|
}
|
|
784
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DriveService, decorators: [{
|
|
785
770
|
type: Injectable,
|
|
786
771
|
args: [{
|
|
787
772
|
providedIn: 'root'
|
|
@@ -798,24 +783,18 @@ const provideDrive = (breadkrumbMaxDepth = 3) => {
|
|
|
798
783
|
};
|
|
799
784
|
|
|
800
785
|
class PasteAction extends AbstractContextAction {
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
this.range = SelectionRange.SINGLE_SELECT;
|
|
814
|
-
this.supports = {};
|
|
815
|
-
}
|
|
816
|
-
#clipboardService;
|
|
817
|
-
#drive;
|
|
818
|
-
#route;
|
|
786
|
+
translate = inject(TranslateService);
|
|
787
|
+
#clipboardService = inject(ClipboardService);
|
|
788
|
+
#drive = inject(DriveService);
|
|
789
|
+
#route = inject(ActivatedRoute);
|
|
790
|
+
id = 'app.drive.action.paste';
|
|
791
|
+
label = this.translate.instant('yuv.app.drive.action.paste.label');
|
|
792
|
+
description = this.translate.instant('yuv.app.drive.action.paste.description');
|
|
793
|
+
priority = 2;
|
|
794
|
+
icon = 'content_paste';
|
|
795
|
+
group = 'common';
|
|
796
|
+
range = SelectionRange.SINGLE_SELECT;
|
|
797
|
+
supports = {};
|
|
819
798
|
isExecutable(items) {
|
|
820
799
|
const canWrite = !!items[0]?.permissions?.writeIndexData;
|
|
821
800
|
const cd = this.#clipboardService.getClipboardData(APP_ID);
|
|
@@ -853,27 +832,21 @@ class RenameValidator {
|
|
|
853
832
|
}
|
|
854
833
|
|
|
855
834
|
class ObjectNameComponent {
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
});
|
|
872
|
-
}
|
|
873
|
-
#fb;
|
|
874
|
-
#drive;
|
|
875
|
-
#disabledEffect;
|
|
876
|
-
#itemFormEffect;
|
|
835
|
+
#fb = inject(FormBuilder);
|
|
836
|
+
#drive = inject(DriveService);
|
|
837
|
+
item = input();
|
|
838
|
+
disabled = input(false);
|
|
839
|
+
#disabledEffect = effect(() => {
|
|
840
|
+
const d = this.disabled();
|
|
841
|
+
d ? this.nameForm.get('name')?.disable() : this.nameForm.get('name')?.enable();
|
|
842
|
+
});
|
|
843
|
+
#itemFormEffect = effect(() => this.item() && this.#setupForm(this.item()?.data));
|
|
844
|
+
nameForm = this.#fb.group({
|
|
845
|
+
_initialName: [''],
|
|
846
|
+
name: ['', Validators.required]
|
|
847
|
+
}, {
|
|
848
|
+
asyncValidators: [RenameValidator.createValidator(this.#drive)]
|
|
849
|
+
});
|
|
877
850
|
#setupForm(data) {
|
|
878
851
|
this.nameForm.patchValue({
|
|
879
852
|
_initialName: data ? data[FS_PROPERTIES.name] || '' : '',
|
|
@@ -882,40 +855,34 @@ class ObjectNameComponent {
|
|
|
882
855
|
emitEvent: false
|
|
883
856
|
});
|
|
884
857
|
}
|
|
885
|
-
static
|
|
886
|
-
static
|
|
858
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ObjectNameComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
859
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ObjectNameComponent, isStandalone: true, selector: "ymd-object-name", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [formGroup]=\"nameForm\">\n <mat-form-field>\n <mat-label>{{ 'yuv.app.drive.property.name' | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n\n @if (nameForm.hasError('nameAlreadyExists')) {\n <mat-error class=\"error\">{{ 'yuv.app.drive.create.error.name.exist' | translate }}</mat-error>\n }\n @if (nameForm.hasError('invalidFileNames')) {\n <mat-error class=\"error\">{{ 'yuv.app.drive.create.error.name.invalid' | translate }}</mat-error>\n }\n</div>\n", styles: [":host mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: StringComponent, selector: "yuv-string", inputs: ["multiselect", "rows", "readonly", "autofocus", "classifications", "situation", "regex", "minLength", "maxLength"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
887
860
|
}
|
|
888
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
861
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ObjectNameComponent, decorators: [{
|
|
889
862
|
type: Component,
|
|
890
863
|
args: [{ selector: 'ymd-object-name', standalone: true, imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, StringComponent, TranslateModule], template: "<div [formGroup]=\"nameForm\">\n <mat-form-field>\n <mat-label>{{ 'yuv.app.drive.property.name' | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n\n @if (nameForm.hasError('nameAlreadyExists')) {\n <mat-error class=\"error\">{{ 'yuv.app.drive.create.error.name.exist' | translate }}</mat-error>\n }\n @if (nameForm.hasError('invalidFileNames')) {\n <mat-error class=\"error\">{{ 'yuv.app.drive.create.error.name.invalid' | translate }}</mat-error>\n }\n</div>\n", styles: [":host mat-form-field{width:100%}\n"] }]
|
|
891
864
|
}] });
|
|
892
865
|
|
|
893
866
|
const MATERIAL$1 = [MatError, MatProgressBar];
|
|
894
867
|
class RenameComponent {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
this.
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
this.disabled = signal(false);
|
|
914
|
-
}
|
|
915
|
-
#drive;
|
|
916
|
-
#dmsService;
|
|
917
|
-
#dialogData;
|
|
918
|
-
#dialogRef;
|
|
868
|
+
#drive = inject(DriveService);
|
|
869
|
+
#dmsService = inject(DmsService);
|
|
870
|
+
#dialogData = inject(MAT_DIALOG_DATA);
|
|
871
|
+
#dialogRef = inject((MatDialogRef));
|
|
872
|
+
formComp = viewChild.required(ObjectNameComponent);
|
|
873
|
+
changedValue = signal(undefined);
|
|
874
|
+
disabledSubmit = linkedSignal({
|
|
875
|
+
source: this.changedValue,
|
|
876
|
+
computation: () => {
|
|
877
|
+
const name = this.formComp().nameForm.value.name;
|
|
878
|
+
//console.log('disabledSubmit', name, this.busy(), this.disabled(), this.formComp().nameForm.invalid);
|
|
879
|
+
return !name || this.busy() || this.disabled() || this.formComp().nameForm.invalid;
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
item = signal(this.#dialogData);
|
|
883
|
+
busy = signal(false);
|
|
884
|
+
error = signal(null);
|
|
885
|
+
disabled = signal(false);
|
|
919
886
|
ngAfterViewInit() {
|
|
920
887
|
this.formComp().nameForm.valueChanges.subscribe((value) => {
|
|
921
888
|
this.changedValue.set(value.name);
|
|
@@ -940,10 +907,10 @@ class RenameComponent {
|
|
|
940
907
|
close() {
|
|
941
908
|
this.#dialogRef.close();
|
|
942
909
|
}
|
|
943
|
-
static
|
|
944
|
-
static
|
|
910
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RenameComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
911
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: RenameComponent, isStandalone: true, selector: "ymd-rename", host: { properties: { "class.busy": "busy()" } }, viewQueries: [{ propertyName: "formComp", first: true, predicate: ObjectNameComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<yuv-dialog [headertitel]=\"'yuv.app.drive.action.rename.headline' | translate\">\n <main>\n <mat-progress-bar mode=\"indeterminate\" class=\"progress-bar\"></mat-progress-bar>\n <form [formGroup]=\"formComp().nameForm\" (ngSubmit)=\"rename()\">\n <ymd-object-name [item]=\"item()\"></ymd-object-name>\n\n @if (error()) {\n <mat-error class=\"error\">{{ error() }}</mat-error>\n }\n </form>\n </main>\n\n <footer>\n <button ymtButton=\"secondary\" type=\"button\" (click)=\"close()\" [disabled]=\"busy()\">\n {{ 'yuv.app.drive.action.rename.cancel' | translate }}\n </button>\n <button ymtButton=\"primary\" type=\"button\" (click)=\"rename()\" [disabled]=\"disabledSubmit()\">\n {{ 'yuv.app.drive.action.rename.submit' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:contents}:host .progress-bar{opacity:0}:host ymd-object-name{display:block;padding:var(--ymt-spacing-m)}:host.busy .progress-bar{opacity:1}:host main .error{color:var(--ymt-text-color-subtle);background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline-variant);border-radius:.25rem;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-xs);margin-block-start:var(--ymt-spacing-xs)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ObjectNameComponent, selector: "ymd-object-name", inputs: ["item", "disabled"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: DialogComponent, selector: "yuv-dialog", inputs: ["headertitel"] }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }] });
|
|
945
912
|
}
|
|
946
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RenameComponent, decorators: [{
|
|
947
914
|
type: Component,
|
|
948
915
|
args: [{ selector: 'ymd-rename', standalone: true, imports: [CommonModule, ObjectNameComponent, ReactiveFormsModule, TranslateModule, DialogComponent, ...MATERIAL$1, YmtButtonDirective], host: {
|
|
949
916
|
'[class.busy]': 'busy()'
|
|
@@ -951,19 +918,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
951
918
|
}] });
|
|
952
919
|
|
|
953
920
|
class RenameAction {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
this.supports = {};
|
|
965
|
-
}
|
|
966
|
-
#dialog;
|
|
921
|
+
translate = inject(TranslateService$1);
|
|
922
|
+
#dialog = inject(MatDialog);
|
|
923
|
+
id = 'app.drive.action.rename';
|
|
924
|
+
label = this.translate.instant('yuv.app.drive.action.rename.label');
|
|
925
|
+
description = this.translate.instant('yuv.app.drive.action.rename.description');
|
|
926
|
+
priority = 2;
|
|
927
|
+
icon = 'ink_marker';
|
|
928
|
+
group = 'common';
|
|
929
|
+
range = SelectionRange.SINGLE_SELECT;
|
|
930
|
+
supports = {};
|
|
967
931
|
isExecutable(selection) {
|
|
968
932
|
return of(selection?.length === 1 && !!selection[0].permissions?.writeIndexData);
|
|
969
933
|
}
|
|
@@ -978,22 +942,17 @@ class RenameAction {
|
|
|
978
942
|
}
|
|
979
943
|
|
|
980
944
|
class CopyLinkAction extends AbstractContextAction {
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
this.range = SelectionRange.SINGLE_SELECT;
|
|
993
|
-
this.supports = {};
|
|
994
|
-
}
|
|
995
|
-
#notification;
|
|
996
|
-
#shell;
|
|
945
|
+
translate = inject(TranslateService$1);
|
|
946
|
+
#notification = inject(NotificationService);
|
|
947
|
+
#shell = inject(ShellService);
|
|
948
|
+
id = 'app.drive.action.copy-link';
|
|
949
|
+
label = this.translate.instant('yuv.app.drive.action.copy-link');
|
|
950
|
+
description = this.translate.instant('yuv.app.drive.action.copy-link.description');
|
|
951
|
+
priority = 2;
|
|
952
|
+
icon = 'prescriptions';
|
|
953
|
+
group = 'common';
|
|
954
|
+
range = SelectionRange.SINGLE_SELECT;
|
|
955
|
+
supports = {};
|
|
997
956
|
isExecutable(selection) {
|
|
998
957
|
return from(navigator.permissions.query({ name: 'clipboard-write' })).pipe(catchError(() => of({ state: 'denied' })), map((result) => (result.state === 'granted' || result.state === 'prompt') && selection.length === 1));
|
|
999
958
|
}
|
|
@@ -1011,26 +970,19 @@ class CopyLinkAction extends AbstractContextAction {
|
|
|
1011
970
|
}
|
|
1012
971
|
|
|
1013
972
|
class UpdateContentAction extends AbstractContextAction {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
this.range = SelectionRange.SINGLE_SELECT;
|
|
1028
|
-
this.supports = {};
|
|
1029
|
-
}
|
|
1030
|
-
#router;
|
|
1031
|
-
#drive;
|
|
1032
|
-
#document;
|
|
1033
|
-
#retention;
|
|
973
|
+
translate = inject(TranslateService$1);
|
|
974
|
+
#router = inject(Router);
|
|
975
|
+
#drive = inject(DriveService);
|
|
976
|
+
#document = inject(DOCUMENT);
|
|
977
|
+
#retention = inject(RetentionService);
|
|
978
|
+
id = 'app.drive.action.new.content.version';
|
|
979
|
+
label = this.translate.instant('yuv.app.drive.action.new.version');
|
|
980
|
+
description = this.translate.instant('yuv.app.drive.action.new.version.description');
|
|
981
|
+
priority = 2;
|
|
982
|
+
icon = 'upload_file';
|
|
983
|
+
group = 'common';
|
|
984
|
+
range = SelectionRange.SINGLE_SELECT;
|
|
985
|
+
supports = {};
|
|
1034
986
|
isExecutable(selection) {
|
|
1035
987
|
const selected = selection[0];
|
|
1036
988
|
const canWrite = !!selected?.permissions?.writeContent;
|
|
@@ -1058,25 +1010,22 @@ class UpdateContentAction extends AbstractContextAction {
|
|
|
1058
1010
|
}
|
|
1059
1011
|
|
|
1060
1012
|
class CreateFolderComponent {
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
this.
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
this.message = signal(undefined);
|
|
1078
|
-
}
|
|
1079
|
-
#dialogRef;
|
|
1013
|
+
drive = inject(DriveService);
|
|
1014
|
+
translate = inject(TranslateService);
|
|
1015
|
+
#dialogRef = inject((MatDialogRef));
|
|
1016
|
+
formComp = viewChild.required(ObjectNameComponent);
|
|
1017
|
+
changedValue = signal(undefined);
|
|
1018
|
+
disabledSubmit = linkedSignal({
|
|
1019
|
+
source: this.changedValue,
|
|
1020
|
+
computation: () => {
|
|
1021
|
+
const name = this.formComp().nameForm.value.name;
|
|
1022
|
+
return !name || this.busy() || this.disabled() || this.formComp().nameForm.invalid;
|
|
1023
|
+
}
|
|
1024
|
+
});
|
|
1025
|
+
busy = signal(false);
|
|
1026
|
+
error = signal(null);
|
|
1027
|
+
disabled = signal(false);
|
|
1028
|
+
message = signal(undefined);
|
|
1080
1029
|
ngAfterViewInit() {
|
|
1081
1030
|
this.formComp().nameForm.valueChanges.subscribe((value) => {
|
|
1082
1031
|
this.changedValue.set(value.name);
|
|
@@ -1109,10 +1058,10 @@ class CreateFolderComponent {
|
|
|
1109
1058
|
close() {
|
|
1110
1059
|
this.#dialogRef.close();
|
|
1111
1060
|
}
|
|
1112
|
-
static
|
|
1113
|
-
static
|
|
1061
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CreateFolderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1062
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: CreateFolderComponent, isStandalone: true, selector: "ymd-create-folder", host: { properties: { "class.busy": "busy()" } }, viewQueries: [{ propertyName: "formComp", first: true, predicate: ObjectNameComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<yuv-dialog [headertitel]=\"'yuv.app.drive.folder.create.headline' | translate\">\n <main>\n <mat-progress-bar mode=\"indeterminate\" class=\"progress-bar\"></mat-progress-bar>\n <form [formGroup]=\"formComp().nameForm\">\n <ymd-object-name></ymd-object-name>\n\n @if (error()) {\n <mat-error class=\"error\">{{ error() }}</mat-error>\n }\n @if (message()) {\n <mat-error class=\"message\">{{ message() }}</mat-error>\n }\n </form>\n </main>\n\n <footer>\n <button ymtButton=\"secondary\" type=\"button\" (click)=\"close()\" [disabled]=\"busy()\">\n {{ 'yuv.app.drive.action.rename.cancel' | translate }}\n </button>\n <button ymtButton=\"primary\" type=\"button\" (click)=\"createFolder()\" [disabled]=\"disabledSubmit()\">\n {{ 'yuv.app.drive.folder.create.submit' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:contents}:host .progress-bar{inset-inline-start:0;inset-inline-end:0;inset-block-start:0;opacity:0}:host ymd-object-name{display:block;padding:var(--ymt-spacing-m)}:host.busy .progress-bar{opacity:1}:host .error{color:var(--ymt-text-color-subtle);background-color:var(--ymt-surface-panel);border:1px solid var(--ymt-outline-variant);border-radius:.25rem;padding:var(--ymt-spacing-2xs) var(--ymt-spacing-xs);margin-block-start:var(--ymt-spacing-xs)}:host .message{padding:var(--ymt-spacing-m);background-color:var(--ymt-surface-panel);border-block-start:1px solid var(--ymt-outline-variant)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ObjectNameComponent, selector: "ymd-object-name", inputs: ["item", "disabled"] }, { kind: "component", type: DialogComponent, selector: "yuv-dialog", inputs: ["headertitel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }] });
|
|
1114
1063
|
}
|
|
1115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1064
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: CreateFolderComponent, decorators: [{
|
|
1116
1065
|
type: Component,
|
|
1117
1066
|
args: [{ selector: 'ymd-create-folder', standalone: true, imports: [CommonModule, ObjectNameComponent, DialogComponent, ReactiveFormsModule, TranslateModule, MatError, MatProgressBar, YmtButtonDirective], host: {
|
|
1118
1067
|
'[class.busy]': 'busy()'
|
|
@@ -1120,36 +1069,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
1120
1069
|
}] });
|
|
1121
1070
|
|
|
1122
1071
|
class AddButtonComponent {
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
this.popoverOpen = false;
|
|
1131
|
-
this.disabled = input(false);
|
|
1132
|
-
this.icons = {
|
|
1133
|
-
folder: APP_DRIVE_ICONS.createFolder,
|
|
1134
|
-
file: APP_DRIVE_ICONS.createFile
|
|
1135
|
-
};
|
|
1136
|
-
this.defaultItems = [
|
|
1137
|
-
{ icon: this.icons.folder, label: this.translate.instant('yuv.app.drive.create.folder') },
|
|
1138
|
-
{ icon: this.icons.file, label: this.translate.instant('yuv.app.drive.create.file') }
|
|
1139
|
-
];
|
|
1140
|
-
this.flavorListItems = this.#shell.getObjectCreateFlavors().filter(flavor => {
|
|
1141
|
-
const createSOTPermissions = this.#user.userPermissions?.create.secondaryObjectTypes;
|
|
1142
|
-
return !createSOTPermissions || !!(!flavor.sot || flavor.sot && createSOTPermissions?.includes(flavor.sot));
|
|
1143
|
-
}).map((flavor) => ({
|
|
1144
|
-
label: this.translate.instant(flavor.id),
|
|
1145
|
-
flavor
|
|
1146
|
-
}));
|
|
1147
|
-
}
|
|
1148
|
-
#drive;
|
|
1149
|
-
#shell;
|
|
1150
|
-
#dialog;
|
|
1151
|
-
#user;
|
|
1072
|
+
#drive = inject(DriveService);
|
|
1073
|
+
#shell = inject(ShellService);
|
|
1074
|
+
#dialog = inject(MatDialog);
|
|
1075
|
+
translate = inject(TranslateService);
|
|
1076
|
+
fileInput = viewChild.required('fileInput');
|
|
1077
|
+
popoverOpen = false;
|
|
1078
|
+
disabled = input(false);
|
|
1152
1079
|
#uploadTargetFlavor;
|
|
1080
|
+
icons = {
|
|
1081
|
+
folder: APP_DRIVE_ICONS.createFolder,
|
|
1082
|
+
file: APP_DRIVE_ICONS.createFile
|
|
1083
|
+
};
|
|
1084
|
+
defaultItems = [
|
|
1085
|
+
{ icon: this.icons.folder, label: this.translate.instant('yuv.app.drive.create.folder') },
|
|
1086
|
+
{ icon: this.icons.file, label: this.translate.instant('yuv.app.drive.create.file') }
|
|
1087
|
+
];
|
|
1088
|
+
flavorListItems = this.#shell.getObjectCreateFlavors().map((flavor) => ({
|
|
1089
|
+
label: this.translate.instant(flavor.id),
|
|
1090
|
+
flavor
|
|
1091
|
+
}));
|
|
1153
1092
|
onSelect(idx, isCreateFlavor = false) {
|
|
1154
1093
|
if (isCreateFlavor) {
|
|
1155
1094
|
this.startCreateDocument();
|
|
@@ -1211,10 +1150,10 @@ class AddButtonComponent {
|
|
|
1211
1150
|
.add(() => this.#drive.setBusy(false));
|
|
1212
1151
|
}
|
|
1213
1152
|
}
|
|
1214
|
-
static
|
|
1215
|
-
static
|
|
1153
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AddButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1154
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: AddButtonComponent, isStandalone: true, selector: "ymd-add-button", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.popover": "this.popoverOpen" } }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: "<button mat-mini-fab [attr.aria-label]=\"'yuv.app.drive.create.label' | translate\" class=\"toggle primary\" [disabled]=\"disabled()\" [matMenuTriggerFor]=\"menu\">\n <mat-icon>add</mat-icon>\n</button>\n\n<mat-menu #menu=\"matMenu\" class=\"add-button-menu\">\n @for (i of defaultItems; track $index) {\n <button mat-menu-item (click)=\"onSelect($index)\">\n <mat-icon>{{i.icon}}</mat-icon>\n {{ i.label }}\n </button>\n }\n <!-- Upload file with flavor -->\n @for (f of flavorListItems; track f.flavor.id) {\n <button mat-menu-item class=\"flavor\" (click)=\"onSelect($index, true)\">\n <mat-icon>{{f.flavor.icon}}</mat-icon>\n {{ f.label }}\n </button>\n }\n</mat-menu>\n\n<input style=\"display: none\" multiple=\"true\" #fileInput type=\"file\" (change)=\"createDocument(fileInput)\" />\n", styles: [".add-button-menu{border:1px solid var(--ymt-primary-container)}.add-button-menu{--mat-menu-container-color: var(--ymt-primary-container)}.add-button-menu{--mat-menu-item-hover-state-layer-color: color-mix(in srgb, var(--ymt-primary) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1216
1155
|
}
|
|
1217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AddButtonComponent, decorators: [{
|
|
1218
1157
|
type: Component,
|
|
1219
1158
|
args: [{ selector: 'ymd-add-button', standalone: true, imports: [CommonModule, TranslateModule, MatMenuModule, MatButtonModule, MatIconModule], encapsulation: ViewEncapsulation.None, template: "<button mat-mini-fab [attr.aria-label]=\"'yuv.app.drive.create.label' | translate\" class=\"toggle primary\" [disabled]=\"disabled()\" [matMenuTriggerFor]=\"menu\">\n <mat-icon>add</mat-icon>\n</button>\n\n<mat-menu #menu=\"matMenu\" class=\"add-button-menu\">\n @for (i of defaultItems; track $index) {\n <button mat-menu-item (click)=\"onSelect($index)\">\n <mat-icon>{{i.icon}}</mat-icon>\n {{ i.label }}\n </button>\n }\n <!-- Upload file with flavor -->\n @for (f of flavorListItems; track f.flavor.id) {\n <button mat-menu-item class=\"flavor\" (click)=\"onSelect($index, true)\">\n <mat-icon>{{f.flavor.icon}}</mat-icon>\n {{ f.label }}\n </button>\n }\n</mat-menu>\n\n<input style=\"display: none\" multiple=\"true\" #fileInput type=\"file\" (change)=\"createDocument(fileInput)\" />\n", styles: [".add-button-menu{border:1px solid var(--ymt-primary-container)}.add-button-menu{--mat-menu-container-color: var(--ymt-primary-container)}.add-button-menu{--mat-menu-item-hover-state-layer-color: color-mix(in srgb, var(--ymt-primary) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent)}\n"] }]
|
|
1220
1159
|
}], propDecorators: { popoverOpen: [{
|
|
@@ -1223,24 +1162,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
1223
1162
|
}] } });
|
|
1224
1163
|
|
|
1225
1164
|
class BreadcrumbComponent {
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
this.route = inject(ActivatedRoute);
|
|
1231
|
-
this.homeIcon = APP_DRIVE_ICONS.home;
|
|
1232
|
-
this.breadcrumb = this.#drive.state$.breadcrumb;
|
|
1233
|
-
this.items = viewChildren(ListItemDirective);
|
|
1234
|
-
this.#itemsEffect = effect(() => {
|
|
1235
|
-
const i = this.items();
|
|
1236
|
-
if (this.#keyManager)
|
|
1237
|
-
this.#keyManager.destroy();
|
|
1238
|
-
this.#keyManager = new ActiveDescendantKeyManager(i).withWrap().withHorizontalOrientation(this.#dir.value);
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
|
-
#drive;
|
|
1242
|
-
#router;
|
|
1243
|
-
#dir;
|
|
1165
|
+
#drive = inject(DriveService);
|
|
1166
|
+
#router = inject(Router);
|
|
1167
|
+
#dir = inject(Directionality);
|
|
1168
|
+
route = inject(ActivatedRoute);
|
|
1244
1169
|
onBlur() {
|
|
1245
1170
|
this.#keyManager.setActiveItem(-1);
|
|
1246
1171
|
}
|
|
@@ -1255,7 +1180,15 @@ class BreadcrumbComponent {
|
|
|
1255
1180
|
this.#keyManager?.onKeydown(event);
|
|
1256
1181
|
}
|
|
1257
1182
|
#keyManager;
|
|
1258
|
-
|
|
1183
|
+
homeIcon = APP_DRIVE_ICONS.home;
|
|
1184
|
+
breadcrumb = this.#drive.state$.breadcrumb;
|
|
1185
|
+
items = viewChildren(ListItemDirective);
|
|
1186
|
+
#itemsEffect = effect(() => {
|
|
1187
|
+
const i = this.items();
|
|
1188
|
+
if (this.#keyManager)
|
|
1189
|
+
this.#keyManager.destroy();
|
|
1190
|
+
this.#keyManager = new ActiveDescendantKeyManager(i).withWrap().withHorizontalOrientation(this.#dir.value);
|
|
1191
|
+
});
|
|
1259
1192
|
navigation(id, event) {
|
|
1260
1193
|
event && event.preventDefault();
|
|
1261
1194
|
const nav = ['..'];
|
|
@@ -1265,10 +1198,10 @@ class BreadcrumbComponent {
|
|
|
1265
1198
|
ngOnDestroy() {
|
|
1266
1199
|
this.#keyManager?.destroy();
|
|
1267
1200
|
}
|
|
1268
|
-
static
|
|
1269
|
-
static
|
|
1201
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1202
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: BreadcrumbComponent, isStandalone: true, selector: "ymd-breadcrumb", host: { listeners: { "blur": "onBlur()", "keydown": "onKeydown($event)" }, classAttribute: "breadcrumb" }, viewQueries: [{ propertyName: "items", predicate: ListItemDirective, descendants: true, isSignal: true }], ngImport: i0, template: "@let bread = breadcrumb();\n\n<nav class=\"breadcrumb\" aria-label=\"breadcrumb\">\n <ol class=\"breadcrumb__list\">\n @if (bread.items.length) {\n <li class=\"breadcrumb__list-item breadcrumb__list-item--root\">\n <a class=\"breadcrumb__list-item-anchor breadcrumb__list-item-anchor--root\" mat-icon-button disableRipple tabindex=\"-1\" yuvListItem draggable=\"false\" href=\"\" (click)=\"navigation('root', $event)\">\n <mat-icon [attr.aria-label]=\"'yuv.app.drive.folder-tree.mydrive' | translate\">{{ homeIcon }}</mat-icon>\n </a>\n </li>\n\n\n\n <li class=\"breadcrumb__list-item breadcrumb__list-item--last\" yuvDragScroll>\n @if (bread.partial) {\n <div class=\"partial\" aria-hidden=\"true\"></div>\n }\n\n <ol class=\"breadcrumb__list\">\n @for (crumb of bread.items; track $index) {\n @if (!$last) {\n <li class=\"breadcrumb__list-item\">\n <a class=\"breadcrumb__list-item-anchor\" tabindex=\"-1\" yuvListItem draggable=\"false\" href=\"\" (click)=\"navigation(crumb.id, $event)\">\n {{ crumb.name }}\n </a>\n </li>\n } @else {\n <li class=\"breadcrumb__list-item breadcrumb__list-item--current\" aria-current=\"location\">{{ crumb.name }}</li>\n }\n }\n </ol>\n </li>\n } @else {\n <li class=\"breadcrumb__list-item breadcrumb__list-item--current breadcrumb__list-item--root\" aria-current=\"location\">\n <button mat-icon-button disabled class=\"breadcrumb__list-item-anchor breadcrumb__list-item-anchor--root\">\n <mat-icon>{{ homeIcon }}</mat-icon>\n </button>\n </li>\n }\n </ol>\n</nav>\n", styles: [":host{font:var(--ymt-font-body-subtle);color:var(--ymt-on-surface)}.breadcrumb{overflow:hidden;display:flex;align-items:center}.breadcrumb__list{list-style:none;margin:0;padding:0;align-items:center;display:flex;flex-wrap:nowrap}.breadcrumb__list-item{align-items:center;display:flex;white-space:nowrap}.breadcrumb__list-item:after{content:\"chevron_right\";font-family:Material Symbols Sharp,serif;font-weight:400;font-style:normal;font-size:20px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:\"liga\";-webkit-font-smoothing:antialiased}.breadcrumb__list-item--current:after,.breadcrumb__list-item--last:after{content:none}.breadcrumb__list-item--current:not(.breadcrumb__list-item--root){padding:var(--ymt-spacing-2xs)}.breadcrumb__list-item-anchor:not(.breadcrumb__list-item-anchor--root){padding:var(--ymt-spacing-2xs)}.breadcrumb__list-item-anchor:not(.breadcrumb__list-item-anchor--root):hover:before{content:\"\";inset:0;position:absolute;pointer-events:none;border-radius:inherit;background-color:var(--ymt-on-surface);opacity:var(--ymt-hover-state-layer-opacity)}.breadcrumb__list-item-anchor:not(.breadcrumb__list-item-anchor--root)[aria-current=true]{outline-offset:var(--ymt-focus-indicator-size);outline:var(--ymt-focus-indicator-outer) solid var(--ymt-focus-indicator-size);box-shadow:0 0 0 var(--ymt-focus-indicator-size) var(--ymt-focus-indicator-inner)}.breadcrumb__list-item-anchor{white-space:nowrap;border-radius:var(--ymt-corner-extra-small);text-decoration:none;position:relative;margin:calc(var(--ymt-focus-indicator-size) * 2)}.breadcrumb__list-item-anchor:not(:disabled){color:var(--ymt-on-surface)}nav>.breadcrumb__list{overflow:hidden}nav>.breadcrumb__list li[ymtDragScroll]{overflow-x:auto;--ymt-scrollbar-outer-size: 0px;--ymt-scrollbar-inner-size: 0px}.partial:after{content:\"...\";display:block;padding:var(--ymt-spacing-2xs)}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: YuvListModule }, { kind: "directive", type: i5.ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: YuvCommonModule }, { kind: "directive", type: i3$1.DragScrollDirective, selector: "[yuvDragScroll]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1270
1203
|
}
|
|
1271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
1272
1205
|
type: Component,
|
|
1273
1206
|
args: [{ selector: 'ymd-breadcrumb', standalone: true, imports: [TranslateModule, YuvListModule, MatIcon, MatIconAnchor, MatIconButton, YuvCommonModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1274
1207
|
class: 'breadcrumb'
|
|
@@ -1306,52 +1239,45 @@ const STORED_QUERIES = {
|
|
|
1306
1239
|
};
|
|
1307
1240
|
|
|
1308
1241
|
class FolderTreeComponent {
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
this.currentPage = this.dataSource[0].id;
|
|
1343
|
-
this.childrenAccessor = (node) => node.children ?? [];
|
|
1344
|
-
this.hasChild = (_, node) => !!node.children && node.children.length > 0;
|
|
1345
|
-
}
|
|
1346
|
-
#translate;
|
|
1347
|
-
#router;
|
|
1348
|
-
#route;
|
|
1349
|
-
#shell;
|
|
1350
|
-
#app;
|
|
1242
|
+
#translate = inject(TranslateService);
|
|
1243
|
+
#router = inject(Router);
|
|
1244
|
+
#route = inject(ActivatedRoute);
|
|
1245
|
+
#shell = inject(ShellService);
|
|
1246
|
+
tree = viewChild('tree');
|
|
1247
|
+
treeNodePaddingIndent = 40;
|
|
1248
|
+
#app = this.#shell.getApp(APP_ID);
|
|
1249
|
+
dataSource = [
|
|
1250
|
+
{
|
|
1251
|
+
id: 'mydrive',
|
|
1252
|
+
name: this.#translate.instant('yuv.app.drive.folder-tree.mydrive'),
|
|
1253
|
+
icon: this.#app?.iconName,
|
|
1254
|
+
children: [
|
|
1255
|
+
// {
|
|
1256
|
+
// id: 'ymsq.ymd.recent.added',
|
|
1257
|
+
// name: this.translate.instant('ymsq.ymd.recent.added')
|
|
1258
|
+
// },
|
|
1259
|
+
{
|
|
1260
|
+
id: 'ymsq.ymd.recent.added.by.me',
|
|
1261
|
+
name: this.#translate.instant('ymsq.ymd.recent.added.by.me')
|
|
1262
|
+
},
|
|
1263
|
+
// {
|
|
1264
|
+
// id: 'ymsq.ymd.recent.modified',
|
|
1265
|
+
// name: this.translate.instant('ymsq.ymd.recent.modified')
|
|
1266
|
+
// },
|
|
1267
|
+
{
|
|
1268
|
+
id: 'ymsq.ymd.recent.modified.by.me',
|
|
1269
|
+
name: this.#translate.instant('ymsq.ymd.recent.modified.by.me')
|
|
1270
|
+
}
|
|
1271
|
+
]
|
|
1272
|
+
}
|
|
1273
|
+
];
|
|
1274
|
+
currentPage = this.dataSource[0].id;
|
|
1351
1275
|
ngAfterViewInit() {
|
|
1352
1276
|
const nodeToExpand = this.dataSource.find(({ id }) => id === 'mydrive');
|
|
1353
1277
|
nodeToExpand && this.tree()?.expandDescendants(nodeToExpand);
|
|
1354
1278
|
}
|
|
1279
|
+
childrenAccessor = (node) => node.children ?? [];
|
|
1280
|
+
hasChild = (_, node) => !!node.children && node.children.length > 0;
|
|
1355
1281
|
routeChange(node) {
|
|
1356
1282
|
/*
|
|
1357
1283
|
* Note: This implementation listens only to click/keydown events on the items in the tree itself. If you trigger route change
|
|
@@ -1397,27 +1323,25 @@ class FolderTreeComponent {
|
|
|
1397
1323
|
}
|
|
1398
1324
|
}
|
|
1399
1325
|
}
|
|
1400
|
-
static
|
|
1401
|
-
static
|
|
1326
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FolderTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1327
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.15", type: FolderTreeComponent, isStandalone: true, selector: "ymd-folder-tree", viewQueries: [{ propertyName: "tree", first: true, predicate: ["tree"], descendants: true, isSignal: true }], ngImport: i0, template: "<nav aria-label=\"Navigation\">\n <mat-tree class=\"folder-tree\" #tree [dataSource]=\"dataSource\" [childrenAccessor]=\"childrenAccessor\">\n <mat-tree-node\n class=\"folder-tree__node\"\n *matTreeNodeDef=\"let node\"\n matTreeNodePadding\n [matTreeNodePaddingIndent]=\"treeNodePaddingIndent\"\n [isExpandable]=\"false\"\n [attr.aria-current]=\"currentPage === node.id ? 'page' : null\"\n [attr.aria-label]=\"'Go to page: ' + node.name\"\n (click)=\"routeChange(node)\"\n (keydown.enter)=\"routeChange(node)\"\n (keydown.space)=\"routeChange(node)\"\n >\n <div class=\"folder-tree__item-icon\" *ngIf=\"node.icon\">\n <mat-icon class=\"ymt-icon--size-s\">{{ node.icon }}</mat-icon>\n </div>\n <span class=\"folder-tree__item\">{{ node.name }}</span>\n </mat-tree-node>\n\n <mat-tree-node\n class=\"folder-tree__node\"\n *matTreeNodeDef=\"let node; when: hasChild\"\n matTreeNodeToggle\n matTreeNodePadding\n [matTreeNodePaddingIndent]=\"treeNodePaddingIndent\"\n [isExpandable]=\"true\"\n [isExpanded]=\"tree.isExpanded(node)\"\n [attr.aria-current]=\"currentPage === node.id ? 'page' : null\"\n [attr.aria-label]=\"'Toggle and Go to page: ' + node.name\"\n (activation)=\"routeChange($event)\"\n >\n <button ymt-icon-button icon-button-size=\"small\" tabindex=\"-1\">\n <mat-icon class=\"ymt-icon--size-s\">\n {{ tree.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div class=\"folder-tree__item-icon\" *ngIf=\"node.icon\">\n <mat-icon class=\"ymt-icon--size-s\">{{ node.icon }}</mat-icon>\n </div>\n <a class=\"folder-tree__item\" tabindex=\"-1\" (click)=\"routeChange(node); $event.stopPropagation()\">{{ node.name }}</a>\n </mat-tree-node>\n </mat-tree>\n</nav>\n", styles: [".folder-tree__item-icon{width:var(--ymt-sizing-l);aspect-ratio:1/1;display:flex;align-items:center;justify-content:center}.folder-tree__item{all:unset;cursor:pointer;flex:1;align-self:stretch;display:flex;align-items:center}.folder-tree__node{cursor:pointer;transition:color .2s ease-in-out;gap:var(--ymt-spacing-s);margin-block-end:var(--ymt-spacing-2xs)}.folder-tree__node:hover{color:var(--ymt-primary)}.folder-tree__node:focus-visible{outline-offset:var(--ymt-focus-indicator-size);outline:var(--ymt-focus-indicator-outer) solid var(--ymt-focus-indicator-size);box-shadow:0 0 0 var(--ymt-focus-indicator-size) var(--ymt-focus-indicator-inner)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i2$3.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i2$3.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i2$3.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i2$3.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i2$3.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: YmtIconButtonDirective, selector: "button[ymtIconButton],button[ymt-icon-button],a[ymtIconButton],a[ymt-icon-button]", inputs: ["disabled", "disableRipple", "aria-disabled", "disabledInteractive", "icon-button-size"] }] });
|
|
1402
1328
|
}
|
|
1403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FolderTreeComponent, decorators: [{
|
|
1404
1330
|
type: Component,
|
|
1405
1331
|
args: [{ selector: 'ymd-folder-tree', standalone: true, imports: [CommonModule, RouterModule, TranslateModule, MatTreeModule, MatIcon, YmtIconButtonDirective], template: "<nav aria-label=\"Navigation\">\n <mat-tree class=\"folder-tree\" #tree [dataSource]=\"dataSource\" [childrenAccessor]=\"childrenAccessor\">\n <mat-tree-node\n class=\"folder-tree__node\"\n *matTreeNodeDef=\"let node\"\n matTreeNodePadding\n [matTreeNodePaddingIndent]=\"treeNodePaddingIndent\"\n [isExpandable]=\"false\"\n [attr.aria-current]=\"currentPage === node.id ? 'page' : null\"\n [attr.aria-label]=\"'Go to page: ' + node.name\"\n (click)=\"routeChange(node)\"\n (keydown.enter)=\"routeChange(node)\"\n (keydown.space)=\"routeChange(node)\"\n >\n <div class=\"folder-tree__item-icon\" *ngIf=\"node.icon\">\n <mat-icon class=\"ymt-icon--size-s\">{{ node.icon }}</mat-icon>\n </div>\n <span class=\"folder-tree__item\">{{ node.name }}</span>\n </mat-tree-node>\n\n <mat-tree-node\n class=\"folder-tree__node\"\n *matTreeNodeDef=\"let node; when: hasChild\"\n matTreeNodeToggle\n matTreeNodePadding\n [matTreeNodePaddingIndent]=\"treeNodePaddingIndent\"\n [isExpandable]=\"true\"\n [isExpanded]=\"tree.isExpanded(node)\"\n [attr.aria-current]=\"currentPage === node.id ? 'page' : null\"\n [attr.aria-label]=\"'Toggle and Go to page: ' + node.name\"\n (activation)=\"routeChange($event)\"\n >\n <button ymt-icon-button icon-button-size=\"small\" tabindex=\"-1\">\n <mat-icon class=\"ymt-icon--size-s\">\n {{ tree.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div class=\"folder-tree__item-icon\" *ngIf=\"node.icon\">\n <mat-icon class=\"ymt-icon--size-s\">{{ node.icon }}</mat-icon>\n </div>\n <a class=\"folder-tree__item\" tabindex=\"-1\" (click)=\"routeChange(node); $event.stopPropagation()\">{{ node.name }}</a>\n </mat-tree-node>\n </mat-tree>\n</nav>\n", styles: [".folder-tree__item-icon{width:var(--ymt-sizing-l);aspect-ratio:1/1;display:flex;align-items:center;justify-content:center}.folder-tree__item{all:unset;cursor:pointer;flex:1;align-self:stretch;display:flex;align-items:center}.folder-tree__node{cursor:pointer;transition:color .2s ease-in-out;gap:var(--ymt-spacing-s);margin-block-end:var(--ymt-spacing-2xs)}.folder-tree__node:hover{color:var(--ymt-primary)}.folder-tree__node:focus-visible{outline-offset:var(--ymt-focus-indicator-size);outline:var(--ymt-focus-indicator-outer) solid var(--ymt-focus-indicator-size);box-shadow:0 0 0 var(--ymt-focus-indicator-size) var(--ymt-focus-indicator-inner)}\n"] }]
|
|
1406
1332
|
}] });
|
|
1407
1333
|
|
|
1408
1334
|
class VersionTileComponent {
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
this.
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
}
|
|
1419
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.12", ngImport: i0, type: VersionTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1420
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.12", type: VersionTileComponent, isStandalone: true, selector: "ymd-version-tile", inputs: { tile: { classPropertyName: "tile", publicName: "tile", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedVersion: "selectedVersion" }, ngImport: i0, template: `
|
|
1335
|
+
tile = input.required();
|
|
1336
|
+
rendererInputs = computed(() => ({
|
|
1337
|
+
icon: this.tile().icon,
|
|
1338
|
+
version: this.tile().instanceData?.[BaseObjectTypeField.VERSION_NUMBER],
|
|
1339
|
+
date: this.tile().instanceData?.[BaseObjectTypeField.MODIFICATION_DATE],
|
|
1340
|
+
modified: this.tile().instanceData?.[BaseObjectTypeField.MODIFIED_BY + '_title']
|
|
1341
|
+
}));
|
|
1342
|
+
selectedVersion = output();
|
|
1343
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: VersionTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1344
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: VersionTileComponent, isStandalone: true, selector: "ymd-version-tile", inputs: { tile: { classPropertyName: "tile", publicName: "tile", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedVersion: "selectedVersion" }, ngImport: i0, template: `
|
|
1421
1345
|
<div
|
|
1422
1346
|
class="slots"
|
|
1423
1347
|
title="{{
|
|
@@ -1435,9 +1359,9 @@ class VersionTileComponent {
|
|
|
1435
1359
|
{{ rendererInputs().modified }}
|
|
1436
1360
|
</div>
|
|
1437
1361
|
</div>
|
|
1438
|
-
`, isInline: true, styles: [":host{--_tile-background: var(--tile-background, transparent);--_tile-icon-fill: var(--tile-icon-fill, currentColor);--_tile-padding: var(--tile-padding, var(--ymt-spacing-m));--_tile-action-icon-size: var(--tile-action-icon-size);--_tile-icon-size: var(--tile-icon-size);--_transition-duration: var(--transition-duration, .1s);display:flex;align-items:center;background-color:var(--_tile-background);padding:var(--_tile-padding);transition:background-color var(--_transition-duration)}:host .slots{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:repeat(2,1fr);grid-template-areas:\"version version\" \"date modified\";flex:1;gap:calc(var(--_tile-padding) / 2) calc(var(--_tile-padding) * 2)}:host [data-slot]{align-items:center;-webkit-user-select:none;user-select:none;display:grid}:host [data-slot=icon]{--icon-renderer-icon-size: var(--_tile-icon-size);color:var(--_tile-icon-fill);width:0;grid-area:icon;display:grid;align-items:center;justify-content:center}:host [data-slot=version]{font-weight:700;grid-area:version}:host [data-slot=date]{grid-area:date}:host [data-slot=modified]{grid-area:modified;white-space:nowrap;justify-self:end}\n"], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
1362
|
+
`, isInline: true, styles: [":host{--_tile-background: var(--tile-background, transparent);--_tile-icon-fill: var(--tile-icon-fill, currentColor);--_tile-padding: var(--tile-padding, var(--ymt-spacing-m));--_tile-action-icon-size: var(--tile-action-icon-size);--_tile-icon-size: var(--tile-icon-size);--_transition-duration: var(--transition-duration, .1s);display:flex;align-items:center;background-color:var(--_tile-background);padding:var(--_tile-padding);transition:background-color var(--_transition-duration)}:host .slots{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:repeat(2,1fr);grid-template-areas:\"version version\" \"date modified\";flex:1;gap:calc(var(--_tile-padding) / 2) calc(var(--_tile-padding) * 2)}:host [data-slot]{align-items:center;-webkit-user-select:none;user-select:none;display:grid}:host [data-slot=icon]{--icon-renderer-icon-size: var(--_tile-icon-size);color:var(--_tile-icon-fill);width:0;grid-area:icon;display:grid;align-items:center;justify-content:center}:host [data-slot=version]{font-weight:700;grid-area:version}:host [data-slot=date]{grid-area:date}:host [data-slot=modified]{grid-area:modified;white-space:nowrap;justify-self:end}\n"], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
1439
1363
|
}
|
|
1440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: VersionTileComponent, decorators: [{
|
|
1441
1365
|
type: Component,
|
|
1442
1366
|
args: [{ selector: 'ymd-version-tile', standalone: true, imports: [DatePipe, TranslateModule], template: `
|
|
1443
1367
|
<div
|
|
@@ -1461,20 +1385,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
1461
1385
|
}] });
|
|
1462
1386
|
|
|
1463
1387
|
class VersionsListComponent {
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
this.selection = computed(() => (this.selectedVersion() || []).map((v) => v.version));
|
|
1469
|
-
this.listItems = viewChildren(ListItemDirective);
|
|
1470
|
-
this.#itemsEffect = effect(() => {
|
|
1471
|
-
const items = this.listItems();
|
|
1472
|
-
if (this.#keyManager)
|
|
1473
|
-
this.#keyManager.destroy();
|
|
1474
|
-
this.#keyManager = new ActiveDescendantKeyManager(items).withWrap();
|
|
1475
|
-
});
|
|
1476
|
-
}
|
|
1477
|
-
#drive;
|
|
1388
|
+
#drive = inject(DriveService);
|
|
1389
|
+
versionsList = this.#drive.state$.versions.versionsList;
|
|
1390
|
+
selectedVersion = this.#drive.state$.versions.selectedVersion;
|
|
1391
|
+
selection = computed(() => (this.selectedVersion() || []).map((v) => v.version));
|
|
1478
1392
|
onBlur() {
|
|
1479
1393
|
this.#keyManager.setActiveItem(-1);
|
|
1480
1394
|
}
|
|
@@ -1490,7 +1404,13 @@ class VersionsListComponent {
|
|
|
1490
1404
|
this.#keyManager?.onKeydown(event);
|
|
1491
1405
|
}
|
|
1492
1406
|
#keyManager;
|
|
1493
|
-
|
|
1407
|
+
listItems = viewChildren(ListItemDirective);
|
|
1408
|
+
#itemsEffect = effect(() => {
|
|
1409
|
+
const items = this.listItems();
|
|
1410
|
+
if (this.#keyManager)
|
|
1411
|
+
this.#keyManager.destroy();
|
|
1412
|
+
this.#keyManager = new ActiveDescendantKeyManager(items).withWrap();
|
|
1413
|
+
});
|
|
1494
1414
|
selectedVersionAction(event) {
|
|
1495
1415
|
this.#drive.setBusy(true);
|
|
1496
1416
|
this.#drive
|
|
@@ -1504,8 +1424,8 @@ class VersionsListComponent {
|
|
|
1504
1424
|
setSelectedVersion(version) {
|
|
1505
1425
|
this.#drive.setSelectedVersion(version).subscribe();
|
|
1506
1426
|
}
|
|
1507
|
-
static
|
|
1508
|
-
static
|
|
1427
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: VersionsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1428
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: VersionsListComponent, isStandalone: true, selector: "ymd-versions-list", host: { attributes: { "tabindex": "0", "role": "listbox" }, listeners: { "blur": "onBlur()", "keydown": "onKeydown($event)" } }, viewQueries: [{ propertyName: "listItems", predicate: ListItemDirective, descendants: true, isSignal: true }], ngImport: i0, template: ` @let versions = versionsList();
|
|
1509
1429
|
@if (versions) {
|
|
1510
1430
|
@for (version of versions; track $index) {
|
|
1511
1431
|
<ymd-version-tile
|
|
@@ -1517,9 +1437,9 @@ class VersionsListComponent {
|
|
|
1517
1437
|
(selectedVersion)="selectedVersionAction($event)"
|
|
1518
1438
|
></ymd-version-tile>
|
|
1519
1439
|
}
|
|
1520
|
-
}`, isInline: true, styles: [":host{--_tile-hover-background: var(--tile-hover-background, var(--ymt-hover-background));--_tile-selected-background: var(--tile-selected-background, var(--ymt-selection-background));--_tile-selected-icon-fill: var(--tile-selected-icon-fill, var(--ymt-primary))}:host ymd-version-tile{cursor:pointer;background-color:var(--tile-background)}:host ymd-version-tile:not(.last){border:var(--tile-border);border-width:var(--tile-border-width);margin-block-end:var(--tile-gap)}:host ymd-version-tile:hover,:host ymd-version-tile[aria-current=true]{--tile-background: var(--_tile-hover-background)}:host ymd-version-tile[aria-selected=true]{--tile-background: var(--_tile-selected-background);--tile-icon-fill: var(--_tile-selected-icon-fill)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: VersionTileComponent, selector: "ymd-version-tile", inputs: ["tile"], outputs: ["selectedVersion"] }, { kind: "directive", type: ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "directive", type: ClickDoubleDirective, selector: "[click.single],[click.double]", inputs: ["debounceTime"], outputs: ["click.double", "click.single"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1440
|
+
}`, isInline: true, styles: [":host{--_tile-hover-background: var(--tile-hover-background, var(--ymt-hover-background));--_tile-selected-background: var(--tile-selected-background, var(--ymt-selection-background));--_tile-selected-icon-fill: var(--tile-selected-icon-fill, var(--ymt-primary))}:host ymd-version-tile{cursor:pointer;background-color:var(--tile-background)}:host ymd-version-tile:not(.last){border:var(--tile-border);border-width:var(--tile-border-width);margin-block-end:var(--tile-gap)}:host ymd-version-tile:hover,:host ymd-version-tile[aria-current=true]{--tile-background: var(--_tile-hover-background)}:host ymd-version-tile[aria-selected=true]{--tile-background: var(--_tile-selected-background);--tile-icon-fill: var(--_tile-selected-icon-fill)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: VersionTileComponent, selector: "ymd-version-tile", inputs: ["tile"], outputs: ["selectedVersion"] }, { kind: "directive", type: ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "directive", type: ClickDoubleDirective, selector: "[click.single],[click.double]", inputs: ["debounceTime"], outputs: ["click.double", "click.single"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1521
1441
|
}
|
|
1522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: VersionsListComponent, decorators: [{
|
|
1523
1443
|
type: Component,
|
|
1524
1444
|
args: [{ selector: 'ymd-versions-list', standalone: true, imports: [CommonModule, VersionTileComponent, ListItemDirective, ClickDoubleDirective], template: ` @let versions = versionsList();
|
|
1525
1445
|
@if (versions) {
|
|
@@ -1546,63 +1466,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
1546
1466
|
}] } });
|
|
1547
1467
|
|
|
1548
1468
|
class DriveSearchOverlayComponent {
|
|
1549
|
-
|
|
1550
|
-
#
|
|
1551
|
-
#
|
|
1552
|
-
#
|
|
1553
|
-
#
|
|
1554
|
-
#
|
|
1555
|
-
#
|
|
1556
|
-
#
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
this.flavorFormOptions = signal({});
|
|
1580
|
-
this.flavorForms = computed(() => {
|
|
1581
|
-
const ffo = this.flavorFormOptions() || {};
|
|
1582
|
-
return Object.keys(ffo).map((k) => ({
|
|
1583
|
-
id: k,
|
|
1584
|
-
icon: this.selectedFlavorsRec[k]?.icon,
|
|
1585
|
-
svgIcon: this.selectedFlavorsRec[k]?.svgIcon,
|
|
1586
|
-
label: this.#shell.getFlavorLabel(k),
|
|
1587
|
-
formOptions: ffo[k]
|
|
1588
|
-
}));
|
|
1589
|
-
});
|
|
1590
|
-
this.scopeOptions = signal([]);
|
|
1591
|
-
this.filterForm = this.#fb.nonNullable.group({
|
|
1592
|
-
term: [this.#dialogData.term || ''],
|
|
1593
|
-
scope: [this.ANY_OPTION],
|
|
1594
|
-
modified: [],
|
|
1595
|
-
created: [],
|
|
1596
|
-
contentlength: []
|
|
1597
|
-
});
|
|
1598
|
-
this.searchTokens = [];
|
|
1599
|
-
this.flavors = this.#shell.getObjectFlavors().map((f) => ({
|
|
1600
|
-
...f,
|
|
1601
|
-
label: this.#shell.getFlavorLabel(f.id)
|
|
1469
|
+
translate = inject(TranslateService$1);
|
|
1470
|
+
#fb = inject(FormBuilder);
|
|
1471
|
+
#dialogData = inject(MAT_DIALOG_DATA);
|
|
1472
|
+
#dialogRef = inject((MatDialogRef));
|
|
1473
|
+
#shell = inject(ShellService);
|
|
1474
|
+
#system = inject(SystemService);
|
|
1475
|
+
#drive = inject(DriveService);
|
|
1476
|
+
#search = inject(SearchService);
|
|
1477
|
+
close$ = new Subject();
|
|
1478
|
+
objectForms = viewChildren(ObjectFormComponent);
|
|
1479
|
+
ANY_OPTION = 'any';
|
|
1480
|
+
#query = this.#drive.state$.query;
|
|
1481
|
+
#queryEffect = effect(() => {
|
|
1482
|
+
const q = this.#query();
|
|
1483
|
+
if (q)
|
|
1484
|
+
this.filterForm.patchValue(this.#queryToForm(q));
|
|
1485
|
+
});
|
|
1486
|
+
#initialFormData = {};
|
|
1487
|
+
selectedFlavorsRec = {};
|
|
1488
|
+
combinedFormState;
|
|
1489
|
+
formStates = {};
|
|
1490
|
+
flavorFormOptions = signal({});
|
|
1491
|
+
flavorForms = computed(() => {
|
|
1492
|
+
const ffo = this.flavorFormOptions() || {};
|
|
1493
|
+
return Object.keys(ffo).map((k) => ({
|
|
1494
|
+
id: k,
|
|
1495
|
+
icon: this.selectedFlavorsRec[k]?.icon,
|
|
1496
|
+
svgIcon: this.selectedFlavorsRec[k]?.svgIcon,
|
|
1497
|
+
label: this.#shell.getFlavorLabel(k),
|
|
1498
|
+
formOptions: ffo[k]
|
|
1602
1499
|
}));
|
|
1500
|
+
});
|
|
1501
|
+
scopeOptions = signal([]);
|
|
1502
|
+
filterForm = this.#fb.nonNullable.group({
|
|
1503
|
+
term: [this.#dialogData.term || ''],
|
|
1504
|
+
scope: [this.ANY_OPTION],
|
|
1505
|
+
modified: [],
|
|
1506
|
+
created: [],
|
|
1507
|
+
contentlength: []
|
|
1508
|
+
});
|
|
1509
|
+
searchTokens = [];
|
|
1510
|
+
flavors = this.#shell.getObjectFlavors().map((f) => ({
|
|
1511
|
+
...f,
|
|
1512
|
+
label: this.#shell.getFlavorLabel(f.id)
|
|
1513
|
+
}));
|
|
1514
|
+
constructor() {
|
|
1603
1515
|
this.translate.onLangChange.pipe(takeUntilDestroyed()).subscribe((_) => this.#setupOptions());
|
|
1604
1516
|
this.#setupOptions();
|
|
1605
1517
|
this.filterForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((v) => this.#onFormValueChange(v));
|
|
1518
|
+
this.close$
|
|
1519
|
+
.pipe(
|
|
1520
|
+
// wait 500ms after last trigger, less felt more buggy since we need to wait for the last statusChanged event from yuv-object-form
|
|
1521
|
+
debounceTime(500), switchMap(() => of(this.#formToQuery())))
|
|
1522
|
+
.subscribe((searchQuery) => {
|
|
1523
|
+
this.#dialogRef.close(searchQuery);
|
|
1524
|
+
});
|
|
1606
1525
|
}
|
|
1607
1526
|
typeSelected(idx) {
|
|
1608
1527
|
this.#toggleType(this.flavors[idx[0]]);
|
|
@@ -1721,6 +1640,8 @@ class DriveSearchOverlayComponent {
|
|
|
1721
1640
|
}
|
|
1722
1641
|
combinedFormState.data = { ...combinedFormState.data, ...s.data };
|
|
1723
1642
|
});
|
|
1643
|
+
// Filter out properties with undefined values from combinedFormState.data
|
|
1644
|
+
combinedFormState.data = Object.fromEntries(Object.entries(combinedFormState.data).filter(([_, v]) => v !== undefined));
|
|
1724
1645
|
this.combinedFormState = combinedFormState;
|
|
1725
1646
|
return this.combinedFormState;
|
|
1726
1647
|
}
|
|
@@ -1728,7 +1649,7 @@ class DriveSearchOverlayComponent {
|
|
|
1728
1649
|
this.#dialogRef.close();
|
|
1729
1650
|
}
|
|
1730
1651
|
submit() {
|
|
1731
|
-
this
|
|
1652
|
+
this.close$.next();
|
|
1732
1653
|
}
|
|
1733
1654
|
//Converts the form values to a search query
|
|
1734
1655
|
#formToQuery() {
|
|
@@ -1878,10 +1799,10 @@ class DriveSearchOverlayComponent {
|
|
|
1878
1799
|
}
|
|
1879
1800
|
]);
|
|
1880
1801
|
}
|
|
1881
|
-
static
|
|
1882
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: DriveSearchOverlayComponent, isStandalone: true, selector: "ymd-drive-search-overlay", viewQueries: [{ propertyName: "objectForms", predicate: ObjectFormComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<h2 matDialogTitle class=\"yuv-dialog-title\">{{ 'yuv.app.drive.search.extended.dialog.title' | translate }}</h2>\n<mat-dialog-content class=\"yuv-dialog-content\">\n <yuv-split-view [gutterSize]=\"1\" [layoutSettingsID]=\"'yuv.app.drive.search.meta.splitview'\">\n <!-- search options -->\n <ng-template yuvSplitArea [size]=\"40\">\n <form class=\"options\" role=\"search\" [formGroup]=\"filterForm\">\n <!-- term and scope -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.term' | translate }}</mat-label>\n <input matInput class=\"term\" type=\"search\" formControlName=\"term\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.where' | translate }}</mat-label>\n <mat-select formControlName=\"scope\" [disabled]=\"!filterForm.value.term\">\n @for (food of scopeOptions(); track food) {\n <mat-option [value]=\"food.value\">{{ food.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <!-- types -->\n <div class=\"options-type-list\">\n <h2>{{ 'yuv.app.drive.search.meta.options.type' | translate }}</h2>\n <yuv-list (itemSelect)=\"typeSelected($event)\" [selfHandleSelection]=\"true\">\n @for (t of flavors; track t.id) {\n <div class=\"type\" yuvListItem [ngClass]=\"{ selected: !!selectedFlavorsRec[t.id] }\">\n <mat-pseudo-checkbox [state]=\"!!selectedFlavorsRec[t.id] ? 'checked' : 'unchecked'\"></mat-pseudo-checkbox>\n {{ t.label }}\n </div>\n }\n </yuv-list>\n </div>\n\n <!-- created -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.created' | translate }}</mat-label>\n <yuv-range-select-date formControlName=\"created\"></yuv-range-select-date>\n </mat-form-field>\n\n <!-- modified -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.modified' | translate }}</mat-label>\n <yuv-range-select-date formControlName=\"modified\"></yuv-range-select-date>\n </mat-form-field>\n\n <!-- content length -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.contentlength' | translate }}</mat-label>\n <yuv-range-select-filesize formControlName=\"contentlength\"></yuv-range-select-filesize>\n </mat-form-field>\n </form>\n </ng-template>\n\n <ng-template yuvSplitArea [size]=\"60\">\n <div class=\"query\">\n <h1>{{ 'yuv.app.drive.search.meta.headline.query' | translate }}</h1>\n\n <div class=\"tokens\">\n @if (flavorForms().length === 0 && !filterForm.value.term) {\n <p>{{ 'yuv.app.drive.search.meta.query.for-everything' | translate }}</p>\n }\n @for (o of flavorForms(); track o.id) {\n <details class=\"token\">\n <summary [ngClass]=\"{ dirty: formStates[o.id]?.dirty }\">\n @if (o.icon && o.svgIcon) {\n <mat-icon [svgIcon]=\"o.icon\"></mat-icon>\n } @else {\n <mat-icon>{{ o.icon }}</mat-icon>\n }\n {{ o.label }}\n <mat-icon class=\"arr\">arrow_drop_down</mat-icon>\n </summary>\n <yuv-object-form [formOptions]=\"o.formOptions\" (statusChanged)=\"onFormStatusChanged(o.id, $event)\"></yuv-object-form>\n </details>\n }\n @for (t of searchTokens; track $index) {\n <div class=\"searchToken token\">\n {{ t.label }}\n <button mat-icon-button class=\"ymt-icon-button--size-s\" (click)=\"removeSearchToken(t)\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n }\n </div>\n </div>\n </ng-template>\n </yuv-split-view>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\" class=\"yuv-dialog-actions\">\n <button ymtButton=\"secondary\" mat-dialog-close type=\"button\" (click)=\"cancel()\">{{ 'yuv.app.drive.search.meta.button.cancel' | translate }}</button>\n <button ymtButton=\"primary\" mat-dialog-close type=\"submit\" (click)=\"submit()\">{{ 'yuv.app.drive.search.meta.button.search' | translate }}</button>\n</mat-dialog-actions>\n", styles: [".yuv-dialog-title{border-bottom:1px solid var(--ymt-outline-variant);margin:0}.yuv-dialog-content{flex-grow:1;flex-basis:1px;max-height:inherit}.yuv-dialog-content yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);display:contents}.yuv-dialog-content form.options{padding:var(--ymt-spacing-m);display:flex;flex-flow:column}.yuv-dialog-content form.options [aria-disabled=true]{cursor:default;opacity:.5}.yuv-dialog-content form.options h2{font:var(--ymt-font-subhead);margin-top:0}.yuv-dialog-content form.options .type:hover{background-color:var(--ymt-surface-container-low)}.yuv-dialog-content form.options .yuv-form-field{cursor:pointer}.yuv-dialog-content form.options .options-type-list,.yuv-dialog-content form.options .yuv-form-field{margin:var(--ymt-spacing-xs) 0}.yuv-dialog-content form.options .options-type-list{margin-bottom:var(--ymt-spacing-3xl)}.yuv-dialog-content form.options .type{display:flex;gap:var(--ymt-spacing-m);align-items:center;padding:var(--ymt-spacing-xs);cursor:pointer}.yuv-dialog-content .query{background-color:var(--ymt-surface);height:100%;box-sizing:border-box;overflow-y:auto;padding:var(--ymt-spacing-m)}.yuv-dialog-content .query h1{font:var(--yuv-font-display);margin:.5rem 0 1rem;color:var(--ymt-text-color-subtle)}.yuv-dialog-content .query .tokens{display:flex;flex-flow:row wrap;align-items:start;gap:var(--ymt-spacing-m)}.yuv-dialog-content .query .tokens>.token{background-color:var(--ymt-surface-container);border:1px solid var(--ymt-outline-variant);animation:searchTokenEnter .2s ease-in-out forwards;box-sizing:border-box;color:var(--ymt-text-color-subtle);border-radius:4px}.yuv-dialog-content .query .tokens details{width:var(--om-section-max-width);max-width:100%}.yuv-dialog-content .query .tokens details[open]{width:100%}.yuv-dialog-content .query .tokens details[open] mat-icon.arr{transform:rotate(180deg)}.yuv-dialog-content .query .tokens details summary{padding:var(--ymt-spacing-xs);padding-inline-end:var(--ymt-spacing-3xl);cursor:pointer;display:flex;align-items:center;position:relative;font-weight:700}.yuv-dialog-content .query .tokens details summary.dirty:after{content:\"\";width:.5em;height:.5em;border-radius:50%;background-color:var(--ymt-primary);margin-inline-start:.5em;align-self:start}.yuv-dialog-content .query .tokens details summary::marker{display:none}.yuv-dialog-content .query .tokens details summary mat-icon{margin-inline-end:var(--ymt-spacing-xs)}.yuv-dialog-content .query .tokens details summary mat-icon.arr{position:absolute;inset-inline-end:0}.yuv-dialog-content .query .tokens .searchToken{padding:var(--ymt-spacing-xs);gap:var(--ymt-spacing-xs);cursor:pointer;display:flex;align-items:center;line-height:1em;font-weight:700}.yuv-dialog-actions{border-top:1px solid var(--ymt-outline-variant)}@keyframes searchTokenEnter{0%{opacity:0;transform:translateY(.5em)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule$1 }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: ObjectFormComponent, selector: "yuv-object-form", inputs: ["formOptions", "inert", "elementExtensions", "isInnerTableForm"], outputs: ["statusChanged", "onFormReady"] }, { kind: "ngmodule", type: YuvSplitViewModule }, { kind: "directive", type: i1$2.SplitAreaDirective, selector: "[yuvSplitArea]", inputs: ["size", "minSize", "maxSize", "panelClass", "visible"] }, { kind: "component", type: i1$2.SplitViewComponent, selector: "yuv-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: YuvListModule }, { kind: "component", type: i5.ListComponent, selector: "yuv-list", inputs: ["multiselect", "selfHandleSelection", "autoSelect", "disableSelection"], outputs: ["itemSelect", "itemFocus"] }, { kind: "directive", type: i5.ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "component", type: RangeSelectDateComponent, selector: "yuv-range-select-date", inputs: ["ranges", "customRange"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }, { kind: "component", type: RangeSelectFilesizeComponent, selector: "yuv-range-select-filesize", inputs: ["ranges"] }] }); }
|
|
1802
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DriveSearchOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1803
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: DriveSearchOverlayComponent, isStandalone: true, selector: "ymd-drive-search-overlay", viewQueries: [{ propertyName: "objectForms", predicate: ObjectFormComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<h2 matDialogTitle class=\"yuv-dialog-title\">\n {{ 'yuv.app.drive.search.extended.dialog.title' | translate }}\n</h2>\n<mat-dialog-content class=\"yuv-dialog-content\">\n <yuv-split-view [gutterSize]=\"1\" [layoutSettingsID]=\"'yuv.app.drive.search.meta.splitview'\">\n <!-- search options -->\n <ng-template yuvSplitArea [size]=\"40\">\n <form class=\"options\" role=\"search\" [formGroup]=\"filterForm\">\n <!-- term and scope -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.term' | translate }}</mat-label>\n <input matInput class=\"term\" type=\"search\" formControlName=\"term\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.where' | translate }}</mat-label>\n <mat-select formControlName=\"scope\" [disabled]=\"!filterForm.value.term\">\n @for (food of scopeOptions(); track food) {\n <mat-option [value]=\"food.value\">{{ food.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <!-- types -->\n <div class=\"options-type-list\">\n <h2>{{ 'yuv.app.drive.search.meta.options.type' | translate }}</h2>\n <yuv-list (itemSelect)=\"typeSelected($event)\" [selfHandleSelection]=\"true\">\n @for (t of flavors; track t.id) {\n <div class=\"type\" yuvListItem [ngClass]=\"{ selected: !!selectedFlavorsRec[t.id] }\">\n <mat-pseudo-checkbox [state]=\"!!selectedFlavorsRec[t.id] ? 'checked' : 'unchecked'\"></mat-pseudo-checkbox>\n {{ t.label }}\n </div>\n }\n </yuv-list>\n </div>\n\n <!-- created -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.created' | translate }}</mat-label>\n <yuv-range-select-date formControlName=\"created\"></yuv-range-select-date>\n </mat-form-field>\n\n <!-- modified -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.modified' | translate }}</mat-label>\n <yuv-range-select-date formControlName=\"modified\"></yuv-range-select-date>\n </mat-form-field>\n\n <!-- content length -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.contentlength' | translate }}</mat-label>\n <yuv-range-select-filesize formControlName=\"contentlength\"></yuv-range-select-filesize>\n </mat-form-field>\n </form>\n </ng-template>\n\n <ng-template yuvSplitArea [size]=\"60\">\n <div class=\"query\">\n <h1>{{ 'yuv.app.drive.search.meta.headline.query' | translate }}</h1>\n\n <div class=\"tokens\">\n @if (flavorForms().length === 0 && !filterForm.value.term) {\n <p>\n {{ 'yuv.app.drive.search.meta.query.for-everything' | translate }}\n </p>\n } @for (o of flavorForms(); track o.id) {\n <details class=\"token\">\n <summary [ngClass]=\"{ dirty: (formStates[o.id] && formStates[o.id].dirty) }\">\n @if (o.icon && o.svgIcon) {\n <mat-icon [svgIcon]=\"o.icon\"></mat-icon>\n } @else {\n <mat-icon>{{ o.icon }}</mat-icon>\n }\n {{ o.label }}\n <mat-icon class=\"arr\">arrow_drop_down</mat-icon>\n </summary>\n <yuv-object-form [formOptions]=\"o.formOptions\" (statusChanged)=\"onFormStatusChanged(o.id, $event)\"></yuv-object-form>\n </details>\n } @for (t of searchTokens; track $index) {\n <div class=\"searchToken token\">\n {{ t.label }}\n <button mat-icon-button class=\"ymt-icon-button--size-s\" (click)=\"removeSearchToken(t)\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n }\n </div>\n </div>\n </ng-template>\n </yuv-split-view>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\" class=\"yuv-dialog-actions\">\n <button ymtButton=\"secondary\" mat-dialog-close type=\"button\" (click)=\"cancel()\">\n {{ 'yuv.app.drive.search.meta.button.cancel' | translate }}\n </button>\n <button ymtButton=\"primary\" type=\"submit\" (click)=\"submit()\">\n {{ 'yuv.app.drive.search.meta.button.search' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".yuv-dialog-title{border-bottom:1px solid var(--ymt-outline-variant);margin:0}.yuv-dialog-content{flex-grow:1;flex-basis:1px;max-height:inherit}.yuv-dialog-content yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);display:contents}.yuv-dialog-content form.options{padding:var(--ymt-spacing-m);display:flex;flex-flow:column}.yuv-dialog-content form.options [aria-disabled=true]{cursor:default;opacity:.5}.yuv-dialog-content form.options h2{font:var(--ymt-font-subhead);margin-top:0}.yuv-dialog-content form.options .type:hover{background-color:var(--ymt-surface-container-low)}.yuv-dialog-content form.options .yuv-form-field{cursor:pointer}.yuv-dialog-content form.options .options-type-list,.yuv-dialog-content form.options .yuv-form-field{margin:var(--ymt-spacing-xs) 0}.yuv-dialog-content form.options .options-type-list{margin-bottom:var(--ymt-spacing-3xl)}.yuv-dialog-content form.options .type{display:flex;gap:var(--ymt-spacing-m);align-items:center;padding:var(--ymt-spacing-xs);cursor:pointer}.yuv-dialog-content .query{background-color:var(--ymt-surface);height:100%;box-sizing:border-box;overflow-y:auto;padding:var(--ymt-spacing-m)}.yuv-dialog-content .query h1{font:var(--yuv-font-display);margin:.5rem 0 1rem;color:var(--ymt-text-color-subtle)}.yuv-dialog-content .query .tokens{display:flex;flex-flow:row wrap;align-items:start;gap:var(--ymt-spacing-m)}.yuv-dialog-content .query .tokens>.token{background-color:var(--ymt-surface-container);border:1px solid var(--ymt-outline-variant);animation:searchTokenEnter .2s ease-in-out forwards;box-sizing:border-box;color:var(--ymt-text-color-subtle);border-radius:4px}.yuv-dialog-content .query .tokens details{width:var(--om-section-max-width);max-width:100%}.yuv-dialog-content .query .tokens details[open]{width:100%}.yuv-dialog-content .query .tokens details[open] mat-icon.arr{transform:rotate(180deg)}.yuv-dialog-content .query .tokens details summary{padding:var(--ymt-spacing-xs);padding-inline-end:var(--ymt-spacing-3xl);cursor:pointer;display:flex;align-items:center;position:relative;font-weight:700}.yuv-dialog-content .query .tokens details summary.dirty:after{content:\"\";width:.5em;height:.5em;border-radius:50%;background-color:var(--ymt-primary);margin-inline-start:.5em;align-self:start}.yuv-dialog-content .query .tokens details summary::marker{display:none}.yuv-dialog-content .query .tokens details summary mat-icon{margin-inline-end:var(--ymt-spacing-xs)}.yuv-dialog-content .query .tokens details summary mat-icon.arr{position:absolute;inset-inline-end:0}.yuv-dialog-content .query .tokens .searchToken{padding:var(--ymt-spacing-xs);gap:var(--ymt-spacing-xs);cursor:pointer;display:flex;align-items:center;line-height:1em;font-weight:700}.yuv-dialog-actions{border-top:1px solid var(--ymt-outline-variant)}@keyframes searchTokenEnter{0%{opacity:0;transform:translateY(.5em)}to{opacity:1;transform:translateY(0)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule$1 }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: ObjectFormComponent, selector: "yuv-object-form", inputs: ["formOptions", "inert", "elementExtensions", "isInnerTableForm"], outputs: ["statusChanged", "onFormReady"] }, { kind: "ngmodule", type: YuvSplitViewModule }, { kind: "directive", type: i1$2.SplitAreaDirective, selector: "[yuvSplitArea]", inputs: ["size", "minSize", "maxSize", "panelClass", "visible"] }, { kind: "component", type: i1$2.SplitViewComponent, selector: "yuv-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: YuvListModule }, { kind: "component", type: i5.ListComponent, selector: "yuv-list", inputs: ["multiselect", "selfHandleSelection", "autoSelect", "disableSelection"], outputs: ["itemSelect", "itemFocus"] }, { kind: "directive", type: i5.ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "component", type: RangeSelectDateComponent, selector: "yuv-range-select-date", inputs: ["ranges", "customRange"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: MatPseudoCheckbox, selector: "mat-pseudo-checkbox", inputs: ["state", "disabled", "appearance"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }, { kind: "component", type: RangeSelectFilesizeComponent, selector: "yuv-range-select-filesize", inputs: ["ranges"] }] });
|
|
1883
1804
|
}
|
|
1884
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DriveSearchOverlayComponent, decorators: [{
|
|
1885
1806
|
type: Component,
|
|
1886
1807
|
args: [{ selector: 'ymd-drive-search-overlay', standalone: true, imports: [
|
|
1887
1808
|
CommonModule,
|
|
@@ -1903,26 +1824,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
1903
1824
|
MatPseudoCheckbox,
|
|
1904
1825
|
YmtButtonDirective,
|
|
1905
1826
|
RangeSelectFilesizeComponent
|
|
1906
|
-
], template: "<h2 matDialogTitle class=\"yuv-dialog-title\"
|
|
1827
|
+
], template: "<h2 matDialogTitle class=\"yuv-dialog-title\">\n {{ 'yuv.app.drive.search.extended.dialog.title' | translate }}\n</h2>\n<mat-dialog-content class=\"yuv-dialog-content\">\n <yuv-split-view [gutterSize]=\"1\" [layoutSettingsID]=\"'yuv.app.drive.search.meta.splitview'\">\n <!-- search options -->\n <ng-template yuvSplitArea [size]=\"40\">\n <form class=\"options\" role=\"search\" [formGroup]=\"filterForm\">\n <!-- term and scope -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.term' | translate }}</mat-label>\n <input matInput class=\"term\" type=\"search\" formControlName=\"term\" />\n <mat-icon matSuffix>search</mat-icon>\n </mat-form-field>\n\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.where' | translate }}</mat-label>\n <mat-select formControlName=\"scope\" [disabled]=\"!filterForm.value.term\">\n @for (food of scopeOptions(); track food) {\n <mat-option [value]=\"food.value\">{{ food.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <!-- types -->\n <div class=\"options-type-list\">\n <h2>{{ 'yuv.app.drive.search.meta.options.type' | translate }}</h2>\n <yuv-list (itemSelect)=\"typeSelected($event)\" [selfHandleSelection]=\"true\">\n @for (t of flavors; track t.id) {\n <div class=\"type\" yuvListItem [ngClass]=\"{ selected: !!selectedFlavorsRec[t.id] }\">\n <mat-pseudo-checkbox [state]=\"!!selectedFlavorsRec[t.id] ? 'checked' : 'unchecked'\"></mat-pseudo-checkbox>\n {{ t.label }}\n </div>\n }\n </yuv-list>\n </div>\n\n <!-- created -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.created' | translate }}</mat-label>\n <yuv-range-select-date formControlName=\"created\"></yuv-range-select-date>\n </mat-form-field>\n\n <!-- modified -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.modified' | translate }}</mat-label>\n <yuv-range-select-date formControlName=\"modified\"></yuv-range-select-date>\n </mat-form-field>\n\n <!-- content length -->\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{ 'yuv.app.drive.search.meta.options.contentlength' | translate }}</mat-label>\n <yuv-range-select-filesize formControlName=\"contentlength\"></yuv-range-select-filesize>\n </mat-form-field>\n </form>\n </ng-template>\n\n <ng-template yuvSplitArea [size]=\"60\">\n <div class=\"query\">\n <h1>{{ 'yuv.app.drive.search.meta.headline.query' | translate }}</h1>\n\n <div class=\"tokens\">\n @if (flavorForms().length === 0 && !filterForm.value.term) {\n <p>\n {{ 'yuv.app.drive.search.meta.query.for-everything' | translate }}\n </p>\n } @for (o of flavorForms(); track o.id) {\n <details class=\"token\">\n <summary [ngClass]=\"{ dirty: (formStates[o.id] && formStates[o.id].dirty) }\">\n @if (o.icon && o.svgIcon) {\n <mat-icon [svgIcon]=\"o.icon\"></mat-icon>\n } @else {\n <mat-icon>{{ o.icon }}</mat-icon>\n }\n {{ o.label }}\n <mat-icon class=\"arr\">arrow_drop_down</mat-icon>\n </summary>\n <yuv-object-form [formOptions]=\"o.formOptions\" (statusChanged)=\"onFormStatusChanged(o.id, $event)\"></yuv-object-form>\n </details>\n } @for (t of searchTokens; track $index) {\n <div class=\"searchToken token\">\n {{ t.label }}\n <button mat-icon-button class=\"ymt-icon-button--size-s\" (click)=\"removeSearchToken(t)\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n }\n </div>\n </div>\n </ng-template>\n </yuv-split-view>\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\" class=\"yuv-dialog-actions\">\n <button ymtButton=\"secondary\" mat-dialog-close type=\"button\" (click)=\"cancel()\">\n {{ 'yuv.app.drive.search.meta.button.cancel' | translate }}\n </button>\n <button ymtButton=\"primary\" type=\"submit\" (click)=\"submit()\">\n {{ 'yuv.app.drive.search.meta.button.search' | translate }}\n </button>\n</mat-dialog-actions>\n", styles: [".yuv-dialog-title{border-bottom:1px solid var(--ymt-outline-variant);margin:0}.yuv-dialog-content{flex-grow:1;flex-basis:1px;max-height:inherit}.yuv-dialog-content yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);display:contents}.yuv-dialog-content form.options{padding:var(--ymt-spacing-m);display:flex;flex-flow:column}.yuv-dialog-content form.options [aria-disabled=true]{cursor:default;opacity:.5}.yuv-dialog-content form.options h2{font:var(--ymt-font-subhead);margin-top:0}.yuv-dialog-content form.options .type:hover{background-color:var(--ymt-surface-container-low)}.yuv-dialog-content form.options .yuv-form-field{cursor:pointer}.yuv-dialog-content form.options .options-type-list,.yuv-dialog-content form.options .yuv-form-field{margin:var(--ymt-spacing-xs) 0}.yuv-dialog-content form.options .options-type-list{margin-bottom:var(--ymt-spacing-3xl)}.yuv-dialog-content form.options .type{display:flex;gap:var(--ymt-spacing-m);align-items:center;padding:var(--ymt-spacing-xs);cursor:pointer}.yuv-dialog-content .query{background-color:var(--ymt-surface);height:100%;box-sizing:border-box;overflow-y:auto;padding:var(--ymt-spacing-m)}.yuv-dialog-content .query h1{font:var(--yuv-font-display);margin:.5rem 0 1rem;color:var(--ymt-text-color-subtle)}.yuv-dialog-content .query .tokens{display:flex;flex-flow:row wrap;align-items:start;gap:var(--ymt-spacing-m)}.yuv-dialog-content .query .tokens>.token{background-color:var(--ymt-surface-container);border:1px solid var(--ymt-outline-variant);animation:searchTokenEnter .2s ease-in-out forwards;box-sizing:border-box;color:var(--ymt-text-color-subtle);border-radius:4px}.yuv-dialog-content .query .tokens details{width:var(--om-section-max-width);max-width:100%}.yuv-dialog-content .query .tokens details[open]{width:100%}.yuv-dialog-content .query .tokens details[open] mat-icon.arr{transform:rotate(180deg)}.yuv-dialog-content .query .tokens details summary{padding:var(--ymt-spacing-xs);padding-inline-end:var(--ymt-spacing-3xl);cursor:pointer;display:flex;align-items:center;position:relative;font-weight:700}.yuv-dialog-content .query .tokens details summary.dirty:after{content:\"\";width:.5em;height:.5em;border-radius:50%;background-color:var(--ymt-primary);margin-inline-start:.5em;align-self:start}.yuv-dialog-content .query .tokens details summary::marker{display:none}.yuv-dialog-content .query .tokens details summary mat-icon{margin-inline-end:var(--ymt-spacing-xs)}.yuv-dialog-content .query .tokens details summary mat-icon.arr{position:absolute;inset-inline-end:0}.yuv-dialog-content .query .tokens .searchToken{padding:var(--ymt-spacing-xs);gap:var(--ymt-spacing-xs);cursor:pointer;display:flex;align-items:center;line-height:1em;font-weight:700}.yuv-dialog-actions{border-top:1px solid var(--ymt-outline-variant)}@keyframes searchTokenEnter{0%{opacity:0;transform:translateY(.5em)}to{opacity:1;transform:translateY(0)}}\n"] }]
|
|
1907
1828
|
}], ctorParameters: () => [] });
|
|
1908
1829
|
|
|
1909
1830
|
class DriveSearchComponent {
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
this.#drive = inject(DriveService);
|
|
1916
|
-
this.query = this.#drive.state$.query;
|
|
1917
|
-
this.extendedQuery = this.#drive.state$.extendedQuery;
|
|
1918
|
-
this.currentFolder = this.#drive.state$.currentFolder;
|
|
1919
|
-
this.term = '';
|
|
1920
|
-
}
|
|
1921
|
-
#overlay;
|
|
1922
|
-
#router;
|
|
1923
|
-
#route;
|
|
1924
|
-
#drive;
|
|
1831
|
+
translate = inject(TranslateService$1);
|
|
1832
|
+
#overlay = inject(MatDialog);
|
|
1833
|
+
#router = inject(Router);
|
|
1834
|
+
#route = inject(ActivatedRoute);
|
|
1835
|
+
#drive = inject(DriveService);
|
|
1925
1836
|
#oRef;
|
|
1837
|
+
query = this.#drive.state$.query;
|
|
1838
|
+
extendedQuery = this.#drive.state$.extendedQuery;
|
|
1839
|
+
currentFolder = this.#drive.state$.currentFolder;
|
|
1840
|
+
term = '';
|
|
1926
1841
|
openModal(event) {
|
|
1927
1842
|
event.stopPropagation();
|
|
1928
1843
|
this.#oRef = this.#overlay.open(DriveSearchOverlayComponent, {
|
|
@@ -1955,10 +1870,10 @@ class DriveSearchComponent {
|
|
|
1955
1870
|
relativeTo: this.#route
|
|
1956
1871
|
});
|
|
1957
1872
|
}
|
|
1958
|
-
static
|
|
1959
|
-
static
|
|
1873
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DriveSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1874
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DriveSearchComponent, isStandalone: true, selector: "ymd-drive-search", host: { properties: { "class.active": "extendedQuery()" } }, ngImport: i0, template: "<button mat-icon-button class=\"icon\" (click)=\"openModal($event)\" [matTooltip]=\"'yuv.app.drive.search.tooltip.extended-search' | translate\">\n <mat-icon>tune</mat-icon>\n</button>\n\n<yuv-simple-search\n [query]=\"query()\"\n (queryChange)=\"onQueryChange($event)\"\n (querySubmit)=\"onQuerySubmit($event)\"\n (clearInput)=\"clear()\"></yuv-simple-search>\n", styles: [":host{display:flex;align-items:center;gap:var(--ymt-spacing-xs)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule$1 }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: SimpleSearchComponent, selector: "yuv-simple-search", inputs: ["query"], outputs: ["querySubmit", "clearInput", "targetSelectionChanged", "queryChange", "typeAggregation"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
1960
1875
|
}
|
|
1961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DriveSearchComponent, decorators: [{
|
|
1962
1877
|
type: Component,
|
|
1963
1878
|
args: [{ selector: 'ymd-drive-search', standalone: true, imports: [CommonModule, TranslateModule$1, SimpleSearchComponent, ReactiveFormsModule, MatTooltipModule, MatIconButton, MatIcon], host: {
|
|
1964
1879
|
'[class.active]': 'extendedQuery()'
|
|
@@ -1969,57 +1884,48 @@ const COMPONENTS = [VersionsListComponent, ObjectSummaryDataComponent, ObjectPre
|
|
|
1969
1884
|
const MODULES = [YuvSplitViewModule, TranslateModule];
|
|
1970
1885
|
const MATERIAL = [MatIconModule, MatButtonModule, MatTabsModule, YmtButtonDirective];
|
|
1971
1886
|
class ManageVersionsComponent {
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
return !(selectedVersion && selectedVersion[0].version !== list.length && !this.isUnderRetention(this.selectedDmsObject()));
|
|
2015
|
-
});
|
|
2016
|
-
}
|
|
2017
|
-
#drive;
|
|
2018
|
-
#shell;
|
|
2019
|
-
#eventService;
|
|
2020
|
-
#retention;
|
|
2021
|
-
#dialogData;
|
|
2022
|
-
#dialogRef;
|
|
1887
|
+
#drive = inject(DriveService);
|
|
1888
|
+
#shell = inject(ShellService);
|
|
1889
|
+
#eventService = inject(EventService);
|
|
1890
|
+
#dialogData = inject(MAT_DIALOG_DATA);
|
|
1891
|
+
#dialogRef = inject((MatDialogRef));
|
|
1892
|
+
versionsList = this.#drive.state$.versions.versionsList;
|
|
1893
|
+
selectedVersion = this.#drive.state$.versions.selectedVersion;
|
|
1894
|
+
selectedDmsObject = this.#drive.state$.selectedDmsObject;
|
|
1895
|
+
isLoading = this.#drive.state$.busy;
|
|
1896
|
+
item = this.#dialogData;
|
|
1897
|
+
layoutSettingIdBase = 'app.drive.versions.';
|
|
1898
|
+
dmsObject = computed(() => {
|
|
1899
|
+
const dmsObject = this.selectedDmsObject();
|
|
1900
|
+
return dmsObject
|
|
1901
|
+
? { id: dmsObject.data[BaseObjectTypeField.OBJECT_ID], name: dmsObject.data[FS_PROPERTIES.name] }
|
|
1902
|
+
: { id: null, name: '' };
|
|
1903
|
+
});
|
|
1904
|
+
id = computed(() => {
|
|
1905
|
+
const version = this.selectedVersion();
|
|
1906
|
+
return version ? version[0].id : null;
|
|
1907
|
+
});
|
|
1908
|
+
flavoredDmsObject = computed(() => {
|
|
1909
|
+
const o = this.selectedVersion();
|
|
1910
|
+
return o
|
|
1911
|
+
? {
|
|
1912
|
+
object: o[0],
|
|
1913
|
+
flavors: [
|
|
1914
|
+
{
|
|
1915
|
+
id: APP_TYPES['file']['id'],
|
|
1916
|
+
icon: APP_TYPES['file']['icon'],
|
|
1917
|
+
sot: FS_SOTS.object
|
|
1918
|
+
},
|
|
1919
|
+
...this.#shell.getAppliedObjectFlavors(o[0]).applied
|
|
1920
|
+
]
|
|
1921
|
+
}
|
|
1922
|
+
: undefined;
|
|
1923
|
+
});
|
|
1924
|
+
disabledRestore = computed(() => {
|
|
1925
|
+
const selectedVersion = this.selectedVersion();
|
|
1926
|
+
const list = this.versionsList();
|
|
1927
|
+
return !(selectedVersion && selectedVersion[0].version !== list.length);
|
|
1928
|
+
});
|
|
2023
1929
|
#loadList() {
|
|
2024
1930
|
this.#drive.setBusy(true);
|
|
2025
1931
|
return forkJoin([this.#drive.getVersions(this.item.id), this.#drive.getSelectedDmsObject(this.item.id)]).pipe(finalize(() => this.#drive.setBusy(false)));
|
|
@@ -2040,40 +1946,32 @@ class ManageVersionsComponent {
|
|
|
2040
1946
|
error: (err) => this.#drive.setBusy(false)
|
|
2041
1947
|
});
|
|
2042
1948
|
}
|
|
2043
|
-
isUnderRetention(o) {
|
|
2044
|
-
return o && this.#retention.getRetentionState(o).underRetention;
|
|
2045
|
-
}
|
|
2046
1949
|
ngOnInit() {
|
|
2047
1950
|
this.#loadList().subscribe();
|
|
2048
1951
|
}
|
|
2049
1952
|
ngOnDestroy() {
|
|
2050
1953
|
this.#drive.clearVersions();
|
|
2051
1954
|
}
|
|
2052
|
-
static
|
|
2053
|
-
static
|
|
1955
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ManageVersionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1956
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ManageVersionsComponent, isStandalone: true, selector: "ymd-manage-versions", providers: [ObjectPreviewService], ngImport: i0, template: "<yuv-dialog [headertitel]=\"'yuv.app.drive.versions.header.label' | translate\">\n <main>\n <div class=\"progress-bar-container\">\n @if (isLoading()) {\n <mat-progress-bar mode=\"indeterminate\" class=\"progress-bar\"></mat-progress-bar>\n }\n </div>\n <yuv-split-view [gutterSize]=\"1\" [layoutSettingsID]=\"layoutSettingIdBase + 'split'\">\n <!-- Versions -->\n <ng-template yuvSplitArea [size]=\"60\">\n <div class=\"version-details\">\n <header>\n <span>{{ dmsObject().name }}</span>\n </header>\n <div class=\"details\">\n @let selected = selectedVersion();\n @if (selected && selected.length === 1) {\n <mat-tab-group class=\"version-tabs\">\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.content.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-preview [dmsObject]=\"selected[0]\" [version]=\"selected[0].version\"></yuv-object-preview>\n </ng-template>\n </mat-tab>\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-summary-data [dmsObject]=\"selected[0]\"></yuv-object-summary-data>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n }\n </div>\n </div>\n </ng-template>\n <!-- Details -->\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"versions\">\n <header>\n <h2>{{ 'yuv.app.drive.versions.header.label.short' | translate }}</h2>\n <div class=\"actions\">\n <button mat-icon-button class=\"refresh\" (click)=\"reloadList()\"><mat-icon>refresh</mat-icon></button>\n </div>\n </header>\n <ymd-versions-list\n class=\"staggered\"\n [attr.aria-label]=\"'yuv.app.drive.files.content.aria.label' | translate\"\n [attr.aria-busy]=\"isLoading()\"\n [attr.role]=\"'listbox'\"\n [id]=\"id()\"\n >\n </ymd-versions-list>\n </div>\n </ng-template>\n </yuv-split-view>\n </main>\n <footer>\n <button ymtButton=\"secondary\" class=\"close\" (click)=\"close()\">{{ 'yuv.app.drive.action.set.new.versions.cancel' | translate }}</button>\n <button ymtButton=\"primary\" [disabled]=\"disabledRestore()\" (click)=\"setNewVersion()\">\n {{ 'yuv.app.drive.action.set.new.versions.label' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:contents}:host main{display:contents}:host .progress-bar-container{height:calc(var(--ymt-progress-bar-height) + 1px);background-color:transparent}:host yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);height:100%}:host header{display:grid;grid-template-columns:2fr max-content;grid-template-rows:1fr max-content;gap:0px 0px;grid-auto-flow:row;grid-template-areas:\"label actions\" \"title title\";padding:var(--ymt-spacing-m);align-items:center}:host .versions,:host .version-details{display:flex;flex-flow:column;height:100%}:host .version-details .details{flex:1;overflow-y:hidden}:host .version-details .details .version-tabs{height:100%}:host .version-details .details ::ng-deep .mat-mdc-tab-body-wrapper{height:100%;overflow:hidden}:host .versions header{border-bottom:1px solid var(--ymt-outline-variant);padding-top:0}:host .versions .label{grid-area:label}:host .versions .actions{grid-area:actions;display:flex;justify-content:center;align-items:center}:host .versions .actions button{padding:0}:host .versions .title{grid-area:title}:host .versions .staggered{flex:1;overflow-y:scroll}:host .versions-details{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: YuvSplitViewModule }, { kind: "directive", type: i1$2.SplitAreaDirective, selector: "[yuvSplitArea]", inputs: ["size", "minSize", "maxSize", "panelClass", "visible"] }, { kind: "component", type: i1$2.SplitViewComponent, selector: "yuv-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: VersionsListComponent, selector: "ymd-versions-list" }, { kind: "component", type: ObjectSummaryDataComponent, selector: "yuv-object-summary-data", inputs: ["dmsObject", "flavors", "showAppliedFlavors"] }, { kind: "component", type: ObjectPreviewComponent, selector: "yuv-object-preview", inputs: ["objectId", "dmsObject", "version", "metadata"] }, { kind: "component", type: DialogComponent, selector: "yuv-dialog", inputs: ["headertitel"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i5$1.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i5$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i5$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2054
1957
|
}
|
|
2055
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
1958
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ManageVersionsComponent, decorators: [{
|
|
2056
1959
|
type: Component,
|
|
2057
1960
|
args: [{ selector: 'ymd-manage-versions', standalone: true, imports: [...MODULES, ...COMPONENTS, ...MATERIAL, MatProgressBar], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ObjectPreviewService], template: "<yuv-dialog [headertitel]=\"'yuv.app.drive.versions.header.label' | translate\">\n <main>\n <div class=\"progress-bar-container\">\n @if (isLoading()) {\n <mat-progress-bar mode=\"indeterminate\" class=\"progress-bar\"></mat-progress-bar>\n }\n </div>\n <yuv-split-view [gutterSize]=\"1\" [layoutSettingsID]=\"layoutSettingIdBase + 'split'\">\n <!-- Versions -->\n <ng-template yuvSplitArea [size]=\"60\">\n <div class=\"version-details\">\n <header>\n <span>{{ dmsObject().name }}</span>\n </header>\n <div class=\"details\">\n @let selected = selectedVersion();\n @if (selected && selected.length === 1) {\n <mat-tab-group class=\"version-tabs\">\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.content.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-preview [dmsObject]=\"selected[0]\" [version]=\"selected[0].version\"></yuv-object-preview>\n </ng-template>\n </mat-tab>\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-summary-data [dmsObject]=\"selected[0]\"></yuv-object-summary-data>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n }\n </div>\n </div>\n </ng-template>\n <!-- Details -->\n <ng-template yuvSplitArea [size]=\"40\">\n <div class=\"versions\">\n <header>\n <h2>{{ 'yuv.app.drive.versions.header.label.short' | translate }}</h2>\n <div class=\"actions\">\n <button mat-icon-button class=\"refresh\" (click)=\"reloadList()\"><mat-icon>refresh</mat-icon></button>\n </div>\n </header>\n <ymd-versions-list\n class=\"staggered\"\n [attr.aria-label]=\"'yuv.app.drive.files.content.aria.label' | translate\"\n [attr.aria-busy]=\"isLoading()\"\n [attr.role]=\"'listbox'\"\n [id]=\"id()\"\n >\n </ymd-versions-list>\n </div>\n </ng-template>\n </yuv-split-view>\n </main>\n <footer>\n <button ymtButton=\"secondary\" class=\"close\" (click)=\"close()\">{{ 'yuv.app.drive.action.set.new.versions.cancel' | translate }}</button>\n <button ymtButton=\"primary\" [disabled]=\"disabledRestore()\" (click)=\"setNewVersion()\">\n {{ 'yuv.app.drive.action.set.new.versions.label' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:contents}:host main{display:contents}:host .progress-bar-container{height:calc(var(--ymt-progress-bar-height) + 1px);background-color:transparent}:host yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);height:100%}:host header{display:grid;grid-template-columns:2fr max-content;grid-template-rows:1fr max-content;gap:0px 0px;grid-auto-flow:row;grid-template-areas:\"label actions\" \"title title\";padding:var(--ymt-spacing-m);align-items:center}:host .versions,:host .version-details{display:flex;flex-flow:column;height:100%}:host .version-details .details{flex:1;overflow-y:hidden}:host .version-details .details .version-tabs{height:100%}:host .version-details .details ::ng-deep .mat-mdc-tab-body-wrapper{height:100%;overflow:hidden}:host .versions header{border-bottom:1px solid var(--ymt-outline-variant);padding-top:0}:host .versions .label{grid-area:label}:host .versions .actions{grid-area:actions;display:flex;justify-content:center;align-items:center}:host .versions .actions button{padding:0}:host .versions .title{grid-area:title}:host .versions .staggered{flex:1;overflow-y:scroll}:host .versions-details{height:100%}\n"] }]
|
|
2058
1961
|
}] });
|
|
2059
1962
|
|
|
2060
1963
|
class ManageVersionsAction extends AbstractContextAction {
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
this.range = SelectionRange.SINGLE_SELECT;
|
|
2073
|
-
this.supports = {};
|
|
2074
|
-
}
|
|
2075
|
-
#overlay;
|
|
2076
|
-
#overlayService;
|
|
1964
|
+
translate = inject(TranslateService);
|
|
1965
|
+
#overlay = inject(MatDialog);
|
|
1966
|
+
#overlayService = inject(Overlay);
|
|
1967
|
+
id = 'app.drive.action.manage-versions';
|
|
1968
|
+
label = this.translate.instant('yuv.app.drive.action.manage-versions.label');
|
|
1969
|
+
description = this.translate.instant('yuv.app.drive.action.manage-versions.description');
|
|
1970
|
+
priority = 2;
|
|
1971
|
+
icon = 'manage_history';
|
|
1972
|
+
group = 'common';
|
|
1973
|
+
range = SelectionRange.SINGLE_SELECT;
|
|
1974
|
+
supports = {};
|
|
2077
1975
|
isExecutable(selection) {
|
|
2078
1976
|
return of(selection && selection[0] && selection[0].version > 1 && !selection[0].isFolder);
|
|
2079
1977
|
}
|
|
@@ -2086,46 +1984,38 @@ class ManageVersionsAction extends AbstractContextAction {
|
|
|
2086
1984
|
}
|
|
2087
1985
|
|
|
2088
1986
|
class DriveFrameComponent {
|
|
2089
|
-
#router;
|
|
2090
|
-
#route;
|
|
2091
|
-
#drive;
|
|
2092
|
-
#shell;
|
|
2093
|
-
#actionsService;
|
|
2094
|
-
#destroyRef;
|
|
2095
|
-
|
|
2096
|
-
|
|
1987
|
+
#router = inject(Router);
|
|
1988
|
+
#route = inject(ActivatedRoute);
|
|
1989
|
+
#drive = inject(DriveService);
|
|
1990
|
+
#shell = inject(ShellService);
|
|
1991
|
+
#actionsService = inject(ActionsService);
|
|
1992
|
+
#destroyRef = inject(DestroyRef);
|
|
1993
|
+
query = this.#drive.state$.query;
|
|
1994
|
+
currentFolder = this.#drive.state$.currentFolder;
|
|
1995
|
+
busy = this.#drive.state$.busy;
|
|
1996
|
+
#app = this.#shell.getApp(APP_ID);
|
|
1997
|
+
appName = this.#app?.title;
|
|
1998
|
+
appIcon = this.#app?.iconName;
|
|
1999
|
+
headerNavItems = [
|
|
2000
|
+
// TODO: enable again once favorite feature is implemented
|
|
2001
|
+
// {
|
|
2002
|
+
// id: 'favorites',
|
|
2003
|
+
// disabled: true,
|
|
2004
|
+
// label: this.translate.instant('yuv.app.drive.nav.favorites'),
|
|
2005
|
+
// icon: this.icons.favorite,
|
|
2006
|
+
// callback: () => {
|
|
2007
|
+
// this.router.navigate(['favorites'], {relativeTo: this.route})
|
|
2008
|
+
// }
|
|
2009
|
+
// }
|
|
2010
|
+
];
|
|
2011
|
+
#actions = [
|
|
2012
|
+
{ id: APP_ACTIONS.rename, action: RenameAction },
|
|
2013
|
+
{ id: APP_ACTIONS.paste, action: PasteAction },
|
|
2014
|
+
{ id: APP_ACTIONS.contentUpdate, action: UpdateContentAction },
|
|
2015
|
+
{ id: APP_ACTIONS.copyLink, action: CopyLinkAction },
|
|
2016
|
+
{ id: APP_ACTIONS.manageVersions, action: ManageVersionsAction }
|
|
2017
|
+
];
|
|
2097
2018
|
constructor() {
|
|
2098
|
-
this.#router = inject(Router);
|
|
2099
|
-
this.#route = inject(ActivatedRoute);
|
|
2100
|
-
this.#drive = inject(DriveService);
|
|
2101
|
-
this.#shell = inject(ShellService);
|
|
2102
|
-
this.#actionsService = inject(ActionsService);
|
|
2103
|
-
this.#destroyRef = inject(DestroyRef);
|
|
2104
|
-
this.query = this.#drive.state$.query;
|
|
2105
|
-
this.currentFolder = this.#drive.state$.currentFolder;
|
|
2106
|
-
this.busy = this.#drive.state$.busy;
|
|
2107
|
-
this.#app = this.#shell.getApp(APP_ID);
|
|
2108
|
-
this.appName = this.#app?.title;
|
|
2109
|
-
this.appIcon = this.#app?.iconName;
|
|
2110
|
-
this.headerNavItems = [
|
|
2111
|
-
// TODO: enable again once favorite feature is implemented
|
|
2112
|
-
// {
|
|
2113
|
-
// id: 'favorites',
|
|
2114
|
-
// disabled: true,
|
|
2115
|
-
// label: this.translate.instant('yuv.app.drive.nav.favorites'),
|
|
2116
|
-
// icon: this.icons.favorite,
|
|
2117
|
-
// callback: () => {
|
|
2118
|
-
// this.router.navigate(['favorites'], {relativeTo: this.route})
|
|
2119
|
-
// }
|
|
2120
|
-
// }
|
|
2121
|
-
];
|
|
2122
|
-
this.#actions = [
|
|
2123
|
-
{ id: APP_ACTIONS.rename, action: RenameAction },
|
|
2124
|
-
{ id: APP_ACTIONS.paste, action: PasteAction },
|
|
2125
|
-
{ id: APP_ACTIONS.contentUpdate, action: UpdateContentAction },
|
|
2126
|
-
{ id: APP_ACTIONS.copyLink, action: CopyLinkAction },
|
|
2127
|
-
{ id: APP_ACTIONS.manageVersions, action: ManageVersionsAction }
|
|
2128
|
-
];
|
|
2129
2019
|
this.#registerActions();
|
|
2130
2020
|
// TODO: make use of global shortcuts
|
|
2131
2021
|
// this.shellService.globalShortcuts$.pipe(takeUntilDestroyed()).subscribe((s: GlobalShortcut) => {
|
|
@@ -2157,10 +2047,10 @@ class DriveFrameComponent {
|
|
|
2157
2047
|
ngOnDestroy() {
|
|
2158
2048
|
this.#actions.forEach((a) => this.#actionsService.concealActions([a.id]));
|
|
2159
2049
|
}
|
|
2160
|
-
static
|
|
2161
|
-
static
|
|
2050
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DriveFrameComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2051
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: DriveFrameComponent, isStandalone: true, selector: "ymd-drive", ngImport: i0, template: "<yuv-upload-progress (resultItemClick)=\"onUploadProgressResultItemClick($event)\"></yuv-upload-progress>\n\n<ng-template yuvAppHeaderSlot=\"search\"><ymd-drive-search></ymd-drive-search></ng-template>\n<ng-template yuvAppHeaderSlot=\"actions\"> <yuv-overflow-menu [menuItems]=\"headerNavItems\"></yuv-overflow-menu></ng-template>\n\n\n\n<section class=\"drive-main__content\" [attr.aria-label]=\"'yuv.app.drive.content.aria.label' | translate\">\n <router-outlet></router-outlet>\n</section>\n\n<router-outlet name=\"modal\"></router-outlet>\n", styles: [":host{display:flex;flex-flow:column;height:100%}:host .drive-main__content{flex:1;overflow-y:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$3.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: OverflowMenuComponent, selector: "yuv-overflow-menu", inputs: ["overflowIcon", "groupLabels", "menuItems", "vertical"] }, { kind: "ngmodule", type: YuvClientShellModule }, { kind: "directive", type: i2$5.YuvAppHeaderSlotDirective, selector: "ng-template[yuvAppHeaderSlot]", inputs: ["yuvAppHeaderSlot"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: UploadProgressComponent, selector: "yuv-upload-progress", outputs: ["resultItemClick"] }, { kind: "component", type: DriveSearchComponent, selector: "ymd-drive-search" }] });
|
|
2162
2052
|
}
|
|
2163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2053
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: DriveFrameComponent, decorators: [{
|
|
2164
2054
|
type: Component,
|
|
2165
2055
|
args: [{ selector: 'ymd-drive', standalone: true, imports: [
|
|
2166
2056
|
CommonModule,
|
|
@@ -2175,22 +2065,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
2175
2065
|
}], ctorParameters: () => [] });
|
|
2176
2066
|
|
|
2177
2067
|
class FolderDetailsDialogComponent {
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
: undefined);
|
|
2190
|
-
}
|
|
2191
|
-
#shell;
|
|
2192
|
-
#folder;
|
|
2193
|
-
#dialogRef;
|
|
2068
|
+
#shell = inject(ShellService);
|
|
2069
|
+
#folder = inject(MAT_DIALOG_DATA);
|
|
2070
|
+
#dialogRef = inject((MatDialogRef));
|
|
2071
|
+
folderName = this.#folder.data[FS_PROPERTIES.name];
|
|
2072
|
+
formState = signal(undefined);
|
|
2073
|
+
flavoredDmsObject = computed(() => this.#folder
|
|
2074
|
+
? {
|
|
2075
|
+
object: this.#folder,
|
|
2076
|
+
flavors: [...this.#shell.getAppliedObjectFlavors(this.#folder).applied]
|
|
2077
|
+
}
|
|
2078
|
+
: undefined);
|
|
2194
2079
|
onMetadataStatusChanged(formState) {
|
|
2195
2080
|
this.formState.set(formState);
|
|
2196
2081
|
}
|
|
@@ -2200,43 +2085,39 @@ class FolderDetailsDialogComponent {
|
|
|
2200
2085
|
close() {
|
|
2201
2086
|
this.#dialogRef.close();
|
|
2202
2087
|
}
|
|
2203
|
-
static
|
|
2204
|
-
static
|
|
2088
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FolderDetailsDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2089
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: FolderDetailsDialogComponent, isStandalone: true, selector: "ymd-folder-details-dialog", ngImport: i0, template: "<yuv-dialog [headertitel]=\"folderName\">\n <main [yuvBusyOverlay]=\"metadata.busySaving()\">\n <yuv-object-metadata\n [flavoredDmsObject]=\"flavoredDmsObject()\"\n #metadata\n [disableControls]=\"true\"\n (statusChanged)=\"onMetadataStatusChanged($event)\"\n (indexDataSaved)=\"onIndexdataSaved($event)\"\n >\n </yuv-object-metadata>\n </main>\n <footer>\n <button ymtButton=\"secondary\" type=\"button\" (click)=\"close()\" [disabled]=\"metadata.busySaving()\">\n {{ 'yuv.app.drive.action.rename.cancel' | translate }}\n </button>\n <button ymtButton=\"secondary\" (click)=\"metadata.resetForm()\" [hidden]=\"!formState()?.dirty\" [disabled]=\"!formState()?.dirty\">\n {{ 'yuv.object-metadata.button.reset' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n class=\"primary\"\n [ngClass]=\"{ spinning: metadata.busySaving() }\"\n (click)=\"metadata.save()\"\n [disabled]=\"!formState()?.dirty || formState()?.invalid\"\n >\n {{ 'yuv.object-metadata.button.save' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host main{overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: DialogComponent, selector: "yuv-dialog", inputs: ["headertitel"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: ObjectMetadataComponent, selector: "yuv-object-metadata", inputs: ["disableControls", "disableBasicMetadata", "situation", "formDisabled", "dmsObject", "flavoredDmsObject"], outputs: ["indexDataSaved", "statusChanged"] }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay", "yuvBusyOverlayConfig"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }] });
|
|
2205
2090
|
}
|
|
2206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2091
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FolderDetailsDialogComponent, decorators: [{
|
|
2207
2092
|
type: Component,
|
|
2208
|
-
args: [{ selector: 'ymd-folder-details-dialog', imports: [CommonModule, DialogComponent, TranslateModule, ObjectMetadataComponent, BusyOverlayDirective, YmtButtonDirective], template: "<yuv-dialog [headertitel]=\"folderName\">\n <main [yuvBusyOverlay]=\"metadata.
|
|
2093
|
+
args: [{ selector: 'ymd-folder-details-dialog', imports: [CommonModule, DialogComponent, TranslateModule, ObjectMetadataComponent, BusyOverlayDirective, YmtButtonDirective], template: "<yuv-dialog [headertitel]=\"folderName\">\n <main [yuvBusyOverlay]=\"metadata.busySaving()\">\n <yuv-object-metadata\n [flavoredDmsObject]=\"flavoredDmsObject()\"\n #metadata\n [disableControls]=\"true\"\n (statusChanged)=\"onMetadataStatusChanged($event)\"\n (indexDataSaved)=\"onIndexdataSaved($event)\"\n >\n </yuv-object-metadata>\n </main>\n <footer>\n <button ymtButton=\"secondary\" type=\"button\" (click)=\"close()\" [disabled]=\"metadata.busySaving()\">\n {{ 'yuv.app.drive.action.rename.cancel' | translate }}\n </button>\n <button ymtButton=\"secondary\" (click)=\"metadata.resetForm()\" [hidden]=\"!formState()?.dirty\" [disabled]=\"!formState()?.dirty\">\n {{ 'yuv.object-metadata.button.reset' | translate }}\n </button>\n <button\n ymtButton=\"primary\"\n class=\"primary\"\n [ngClass]=\"{ spinning: metadata.busySaving() }\"\n (click)=\"metadata.save()\"\n [disabled]=\"!formState()?.dirty || formState()?.invalid\"\n >\n {{ 'yuv.object-metadata.button.save' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host main{overflow-y:auto}\n"] }]
|
|
2209
2094
|
}] });
|
|
2210
2095
|
|
|
2211
2096
|
class RibbonComponent {
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
#
|
|
2215
|
-
#
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
this.busy = input(false);
|
|
2232
|
-
this.enableClipboard = input(false);
|
|
2097
|
+
primarySlot = contentChild('primaryActions');
|
|
2098
|
+
secondarySlot = contentChild('secondaryActions');
|
|
2099
|
+
#drive = inject(DriveService);
|
|
2100
|
+
#clipboard = inject(ClipboardService);
|
|
2101
|
+
#actionsService = inject(ActionsService);
|
|
2102
|
+
_defaultMenuItems = this.#drive.getDefaultRibbonActions().map((a) => ({
|
|
2103
|
+
id: a.id,
|
|
2104
|
+
icon: a.icon,
|
|
2105
|
+
label: a.label,
|
|
2106
|
+
disabled: true,
|
|
2107
|
+
group: 'default',
|
|
2108
|
+
callback: () => this.executeAction(a)
|
|
2109
|
+
}));
|
|
2110
|
+
clipboardBucket = APP_ID;
|
|
2111
|
+
busy = input(false);
|
|
2112
|
+
enableClipboard = input(false);
|
|
2113
|
+
menuItems = this._defaultMenuItems;
|
|
2114
|
+
objects = input();
|
|
2115
|
+
#objectsEffect = effect(() => {
|
|
2233
2116
|
this.menuItems = this._defaultMenuItems;
|
|
2234
|
-
this.objects
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
});
|
|
2239
|
-
this.excludeActions = input();
|
|
2117
|
+
this.#getActionsAndSetupItems(this.objects() || []);
|
|
2118
|
+
});
|
|
2119
|
+
excludeActions = input();
|
|
2120
|
+
constructor() {
|
|
2240
2121
|
this.#clipboard
|
|
2241
2122
|
.clipboard$(this.clipboardBucket)
|
|
2242
2123
|
.pipe(takeUntilDestroyed())
|
|
@@ -2288,10 +2169,10 @@ class RibbonComponent {
|
|
|
2288
2169
|
}))
|
|
2289
2170
|
];
|
|
2290
2171
|
}
|
|
2291
|
-
static
|
|
2292
|
-
static
|
|
2172
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RibbonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2173
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: RibbonComponent, isStandalone: true, selector: "ymd-ribbon", inputs: { busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null }, enableClipboard: { classPropertyName: "enableClipboard", publicName: "enableClipboard", isSignal: true, isRequired: false, transformFunction: null }, objects: { classPropertyName: "objects", publicName: "objects", isSignal: true, isRequired: false, transformFunction: null }, excludeActions: { classPropertyName: "excludeActions", publicName: "excludeActions", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ymd-ribbon" }, queries: [{ propertyName: "primarySlot", first: true, predicate: ["primaryActions"], descendants: true, isSignal: true }, { propertyName: "secondarySlot", first: true, predicate: ["secondaryActions"], descendants: true, isSignal: true }], ngImport: i0, template: "@let primary = primarySlot();\n@let secondary = secondarySlot();\n\n@if (primary) {\n <div class=\"primary-actions\">\n <ng-container [ngTemplateOutlet]=\"primary\"></ng-container>\n </div>\n}\n\n<div class=\"object-actions\">\n @if (enableClipboard()) {\n <yuv-clipboard class=\"dark\" [bucket]=\"clipboardBucket\" [enablePaste]=\"true\" (paste)=\"onClipboardPaste()\"></yuv-clipboard>\n }\n <yuv-overflow-menu [menuItems]=\"menuItems\"></yuv-overflow-menu>\n</div>\n\n@if (secondary) {\n <div class=\"secondary-actions\">\n <ng-container [ngTemplateOutlet]=\"secondary\"></ng-container>\n </div>\n}\n\n@if (busy()) {\n <mat-progress-bar mode=\"indeterminate\" class=\"progress-bar\"></mat-progress-bar>\n}\n", styles: ["ymd-ribbon{--ribbon-button-padding: var(--ymt-spacing-2xs);--ribbon-button-border-radius: 2px;--ribbon-button-gap: var(--ymt-spacing-2xs);--ribbon-icon-size: 20px;flex:0 0 auto;display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:\"primary actions secondary\";align-items:center;gap:var(--ymt-spacing-xs);border-block-end:1px solid var(--ymt-outline-variant);position:relative;padding:var(--ymt-spacing-xs) var(--ymt-spacing-s)}ymd-ribbon .primary-actions{grid-area:primary;overflow-x:auto;overflow-y:hidden}ymd-ribbon .secondary-actions{grid-area:secondary;overflow-x:auto;overflow-y:hidden}ymd-ribbon .object-actions{grid-area:actions;align-self:stretch;overflow-x:auto;border-color:var(--ymt-outline-variant);border-width:0 1px 0 1px;border-style:solid;display:grid;grid-template-rows:1fr;grid-template-columns:1fr;align-items:center;padding-inline:var(--ymt-spacing-xs) 0;position:relative}ymd-ribbon .object-actions yuv-clipboard{z-index:1;position:absolute;inset:0;left:var(--ymt-spacing-xs);right:var(--ymt-spacing-xs)}ymd-ribbon .object-actions ymd-sort{grid-row:1;grid-column:1}ymd-ribbon .sort-column{grid-area:sort;display:flex;align-items:center;gap:var(--ribbon-button-gap);padding:0 var(--ribbon-button-padding)}ymd-ribbon .progress-bar{position:absolute;bottom:-1px}ymd-ribbon .progress-bar{--mdc-linear-progress-active-indicator-height: 2px}ymd-ribbon .progress-bar{--mdc-linear-progress-track-height: 2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ClipboardComponent, selector: "yuv-clipboard", inputs: ["enablePaste", "bucket"], outputs: ["paste"] }, { kind: "component", type: OverflowMenuComponent, selector: "yuv-overflow-menu", inputs: ["overflowIcon", "groupLabels", "menuItems", "vertical"] }, { kind: "component", type: MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2293
2174
|
}
|
|
2294
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RibbonComponent, decorators: [{
|
|
2295
2176
|
type: Component,
|
|
2296
2177
|
args: [{ selector: 'ymd-ribbon', standalone: true, imports: [CommonModule, ClipboardComponent, OverflowMenuComponent, MatProgressBar], encapsulation: ViewEncapsulation.None, host: {
|
|
2297
2178
|
class: 'ymd-ribbon'
|
|
@@ -2299,26 +2180,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
2299
2180
|
}], ctorParameters: () => [] });
|
|
2300
2181
|
|
|
2301
2182
|
class SearchFilterComponent {
|
|
2302
|
-
#shell;
|
|
2303
|
-
#fb;
|
|
2304
|
-
#search;
|
|
2305
|
-
|
|
2183
|
+
#shell = inject(ShellService);
|
|
2184
|
+
#fb = inject(FormBuilder);
|
|
2185
|
+
#search = inject(SearchService);
|
|
2186
|
+
translate = inject(TranslateService$1);
|
|
2187
|
+
ANY_OPTION = 'any';
|
|
2188
|
+
#flavors = this.#shell.getObjectFlavors();
|
|
2189
|
+
typeOptions = signal([]);
|
|
2190
|
+
query = input(null);
|
|
2191
|
+
queryChange = output();
|
|
2192
|
+
filtersActive = signal(false);
|
|
2193
|
+
filterForm = this.#fb.nonNullable.group({
|
|
2194
|
+
type: [this.ANY_OPTION],
|
|
2195
|
+
size: [this.ANY_OPTION],
|
|
2196
|
+
created: [this.ANY_OPTION]
|
|
2197
|
+
});
|
|
2306
2198
|
constructor() {
|
|
2307
|
-
this.#shell = inject(ShellService);
|
|
2308
|
-
this.#fb = inject(FormBuilder);
|
|
2309
|
-
this.#search = inject(SearchService);
|
|
2310
|
-
this.translate = inject(TranslateService$1);
|
|
2311
|
-
this.ANY_OPTION = 'any';
|
|
2312
|
-
this.#flavors = this.#shell.getObjectFlavors();
|
|
2313
|
-
this.typeOptions = signal([]);
|
|
2314
|
-
this.query = input(null);
|
|
2315
|
-
this.queryChange = output();
|
|
2316
|
-
this.filtersActive = signal(false);
|
|
2317
|
-
this.filterForm = this.#fb.nonNullable.group({
|
|
2318
|
-
type: [this.ANY_OPTION],
|
|
2319
|
-
size: [this.ANY_OPTION],
|
|
2320
|
-
created: [this.ANY_OPTION]
|
|
2321
|
-
});
|
|
2322
2199
|
this.translate.onLangChange.pipe(takeUntilDestroyed()).subscribe((_) => this.#setupOptions());
|
|
2323
2200
|
this.#setupOptions();
|
|
2324
2201
|
this.filterForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((v) => this.#onFormValueChange(v));
|
|
@@ -2385,10 +2262,10 @@ class SearchFilterComponent {
|
|
|
2385
2262
|
v1: [value]
|
|
2386
2263
|
};
|
|
2387
2264
|
}
|
|
2388
|
-
static
|
|
2389
|
-
static
|
|
2265
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SearchFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2266
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: SearchFilterComponent, isStandalone: true, selector: "ymd-search-filter", inputs: { query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { queryChange: "queryChange" }, ngImport: i0, template: "<form [formGroup]=\"filterForm\" yuvDragScroll>\n <mat-select [panelWidth]=\"null\" [hideSingleSelectionIndicator]=\"true\" formControlName=\"type\">\n @for (o of typeOptions(); track $index) {\n <mat-option [value]=\"o.value\">{{ o.label }}</mat-option>\n }\n </mat-select>\n <yuv-range-select-filesize formControlName=\"size\"></yuv-range-select-filesize>\n <yuv-range-select-date formControlName=\"created\"></yuv-range-select-date>\n\n @if (filtersActive()) {\n <button ymtButton=\"secondary\" button-size=\"small\" (click)=\"reset()\">{{ 'yuv.app.drive.search.filter.button.reset' | translate }}</button>\n }\n</form>\n", styles: [":host form{--ymt-scrollbar-outer-size: 0;display:flex;align-items:center;gap:var(--ymt-spacing-m);overflow-x:auto;padding:var(--ymt-spacing-3xs);min-height:var(--ymt-spacing-3xl)}:host form yuv-range-select-filesize,:host form yuv-range-select-date,:host form mat-select{cursor:pointer;flex:0 0 auto;padding:0;width:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i7.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: TranslateModule$1 }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: RangeSelectFilesizeComponent, selector: "yuv-range-select-filesize", inputs: ["ranges"] }, { kind: "component", type: RangeSelectDateComponent, selector: "yuv-range-select-date", inputs: ["ranges", "customRange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: DragScrollDirective, selector: "[yuvDragScroll]" }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }] });
|
|
2390
2267
|
}
|
|
2391
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SearchFilterComponent, decorators: [{
|
|
2392
2269
|
type: Component,
|
|
2393
2270
|
args: [{ selector: 'ymd-search-filter', standalone: true, imports: [
|
|
2394
2271
|
CommonModule,
|
|
@@ -2403,10 +2280,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
2403
2280
|
}], ctorParameters: () => [] });
|
|
2404
2281
|
|
|
2405
2282
|
class StoredQueryService {
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
this.translate = inject(TranslateService);
|
|
2409
|
-
}
|
|
2283
|
+
userService = inject(UserService);
|
|
2284
|
+
translate = inject(TranslateService);
|
|
2410
2285
|
getStoredQuery(id) {
|
|
2411
2286
|
const q = STORED_QUERIES[id];
|
|
2412
2287
|
if (!q)
|
|
@@ -2429,10 +2304,10 @@ class StoredQueryService {
|
|
|
2429
2304
|
});
|
|
2430
2305
|
return str;
|
|
2431
2306
|
}
|
|
2432
|
-
static
|
|
2433
|
-
static
|
|
2307
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: StoredQueryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2308
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: StoredQueryService, providedIn: 'root' });
|
|
2434
2309
|
}
|
|
2435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: StoredQueryService, decorators: [{
|
|
2436
2311
|
type: Injectable,
|
|
2437
2312
|
args: [{
|
|
2438
2313
|
providedIn: 'root'
|
|
@@ -2456,156 +2331,149 @@ const components = [
|
|
|
2456
2331
|
];
|
|
2457
2332
|
const module = [TranslateModule, RouterModule, YuvSplitViewModule, YuvClientShellModule];
|
|
2458
2333
|
class FilesPageComponent {
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
this.
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
label: this.translate.instant('yuv.object-summary.action.edit'),
|
|
2506
|
-
callback: () => {
|
|
2507
|
-
const o = this.selected();
|
|
2508
|
-
if (o) {
|
|
2509
|
-
if (o.isFolder) {
|
|
2510
|
-
// open metadata edit dialog^
|
|
2511
|
-
this.#dialog.open(FolderDetailsDialogComponent, {
|
|
2512
|
-
maxHeight: '90vh',
|
|
2513
|
-
maxWidth: '90vw',
|
|
2514
|
-
data: o
|
|
2515
|
-
});
|
|
2516
|
-
}
|
|
2517
|
-
else {
|
|
2518
|
-
this.#navigateTo(o.id);
|
|
2519
|
-
}
|
|
2334
|
+
tileList = viewChild('tileList');
|
|
2335
|
+
LAYOUT_SETTINGS_STORAGE_KEY = 'yuv.app.drive.files.layout';
|
|
2336
|
+
shellService = inject(ShellService);
|
|
2337
|
+
dmsService = inject(DmsService);
|
|
2338
|
+
drive = inject(DriveService);
|
|
2339
|
+
route = inject(ActivatedRoute);
|
|
2340
|
+
router = inject(Router);
|
|
2341
|
+
translate = inject(TranslateService);
|
|
2342
|
+
storedQueryService = inject(StoredQueryService);
|
|
2343
|
+
clipboard = inject(ClipboardService);
|
|
2344
|
+
#objectConfigService = inject(ObjectConfigService);
|
|
2345
|
+
#device = inject(DeviceService);
|
|
2346
|
+
#retention = inject(RetentionService);
|
|
2347
|
+
#shell = inject(ShellService);
|
|
2348
|
+
#dialog = inject(MatDialog);
|
|
2349
|
+
#eventService = inject(EventService);
|
|
2350
|
+
ERROR_CODE = {
|
|
2351
|
+
NOT_FOUND: '404',
|
|
2352
|
+
// pattern: {HTTP_STATUS_CODE}-{SERVICE_ERROR_CODE}
|
|
2353
|
+
INVALID_ID: '422-2912'
|
|
2354
|
+
};
|
|
2355
|
+
#appCache = inject(AppCacheService);
|
|
2356
|
+
objectConfigBucket = APP_ID;
|
|
2357
|
+
splitViewCmp = viewChild.required(SplitViewComponent);
|
|
2358
|
+
selected = signal(undefined);
|
|
2359
|
+
sortOptions = signal([
|
|
2360
|
+
BaseObjectTypeField.CREATION_DATE,
|
|
2361
|
+
BaseObjectTypeField.MODIFICATION_DATE,
|
|
2362
|
+
ContentStreamField.LENGTH,
|
|
2363
|
+
ContentStreamField.MIME_TYPE
|
|
2364
|
+
]);
|
|
2365
|
+
storageKey = 'yuv.app.drive.files.sort';
|
|
2366
|
+
#editAction = {
|
|
2367
|
+
id: 'edit',
|
|
2368
|
+
icon: 'edit_note',
|
|
2369
|
+
label: this.translate.instant('yuv.object-summary.action.edit'),
|
|
2370
|
+
callback: () => {
|
|
2371
|
+
const o = this.selected();
|
|
2372
|
+
if (o) {
|
|
2373
|
+
if (o.isFolder) {
|
|
2374
|
+
// open metadata edit dialog^
|
|
2375
|
+
this.#dialog.open(FolderDetailsDialogComponent, {
|
|
2376
|
+
maxHeight: '90vh',
|
|
2377
|
+
maxWidth: '90vw',
|
|
2378
|
+
data: o
|
|
2379
|
+
});
|
|
2520
2380
|
}
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
this.summaryActions = computed(() => {
|
|
2524
|
-
const e = this.selected();
|
|
2525
|
-
if (!e)
|
|
2526
|
-
return [];
|
|
2527
|
-
const res = this.#shell.getAppliedObjectFlavors(e);
|
|
2528
|
-
return !e.isFolder || res.applied.length ? [this.#editAction] : [];
|
|
2529
|
-
});
|
|
2530
|
-
this.fileDropSummaryDisabled = computed(() => {
|
|
2531
|
-
const e = this.selected();
|
|
2532
|
-
return !e || !e.permissions?.writeContent || this.#retention.getRetentionState(e).underRetention;
|
|
2533
|
-
});
|
|
2534
|
-
this.disableCreate = false;
|
|
2535
|
-
this.actions = this.drive.state$.actions;
|
|
2536
|
-
this.selection = this.drive.state$.selection;
|
|
2537
|
-
this.extendedQuery = this.drive.state$.extendedQuery;
|
|
2538
|
-
this.hasActions = computed(() => !!this.actions().length);
|
|
2539
|
-
this.busy = this.drive.state$.busy;
|
|
2540
|
-
this.flavorChips = this.shellService.getObjectFlavors();
|
|
2541
|
-
this.selectionActions = computed(() => ({ selection: this.selection(), actions: this.actions() }));
|
|
2542
|
-
this.emptyMode = signal(null);
|
|
2543
|
-
// error code when loading the object failed. This will be used
|
|
2544
|
-
// to determine a proper error message to display
|
|
2545
|
-
this.error = signal(undefined);
|
|
2546
|
-
this.configTypeOptions = {
|
|
2547
|
-
folder: { bucket: APP_ID, type: APP_TYPES['folder'] },
|
|
2548
|
-
file: { bucket: APP_ID, type: APP_TYPES['file'] }
|
|
2549
|
-
};
|
|
2550
|
-
this.enableDetails = signal(true);
|
|
2551
|
-
this.enableTree = signal(true);
|
|
2552
|
-
this.tileConfigBucketLabel = this.translate.instant('yuv.app.drive.tile-config.bucket');
|
|
2553
|
-
this.smallScreenLayout = signal(false);
|
|
2554
|
-
this.sortOptionsAvailable = signal(true);
|
|
2555
|
-
this.extendedSearch = signal(false);
|
|
2556
|
-
this.id = input(null);
|
|
2557
|
-
this.highlightStyles$ = this.clipboard.clipboard$(APP_ID).pipe(takeUntilDestroyed(), map((c) => {
|
|
2558
|
-
return c && c.mode && c.objects?.length
|
|
2559
|
-
? [
|
|
2560
|
-
{
|
|
2561
|
-
cssStyles: this.#highlightStyles[c?.mode],
|
|
2562
|
-
ids: c.objects.map((o) => o.id)
|
|
2563
|
-
}
|
|
2564
|
-
]
|
|
2565
|
-
: [];
|
|
2566
|
-
}));
|
|
2567
|
-
this.#highlightStyles = {
|
|
2568
|
-
cut: { opacity: 0.5 }
|
|
2569
|
-
};
|
|
2570
|
-
this.#routeIdEffect = effect(() => {
|
|
2571
|
-
const param = this.id() || undefined;
|
|
2572
|
-
untracked(async () => {
|
|
2573
|
-
if (param === DRIVE_QUERY_FOLDER_ID) {
|
|
2574
|
-
this.emptyMode.set(DRIVE_QUERY_FOLDER_ID);
|
|
2575
|
-
return;
|
|
2381
|
+
else {
|
|
2382
|
+
this.#navigateTo(o.id);
|
|
2576
2383
|
}
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
};
|
|
2387
|
+
summaryActions = computed(() => {
|
|
2388
|
+
const e = this.selected();
|
|
2389
|
+
if (!e)
|
|
2390
|
+
return [];
|
|
2391
|
+
const res = this.#shell.getAppliedObjectFlavors(e);
|
|
2392
|
+
return !e.isFolder || res.applied.length ? [this.#editAction] : [];
|
|
2393
|
+
});
|
|
2394
|
+
fileDropSummaryDisabled = computed(() => {
|
|
2395
|
+
const e = this.selected();
|
|
2396
|
+
return !e || !e.permissions?.writeContent || this.#retention.getRetentionState(e).underRetention;
|
|
2397
|
+
});
|
|
2398
|
+
disableCreate = false;
|
|
2399
|
+
actions = this.drive.state$.actions;
|
|
2400
|
+
selection = this.drive.state$.selection;
|
|
2401
|
+
extendedQuery = this.drive.state$.extendedQuery;
|
|
2402
|
+
hasActions = computed(() => !!this.actions().length);
|
|
2403
|
+
busy = this.drive.state$.busy;
|
|
2404
|
+
flavorChips = this.shellService.getObjectFlavors();
|
|
2405
|
+
appliedFlavor;
|
|
2406
|
+
selectionActions = computed(() => ({ selection: this.selection(), actions: this.actions() }));
|
|
2407
|
+
emptyMode = signal(null);
|
|
2408
|
+
// error code when loading the object failed. This will be used
|
|
2409
|
+
// to determine a proper error message to display
|
|
2410
|
+
error = signal(undefined);
|
|
2411
|
+
configTypeOptions = {
|
|
2412
|
+
folder: { bucket: APP_ID, type: APP_TYPES['folder'] },
|
|
2413
|
+
file: { bucket: APP_ID, type: APP_TYPES['file'] }
|
|
2414
|
+
};
|
|
2415
|
+
currentFolderID;
|
|
2416
|
+
currentFolder;
|
|
2417
|
+
enableDetails = signal(true);
|
|
2418
|
+
enableTree = signal(true);
|
|
2419
|
+
tileConfigBucketLabel = this.translate.instant('yuv.app.drive.tile-config.bucket');
|
|
2420
|
+
smallScreenLayout = signal(false);
|
|
2421
|
+
sortOptionsAvailable = signal(true);
|
|
2422
|
+
extendedSearch = signal(false);
|
|
2423
|
+
id = input(null);
|
|
2424
|
+
highlightStyles$ = this.clipboard.clipboard$(APP_ID).pipe(takeUntilDestroyed(), map((c) => {
|
|
2425
|
+
return c && c.mode && c.objects?.length
|
|
2426
|
+
? [
|
|
2427
|
+
{
|
|
2428
|
+
cssStyles: this.#highlightStyles[c?.mode],
|
|
2429
|
+
ids: c.objects.map((o) => o.id)
|
|
2597
2430
|
}
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2431
|
+
]
|
|
2432
|
+
: [];
|
|
2433
|
+
}));
|
|
2434
|
+
#highlightStyles = {
|
|
2435
|
+
cut: { opacity: 0.5 }
|
|
2436
|
+
};
|
|
2437
|
+
#routeIdEffect = effect(() => {
|
|
2438
|
+
const param = this.id() || undefined;
|
|
2439
|
+
untracked(async () => {
|
|
2440
|
+
if (param === DRIVE_QUERY_FOLDER_ID) {
|
|
2441
|
+
this.emptyMode.set(DRIVE_QUERY_FOLDER_ID);
|
|
2442
|
+
return;
|
|
2443
|
+
}
|
|
2444
|
+
this.emptyMode.set(param === DRIVE_ROOT_FOLDER_ID ? DRIVE_ROOT_FOLDER_ID : null);
|
|
2445
|
+
this.error.set(undefined);
|
|
2446
|
+
this.disableCreate = false;
|
|
2447
|
+
this.currentFolderID = param;
|
|
2448
|
+
this.drive.updateCurrentFolder(this.currentFolderID);
|
|
2449
|
+
this.selected.set(undefined);
|
|
2450
|
+
this.currentFolder = undefined;
|
|
2451
|
+
if (this.currentFolderID === DRIVE_ROOT_FOLDER_ID)
|
|
2452
|
+
this.currentFolderID = undefined;
|
|
2453
|
+
if (this.currentFolderID) {
|
|
2454
|
+
this.dmsService.getDmsObject(this.currentFolderID).subscribe({
|
|
2455
|
+
next: (o) => {
|
|
2456
|
+
this.currentFolder = o;
|
|
2457
|
+
this._setFolderQuery(this.#getTitle(o));
|
|
2458
|
+
},
|
|
2459
|
+
error: (e) => {
|
|
2460
|
+
console.error('Error getting folder', e);
|
|
2461
|
+
this.#processLoadError(e);
|
|
2462
|
+
}
|
|
2463
|
+
});
|
|
2464
|
+
}
|
|
2465
|
+
else
|
|
2466
|
+
this._setFolderQuery(this.translate.instant('yuv.app.drive.folder-tree.mydrive'));
|
|
2601
2467
|
});
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2468
|
+
});
|
|
2469
|
+
tileListOptions = {
|
|
2470
|
+
actionContext: ACTION_CONTEXT,
|
|
2471
|
+
configTypes: Object.values(APP_TYPES),
|
|
2472
|
+
configFlavors: []
|
|
2473
|
+
};
|
|
2474
|
+
query = this.drive.state$.query;
|
|
2475
|
+
queryTitle = this.drive.state$.queryTitle;
|
|
2476
|
+
constructor() {
|
|
2609
2477
|
this.drive.events$.pipe(takeUntilDestroyed()).subscribe({
|
|
2610
2478
|
next: (e) => {
|
|
2611
2479
|
if (e === DRIVE_EVENT.refresh) {
|
|
@@ -2794,10 +2662,10 @@ class FilesPageComponent {
|
|
|
2794
2662
|
ngOnDestroy() {
|
|
2795
2663
|
this.clipboard.clear(APP_ID);
|
|
2796
2664
|
}
|
|
2797
|
-
static
|
|
2798
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: FilesPageComponent, isStandalone: true, selector: "ymd-files", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.smallScreen": "smallScreenLayout()" } }, viewQueries: [{ propertyName: "tileList", first: true, predicate: ["tileList"], descendants: true, isSignal: true }, { propertyName: "splitViewCmp", first: true, predicate: SplitViewComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<header>\n <!-- navigation bar -->\n <nav [attr.aria-label]=\"'yuv.app.drive.files.naviagtion.aria.label' | translate\">\n <div class=\"nav\">\n <button mat-icon-button [disabled]=\"!currentFolder\" [matTooltip]=\"'yuv.app.drive.files.nav.back.tooltip' | translate\" (click)=\"openParent()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'yuv.app.drive.files.nav.refresh.tooltip' | translate\" (click)=\"refresh()\">\n <mat-icon>refresh</mat-icon>\n </button>\n </div>\n\n @if (!query()?.term) {\n <ymd-breadcrumb></ymd-breadcrumb>\n } @else {\n <div class=\"breadcrumb\"></div>\n }\n </nav>\n\n <!-- ribbon with actions and options -->\n <ymd-ribbon [objects]=\"selection()\" [busy]=\"busy()\" [enableClipboard]=\"true\" class=\"files__surface\">\n <ng-template #primaryActions>\n <ymd-add-button [disabled]=\"disableCreate\"></ymd-add-button>\n </ng-template>\n\n <ng-template #secondaryActions>\n <div class=\"options\">\n @if (!smallScreenLayout()) {\n <button\n mat-icon-button\n class=\"toggle-tree toggle\"\n [ngClass]=\"{ enabled: enableTree() }\"\n [matTooltip]=\"'yuv.app.drive.files.toggletree.tooltip' | translate\"\n (click)=\"enableTree.set(!enableTree())\"\n >\n <mat-icon>dock_to_right</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-details toggle\"\n [ngClass]=\"{ enabled: enableDetails() }\"\n [matTooltip]=\"'yuv.app.drive.files.toggledetails.tooltip' | translate\"\n (click)=\"enableDetails.set(!enableDetails())\"\n >\n <mat-icon>dock_to_left</mat-icon>\n </button>\n }\n <yuv-tile-config-trigger [bucket]=\"objectConfigBucket\" [bucketLabel]=\"tileConfigBucketLabel\" [options]=\"tileListOptions\"></yuv-tile-config-trigger>\n </div>\n </ng-template>\n </ymd-ribbon>\n</header>\n\n<yuv-split-view [gutterSize]=\"1\" [layoutSettingsID]=\"LAYOUT_SETTINGS_STORAGE_KEY\" class=\"files__surface\">\n <!-- folder tree -->\n <ng-template yuvSplitArea [size]=\"20\" [visible]=\"enableTree() && !smallScreenLayout()\">\n <ymd-folder-tree></ymd-folder-tree>\n </ng-template>\n\n <!-- files -->\n <ng-template yuvSplitArea [size]=\"60\">\n @let err = error();\n @if (err) {\n <div class=\"error\">\n <p>\n <mat-icon>warning</mat-icon>\n @switch (err) {\n @case (ERROR_CODE.NOT_FOUND) {\n {{ 'yuv.app.drive.files.error.load.not-found' | translate }}\n }\n @case (ERROR_CODE.INVALID_ID) {\n {{ 'yuv.app.drive.files.error.load.invalid-id' | translate }}\n }\n @default {\n {{ 'yuv.app.drive.files.error.load' | translate }}\n }\n }\n </p>\n </div>\n } @else {\n <div class=\"files\" [yuvFileDropZone]=\"{ label: 'yuv.app.drive.files.dropzone.label' | translate }\" (fileDrop)=\"onFileDrop($event)\">\n <header class=\"files-header\">\n <h1>{{ queryTitle() }}</h1>\n @if (sortOptionsAvailable()) {\n <yuv-sort [sortOptions]=\"sortOptions()\" [storageKey]=\"storageKey\" (sortChanged)=\"onSortChanged($event)\"></yuv-sort>\n }\n <!-- <div class=\"flavors\">\n TODO: enable again once flavors/aspects are supported -->\n <!-- @for (f of flavorChips; track f.id) {\n <yuv-flavor-chip [ngClass]=\"{ active: f.id === appliedFlavor?.id }\" [flavor]=\"f\" (click)=\"appliedFlavor = f\"></yuv-flavor-chip>\n }\n </div>-->\n @if (query()?.term && !extendedQuery()) {\n <ymd-search-filter [query]=\"query()\" (queryChange)=\"onFilterQueryChange($event)\"></ymd-search-filter>\n }\n </header>\n <yuv-tile-list\n #tileList\n [attr.aria-label]=\"'yuv.app.drive.files.content.aria.label' | translate\"\n [attr.aria-busy]=\"busy()\"\n [attr.role]=\"'listbox'\"\n (keydown.backspace)=\"openParent()\"\n (keydown.delete)=\"onDelete()\"\n [bucket]=\"objectConfigBucket\"\n [multiselect]=\"true\"\n [query]=\"query()\"\n [flavor]=\"appliedFlavor\"\n [options]=\"tileListOptions\"\n (itemDblClick)=\"itemDoubleClicked($event)\"\n (itemSelect)=\"itemClicked($event)\"\n (selectionChange)=\"selectionChanged($event)\"\n (tileCopy)=\"onCopy($event)\"\n (tileCut)=\"onCut($event)\"\n (busy)=\"setBusy($event)\"\n [highlights]=\"highlightStyles$ | async\"\n [yuvContextMenuTrigger]=\"context_menu\"\n [yuvContextMenuTriggerWhen]=\"hasActions()\"\n >\n <div #empty>\n @if (emptyMode() === 'root') {\n <p class=\"empty\">{{ 'yuv.app.drive.files.content.empty.root.list' | translate }}</p>\n } @else if (emptyMode() === 'query') {\n <p class=\"empty\">{{ 'yuv.app.drive.files.content.empty.query.list' | translate }}</p>\n } @else {\n <p class=\"empty\">{{ 'yuv.app.drive.files.content.empty.list' | translate }}</p>\n }\n </div>\n\n <ng-template #context_menu>\n <yuv-contextmenu [actions]=\"actions()\" (itemSelect)=\"onContextmenuAction($event)\"></yuv-contextmenu>\n </ng-template>\n </yuv-tile-list>\n </div>\n }\n </ng-template>\n\n <!-- details -->\n <ng-template yuvSplitArea [size]=\"20\" [visible]=\"enableDetails()\">\n @let selectedItem = selected();\n @if (enableDetails() && selectedItem) {\n @if (selectedItem?.isFolder) {\n <yuv-object-summary [actions]=\"summaryActions()\" [configType]=\"configTypeOptions['folder']\" [dmsObject]=\"selectedItem\"></yuv-object-summary>\n } @else {\n <yuv-object-summary\n [actions]=\"summaryActions()\"\n [configType]=\"configTypeOptions['file']\"\n [dmsObject]=\"selectedItem\"\n [yuvFileDropZone]=\"{ label: 'yuv.app.drive.files.dropzone.content.replace.label' | translate }\"\n [fileDropDisabled]=\"fileDropSummaryDisabled()\"\n (fileDrop)=\"onFileUpdateDrop($event)\"\n ></yuv-object-summary>\n }\n } @else {\n @let sel = selection();\n @if (sel && sel.length > 0) {\n <yuv-multi-object-summary [headline]=\"'yuv.app.drive.multiselected.details' | translate: { count: selection().length }\"></yuv-multi-object-summary>\n } @else if (tileList()?.items?.length === 0) {\n <!-- TODO: CHOULD HAVE A DIFFERENT MESSAGE FOR EMPTY RESULTS EMPTY FOR NOW -->\n <div class=\"message\">{{ 'yuv.app.drive.empty.results.details.message' | translate }}</div>\n } @else {\n <div class=\"message\">{{ 'yuv.app.drive.unselected.details' | translate }}</div>\n }\n }\n </ng-template>\n</yuv-split-view>\n", styles: [":host{height:100%;overflow:hidden;display:flex;flex-flow:column}:host header{flex:0 0 auto}:host header>nav{border-block-end:1px solid var(--ymt-outline-variant);display:grid;grid-template-columns:auto 1fr 1fr auto;align-items:center;gap:var(--ymt-spacing-xs);padding:var(--ymt-spacing-2xs) var(--ymt-spacing-s) var(--ymt-spacing-s) var(--ymt-spacing-s);min-height:40px}:host header>nav .nav{grid-column:1/2;grid-row:1;display:flex;border-inline-end:1px solid var(--ymt-outline-variant);padding-inline-end:var(--ymt-spacing-xs);gap:var(--ymt-spacing-3xs);margin-bottom:calc(var(--ymt-spacing-s) * -1)}:host header>nav .breadcrumb{grid-column:2/4;grid-row:1;display:flex;margin-bottom:calc(var(--ymt-spacing-s) * -1)}:host yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);flex:1;animation:fade-in .3s ease-in-out}:host main{height:100%;overflow:hidden;display:flex;flex-flow:column}:host .error{display:grid;justify-items:center;align-items:center;height:100%;padding:0 2rem;text-align:center;color:var(--ymt-text-color-subtle)}:host .error p{max-width:31ch;line-height:1.5em;display:grid;justify-items:center}:host .error p mat-icon{display:block;margin-block-end:1rem}:host .files{display:flex;flex-flow:column;overflow:hidden;height:100%}:host .files header{flex:0 0 auto;padding:var(--ymt-spacing-l) var(--ymt-spacing-l) var(--ymt-spacing-s) var(--ymt-spacing-l);display:grid;grid-template-columns:1fr;gap:var(--ymt-spacing-3xs);grid-template-areas:\"title sort\" \"flavors flavors\" \"searchfilter searchfilter\"}:host .files header h1{grid-area:title;margin:0;height:min-content}:host .files header .flavors{grid-area:flavors;display:flex;gap:2px;justify-content:flex-end;padding:var(--ymt-spacing-2xs)}:host .files header .flavors yuv-flavor-chip{font:var(--ymt-font-body-subtle);cursor:pointer;--flavor-background: var(--ymt-surface-panel);--flavor-icon-size: 16px}:host .files header .flavors yuv-flavor-chip:hover{--flavor-border-color: var(--ymt-primary)}:host .files header ymd-sort{grid-area:sort}:host .files header ymd-search-filter{grid-area:searchfilter}:host .files yuv-tile-list{--paging-margin: 0;overflow-y:auto}:host .message{display:grid;justify-items:center;align-items:center;height:100%;padding:0 var(--ymt-spacing-3xl);text-align:center;color:var(--ymt-text-color-subtle)}:host .message p{max-width:31ch;line-height:1.5em}:host yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);display:flex;height:100%;box-sizing:border-box}:host ymd-folder-tree{padding:var(--ymt-spacing-l) var(--ymt-spacing-m);min-width:300px}:host ymd-folder-tree,:host yuv-object-summary{height:100%;overflow-y:auto;display:block}:host yuv-tile-list{--tile-border: 1px solid var(--ymt-outline-variant);--tile-border-width: 0 0 1px 0;--tile-icon-size: 18px;--tile-action-icon-size: 18px}:host p.empty{color:var(--ymt-text-color-subtle)}:host .details{height:100%}:host .details yuv-object-details{height:100%}:host.smallScreen yuv-tile-list{--tile-padding: var(--ymt-spacing-m) !important}@keyframes fade-in{0%{opacity:0}}.files__surface{background-color:var(--ymt-surface)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: YuvSplitViewModule }, { kind: "directive", type: i1$2.SplitAreaDirective, selector: "[yuvSplitArea]", inputs: ["size", "minSize", "maxSize", "panelClass", "visible"] }, { kind: "component", type: i1$2.SplitViewComponent, selector: "yuv-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "ngmodule", type: YuvClientShellModule }, { kind: "component", type: TileListComponent, selector: "yuv-tile-list", inputs: ["bucket", "multiselect", "options", "flavor", "query", "preselect", "highlights"], outputs: ["itemSelect", "tileCopy", "tileCut", "busy", "queryResult", "selectionChange", "itemDblClick", "ctxMenu"] }, { kind: "component", type: BreadcrumbComponent, selector: "ymd-breadcrumb" }, { kind: "component", type: FolderTreeComponent, selector: "ymd-folder-tree" }, { kind: "component", type: ObjectSummaryComponent, selector: "yuv-object-summary", inputs: ["actions", "dmsObject", "objectId", "configType"] }, { kind: "component", type: TileConfigTriggerComponent, selector: "yuv-tile-config-trigger", inputs: ["icon", "bucket", "bucketLabel", "options"] }, { kind: "component", type: RibbonComponent, selector: "ymd-ribbon", inputs: ["busy", "enableClipboard", "objects", "excludeActions"] }, { kind: "component", type: AddButtonComponent, selector: "ymd-add-button", inputs: ["disabled"] }, { kind: "component", type: MultiObjectSummaryComponent, selector: "yuv-multi-object-summary", inputs: ["headline"] }, { kind: "component", type: SortComponent, selector: "yuv-sort", inputs: ["sortOptions", "storageKey"], outputs: ["sortChanged"] }, { kind: "component", type: SearchFilterComponent, selector: "ymd-search-filter", inputs: ["query"], outputs: ["queryChange"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: FileDropZoneDirective, selector: "[yuvFileDropZone]", inputs: ["yuvFileDropZone", "fileDropDisabled"], outputs: ["fileDrop", "fileDropOver"] }, { kind: "component", type: ContextmenuComponent, selector: "yuv-contextmenu", inputs: ["actions", "selection"], outputs: ["itemSelect"] }, { kind: "directive", type: YuvContextMenuTriggerDirective, selector: "[yuvContextMenuTrigger]", inputs: ["yuvContextMenuTrigger", "yuvContextMenuTriggerWhen"], exportAs: ["yuvContextMenuTrigger"] }] }); }
|
|
2665
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FilesPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2666
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: FilesPageComponent, isStandalone: true, selector: "ymd-files", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.smallScreen": "smallScreenLayout()" } }, viewQueries: [{ propertyName: "tileList", first: true, predicate: ["tileList"], descendants: true, isSignal: true }, { propertyName: "splitViewCmp", first: true, predicate: SplitViewComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<header>\n <!-- navigation bar -->\n <nav [attr.aria-label]=\"'yuv.app.drive.files.naviagtion.aria.label' | translate\">\n <div class=\"nav\">\n <button mat-icon-button [disabled]=\"!currentFolder\" [matTooltip]=\"'yuv.app.drive.files.nav.back.tooltip' | translate\" (click)=\"openParent()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n <button mat-icon-button [matTooltip]=\"'yuv.app.drive.files.nav.refresh.tooltip' | translate\" (click)=\"refresh()\">\n <mat-icon>refresh</mat-icon>\n </button>\n </div>\n\n @if (!query()?.term) {\n <ymd-breadcrumb></ymd-breadcrumb>\n } @else {\n <div class=\"breadcrumb\"></div>\n }\n </nav>\n\n <!-- ribbon with actions and options -->\n <ymd-ribbon [objects]=\"selection()\" [busy]=\"busy()\" [enableClipboard]=\"true\" class=\"files__surface\">\n <ng-template #primaryActions>\n <ymd-add-button [disabled]=\"disableCreate\"></ymd-add-button>\n </ng-template>\n\n <ng-template #secondaryActions>\n <div class=\"options\">\n @if (!smallScreenLayout()) {\n <button\n mat-icon-button\n class=\"toggle-tree toggle\"\n [ngClass]=\"{ enabled: enableTree() }\"\n [matTooltip]=\"'yuv.app.drive.files.toggletree.tooltip' | translate\"\n (click)=\"enableTree.set(!enableTree())\"\n >\n <mat-icon>dock_to_right</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-details toggle\"\n [ngClass]=\"{ enabled: enableDetails() }\"\n [matTooltip]=\"'yuv.app.drive.files.toggledetails.tooltip' | translate\"\n (click)=\"enableDetails.set(!enableDetails())\"\n >\n <mat-icon>dock_to_left</mat-icon>\n </button>\n }\n <yuv-tile-config-trigger [bucket]=\"objectConfigBucket\" [bucketLabel]=\"tileConfigBucketLabel\" [options]=\"tileListOptions\"></yuv-tile-config-trigger>\n </div>\n </ng-template>\n </ymd-ribbon>\n</header>\n\n<yuv-split-view [gutterSize]=\"1\" [layoutSettingsID]=\"LAYOUT_SETTINGS_STORAGE_KEY\" class=\"files__surface\">\n <!-- folder tree -->\n <ng-template yuvSplitArea [size]=\"20\" [visible]=\"enableTree() && !smallScreenLayout()\">\n <ymd-folder-tree></ymd-folder-tree>\n </ng-template>\n\n <!-- files -->\n <ng-template yuvSplitArea [size]=\"60\">\n @let err = error();\n @if (err) {\n <div class=\"error\">\n <p>\n <mat-icon>warning</mat-icon>\n @switch (err) {\n @case (ERROR_CODE.NOT_FOUND) {\n {{ 'yuv.app.drive.files.error.load.not-found' | translate }}\n }\n @case (ERROR_CODE.INVALID_ID) {\n {{ 'yuv.app.drive.files.error.load.invalid-id' | translate }}\n }\n @default {\n {{ 'yuv.app.drive.files.error.load' | translate }}\n }\n }\n </p>\n </div>\n } @else {\n <div class=\"files\" [yuvFileDropZone]=\"{ label: 'yuv.app.drive.files.dropzone.label' | translate }\" (fileDrop)=\"onFileDrop($event)\">\n <header class=\"files-header\">\n <h1>{{ queryTitle() }}</h1>\n @if (sortOptionsAvailable()) {\n <yuv-sort [sortOptions]=\"sortOptions()\" [storageKey]=\"storageKey\" (sortChanged)=\"onSortChanged($event)\"></yuv-sort>\n }\n <!-- <div class=\"flavors\">\n TODO: enable again once flavors/aspects are supported -->\n <!-- @for (f of flavorChips; track f.id) {\n <yuv-flavor-chip [ngClass]=\"{ active: f.id === appliedFlavor?.id }\" [flavor]=\"f\" (click)=\"appliedFlavor = f\"></yuv-flavor-chip>\n }\n </div>-->\n @if (query()?.term && !extendedQuery()) {\n <ymd-search-filter [query]=\"query()\" (queryChange)=\"onFilterQueryChange($event)\"></ymd-search-filter>\n }\n </header>\n <yuv-tile-list\n #tileList\n [attr.aria-label]=\"'yuv.app.drive.files.content.aria.label' | translate\"\n [attr.aria-busy]=\"busy()\"\n [attr.role]=\"'listbox'\"\n (keydown.backspace)=\"openParent()\"\n (keydown.delete)=\"onDelete()\"\n [bucket]=\"objectConfigBucket\"\n [multiselect]=\"true\"\n [query]=\"query()\"\n [flavor]=\"appliedFlavor\"\n [options]=\"tileListOptions\"\n (itemDblClick)=\"itemDoubleClicked($event)\"\n (itemSelect)=\"itemClicked($event)\"\n (selectionChange)=\"selectionChanged($event)\"\n (tileCopy)=\"onCopy($event)\"\n (tileCut)=\"onCut($event)\"\n (busy)=\"setBusy($event)\"\n [highlights]=\"highlightStyles$ | async\"\n [yuvContextMenuTrigger]=\"context_menu\"\n [yuvContextMenuTriggerWhen]=\"hasActions()\"\n >\n <div #empty>\n @if (emptyMode() === 'root') {\n <p class=\"empty\">{{ 'yuv.app.drive.files.content.empty.root.list' | translate }}</p>\n } @else if (emptyMode() === 'query') {\n <p class=\"empty\">{{ 'yuv.app.drive.files.content.empty.query.list' | translate }}</p>\n } @else {\n <p class=\"empty\">{{ 'yuv.app.drive.files.content.empty.list' | translate }}</p>\n }\n </div>\n\n <ng-template #context_menu>\n <yuv-contextmenu [actions]=\"actions()\" (itemSelect)=\"onContextmenuAction($event)\"></yuv-contextmenu>\n </ng-template>\n </yuv-tile-list>\n </div>\n }\n </ng-template>\n\n <!-- details -->\n <ng-template yuvSplitArea [size]=\"20\" [visible]=\"enableDetails()\">\n @let selectedItem = selected();\n @if (enableDetails() && selectedItem) {\n @if (selectedItem?.isFolder) {\n <yuv-object-summary [actions]=\"summaryActions()\" [configType]=\"configTypeOptions['folder']\" [dmsObject]=\"selectedItem\"></yuv-object-summary>\n } @else {\n <yuv-object-summary\n [actions]=\"summaryActions()\"\n [configType]=\"configTypeOptions['file']\"\n [dmsObject]=\"selectedItem\"\n [yuvFileDropZone]=\"{ label: 'yuv.app.drive.files.dropzone.content.replace.label' | translate }\"\n [fileDropDisabled]=\"fileDropSummaryDisabled()\"\n (fileDrop)=\"onFileUpdateDrop($event)\"\n ></yuv-object-summary>\n }\n } @else {\n @let sel = selection();\n @if (sel && sel.length > 0) {\n <yuv-multi-object-summary [headline]=\"'yuv.app.drive.multiselected.details' | translate: { count: selection().length }\"></yuv-multi-object-summary>\n } @else if (tileList()?.items?.length === 0) {\n <!-- TODO: CHOULD HAVE A DIFFERENT MESSAGE FOR EMPTY RESULTS EMPTY FOR NOW -->\n <div class=\"message\">{{ 'yuv.app.drive.empty.results.details.message' | translate }}</div>\n } @else {\n <div class=\"message\">{{ 'yuv.app.drive.unselected.details' | translate }}</div>\n }\n }\n </ng-template>\n</yuv-split-view>\n", styles: [":host{height:100%;overflow:hidden;display:flex;flex-flow:column}:host header{flex:0 0 auto}:host header>nav{border-block-end:1px solid var(--ymt-outline-variant);display:grid;grid-template-columns:auto 1fr 1fr auto;align-items:center;gap:var(--ymt-spacing-xs);padding:var(--ymt-spacing-2xs) var(--ymt-spacing-s) var(--ymt-spacing-s) var(--ymt-spacing-s);min-height:40px}:host header>nav .nav{grid-column:1/2;grid-row:1;display:flex;border-inline-end:1px solid var(--ymt-outline-variant);padding-inline-end:var(--ymt-spacing-xs);gap:var(--ymt-spacing-3xs);margin-bottom:calc(var(--ymt-spacing-s) * -1)}:host header>nav .breadcrumb{grid-column:2/4;grid-row:1;display:flex;margin-bottom:calc(var(--ymt-spacing-s) * -1)}:host yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);flex:1;animation:fade-in .3s ease-in-out}:host main{height:100%;overflow:hidden;display:flex;flex-flow:column}:host .error{display:grid;justify-items:center;align-items:center;height:100%;padding:0 2rem;text-align:center;color:var(--ymt-text-color-subtle)}:host .error p{max-width:31ch;line-height:1.5em;display:grid;justify-items:center}:host .error p mat-icon{display:block;margin-block-end:1rem}:host .files{display:flex;flex-flow:column;overflow:hidden;height:100%}:host .files header{flex:0 0 auto;padding:var(--ymt-spacing-l) var(--ymt-spacing-l) var(--ymt-spacing-s) var(--ymt-spacing-l);display:grid;grid-template-columns:1fr;gap:var(--ymt-spacing-3xs);grid-template-areas:\"title sort\" \"flavors flavors\" \"searchfilter searchfilter\"}:host .files header h1{grid-area:title;margin:0;height:min-content}:host .files header .flavors{grid-area:flavors;display:flex;gap:2px;justify-content:flex-end;padding:var(--ymt-spacing-2xs)}:host .files header .flavors yuv-flavor-chip{font:var(--ymt-font-body-subtle);cursor:pointer;--flavor-background: var(--ymt-surface-panel);--flavor-icon-size: 16px}:host .files header .flavors yuv-flavor-chip:hover{--flavor-border-color: var(--ymt-primary)}:host .files header ymd-sort{grid-area:sort}:host .files header ymd-search-filter{grid-area:searchfilter}:host .files yuv-tile-list{--paging-margin: 0;overflow-y:auto}:host .message{display:grid;justify-items:center;align-items:center;height:100%;padding:0 var(--ymt-spacing-3xl);text-align:center;color:var(--ymt-text-color-subtle)}:host .message p{max-width:31ch;line-height:1.5em}:host yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);display:flex;height:100%;box-sizing:border-box}:host ymd-folder-tree{padding:var(--ymt-spacing-l) var(--ymt-spacing-m);min-width:300px}:host ymd-folder-tree,:host yuv-object-summary{height:100%;overflow-y:auto;display:block}:host yuv-tile-list{--tile-border: 1px solid var(--ymt-outline-variant);--tile-border-width: 0 0 1px 0;--tile-icon-size: 18px;--tile-action-icon-size: 18px}:host p.empty{color:var(--ymt-text-color-subtle)}:host .details{height:100%}:host .details yuv-object-details{height:100%}:host.smallScreen yuv-tile-list{--tile-padding: var(--ymt-spacing-m) !important}@keyframes fade-in{0%{opacity:0}}.files__surface{background-color:var(--ymt-surface)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: YuvSplitViewModule }, { kind: "directive", type: i1$2.SplitAreaDirective, selector: "[yuvSplitArea]", inputs: ["size", "minSize", "maxSize", "panelClass", "visible"] }, { kind: "component", type: i1$2.SplitViewComponent, selector: "yuv-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "ngmodule", type: YuvClientShellModule }, { kind: "component", type: TileListComponent, selector: "yuv-tile-list", inputs: ["bucket", "pageSize", "multiselect", "options", "flavor", "query", "preselect", "highlights"], outputs: ["itemSelect", "tileCopy", "tileCut", "busy", "queryResult", "selectionChange", "itemDblClick", "ctxMenu"] }, { kind: "component", type: BreadcrumbComponent, selector: "ymd-breadcrumb" }, { kind: "component", type: FolderTreeComponent, selector: "ymd-folder-tree" }, { kind: "component", type: ObjectSummaryComponent, selector: "yuv-object-summary", inputs: ["actions", "dmsObject", "objectId", "configType"] }, { kind: "component", type: TileConfigTriggerComponent, selector: "yuv-tile-config-trigger", inputs: ["icon", "bucket", "bucketLabel", "options"] }, { kind: "component", type: RibbonComponent, selector: "ymd-ribbon", inputs: ["busy", "enableClipboard", "objects", "excludeActions"] }, { kind: "component", type: AddButtonComponent, selector: "ymd-add-button", inputs: ["disabled"] }, { kind: "component", type: MultiObjectSummaryComponent, selector: "yuv-multi-object-summary", inputs: ["headline"] }, { kind: "component", type: SortComponent, selector: "yuv-sort", inputs: ["sortOptions", "storageKey"], outputs: ["sortChanged"] }, { kind: "component", type: SearchFilterComponent, selector: "ymd-search-filter", inputs: ["query"], outputs: ["queryChange"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: FileDropZoneDirective, selector: "[yuvFileDropZone]", inputs: ["yuvFileDropZone", "fileDropDisabled"], outputs: ["fileDrop", "fileDropOver"] }, { kind: "component", type: ContextmenuComponent, selector: "yuv-contextmenu", inputs: ["actions", "selection"], outputs: ["itemSelect"] }, { kind: "directive", type: YuvContextMenuTriggerDirective, selector: "[yuvContextMenuTrigger]", inputs: ["yuvContextMenuTrigger", "yuvContextMenuTriggerWhen"], exportAs: ["yuvContextMenuTrigger"] }] });
|
|
2799
2667
|
}
|
|
2800
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2668
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: FilesPageComponent, decorators: [{
|
|
2801
2669
|
type: Component,
|
|
2802
2670
|
args: [{ selector: 'ymd-files', standalone: true, imports: [NgClass, AsyncPipe, ...module, ...components, FileDropZoneDirective, ContextmenuComponent, YuvContextMenuTriggerDirective], host: {
|
|
2803
2671
|
'[class.smallScreen]': 'smallScreenLayout()'
|
|
@@ -2805,52 +2673,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.12", ngImpo
|
|
|
2805
2673
|
}], ctorParameters: () => [] });
|
|
2806
2674
|
|
|
2807
2675
|
class ObjectPageComponent {
|
|
2808
|
-
#dmsService;
|
|
2809
|
-
#eventService;
|
|
2810
|
-
#shellService;
|
|
2811
|
-
#route;
|
|
2812
|
-
#router;
|
|
2813
|
-
#objectConfig;
|
|
2814
|
-
|
|
2815
|
-
#
|
|
2816
|
-
#
|
|
2817
|
-
#
|
|
2676
|
+
#dmsService = inject(DmsService);
|
|
2677
|
+
#eventService = inject(EventService);
|
|
2678
|
+
#shellService = inject(ShellService);
|
|
2679
|
+
#route = inject(ActivatedRoute);
|
|
2680
|
+
#router = inject(Router);
|
|
2681
|
+
#objectConfig = inject(ObjectConfigService);
|
|
2682
|
+
translate = inject(TranslateService);
|
|
2683
|
+
#drive = inject(DriveService);
|
|
2684
|
+
#device = inject(DeviceService);
|
|
2685
|
+
#retention = inject(RetentionService);
|
|
2686
|
+
busy = this.#drive.state$.busy;
|
|
2687
|
+
smallScreenLayout = signal(false);
|
|
2688
|
+
errorMessage;
|
|
2689
|
+
dmsObject = signal(undefined);
|
|
2690
|
+
retentionState = signal(undefined);
|
|
2691
|
+
#dmsObjectEffect = effect(() => this.#setHeaderData());
|
|
2692
|
+
fileDropReplaceDisabled = computed(() => {
|
|
2693
|
+
const e = this.dmsObject();
|
|
2694
|
+
return !e || !e.permissions?.writeContent || this.#retention.getRetentionState(e).underRetention;
|
|
2695
|
+
});
|
|
2696
|
+
flavoredDmsObject = computed(() => {
|
|
2697
|
+
const o = this.dmsObject();
|
|
2698
|
+
return o
|
|
2699
|
+
? {
|
|
2700
|
+
object: o,
|
|
2701
|
+
flavors: [...this.#shellService.getAppliedObjectFlavors(o).applied]
|
|
2702
|
+
}
|
|
2703
|
+
: undefined;
|
|
2704
|
+
});
|
|
2705
|
+
icons = {
|
|
2706
|
+
back: YUV_ICONS.back,
|
|
2707
|
+
error: YUV_ICONS.attention,
|
|
2708
|
+
refresh: YUV_ICONS.refresh
|
|
2709
|
+
};
|
|
2710
|
+
layoutSettingIdBase = 'app.drive.object.';
|
|
2711
|
+
headerData;
|
|
2712
|
+
excludeActions = [APP_ACTIONS.paste, APP_ACTIONS.contentUpdate, BASE_ACTION.copy, BASE_ACTION.cut];
|
|
2818
2713
|
constructor() {
|
|
2819
|
-
this.#dmsService = inject(DmsService);
|
|
2820
|
-
this.#eventService = inject(EventService);
|
|
2821
|
-
this.#shellService = inject(ShellService);
|
|
2822
|
-
this.#route = inject(ActivatedRoute);
|
|
2823
|
-
this.#router = inject(Router);
|
|
2824
|
-
this.#objectConfig = inject(ObjectConfigService);
|
|
2825
|
-
this.translate = inject(TranslateService);
|
|
2826
|
-
this.#drive = inject(DriveService);
|
|
2827
|
-
this.#device = inject(DeviceService);
|
|
2828
|
-
this.#retention = inject(RetentionService);
|
|
2829
|
-
this.busy = this.#drive.state$.busy;
|
|
2830
|
-
this.smallScreenLayout = signal(false);
|
|
2831
|
-
this.dmsObject = signal(undefined);
|
|
2832
|
-
this.retentionState = signal(undefined);
|
|
2833
|
-
this.#dmsObjectEffect = effect(() => this.#setHeaderData());
|
|
2834
|
-
this.fileDropReplaceDisabled = computed(() => {
|
|
2835
|
-
const e = this.dmsObject();
|
|
2836
|
-
return !e || !e.permissions?.writeContent || this.#retention.getRetentionState(e).underRetention;
|
|
2837
|
-
});
|
|
2838
|
-
this.flavoredDmsObject = computed(() => {
|
|
2839
|
-
const o = this.dmsObject();
|
|
2840
|
-
return o
|
|
2841
|
-
? {
|
|
2842
|
-
object: o,
|
|
2843
|
-
flavors: [...this.#shellService.getAppliedObjectFlavors(o).applied]
|
|
2844
|
-
}
|
|
2845
|
-
: undefined;
|
|
2846
|
-
});
|
|
2847
|
-
this.icons = {
|
|
2848
|
-
back: YUV_ICONS.back,
|
|
2849
|
-
error: YUV_ICONS.attention,
|
|
2850
|
-
refresh: YUV_ICONS.refresh
|
|
2851
|
-
};
|
|
2852
|
-
this.layoutSettingIdBase = 'app.drive.object.';
|
|
2853
|
-
this.excludeActions = [APP_ACTIONS.paste, APP_ACTIONS.contentUpdate, BASE_ACTION.copy, BASE_ACTION.cut];
|
|
2854
2714
|
this.#route.paramMap.pipe(takeUntilDestroyed()).subscribe((p) => {
|
|
2855
2715
|
this._loadDetails(p.get('id'));
|
|
2856
2716
|
});
|
|
@@ -2951,10 +2811,10 @@ class ObjectPageComponent {
|
|
|
2951
2811
|
});
|
|
2952
2812
|
}
|
|
2953
2813
|
}
|
|
2954
|
-
static
|
|
2955
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.12", type: ObjectPageComponent, isStandalone: true, selector: "ymd-object", host: { attributes: { "class.smallScreenLayout": "smallScreenLayout()" } }, providers: [ObjectPreviewService], ngImport: i0, template: "@let object = dmsObject();\n@if (object) {\n <div\n class=\"object\"\n yuvContainerSize\n [yuvFileDropZone]=\"{ label: 'yuv.app.drive.files.dropzone.content.replace.label' | translate }\"\n [fileDropDisabled]=\"fileDropReplaceDisabled()\"\n (fileDrop)=\"onFileDrop($event)\"\n >\n <ymd-ribbon [objects]=\"[object]\" [excludeActions]=\"excludeActions\" class=\"object__surface\">\n <ng-template #primaryActions>\n <div class=\"nav\">\n <button mat-icon-button class=\"back\" (click)=\"openParent()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n <button mat-icon-button class=\"refresh\" [matTooltip]=\"'yuv.app.drive.page.object.refresh.tooltip' | translate\" (click)=\"refresh()\">\n <mat-icon>refresh</mat-icon>\n </button>\n </div>\n </ng-template>\n <!-- <ng-template #secondaryActions></ng-template> -->\n </ymd-ribbon>\n\n @let ssl = smallScreenLayout();\n @if (ssl) {\n <mat-tab-group class=\"object__surface\" mat-stretch-tabs=\"true\">\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.content.title' | translate\">\n <ng-template matTabContent>\n @if (object && object?.content) {\n <yuv-object-preview [dmsObject]=\"object\"></yuv-object-preview>\n }\n </ng-template>\n </mat-tab>\n\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-metadata [flavoredDmsObject]=\"flavoredDmsObject()\" (indexDataSaved)=\"onIndexdataSaved($event)\"> </yuv-object-metadata>\n </ng-template>\n </mat-tab>\n\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.history.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-audit [dmsObject]=\"object\"></yuv-object-audit>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n } @else {\n <yuv-split-view [layoutSettingsID]=\"layoutSettingIdBase + 'splitview'\" [gutterSize]=\"1\" class=\"object__surface\">\n <ng-template yuvSplitArea [size]=\"40\">\n <section class=\"meta\">\n <header>\n <yuv-object-flavor disableSelection=\"true\" [dmsObject]=\"object\"></yuv-object-flavor>\n\n @if (headerData) {\n\n <div class=\"object-icon\"><mat-icon >{{headerData.icon}}</mat-icon></div>\n <h1><ng-container *yuvRenderer=\"headerData.title\"></ng-container></h1>\n <div class=\"description\"><ng-container *yuvRenderer=\"headerData.description\"></ng-container></div>\n <div class=\"badges\">\n <yuv-retention-badge [dmsObject]=\"object\"></yuv-retention-badge>\n </div>\n }\n </header>\n\n <mat-tab-group>\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.indexdata.title' | translate\" >\n <yuv-object-metadata [flavoredDmsObject]=\"flavoredDmsObject()\" (indexDataSaved)=\"onIndexdataSaved($event)\"> </yuv-object-metadata>\n </mat-tab>\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.history.title' | translate\">\n <yuv-object-audit [dmsObject]=\"object\"></yuv-object-audit\n ></mat-tab>\n </mat-tab-group>\n </section>\n </ng-template>\n <ng-template yuvSplitArea [size]=\"60\">\n @if (object && object?.content) {\n <yuv-object-preview [dmsObject]=\"object\"></yuv-object-preview>\n }\n </ng-template>\n </yuv-split-view>\n }\n </div>\n} @else if (errorMessage) {\n <!-- object could not be loaded -->\n <div class=\"error state\">\n <yuv-icon [svg]=\"icons.error\"></yuv-icon>\n <p>{{ errorMessage }}</p>\n </div>\n} @else {\n <!-- object is loading -->\n <div class=\"loading state\">\n <mat-progress-spinner mode=\"indeterminate\" class=\"ymt-progress-spinner--giant\"></mat-progress-spinner>\n </div>\n}\n", styles: [":host{--button-gap: var(--ymt-spacing-2xs);display:flex;flex-flow:column;height:100%;overflow:hidden}:host mat-tab-group{overflow:hidden;height:100%}:host mat-tab-group ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}:host .state{display:flex;flex-flow:column;height:100%;align-items:center;justify-content:center;border-block-start:1px solid var(--ymt-outline-variant)}:host .error mat-icon{color:rgb(from var(--ymt-text-color) r g b/.1)}:host .error p{margin:var(--ymt-spacing-m);max-width:35ch;color:var(--ymt-text-color-subtle)}:host .state,:host .object{animation:fade-in .3s ease-in-out}:host .object{height:100%;display:flex;flex-flow:column}:host .object ymd-ribbon{background-color:var(--app-drive-header-background);border-block-end:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-s) var(--ymt-spacing-s) var(--ymt-spacing-xs) var(--ymt-spacing-s);flex:0 0 auto}:host .object ymd-ribbon .nav{display:flex;align-items:center;gap:var(--button-gap)}:host .object yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);flex:1}:host .meta{display:flex;flex-flow:column;height:100%}:host .meta header{flex:0 0 auto;display:grid;margin-block-end:var(--ymt-spacing-xl);gap:var(--ymt-spacing-xs);grid-template-columns:var(--ymt-sizing-5xl) repeat(auto-fit,minmax(0,1fr));grid-template-areas:\"flavor flavor\" \"icon title\" \". description\" \". badges\"}:host .meta header yuv-object-flavor{grid-area:flavor;border-block-end:1px solid var(--ymt-outline-variant);padding:0 var(--ymt-spacing-s);margin-block-end:var(--ymt-spacing-m);grid-column:span 5}:host .meta header .object-icon{color:var(--ymt-text-color);grid-area:icon;padding:0 var(--ymt-spacing-m);padding-block-start:var(--ymt-spacing-3xs)}:host .meta header h1{grid-area:title;margin:0;word-break:break-word;padding-inline-end:var(--ymt-spacing-l);grid-column:span 4}:host .meta header .description{grid-area:description;padding-inline-end:var(--ymt-spacing-l);font:var(--ymt-font-body-subtle);color:var(--ymt-text-color-subtle);text-overflow:ellipsis;grid-column:2/span 3;overflow:hidden;white-space:nowrap;--yuv-renderer-display: contents}:host .meta header .badges{grid-area:badges;padding-block-start:var(--ymt-spacing-xs);padding-inline-end:var(--ymt-spacing-l);grid-column:2/span 4;display:flex}@keyframes fade-in{0%{opacity:0}}.object__surface{background-color:var(--ymt-surface)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ObjectMetadataComponent, selector: "yuv-object-metadata", inputs: ["disableControls", "situation", "formDisabled", "dmsObject", "flavoredDmsObject"], outputs: ["indexDataSaved", "statusChanged"] }, { kind: "component", type: ObjectAuditComponent, selector: "yuv-object-audit", inputs: ["dmsObject", "skipActions", "allActions"] }, { kind: "component", type: ObjectFlavorComponent, selector: "yuv-object-flavor", inputs: ["dmsObject"], outputs: ["flavorSelect"] }, { kind: "component", type: YuvIconComponent, selector: "yuv-icon", inputs: ["label", "svg", "svgSrc"] }, { kind: "ngmodule", type: YuvSplitViewModule }, { kind: "directive", type: i1$2.SplitAreaDirective, selector: "[yuvSplitArea]", inputs: ["size", "minSize", "maxSize", "panelClass", "visible"] }, { kind: "component", type: i1$2.SplitViewComponent, selector: "yuv-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "directive", type: RendererDirective, selector: "[yuvRenderer]", inputs: ["yuvRenderer"] }, { kind: "directive", type: ContainerSizeDirective, selector: "[yuvContainerSize]", outputs: ["containerHeight", "containerWidth"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: RibbonComponent, selector: "ymd-ribbon", inputs: ["busy", "enableClipboard", "objects", "excludeActions"] }, { kind: "component", type: RetentionBadgeComponent, selector: "yuv-retention-badge", inputs: ["dmsObject"] }, { kind: "component", type: ObjectPreviewComponent, selector: "yuv-object-preview", inputs: ["objectId", "dmsObject", "version", "metadata"] }, { kind: "directive", type: FileDropZoneDirective, selector: "[yuvFileDropZone]", inputs: ["yuvFileDropZone", "fileDropDisabled"], outputs: ["fileDrop", "fileDropOver"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i5$1.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i5$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i5$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
|
|
2814
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ObjectPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2815
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ObjectPageComponent, isStandalone: true, selector: "ymd-object", host: { attributes: { "class.smallScreenLayout": "smallScreenLayout()" } }, providers: [ObjectPreviewService], ngImport: i0, template: "@let object = dmsObject();\n@if (object) {\n <div\n class=\"object\"\n yuvContainerSize\n [yuvFileDropZone]=\"{ label: 'yuv.app.drive.files.dropzone.content.replace.label' | translate }\"\n [fileDropDisabled]=\"fileDropReplaceDisabled()\"\n (fileDrop)=\"onFileDrop($event)\"\n >\n <ymd-ribbon [objects]=\"[object]\" [excludeActions]=\"excludeActions\" class=\"object__surface\">\n <ng-template #primaryActions>\n <div class=\"nav\">\n <button mat-icon-button class=\"back\" (click)=\"openParent()\">\n <mat-icon>arrow_back</mat-icon>\n </button>\n <button mat-icon-button class=\"refresh\" [matTooltip]=\"'yuv.app.drive.page.object.refresh.tooltip' | translate\" (click)=\"refresh()\">\n <mat-icon>refresh</mat-icon>\n </button>\n </div>\n </ng-template>\n <!-- <ng-template #secondaryActions></ng-template> -->\n </ymd-ribbon>\n\n @let ssl = smallScreenLayout();\n @if (ssl) {\n <mat-tab-group class=\"object__surface\" mat-stretch-tabs=\"true\">\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.content.title' | translate\">\n <ng-template matTabContent>\n @if (object && object?.content) {\n <yuv-object-preview [dmsObject]=\"object\"></yuv-object-preview>\n }\n </ng-template>\n </mat-tab>\n\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.indexdata.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-metadata [flavoredDmsObject]=\"flavoredDmsObject()\" (indexDataSaved)=\"onIndexdataSaved($event)\"> </yuv-object-metadata>\n </ng-template>\n </mat-tab>\n\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.history.title' | translate\">\n <ng-template matTabContent>\n <yuv-object-audit [dmsObject]=\"object\"></yuv-object-audit>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n } @else {\n <yuv-split-view [layoutSettingsID]=\"layoutSettingIdBase + 'splitview'\" [gutterSize]=\"1\" class=\"object__surface\">\n <ng-template yuvSplitArea [size]=\"40\">\n <section class=\"meta\">\n <header>\n <yuv-object-flavor disableSelection=\"true\" [dmsObject]=\"object\"></yuv-object-flavor>\n\n @if (headerData) {\n\n <div class=\"object-icon\"><mat-icon >{{headerData.icon}}</mat-icon></div>\n <h1><ng-container *yuvRenderer=\"headerData.title\"></ng-container></h1>\n <div class=\"description\"><ng-container *yuvRenderer=\"headerData.description\"></ng-container></div>\n <div class=\"badges\">\n <yuv-retention-badge [dmsObject]=\"object\"></yuv-retention-badge>\n </div>\n }\n </header>\n\n <mat-tab-group>\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.indexdata.title' | translate\" >\n <yuv-object-metadata [flavoredDmsObject]=\"flavoredDmsObject()\" (indexDataSaved)=\"onIndexdataSaved($event)\"> </yuv-object-metadata>\n </mat-tab>\n <mat-tab [label]=\"'yuv.app.drive.object-metadata.tabs.history.title' | translate\">\n <yuv-object-audit [dmsObject]=\"object\"></yuv-object-audit\n ></mat-tab>\n </mat-tab-group>\n </section>\n </ng-template>\n <ng-template yuvSplitArea [size]=\"60\">\n @if (object && object?.content) {\n <yuv-object-preview [dmsObject]=\"object\"></yuv-object-preview>\n }\n </ng-template>\n </yuv-split-view>\n }\n </div>\n} @else if (errorMessage) {\n <!-- object could not be loaded -->\n <div class=\"error state\">\n <yuv-icon [svg]=\"icons.error\"></yuv-icon>\n <p>{{ errorMessage }}</p>\n </div>\n} @else {\n <!-- object is loading -->\n <div class=\"loading state\">\n <mat-progress-spinner mode=\"indeterminate\" class=\"ymt-progress-spinner--giant\"></mat-progress-spinner>\n </div>\n}\n", styles: [":host{--button-gap: var(--ymt-spacing-2xs);display:flex;flex-flow:column;height:100%;overflow:hidden}:host mat-tab-group{overflow:hidden;height:100%}:host mat-tab-group ::ng-deep .mat-mdc-tab-body-wrapper{height:100%}:host .state{display:flex;flex-flow:column;height:100%;align-items:center;justify-content:center;border-block-start:1px solid var(--ymt-outline-variant)}:host .error mat-icon{color:rgb(from var(--ymt-text-color) r g b/.1)}:host .error p{margin:var(--ymt-spacing-m);max-width:35ch;color:var(--ymt-text-color-subtle)}:host .state,:host .object{animation:fade-in .3s ease-in-out}:host .object{height:100%;display:flex;flex-flow:column}:host .object ymd-ribbon{background-color:var(--app-drive-header-background);border-block-end:1px solid var(--ymt-outline-variant);padding:var(--ymt-spacing-s) var(--ymt-spacing-s) var(--ymt-spacing-xs) var(--ymt-spacing-s);flex:0 0 auto}:host .object ymd-ribbon .nav{display:flex;align-items:center;gap:var(--button-gap)}:host .object yuv-split-view{--split-gutter-background-color: var(--ymt-outline-variant);flex:1}:host .meta{display:flex;flex-flow:column;height:100%}:host .meta header{flex:0 0 auto;display:grid;margin-block-end:var(--ymt-spacing-xl);gap:var(--ymt-spacing-xs);grid-template-columns:var(--ymt-sizing-5xl) repeat(auto-fit,minmax(0,1fr));grid-template-areas:\"flavor flavor\" \"icon title\" \". description\" \". badges\"}:host .meta header yuv-object-flavor{grid-area:flavor;border-block-end:1px solid var(--ymt-outline-variant);padding:0 var(--ymt-spacing-s);margin-block-end:var(--ymt-spacing-m);grid-column:span 5}:host .meta header .object-icon{color:var(--ymt-text-color);grid-area:icon;padding:0 var(--ymt-spacing-m);padding-block-start:var(--ymt-spacing-3xs)}:host .meta header h1{grid-area:title;margin:0;word-break:break-word;padding-inline-end:var(--ymt-spacing-l);grid-column:span 4}:host .meta header .description{grid-area:description;padding-inline-end:var(--ymt-spacing-l);font:var(--ymt-font-body-subtle);color:var(--ymt-text-color-subtle);text-overflow:ellipsis;grid-column:2/span 3;overflow:hidden;white-space:nowrap;--yuv-renderer-display: contents}:host .meta header .badges{grid-area:badges;padding-block-start:var(--ymt-spacing-xs);padding-inline-end:var(--ymt-spacing-l);grid-column:2/span 4;display:flex}@keyframes fade-in{0%{opacity:0}}.object__surface{background-color:var(--ymt-surface)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ObjectMetadataComponent, selector: "yuv-object-metadata", inputs: ["disableControls", "disableBasicMetadata", "situation", "formDisabled", "dmsObject", "flavoredDmsObject"], outputs: ["indexDataSaved", "statusChanged"] }, { kind: "component", type: ObjectAuditComponent, selector: "yuv-object-audit", inputs: ["dmsObject", "skipActions", "allActions"] }, { kind: "component", type: ObjectFlavorComponent, selector: "yuv-object-flavor", inputs: ["dmsObject"], outputs: ["flavorSelect"] }, { kind: "component", type: YuvIconComponent, selector: "yuv-icon", inputs: ["label", "svg", "svgSrc"] }, { kind: "ngmodule", type: YuvSplitViewModule }, { kind: "directive", type: i1$2.SplitAreaDirective, selector: "[yuvSplitArea]", inputs: ["size", "minSize", "maxSize", "panelClass", "visible"] }, { kind: "component", type: i1$2.SplitViewComponent, selector: "yuv-split-view", inputs: ["direction", "gutterSize", "restrictMove", "disabled", "layoutSettingsID"], outputs: ["layoutSettingsChange", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"] }, { kind: "directive", type: RendererDirective, selector: "[yuvRenderer]", inputs: ["yuvRenderer"] }, { kind: "directive", type: ContainerSizeDirective, selector: "[yuvContainerSize]", outputs: ["containerHeight", "containerWidth"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "component", type: RibbonComponent, selector: "ymd-ribbon", inputs: ["busy", "enableClipboard", "objects", "excludeActions"] }, { kind: "component", type: RetentionBadgeComponent, selector: "yuv-retention-badge", inputs: ["dmsObject"] }, { kind: "component", type: ObjectPreviewComponent, selector: "yuv-object-preview", inputs: ["objectId", "dmsObject", "version", "metadata"] }, { kind: "directive", type: FileDropZoneDirective, selector: "[yuvFileDropZone]", inputs: ["yuvFileDropZone", "fileDropDisabled"], outputs: ["fileDrop", "fileDropOver"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i5$1.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i5$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i5$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
2956
2816
|
}
|
|
2957
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
2817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ObjectPageComponent, decorators: [{
|
|
2958
2818
|
type: Component,
|
|
2959
2819
|
args: [{ selector: 'ymd-object', standalone: true, imports: [
|
|
2960
2820
|
CommonModule,
|