@yuuvis/app-drive 3.4.2 → 3.4.4
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.
|
@@ -2358,7 +2358,7 @@ class SearchFilterComponent {
|
|
|
2358
2358
|
value: this.ANY_OPTION
|
|
2359
2359
|
},
|
|
2360
2360
|
...this.#flavors.map((f) => ({
|
|
2361
|
-
label: this.
|
|
2361
|
+
label: this.#shell.getFlavorLabel(f.id),
|
|
2362
2362
|
value: f.sot
|
|
2363
2363
|
}))
|
|
2364
2364
|
]);
|
|
@@ -2574,11 +2574,21 @@ class FilesPageComponent {
|
|
|
2574
2574
|
}
|
|
2575
2575
|
];
|
|
2576
2576
|
currentPage = this.dataSource[0].route;
|
|
2577
|
+
_autoSelectHandled = false;
|
|
2577
2578
|
itemSelected(idx) {
|
|
2578
2579
|
const node = this.dataSource.find(({ id }) => id === idx[0]);
|
|
2579
|
-
if (node)
|
|
2580
|
-
|
|
2580
|
+
if (!node)
|
|
2581
|
+
return;
|
|
2582
|
+
if (!this._autoSelectHandled) {
|
|
2583
|
+
this._autoSelectHandled = true;
|
|
2584
|
+
// Suppress the initial auto-selection if it would navigate away from the current route.
|
|
2585
|
+
// When returning from object view to a subfolder, autoSelect fires 'mydrive' but we're
|
|
2586
|
+
// already on the correct subfolder route — navigating to root would be wrong.
|
|
2587
|
+
const currentId = this.id();
|
|
2588
|
+
if (node.route === 'mydrive' && currentId !== DRIVE_ROOT_FOLDER_ID)
|
|
2589
|
+
return;
|
|
2581
2590
|
}
|
|
2591
|
+
this.routeChange(node);
|
|
2582
2592
|
}
|
|
2583
2593
|
routeChange(node) {
|
|
2584
2594
|
const commands = node.route === 'mydrive'
|
|
@@ -2616,12 +2626,17 @@ class FilesPageComponent {
|
|
|
2616
2626
|
if (this.currentFolderID === DRIVE_ROOT_FOLDER_ID)
|
|
2617
2627
|
this.currentFolderID = undefined;
|
|
2618
2628
|
if (this.currentFolderID) {
|
|
2619
|
-
this.
|
|
2629
|
+
const folderIdSnapshot = this.currentFolderID;
|
|
2630
|
+
this.dmsService.getDmsObject(folderIdSnapshot).subscribe({
|
|
2620
2631
|
next: (o) => {
|
|
2632
|
+
if (this.currentFolderID !== folderIdSnapshot)
|
|
2633
|
+
return;
|
|
2621
2634
|
this.currentFolder = o;
|
|
2622
2635
|
this._setFolderQuery(this.#getTitle(o));
|
|
2623
2636
|
},
|
|
2624
2637
|
error: (e) => {
|
|
2638
|
+
if (this.currentFolderID !== folderIdSnapshot)
|
|
2639
|
+
return;
|
|
2625
2640
|
console.error('Error getting folder', e);
|
|
2626
2641
|
this.#processLoadError(e);
|
|
2627
2642
|
}
|
|
@@ -2896,8 +2911,11 @@ class ObjectPageComponent {
|
|
|
2896
2911
|
.on(YuvEventType.DMS_OBJECT_UPDATED)
|
|
2897
2912
|
.pipe(takeUntilDestroyed())
|
|
2898
2913
|
.subscribe((e) => {
|
|
2899
|
-
if (e.data.id === this.dmsObject()?.id)
|
|
2914
|
+
if (e.data.id === this.dmsObject()?.id) {
|
|
2915
|
+
if (!e.data.content)
|
|
2916
|
+
e.data.content = this.dmsObject()?.content;
|
|
2900
2917
|
this.dmsObject.set(e.data);
|
|
2918
|
+
}
|
|
2901
2919
|
});
|
|
2902
2920
|
this.#eventService
|
|
2903
2921
|
.on(YuvEventType.DMS_OBJECT_DELETED)
|
|
@@ -2927,6 +2945,8 @@ class ObjectPageComponent {
|
|
|
2927
2945
|
});
|
|
2928
2946
|
}
|
|
2929
2947
|
onIndexdataSaved(updatedObject) {
|
|
2948
|
+
if (!updatedObject.content)
|
|
2949
|
+
updatedObject.content = this.dmsObject()?.content;
|
|
2930
2950
|
this.dmsObject.set(updatedObject);
|
|
2931
2951
|
}
|
|
2932
2952
|
#setHeaderData() {
|
|
@@ -2961,27 +2981,27 @@ class ObjectPageComponent {
|
|
|
2961
2981
|
if (!id) {
|
|
2962
2982
|
this.dmsObject.set(undefined);
|
|
2963
2983
|
this.headerData = undefined;
|
|
2984
|
+
return;
|
|
2964
2985
|
}
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
this.#
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
}
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
}
|
|
2986
|
+
this.#shellService.addBusy();
|
|
2987
|
+
this.#dmsService
|
|
2988
|
+
.getDmsObject(id)
|
|
2989
|
+
.pipe(finalize(() => this.#shellService.removeBusy()))
|
|
2990
|
+
.subscribe({
|
|
2991
|
+
next: (o) => {
|
|
2992
|
+
this.dmsObject.set(o);
|
|
2993
|
+
},
|
|
2994
|
+
error: (e) => {
|
|
2995
|
+
this.dmsObject.set(undefined);
|
|
2996
|
+
switch (e.status) {
|
|
2997
|
+
case 404:
|
|
2998
|
+
this.errorMessage = this.translate.instant('yuv.app.drive.page.object.error.404');
|
|
2999
|
+
break;
|
|
3000
|
+
default:
|
|
3001
|
+
this.errorMessage = this.translate.instant('yuv.app.drive.page.object.error.default');
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
});
|
|
2985
3005
|
}
|
|
2986
3006
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ObjectPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2987
3007
|
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 [dmsObject]=\"dmsObject()\" [flavors]=\"\" (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 [dmsObject]=\"dmsObject()\" [flavors]=\"flavors()\" (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", "elementExtensions", "situation", "dmsObject", "flavoredDmsObject", "flavors"], 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", "lockSize"] }, { 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"] }] });
|