@yuuvis/app-drive 3.4.3 → 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.
@@ -2911,8 +2911,11 @@ class ObjectPageComponent {
2911
2911
  .on(YuvEventType.DMS_OBJECT_UPDATED)
2912
2912
  .pipe(takeUntilDestroyed())
2913
2913
  .subscribe((e) => {
2914
- 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;
2915
2917
  this.dmsObject.set(e.data);
2918
+ }
2916
2919
  });
2917
2920
  this.#eventService
2918
2921
  .on(YuvEventType.DMS_OBJECT_DELETED)
@@ -2942,6 +2945,8 @@ class ObjectPageComponent {
2942
2945
  });
2943
2946
  }
2944
2947
  onIndexdataSaved(updatedObject) {
2948
+ if (!updatedObject.content)
2949
+ updatedObject.content = this.dmsObject()?.content;
2945
2950
  this.dmsObject.set(updatedObject);
2946
2951
  }
2947
2952
  #setHeaderData() {
@@ -2976,27 +2981,27 @@ class ObjectPageComponent {
2976
2981
  if (!id) {
2977
2982
  this.dmsObject.set(undefined);
2978
2983
  this.headerData = undefined;
2984
+ return;
2979
2985
  }
2980
- else {
2981
- this.#shellService.addBusy();
2982
- // load the dms object
2983
- this.#dmsService.getDmsObject(id).subscribe({
2984
- next: (o) => {
2985
- this.dmsObject.set(o);
2986
- },
2987
- error: (e) => {
2988
- this.dmsObject.set(undefined);
2989
- switch (e.status) {
2990
- case 404:
2991
- this.errorMessage = this.translate.instant('yuv.app.drive.page.object.error.404');
2992
- break;
2993
- default:
2994
- this.errorMessage = this.translate.instant('yuv.app.drive.page.object.error.default');
2995
- }
2996
- },
2997
- complete: () => this.#shellService.removeBusy()
2998
- });
2999
- }
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
+ });
3000
3005
  }
3001
3006
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ObjectPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3002
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"] }] });