@yuuvis/app-drive 3.4.3 → 3.4.6
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.
|
@@ -143,6 +143,7 @@ const APP_TYPES = {
|
|
|
143
143
|
sots: [FS_SOTS.object]
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
+
const EMAIL_MIME_TYPES = new Set(['message/rfc822', 'application/vnd.ms-outlook']);
|
|
146
147
|
const APP_FLAVORS = [
|
|
147
148
|
{
|
|
148
149
|
id: 'io.yuuvis.app.drive.flavor.email',
|
|
@@ -154,7 +155,8 @@ const APP_FLAVORS = [
|
|
|
154
155
|
mimeTypes: ['message/rfc822', 'application/vnd.ms-outlook'],
|
|
155
156
|
documents: true
|
|
156
157
|
},
|
|
157
|
-
preventApply: true
|
|
158
|
+
preventApply: true,
|
|
159
|
+
preventRemove: true
|
|
158
160
|
}
|
|
159
161
|
];
|
|
160
162
|
const APP_ACTIONS = {
|
|
@@ -1037,7 +1039,8 @@ class UpdateContentAction extends AbstractContextAction {
|
|
|
1037
1039
|
isExecutable(selection) {
|
|
1038
1040
|
const selected = selection[0];
|
|
1039
1041
|
const canWrite = !!selected?.permissions?.writeContent;
|
|
1040
|
-
|
|
1042
|
+
const isEmail = selected.sots.includes('appSystemmail:email');
|
|
1043
|
+
return of(canWrite && selection.length === 1 && !selected.isFolder && !this.#retention.getRetentionState(selected).underRetention && !isEmail);
|
|
1041
1044
|
}
|
|
1042
1045
|
run(selection) {
|
|
1043
1046
|
if (!selection[0].isFolder) {
|
|
@@ -2883,7 +2886,8 @@ class ObjectPageComponent {
|
|
|
2883
2886
|
#dmsObjectEffect = effect(() => this.#setHeaderData());
|
|
2884
2887
|
fileDropReplaceDisabled = computed(() => {
|
|
2885
2888
|
const e = this.dmsObject();
|
|
2886
|
-
|
|
2889
|
+
const isEmail = e?.sots.includes('appSystemmail:email');
|
|
2890
|
+
return !e || !e.permissions?.writeContent || this.#retention.getRetentionState(e).underRetention || !!isEmail;
|
|
2887
2891
|
});
|
|
2888
2892
|
flavors = computed(() => {
|
|
2889
2893
|
const o = this.dmsObject();
|
|
@@ -2911,8 +2915,11 @@ class ObjectPageComponent {
|
|
|
2911
2915
|
.on(YuvEventType.DMS_OBJECT_UPDATED)
|
|
2912
2916
|
.pipe(takeUntilDestroyed())
|
|
2913
2917
|
.subscribe((e) => {
|
|
2914
|
-
if (e.data.id === this.dmsObject()?.id)
|
|
2918
|
+
if (e.data.id === this.dmsObject()?.id) {
|
|
2919
|
+
if (!e.data.content)
|
|
2920
|
+
e.data.content = this.dmsObject()?.content;
|
|
2915
2921
|
this.dmsObject.set(e.data);
|
|
2922
|
+
}
|
|
2916
2923
|
});
|
|
2917
2924
|
this.#eventService
|
|
2918
2925
|
.on(YuvEventType.DMS_OBJECT_DELETED)
|
|
@@ -2942,6 +2949,8 @@ class ObjectPageComponent {
|
|
|
2942
2949
|
});
|
|
2943
2950
|
}
|
|
2944
2951
|
onIndexdataSaved(updatedObject) {
|
|
2952
|
+
if (!updatedObject.content)
|
|
2953
|
+
updatedObject.content = this.dmsObject()?.content;
|
|
2945
2954
|
this.dmsObject.set(updatedObject);
|
|
2946
2955
|
}
|
|
2947
2956
|
#setHeaderData() {
|
|
@@ -2976,27 +2985,27 @@ class ObjectPageComponent {
|
|
|
2976
2985
|
if (!id) {
|
|
2977
2986
|
this.dmsObject.set(undefined);
|
|
2978
2987
|
this.headerData = undefined;
|
|
2988
|
+
return;
|
|
2979
2989
|
}
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
this.#
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
}
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
}
|
|
2990
|
+
this.#shellService.addBusy();
|
|
2991
|
+
this.#dmsService
|
|
2992
|
+
.getDmsObject(id)
|
|
2993
|
+
.pipe(finalize(() => this.#shellService.removeBusy()))
|
|
2994
|
+
.subscribe({
|
|
2995
|
+
next: (o) => {
|
|
2996
|
+
this.dmsObject.set(o);
|
|
2997
|
+
},
|
|
2998
|
+
error: (e) => {
|
|
2999
|
+
this.dmsObject.set(undefined);
|
|
3000
|
+
switch (e.status) {
|
|
3001
|
+
case 404:
|
|
3002
|
+
this.errorMessage = this.translate.instant('yuv.app.drive.page.object.error.404');
|
|
3003
|
+
break;
|
|
3004
|
+
default:
|
|
3005
|
+
this.errorMessage = this.translate.instant('yuv.app.drive.page.object.error.default');
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
});
|
|
3000
3009
|
}
|
|
3001
3010
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ObjectPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3002
3011
|
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"] }] });
|
|
@@ -3059,5 +3068,5 @@ const YuuvisDriveRoutes = [
|
|
|
3059
3068
|
* Generated bundle index. Do not edit.
|
|
3060
3069
|
*/
|
|
3061
3070
|
|
|
3062
|
-
export { ACTION_CONTEXT, APP_ACTIONS, APP_FLAVORS, APP_ID, APP_PREFIX, APP_TYPES, FS_PROPERTIES, FS_SOTS, SearchFilterComponent, YuuvisDriveRoutes, provideDrive };
|
|
3071
|
+
export { ACTION_CONTEXT, APP_ACTIONS, APP_FLAVORS, APP_ID, APP_PREFIX, APP_TYPES, EMAIL_MIME_TYPES, FS_PROPERTIES, FS_SOTS, SearchFilterComponent, YuuvisDriveRoutes, provideDrive };
|
|
3063
3072
|
//# sourceMappingURL=yuuvis-app-drive.mjs.map
|