@yuuvis/app-templates 1.0.2 → 1.1.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/extensions/lib/actions/apply.component.d.ts +1 -0
- package/fesm2022/yuuvis-app-templates-shared.mjs +2 -8
- package/fesm2022/yuuvis-app-templates-shared.mjs.map +1 -1
- package/fesm2022/yuuvis-app-templates.mjs +158 -36
- package/fesm2022/yuuvis-app-templates.mjs.map +1 -1
- package/lib/app-templates.component.d.ts +2 -1
- package/lib/app-templates.service.d.ts +2 -1
- package/lib/assets/i18n/de.json +4 -2
- package/lib/assets/i18n/en.json +4 -2
- package/lib/components/template-details/template-details.component.d.ts +3 -3
- package/lib/overlays/edit-template/edit-template.component.d.ts +18 -0
- package/lib/pages/management/template-management.component.d.ts +4 -2
- package/package.json +1 -1
- package/shared/app-templates.schema.d.ts +1 -2
- package/yuv-manifest.json +4 -1
|
@@ -11,18 +11,12 @@ const APP_ICONS = {
|
|
|
11
11
|
actionDeleteTemplate: 'delete',
|
|
12
12
|
actionDownloadTemplateContent: 'download',
|
|
13
13
|
actionReplaceTemplateContent: 'upload_file',
|
|
14
|
+
actionEditTemplate: 'edit',
|
|
14
15
|
toggleRight: 'dock_to_left',
|
|
15
16
|
};
|
|
16
17
|
const APP_ACTIONS = {
|
|
17
18
|
apply: APP_ID + 'action.apply',
|
|
18
19
|
};
|
|
19
|
-
const APP_SCHEMA = {
|
|
20
|
-
id: APP_ID,
|
|
21
|
-
name: 'yuuvis Templates',
|
|
22
|
-
icon: 'library_books',
|
|
23
|
-
types: {},
|
|
24
|
-
flavors: []
|
|
25
|
-
};
|
|
26
20
|
const TEMPLATE_FILE_MIME_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
|
|
27
21
|
class TemplateObject {
|
|
28
22
|
constructor(obj) {
|
|
@@ -44,5 +38,5 @@ var TemplateManagementEventType;
|
|
|
44
38
|
* Generated bundle index. Do not edit.
|
|
45
39
|
*/
|
|
46
40
|
|
|
47
|
-
export { APP_ACTIONS, APP_ICONS, APP_ID,
|
|
41
|
+
export { APP_ACTIONS, APP_ICONS, APP_ID, TEMPLATE_FILE_MIME_TYPE, TemplateManagementEventType, TemplateObject };
|
|
48
42
|
//# sourceMappingURL=yuuvis-app-templates-shared.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-app-templates-shared.mjs","sources":["../../../../projects/yuuvis/app-templates/shared/src/app-templates.schema.ts","../../../../projects/yuuvis/app-templates/shared/src/yuuvis-app-templates-shared.ts"],"sourcesContent":["import { BaseObjectTypeField, CoreApiObject } from '@yuuvis/client-core';\
|
|
1
|
+
{"version":3,"file":"yuuvis-app-templates-shared.mjs","sources":["../../../../projects/yuuvis/app-templates/shared/src/app-templates.schema.ts","../../../../projects/yuuvis/app-templates/shared/src/yuuvis-app-templates-shared.ts"],"sourcesContent":["import { BaseObjectTypeField, CoreApiObject } from '@yuuvis/client-core';\n\nexport const APP_ID = 'io.yuuvis.app.templates';\n\nexport const APP_ICONS = {\n close: 'close',\n refresh: 'refresh',\n actionApplyTemplate: 'article_shortcut',\n actionCreateNewTemplate: 'add_notes',\n actionToggleStateToPublished: 'input_circle',\n actionToggleStateToUnpublished: 'unpublished',\n actionDeleteTemplate: 'delete',\n actionDownloadTemplateContent: 'download',\n actionReplaceTemplateContent: 'upload_file',\n actionEditTemplate: 'edit',\n toggleRight: 'dock_to_left',\n};\n\nexport const APP_ACTIONS = {\n apply: APP_ID + 'action.apply',\n};\n\nexport const TEMPLATE_FILE_MIME_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';\n\nexport class TemplateObject {\n readonly id: string;\n\n name: string;\n description: string;\n published: boolean;\n dataObjectType: string\n\n constructor(obj: CoreApiObject) {\n this.id = obj.properties[BaseObjectTypeField.OBJECT_ID].value as string;\n this.name = obj.properties[\"appTemplates:name\"].value as string;\n this.description = obj.properties[\"appTemplates:description\"]?.value as string;\n this.published = obj.properties[\"appTemplates:published\"].value as boolean;\n this.dataObjectType = (obj.properties[\"appTemplates:dataObjects\"].value as Array<string[]>)[0][1];\n }\n}\n\nexport enum TemplateManagementEventType {\n TEMPLATE_OBJECT_CREATED = APP_ID + '.object.created',\n TEMPLATE_OBJECT_UPDATED = APP_ID + '.object.updated',\n TEMPLATE_OBJECT_DELETED = APP_ID + '.object.deleted'\n}\n\nexport interface CreateTemplateResult {\n item: TemplateObject;\n}\n\nexport interface TemplateSearchResponse {\n pageNumber: number;\n pageSize: number;\n totalNumItems: number;\n items: TemplateObject[];\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAEO,MAAM,MAAM,GAAG;AAET,MAAA,SAAS,GAAG;AACvB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,mBAAmB,EAAE,kBAAkB;AACvC,IAAA,uBAAuB,EAAE,WAAW;AACpC,IAAA,4BAA4B,EAAE,cAAc;AAC5C,IAAA,8BAA8B,EAAE,aAAa;AAC7C,IAAA,oBAAoB,EAAE,QAAQ;AAC9B,IAAA,6BAA6B,EAAE,UAAU;AACzC,IAAA,4BAA4B,EAAE,aAAa;AAC3C,IAAA,kBAAkB,EAAE,MAAM;AAC1B,IAAA,WAAW,EAAE,cAAc;;AAGhB,MAAA,WAAW,GAAG;IACzB,KAAK,EAAE,MAAM,GAAG,cAAc;;AAGzB,MAAM,uBAAuB,GAAG;MAE1B,cAAc,CAAA;AAQzB,IAAA,WAAA,CAAY,GAAkB,EAAA;AAC5B,QAAA,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,UAAU,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,KAAe;QACvE,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,KAAe;QAC/D,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC,0BAA0B,CAAC,EAAE,KAAe;QAC9E,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC,KAAgB;AAC1E,QAAA,IAAI,CAAC,cAAc,GAAI,GAAG,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,KAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;;AAEpG;IAEW;AAAZ,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,yBAAA,CAAA,GAAA,wCAAoD;AACpD,IAAA,2BAAA,CAAA,yBAAA,CAAA,GAAA,wCAAoD;AACpD,IAAA,2BAAA,CAAA,yBAAA,CAAA,GAAA,wCAAoD;AACtD,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,GAItC,EAAA,CAAA,CAAA;;AC7CD;;AAEG;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { HttpParams } from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, signal, Injectable, Component, Input, linkedSignal,
|
|
3
|
+
import { inject, signal, Injectable, Component, Input, linkedSignal, HostBinding } from '@angular/core';
|
|
4
4
|
import * as i2 from '@yuuvis/client-core';
|
|
5
|
-
import { Logger, BackendService, DmsService, TranslateService, SystemService, ContentStreamAllowed, ApiBase, TranslateModule, DeviceService, NotificationService } from '@yuuvis/client-core';
|
|
6
|
-
import { ReplaySubject, catchError, throwError, map,
|
|
7
|
-
import { TemplateObject, TEMPLATE_FILE_MIME_TYPE,
|
|
5
|
+
import { Logger, BackendService, DmsService, TranslateService, SystemService, ContentStreamAllowed, ApiBase, TranslateModule, DeviceService, NotificationService, EventService, YuvEventType } from '@yuuvis/client-core';
|
|
6
|
+
import { ReplaySubject, catchError, throwError, map, switchMap, tap, of } from 'rxjs';
|
|
7
|
+
import { TemplateObject, TEMPLATE_FILE_MIME_TYPE, APP_ID, APP_ICONS } from '@yuuvis/app-templates/shared';
|
|
8
8
|
import { ConfirmService, BusyOverlayDirective, DialogComponent } from '@yuuvis/client-framework/common';
|
|
9
9
|
import * as i1$2 from '@angular/common';
|
|
10
10
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
11
11
|
import * as i1 from '@angular/router';
|
|
12
12
|
import { RouterModule } from '@angular/router';
|
|
13
|
-
import {
|
|
13
|
+
import { ShellService } from '@yuuvis/client-shell-core';
|
|
14
14
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
15
15
|
import { ListComponent, ListItemDirective } from '@yuuvis/client-framework/list';
|
|
16
16
|
import * as i5 from '@yuuvis/client-framework/master-details';
|
|
@@ -20,7 +20,7 @@ import { YuvOverflowMenuModule } from '@yuuvis/client-framework/overflow-menu';
|
|
|
20
20
|
import { PaginationComponent } from '@yuuvis/client-framework/pagination';
|
|
21
21
|
import * as i7 from '@angular/material/button';
|
|
22
22
|
import { MatButtonModule } from '@angular/material/button';
|
|
23
|
-
import { MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
23
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
|
24
24
|
import * as i6 from '@angular/material/icon';
|
|
25
25
|
import { MatIconModule } from '@angular/material/icon';
|
|
26
26
|
import * as i8 from '@angular/material/tooltip';
|
|
@@ -95,7 +95,10 @@ class TemplateService {
|
|
|
95
95
|
}
|
|
96
96
|
return this.#dmsService
|
|
97
97
|
.uploadContent(template.id, file)
|
|
98
|
-
.pipe(
|
|
98
|
+
.pipe(catchError((e) => {
|
|
99
|
+
this.#logger.error('Failed to create template', e);
|
|
100
|
+
return throwError(() => new Error(e.message));
|
|
101
|
+
}));
|
|
99
102
|
}
|
|
100
103
|
toggleTemplateState(template) {
|
|
101
104
|
let requestParams = {
|
|
@@ -121,6 +124,11 @@ class TemplateService {
|
|
|
121
124
|
return of(false);
|
|
122
125
|
}));
|
|
123
126
|
}
|
|
127
|
+
updateTemplateData(id, requestParams) {
|
|
128
|
+
return this.#backendService
|
|
129
|
+
.patch(`/template-service/api/objects/${id}`, requestParams, ApiBase.none)
|
|
130
|
+
.pipe(map(() => true), tap(() => this.refreshTemplates()));
|
|
131
|
+
}
|
|
124
132
|
deleteTemplate(template) {
|
|
125
133
|
return this.#confirmService
|
|
126
134
|
.confirm({
|
|
@@ -167,50 +175,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
167
175
|
}]
|
|
168
176
|
}], ctorParameters: () => [] });
|
|
169
177
|
|
|
170
|
-
const components$3 = [AppLogoComponent];
|
|
171
|
-
const module = [CommonModule, TranslateModule, RouterModule];
|
|
172
178
|
class YuvTemplatesComponent {
|
|
173
179
|
constructor() {
|
|
174
|
-
this
|
|
175
|
-
this
|
|
180
|
+
this.#shell = inject(ShellService);
|
|
181
|
+
this.#app = this.#shell.getApp(APP_ID);
|
|
182
|
+
this.appName = this.#app?.title;
|
|
183
|
+
this.appIcon = this.#app?.iconName;
|
|
176
184
|
}
|
|
185
|
+
#shell;
|
|
186
|
+
#app;
|
|
177
187
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YuvTemplatesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
178
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: YuvTemplatesComponent, isStandalone: true, selector: "ymtmpl-app-templates", ngImport: i0, template:
|
|
179
|
-
<header>
|
|
180
|
-
<yuv-app-logo [label]="appName" routerLink="management"></yuv-app-logo>
|
|
181
|
-
</header>
|
|
182
|
-
<main><router-outlet></router-outlet></main>
|
|
183
|
-
`, isInline: true, styles: [":host{display:flex;flex-flow:column;height:100%}:host header{flex:0 0 auto;display:flex;padding-block-end:var(--ymt-spacing-xs)}:host main{flex:1;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: AppLogoComponent, selector: "yuv-app-logo", inputs: ["icon", "label"] }] }); }
|
|
188
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: YuvTemplatesComponent, isStandalone: true, selector: "ymtmpl-app-templates", ngImport: i0, template: `<router-outlet></router-outlet>`, isInline: true, styles: [":host{display:flex;flex-flow:column;height:100%}:host header{flex:0 0 auto;display:flex;padding-block-end:var(--ymt-spacing-xs)}:host main{flex:1;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }] }); }
|
|
184
189
|
}
|
|
185
190
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: YuvTemplatesComponent, decorators: [{
|
|
186
191
|
type: Component,
|
|
187
|
-
args: [{ selector: 'ymtmpl-app-templates', standalone: true, imports: [
|
|
188
|
-
<header>
|
|
189
|
-
<yuv-app-logo [label]="appName" routerLink="management"></yuv-app-logo>
|
|
190
|
-
</header>
|
|
191
|
-
<main><router-outlet></router-outlet></main>
|
|
192
|
-
`, styles: [":host{display:flex;flex-flow:column;height:100%}:host header{flex:0 0 auto;display:flex;padding-block-end:var(--ymt-spacing-xs)}:host main{flex:1;overflow-y:auto}\n"] }]
|
|
192
|
+
args: [{ selector: 'ymtmpl-app-templates', standalone: true, imports: [CommonModule, TranslateModule, RouterModule], template: `<router-outlet></router-outlet>`, styles: [":host{display:flex;flex-flow:column;height:100%}:host header{flex:0 0 auto;display:flex;padding-block-end:var(--ymt-spacing-xs)}:host main{flex:1;overflow-y:auto}\n"] }]
|
|
193
193
|
}] });
|
|
194
194
|
|
|
195
|
-
const components$
|
|
195
|
+
const components$3 = [
|
|
196
196
|
ObjectPreviewComponent
|
|
197
197
|
];
|
|
198
|
-
const modules$
|
|
198
|
+
const modules$3 = [
|
|
199
199
|
CommonModule
|
|
200
200
|
];
|
|
201
201
|
class TemplateDetailsComponent {
|
|
202
202
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
203
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TemplateDetailsComponent, isStandalone: true, selector: "ymtmpl-template-details", inputs: {
|
|
203
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TemplateDetailsComponent, isStandalone: true, selector: "ymtmpl-template-details", inputs: { dmsObject: "dmsObject" }, ngImport: i0, template: "<yuv-object-preview [dmsObject]=\"dmsObject\"></yuv-object-preview>", styles: [":host{display:flex;flex-flow:column;height:100%;overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ObjectPreviewComponent, selector: "yuv-object-preview", inputs: ["objectId", "dmsObject", "version"] }] }); }
|
|
204
204
|
}
|
|
205
205
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateDetailsComponent, decorators: [{
|
|
206
206
|
type: Component,
|
|
207
|
-
args: [{ selector: 'ymtmpl-template-details', standalone: true, imports: [...modules$
|
|
208
|
-
}], propDecorators: {
|
|
207
|
+
args: [{ selector: 'ymtmpl-template-details', standalone: true, imports: [...modules$3, ...components$3], template: "<yuv-object-preview [dmsObject]=\"dmsObject\"></yuv-object-preview>", styles: [":host{display:flex;flex-flow:column;height:100%;overflow:hidden}\n"] }]
|
|
208
|
+
}], propDecorators: { dmsObject: [{
|
|
209
209
|
type: Input
|
|
210
210
|
}] } });
|
|
211
211
|
|
|
212
|
-
const components$
|
|
213
|
-
const modules$
|
|
212
|
+
const components$2 = [BusyOverlayDirective, StringComponent, YmtButtonDirective, DialogComponent];
|
|
213
|
+
const modules$2 = [
|
|
214
214
|
CommonModule,
|
|
215
215
|
ReactiveFormsModule,
|
|
216
216
|
TranslateModule,
|
|
@@ -274,13 +274,86 @@ class CreateTemplateComponent {
|
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
276
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CreateTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
277
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: CreateTemplateComponent, isStandalone: true, selector: "ymtmpl-create-template", host: { properties: { "class.busy": "!busy()" } }, ngImport: i0, template: "<yuv-dialog [yuvBusyOverlay]=\"busy()\" [headertitel]=\"'yuv.app.templates.action.create.headline' | translate\">\n <main class=\"yuv-dialog-content\">\n <form [formGroup]=\"form\">\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.name\" | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.description\" | translate}}</mat-label>\n <yuv-string formControlName=\"description\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.dataObjectType\" | translate}}</mat-label>\n <mat-select formControlName=\"dataObjectType\">\n @for (dataObjectType of dataObjectTypes(); track dataObjectType) {\n <mat-option [value]=\"dataObjectType.id\">{{ dataObjectType.id }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (error()) {\n <p class=\"error\">{{ error() }}</p>\n }\n </form>\n </main>\n <footer>\n <button ymtButton=\"secondary\" [disabled]=\"busy()\" (click)=\"close()\">\n {{ \"yuv.app.templates.action.
|
|
277
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: CreateTemplateComponent, isStandalone: true, selector: "ymtmpl-create-template", host: { properties: { "class.busy": "!busy()" } }, ngImport: i0, template: "<yuv-dialog [yuvBusyOverlay]=\"busy()\" [headertitel]=\"'yuv.app.templates.action.create.headline' | translate\">\n <main class=\"yuv-dialog-content\">\n <form [formGroup]=\"form\">\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.name\" | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.description\" | translate}}</mat-label>\n <yuv-string formControlName=\"description\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.dataObjectType\" | translate}}</mat-label>\n <mat-select formControlName=\"dataObjectType\">\n @for (dataObjectType of dataObjectTypes(); track dataObjectType) {\n <mat-option [value]=\"dataObjectType.id\">{{ dataObjectType.id }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (error()) {\n <p class=\"error\">{{ error() }}</p>\n }\n </form>\n </main>\n <footer>\n <button ymtButton=\"secondary\" [disabled]=\"busy()\" (click)=\"close()\">\n {{ \"yuv.app.templates.action.button.cancel\" | translate }}\n </button>\n <button ymtButton=\"primary\" [disabled]=\"disabledSubmit()\" (click)=\"createTemplate()\">\n {{ 'yuv.app.templates.action.button.create' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:block;position:relative}:host main form{padding:var(--ymt-spacing-m)}:host main form .yuv-form-field{width:100%;margin:var(--ymt-spacing-xs) 0}:host main form .error{color:var(--ymt-on-danger-container);background-color:var(--ymt-danger-container);padding:var(--ymt-spacing-m);border-radius:var(--ymt-corner-xs)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i4.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: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay"] }, { kind: "component", type: StringComponent, selector: "yuv-string", inputs: ["multiselect", "rows", "readonly", "autofocus", "classifications", "situation", "regex", "minLength", "maxLength"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }, { kind: "component", type: DialogComponent, selector: "yuv-dialog", inputs: ["headertitel"] }] }); }
|
|
278
278
|
}
|
|
279
279
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CreateTemplateComponent, decorators: [{
|
|
280
280
|
type: Component,
|
|
281
|
-
args: [{ selector: 'ymtmpl-create-template', standalone: true, imports: [...modules$
|
|
281
|
+
args: [{ selector: 'ymtmpl-create-template', standalone: true, imports: [...modules$2, ...components$2], host: {
|
|
282
282
|
'[class.busy]': '!busy()',
|
|
283
|
-
}, template: "<yuv-dialog [yuvBusyOverlay]=\"busy()\" [headertitel]=\"'yuv.app.templates.action.create.headline' | translate\">\n <main class=\"yuv-dialog-content\">\n <form [formGroup]=\"form\">\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.name\" | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.description\" | translate}}</mat-label>\n <yuv-string formControlName=\"description\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.dataObjectType\" | translate}}</mat-label>\n <mat-select formControlName=\"dataObjectType\">\n @for (dataObjectType of dataObjectTypes(); track dataObjectType) {\n <mat-option [value]=\"dataObjectType.id\">{{ dataObjectType.id }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (error()) {\n <p class=\"error\">{{ error() }}</p>\n }\n </form>\n </main>\n <footer>\n <button ymtButton=\"secondary\" [disabled]=\"busy()\" (click)=\"close()\">\n {{ \"yuv.app.templates.action.
|
|
283
|
+
}, template: "<yuv-dialog [yuvBusyOverlay]=\"busy()\" [headertitel]=\"'yuv.app.templates.action.create.headline' | translate\">\n <main class=\"yuv-dialog-content\">\n <form [formGroup]=\"form\">\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.name\" | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.description\" | translate}}</mat-label>\n <yuv-string formControlName=\"description\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.dataObjectType\" | translate}}</mat-label>\n <mat-select formControlName=\"dataObjectType\">\n @for (dataObjectType of dataObjectTypes(); track dataObjectType) {\n <mat-option [value]=\"dataObjectType.id\">{{ dataObjectType.id }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (error()) {\n <p class=\"error\">{{ error() }}</p>\n }\n </form>\n </main>\n <footer>\n <button ymtButton=\"secondary\" [disabled]=\"busy()\" (click)=\"close()\">\n {{ \"yuv.app.templates.action.button.cancel\" | translate }}\n </button>\n <button ymtButton=\"primary\" [disabled]=\"disabledSubmit()\" (click)=\"createTemplate()\">\n {{ 'yuv.app.templates.action.button.create' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:block;position:relative}:host main form{padding:var(--ymt-spacing-m)}:host main form .yuv-form-field{width:100%;margin:var(--ymt-spacing-xs) 0}:host main form .error{color:var(--ymt-on-danger-container);background-color:var(--ymt-danger-container);padding:var(--ymt-spacing-m);border-radius:var(--ymt-corner-xs)}\n"] }]
|
|
284
|
+
}], ctorParameters: () => [] });
|
|
285
|
+
|
|
286
|
+
const components$1 = [BusyOverlayDirective, StringComponent, YmtButtonDirective, DialogComponent];
|
|
287
|
+
const modules$1 = [
|
|
288
|
+
CommonModule,
|
|
289
|
+
ReactiveFormsModule,
|
|
290
|
+
TranslateModule,
|
|
291
|
+
MatFormFieldModule,
|
|
292
|
+
MatSelectModule
|
|
293
|
+
];
|
|
294
|
+
class EditTemplateComponent {
|
|
295
|
+
#fb;
|
|
296
|
+
#templateService;
|
|
297
|
+
#dialogRef;
|
|
298
|
+
ngOnInit() {
|
|
299
|
+
this.form = this.#fb.group({
|
|
300
|
+
name: [this.data.template?.name || '', Validators.required],
|
|
301
|
+
description: [this.data.template?.description || ''],
|
|
302
|
+
dataObjectType: [this.data.template?.dataObjectType || ''],
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
constructor() {
|
|
306
|
+
this.#fb = inject(FormBuilder);
|
|
307
|
+
this.#templateService = inject(TemplateService);
|
|
308
|
+
this.#dialogRef = inject((MatDialogRef));
|
|
309
|
+
this.busy = signal(false);
|
|
310
|
+
this.error = signal(undefined);
|
|
311
|
+
this.data = inject(MAT_DIALOG_DATA);
|
|
312
|
+
this.changedInput = signal(undefined);
|
|
313
|
+
this.disabledSubmit = linkedSignal({
|
|
314
|
+
source: this.changedInput,
|
|
315
|
+
computation: () => {
|
|
316
|
+
return this.busy() || this.form.invalid || !this.form.value.name;
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
updateTemplate() {
|
|
321
|
+
if (!this.form.dirty) {
|
|
322
|
+
this.#dialogRef.close();
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
this.busy.set(true);
|
|
326
|
+
this.error.set(undefined);
|
|
327
|
+
this.#templateService
|
|
328
|
+
.updateTemplateData(this.data.template.id, { name: this.form.value.name, description: this.form.value.description })
|
|
329
|
+
.subscribe({
|
|
330
|
+
error: (e) => {
|
|
331
|
+
this.error.set(e);
|
|
332
|
+
this.busy.set(false);
|
|
333
|
+
},
|
|
334
|
+
next: () => {
|
|
335
|
+
},
|
|
336
|
+
complete: () => {
|
|
337
|
+
this.#dialogRef.close();
|
|
338
|
+
},
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
close() {
|
|
342
|
+
this.#dialogRef.close();
|
|
343
|
+
}
|
|
344
|
+
ngAfterViewInit() {
|
|
345
|
+
this.form.valueChanges.subscribe((value) => {
|
|
346
|
+
this.changedInput.set(value);
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EditTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
350
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: EditTemplateComponent, isStandalone: true, selector: "ymtmpl-edit-template", host: { properties: { "class.busy": "!busy()" } }, ngImport: i0, template: "<yuv-dialog [yuvBusyOverlay]=\"busy()\" [headertitel]=\"'yuv.app.templates.action.edit.label' | translate\">\n <main class=\"yuv-dialog-content\">\n <form [formGroup]=\"form\">\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.name\" | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.description\" | translate}}</mat-label>\n <yuv-string formControlName=\"description\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.dataObjectType\" | translate}}</mat-label>\n <yuv-string formControlName=\"dataObjectType\" [readonly]=\"true\"></yuv-string>\n </mat-form-field>\n @if (error()) {\n <p class=\"error\">{{ error() }}</p>\n }\n </form>\n </main>\n <footer>\n <button ymtButton=\"secondary\" (click)=\"close()\">\n {{ \"yuv.app.templates.action.button.cancel\" | translate }}\n </button>\n <button ymtButton=\"primary\" [disabled]=\"disabledSubmit()\" (click)=\"updateTemplate()\">\n {{ \"yuv.app.templates.action.button.apply\" | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:block;position:relative}:host main form{padding:var(--ymt-spacing-m)}:host main form .yuv-form-field{width:100%;margin:var(--ymt-spacing-xs) 0}:host main form .error{color:var(--ymt-on-danger-container);background-color:var(--ymt-danger-container);padding:var(--ymt-spacing-m);border-radius:var(--ymt-corner-xs)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "directive", type: BusyOverlayDirective, selector: "[yuvBusyOverlay]", inputs: ["yuvBusyOverlay"] }, { kind: "component", type: StringComponent, selector: "yuv-string", inputs: ["multiselect", "rows", "readonly", "autofocus", "classifications", "situation", "regex", "minLength", "maxLength"] }, { kind: "directive", type: YmtButtonDirective, selector: "button[ymtButton], a[ymtButton]", inputs: ["ymtButton", "disabled", "aria-disabled", "disableRipple", "disabledInteractive", "button-size"] }, { kind: "component", type: DialogComponent, selector: "yuv-dialog", inputs: ["headertitel"] }] }); }
|
|
351
|
+
}
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EditTemplateComponent, decorators: [{
|
|
353
|
+
type: Component,
|
|
354
|
+
args: [{ selector: 'ymtmpl-edit-template', standalone: true, imports: [...modules$1, ...components$1], host: {
|
|
355
|
+
'[class.busy]': '!busy()',
|
|
356
|
+
}, template: "<yuv-dialog [yuvBusyOverlay]=\"busy()\" [headertitel]=\"'yuv.app.templates.action.edit.label' | translate\">\n <main class=\"yuv-dialog-content\">\n <form [formGroup]=\"form\">\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.name\" | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.description\" | translate}}</mat-label>\n <yuv-string formControlName=\"description\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.dataObjectType\" | translate}}</mat-label>\n <yuv-string formControlName=\"dataObjectType\" [readonly]=\"true\"></yuv-string>\n </mat-form-field>\n @if (error()) {\n <p class=\"error\">{{ error() }}</p>\n }\n </form>\n </main>\n <footer>\n <button ymtButton=\"secondary\" (click)=\"close()\">\n {{ \"yuv.app.templates.action.button.cancel\" | translate }}\n </button>\n <button ymtButton=\"primary\" [disabled]=\"disabledSubmit()\" (click)=\"updateTemplate()\">\n {{ \"yuv.app.templates.action.button.apply\" | translate }}\n </button>\n </footer>\n</yuv-dialog>\n", styles: [":host{display:block;position:relative}:host main form{padding:var(--ymt-spacing-m)}:host main form .yuv-form-field{width:100%;margin:var(--ymt-spacing-xs) 0}:host main form .error{color:var(--ymt-on-danger-container);background-color:var(--ymt-danger-container);padding:var(--ymt-spacing-m);border-radius:var(--ymt-corner-xs)}\n"] }]
|
|
284
357
|
}], ctorParameters: () => [] });
|
|
285
358
|
|
|
286
359
|
const components = [
|
|
@@ -306,7 +379,9 @@ class TemplateManagementComponent {
|
|
|
306
379
|
#notificationService;
|
|
307
380
|
#dialog;
|
|
308
381
|
#templateService;
|
|
382
|
+
#dmsService;
|
|
309
383
|
#translateService;
|
|
384
|
+
#eventService;
|
|
310
385
|
#templates;
|
|
311
386
|
constructor() {
|
|
312
387
|
this.layoutSettingsID = 'template-management.layout.settings';
|
|
@@ -316,12 +391,15 @@ class TemplateManagementComponent {
|
|
|
316
391
|
this.#notificationService = inject(NotificationService);
|
|
317
392
|
this.#dialog = inject(MatDialog);
|
|
318
393
|
this.#templateService = inject(TemplateService);
|
|
394
|
+
this.#dmsService = inject(DmsService);
|
|
319
395
|
this.#translateService = inject(TranslateService);
|
|
396
|
+
this.#eventService = inject(EventService);
|
|
320
397
|
this.busy = this.#templateService.busy$;
|
|
321
398
|
this.icons = {
|
|
322
399
|
...APP_ICONS,
|
|
323
400
|
};
|
|
324
401
|
this.selectedTemplate = signal(undefined);
|
|
402
|
+
this.selectedDmsObject = signal(undefined);
|
|
325
403
|
this.smallScreenLayout = signal(false);
|
|
326
404
|
this.layoutOptions = signal({
|
|
327
405
|
masterSize: 40,
|
|
@@ -353,8 +431,20 @@ class TemplateManagementComponent {
|
|
|
353
431
|
}
|
|
354
432
|
: undefined;
|
|
355
433
|
}));
|
|
356
|
-
this.templateListComponent = viewChild.required(ListComponent);
|
|
357
434
|
this.enableDetails = signal(true);
|
|
435
|
+
this.#eventService.on(YuvEventType.DMS_OBJECT_UPDATED)
|
|
436
|
+
.pipe(takeUntilDestroyed())
|
|
437
|
+
.subscribe((e) => {
|
|
438
|
+
const id = e.data.id;
|
|
439
|
+
let sel = this.selectedTemplate();
|
|
440
|
+
if (sel && id === sel.id) {
|
|
441
|
+
this.#dmsService.getDmsObject(id).subscribe({
|
|
442
|
+
next: (obj) => {
|
|
443
|
+
this.selectedDmsObject.set(obj);
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
});
|
|
358
448
|
this.#deviceService.screenChange$
|
|
359
449
|
.pipe(takeUntilDestroyed())
|
|
360
450
|
.subscribe((s) => {
|
|
@@ -364,6 +454,12 @@ class TemplateManagementComponent {
|
|
|
364
454
|
#updateActions(obj) {
|
|
365
455
|
this.actions = obj
|
|
366
456
|
? [
|
|
457
|
+
{
|
|
458
|
+
id: 'yuv.app.templates.action.edit',
|
|
459
|
+
icon: APP_ICONS.actionEditTemplate,
|
|
460
|
+
label: this.#translateService.instant('yuv.app.templates.action.edit.label'),
|
|
461
|
+
callback: () => this.editTemplate(),
|
|
462
|
+
},
|
|
367
463
|
{
|
|
368
464
|
id: 'yuv.app.templates.action.replaceContent',
|
|
369
465
|
icon: APP_ICONS.actionReplaceTemplateContent,
|
|
@@ -407,6 +503,29 @@ class TemplateManagementComponent {
|
|
|
407
503
|
}
|
|
408
504
|
});
|
|
409
505
|
}
|
|
506
|
+
editTemplate() {
|
|
507
|
+
const template = this.selectedTemplate();
|
|
508
|
+
if (template) {
|
|
509
|
+
this.#logger.debug('Edit template ' + template.id + ' ...');
|
|
510
|
+
// Open the TemplateDetailsComponent in edit mode or handle editing logic here
|
|
511
|
+
// You may want to open a dialog similar to createNewTemplate, e.g.:
|
|
512
|
+
this.#dialog.open(EditTemplateComponent, {
|
|
513
|
+
data: { template },
|
|
514
|
+
width: '400px',
|
|
515
|
+
maxWidth: '90vw',
|
|
516
|
+
}).afterClosed().subscribe(() => {
|
|
517
|
+
// if (updatedTemplate) {
|
|
518
|
+
// // Update the template in the list if needed
|
|
519
|
+
// const idx = this.#templates.findIndex(t => t.id === updatedTemplate.id);
|
|
520
|
+
// if (idx > -1) {
|
|
521
|
+
// this.#templates[idx] = updatedTemplate;
|
|
522
|
+
// this.selectedTemplate.set(updatedTemplate);
|
|
523
|
+
// this.#logger.debug('Template updated');
|
|
524
|
+
// }
|
|
525
|
+
// }
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
}
|
|
410
529
|
downloadCurrentContent() {
|
|
411
530
|
const template = this.selectedTemplate();
|
|
412
531
|
if (template) {
|
|
@@ -478,19 +597,22 @@ class TemplateManagementComponent {
|
|
|
478
597
|
if (item.id === this.selectedTemplate()?.id)
|
|
479
598
|
return;
|
|
480
599
|
this.selectedTemplate.set(item);
|
|
600
|
+
this.#dmsService.getDmsObject(item.id).subscribe({
|
|
601
|
+
next: (obj) => this.selectedDmsObject.set(obj)
|
|
602
|
+
});
|
|
481
603
|
this.#updateActions(this.selectedTemplate());
|
|
482
604
|
}
|
|
483
605
|
ngOnInit() {
|
|
484
606
|
this.#templateService.refreshTemplates();
|
|
485
607
|
}
|
|
486
608
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
487
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TemplateManagementComponent, isStandalone: true, selector: "ymtmpl-templates-management", host: { attributes: { "class.smallScreen": "smallScreenLayout()" }, properties: { "class.pagination": "this.pagination" } },
|
|
609
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.14", type: TemplateManagementComponent, isStandalone: true, selector: "ymtmpl-templates-management", host: { attributes: { "class.smallScreen": "smallScreenLayout()" }, properties: { "class.pagination": "this.pagination" } }, ngImport: i0, template: "<header>\n <nav [attr.aria-label]=\"'yuv.app.templates.naviagtion.aria.label' | translate\">\n <div class=\"primary-actions\">\n <button mat-mini-fab (click)=\"createNewTemplate()\" [matTooltip]=\"'yuv.app.templates.action.create.label' | translate\">\n <mat-icon>{{icons.actionCreateNewTemplate}}</mat-icon> \n </button>\n </div>\n <div class=\"template-actions\">\n <yuv-overflow-menu [menuItems]=\"actions\"></yuv-overflow-menu>\n </div>\n <div class=\"secondary-actions\">\n @if (!smallScreenLayout()) {\n <button mat-icon-button (click)=\"enableDetails.set(!enableDetails())\" [matTooltip]=\"'yuv.app.templates.toggledetails.tooltip' | translate\" [ngClass]=\"{ enabled: enableDetails() }\">\n <mat-icon>{{icons.toggleRight}}</mat-icon>\n </button>\n }\n </div>\n </nav>\n</header>\n\n<main>\n <yuv-master-details\n [gutterSize]=\"1\"\n [detailsActive]=\"!smallScreenLayout() && enableDetails()\"\n [layoutOptions]=\"layoutOptions()\"\n [layoutSettingsID]=\"layoutSettingsID\"\n [mode]=\"smallScreenLayout() ? 'ontop' : 'aside'\">\n \n <ng-template #yuvMasterPane>\n <div class=\"masterPaneContainer\">\n @let templateObjects = (templates$ | async)?.items;\n @if (templateObjects?.length) {\n <yuv-list (itemSelect)=\"onItemSelect($event)\">\n @for (t of templateObjects; track t.id) {\n <div class=\"item\" [ngClass]=\"[t.published ? 'public' : '']\" yuvListItem [style.--i]=\"$index\">\n <mat-icon class=\"icon\">{{t.published ? 'export_notes' : 'article'}}</mat-icon>\n <div class=\"name\">{{ t.name }}</div>\n <div class=\"description\">{{ t.description }}</div>\n <div class=\"id\">{{ t.id.toUpperCase( ) }}</div>\n <div class=\"dataObjectType\">{{ t.dataObjectType }}</div> \n </div>\n }\n </yuv-list>\n @if (pagination) {\n <yuv-pagination [pagination]=\"pagination\" (pageChange)=\"goToPage($event)\"></yuv-pagination>\n }\n } @else {\n <div class=\"empty\">\n <p>{{ 'yuv.app.templates.list.empty' | translate }}</p>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #yuvDetailsPane>\n <div class=\"detailsPaneContainer\">\n @let dmsObject = selectedDmsObject();\n @if (dmsObject) {\n @if (smallScreenLayout()) {\n <div class=\"toolbar\">\n <button (click)=\"selectedTemplate.set(undefined)\"> \n <mat-icon>{{icons.close}}</mat-icon> \n </button>\n </div>\n }\n <ymtmpl-template-details [dmsObject]=\"dmsObject\"></ymtmpl-template-details>\n } @else {\n <div class=\"nothing-selected\">\n <h2>{{ 'yuv.app.templates.list.selection.empty' | translate }}</h2>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 2H6C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H18C19.11 22 20 21.11 20 20V8L14 2M18 20H6V4H13V9H18V20M17.35 10L15.25 19H13.85L12.05 12.21L10.25 19H8.85L6.65 10H8.15L9.55 16.81L11.35 10H12.65L14.45 16.81L15.85 10H17.35Z\" /></svg>\n </div>\n }\n </div>\n </ng-template>\n\n </yuv-master-details>\n</main>\n\n<router-outlet name=\"modal\"></router-outlet>", styles: [":host{--split-gutter-background-color: var(--ymt-outline-variant);display:flex;overflow:hidden;flex-flow:column;box-sizing:border-box;height:100%}:host header>nav{flex:0 0 auto;display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:\"primary actions sort secondary\";align-items:center;gap:var(--ymt-spacing-s);border-block-end:1px solid var(--ymt-outline-variant);position:relative;padding:var(--ymt-spacing-xs) var(--ymt-spacing-s)}:host header>nav .primary-actions{grid-area:primary;overflow-x:auto}:host header>nav .secondary-actions{grid-area:secondary;overflow-x:auto}:host header>nav .template-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}:host main{overflow:hidden;background-color:var(--ymt-surface);height:100%}:host yuv-master-details{height:100%}:host yuv-master-details .masterPaneContainer{display:flex;flex-direction:column;height:100%;overflow:hidden}:host yuv-master-details .masterPaneContainer yuv-list{height:100%}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem]{--icon-size: 32px;--list-item-hover-background: var(--ymt-focus-background);display:grid;padding:var(--ymt-spacing-s) var(--ymt-spacing-s);border-block-end:1px solid var(--ymt-outline-variant);align-items:center;grid-template-columns:var(--icon-size) 1fr auto;grid-template-rows:repeat(2,auto);grid-template-areas:\"icon name name\" \"icon description description\" \"icon id dataObjectType\";column-gap:var(--ymt-spacing-s);row-gap:var(--ymt-spacing-s);cursor:pointer}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .icon{grid-area:icon;color:var(--ymt-text-color-subtle)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .id{grid-area:id;color:var(--ymt-text-color-subtle);font:var(--ymt-font-body-subtle)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .name{grid-area:name;color:var(--ymt-text-color-body);font:var(--ymt-font-body)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .description{grid-area:description;color:var(--ymt-text-color-subtle);font:var(--ymt-font-body)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .dataObjectType{grid-area:dataObjectType;color:var(--ymt-text-color-subtle);font:var(--ymt-font-body-subtle)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem]:not(:last-child){border-block-end:1px solid var(--ymt-outline-variant)}:host yuv-master-details .masterPaneContainer yuv-pagination{border-block-start:1px solid var(--ymt-outline-variant)}:host yuv-master-details .detailsPaneContainer{display:flex;flex-direction:column;height:100%;overflow:hidden}:host yuv-master-details .detailsPaneContainer ymtmpl-template-details{height:100%}:host yuv-master-details .detailsPaneContainer .toolbar{flex:0 0 auto}:host yuv-master-details .detailsPaneContainer .nothing-selected{display:flex;flex-flow:column;justify-content:center;align-items:center;height:100%}:host yuv-master-details .detailsPaneContainer .nothing-selected svg{width:150px;height:150px;opacity:.5;fill:var(--ymt-text-color-subtle)}:host.smallScreen{--border-radius: 0}:host.smallScreen yuv-master-details{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "ngmodule", type: YuvOverflowMenuModule }, { kind: "component", type: i4$1.OverflowMenuComponent, selector: "yuv-overflow-menu", inputs: ["overflowIcon", "groupLabels", "menuItems", "vertical"] }, { kind: "ngmodule", type: YuvMasterDetailsModule }, { kind: "component", type: i5.YuvMasterDetailsComponent, selector: "yuv-master-details", inputs: ["detailsActive", "layoutSettingsID", "layoutOptions", "undockableDetails", "panelStyle", "gutterSize", "mode"], outputs: ["detailsActiveChange"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ListComponent, selector: "yuv-list", inputs: ["multiselect", "selfHandleSelection", "disableSelection"], outputs: ["itemSelect", "itemFocus"] }, { kind: "directive", type: ListItemDirective, selector: "[yuvListItem]", inputs: ["disabled", "active", "selected"] }, { kind: "component", type: PaginationComponent, selector: "yuv-pagination", inputs: ["pagination"], outputs: ["pageChange"] }, { kind: "component", type: TemplateDetailsComponent, selector: "ymtmpl-template-details", inputs: ["dmsObject"] }] }); }
|
|
488
610
|
}
|
|
489
611
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TemplateManagementComponent, decorators: [{
|
|
490
612
|
type: Component,
|
|
491
613
|
args: [{ selector: 'ymtmpl-templates-management', standalone: true, imports: [...modules, ...components], host: {
|
|
492
614
|
'class.smallScreen': 'smallScreenLayout()',
|
|
493
|
-
}, template: "<header>\n <nav [attr.aria-label]=\"'yuv.app.templates.naviagtion.aria.label' | translate\">\n <div class=\"primary-actions\">\n <button mat-mini-fab (click)=\"createNewTemplate()\" [matTooltip]=\"'yuv.app.templates.action.create.label' | translate\">\n <mat-icon>{{icons.actionCreateNewTemplate}}</mat-icon> \n </button>\n </div>\n <div class=\"template-actions\">\n <yuv-overflow-menu [menuItems]=\"actions\"></yuv-overflow-menu>\n </div>\n <div class=\"secondary-actions\">\n @if (!smallScreenLayout()) {\n <button mat-icon-button (click)=\"enableDetails.set(!enableDetails())\" [matTooltip]=\"'yuv.app.templates.toggledetails.tooltip' | translate\" [ngClass]=\"{ enabled: enableDetails() }\">\n <mat-icon>{{icons.toggleRight}}</mat-icon>\n </button>\n }\n </div>\n </nav>\n</header>\n\n<main>\n <yuv-master-details\n [gutterSize]=\"1\"\n [detailsActive]=\"!smallScreenLayout() && enableDetails()\"\n [layoutOptions]=\"layoutOptions()\"\n [layoutSettingsID]=\"layoutSettingsID\"\n [mode]=\"smallScreenLayout() ? 'ontop' : 'aside'\">\n \n <ng-template #yuvMasterPane>\n <div class=\"masterPaneContainer\">\n @let templateObjects = (templates$ | async)?.items;\n @if (templateObjects?.length) {\n <yuv-list (itemSelect)=\"onItemSelect($event)\">\n @for (t of templateObjects; track t.id) {\n <div class=\"item\" [ngClass]=\"[t.published ? 'public' : '']\" yuvListItem [style.--i]=\"$index\">\n <mat-icon class=\"icon\">{{t.published ? 'export_notes' : 'article'}}</mat-icon>\n <div class=\"name\">{{ t.name }}</div>\n <div class=\"description\">{{ t.description }}</div>\n <div class=\"id\">{{ t.id.toUpperCase( ) }}</div>\n <div class=\"dataObjectType\">{{ t.dataObjectType }}</div> \n </div>\n }\n </yuv-list>\n @if (pagination) {\n <yuv-pagination [pagination]=\"pagination\" (pageChange)=\"goToPage($event)\"></yuv-pagination>\n }\n } @else {\n <div class=\"empty\">\n <p>{{ 'yuv.app.templates.list.empty' | translate }}</p>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #yuvDetailsPane>\n <div class=\"detailsPaneContainer\">\n @let
|
|
615
|
+
}, template: "<header>\n <nav [attr.aria-label]=\"'yuv.app.templates.naviagtion.aria.label' | translate\">\n <div class=\"primary-actions\">\n <button mat-mini-fab (click)=\"createNewTemplate()\" [matTooltip]=\"'yuv.app.templates.action.create.label' | translate\">\n <mat-icon>{{icons.actionCreateNewTemplate}}</mat-icon> \n </button>\n </div>\n <div class=\"template-actions\">\n <yuv-overflow-menu [menuItems]=\"actions\"></yuv-overflow-menu>\n </div>\n <div class=\"secondary-actions\">\n @if (!smallScreenLayout()) {\n <button mat-icon-button (click)=\"enableDetails.set(!enableDetails())\" [matTooltip]=\"'yuv.app.templates.toggledetails.tooltip' | translate\" [ngClass]=\"{ enabled: enableDetails() }\">\n <mat-icon>{{icons.toggleRight}}</mat-icon>\n </button>\n }\n </div>\n </nav>\n</header>\n\n<main>\n <yuv-master-details\n [gutterSize]=\"1\"\n [detailsActive]=\"!smallScreenLayout() && enableDetails()\"\n [layoutOptions]=\"layoutOptions()\"\n [layoutSettingsID]=\"layoutSettingsID\"\n [mode]=\"smallScreenLayout() ? 'ontop' : 'aside'\">\n \n <ng-template #yuvMasterPane>\n <div class=\"masterPaneContainer\">\n @let templateObjects = (templates$ | async)?.items;\n @if (templateObjects?.length) {\n <yuv-list (itemSelect)=\"onItemSelect($event)\">\n @for (t of templateObjects; track t.id) {\n <div class=\"item\" [ngClass]=\"[t.published ? 'public' : '']\" yuvListItem [style.--i]=\"$index\">\n <mat-icon class=\"icon\">{{t.published ? 'export_notes' : 'article'}}</mat-icon>\n <div class=\"name\">{{ t.name }}</div>\n <div class=\"description\">{{ t.description }}</div>\n <div class=\"id\">{{ t.id.toUpperCase( ) }}</div>\n <div class=\"dataObjectType\">{{ t.dataObjectType }}</div> \n </div>\n }\n </yuv-list>\n @if (pagination) {\n <yuv-pagination [pagination]=\"pagination\" (pageChange)=\"goToPage($event)\"></yuv-pagination>\n }\n } @else {\n <div class=\"empty\">\n <p>{{ 'yuv.app.templates.list.empty' | translate }}</p>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #yuvDetailsPane>\n <div class=\"detailsPaneContainer\">\n @let dmsObject = selectedDmsObject();\n @if (dmsObject) {\n @if (smallScreenLayout()) {\n <div class=\"toolbar\">\n <button (click)=\"selectedTemplate.set(undefined)\"> \n <mat-icon>{{icons.close}}</mat-icon> \n </button>\n </div>\n }\n <ymtmpl-template-details [dmsObject]=\"dmsObject\"></ymtmpl-template-details>\n } @else {\n <div class=\"nothing-selected\">\n <h2>{{ 'yuv.app.templates.list.selection.empty' | translate }}</h2>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 2H6C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H18C19.11 22 20 21.11 20 20V8L14 2M18 20H6V4H13V9H18V20M17.35 10L15.25 19H13.85L12.05 12.21L10.25 19H8.85L6.65 10H8.15L9.55 16.81L11.35 10H12.65L14.45 16.81L15.85 10H17.35Z\" /></svg>\n </div>\n }\n </div>\n </ng-template>\n\n </yuv-master-details>\n</main>\n\n<router-outlet name=\"modal\"></router-outlet>", styles: [":host{--split-gutter-background-color: var(--ymt-outline-variant);display:flex;overflow:hidden;flex-flow:column;box-sizing:border-box;height:100%}:host header>nav{flex:0 0 auto;display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:\"primary actions sort secondary\";align-items:center;gap:var(--ymt-spacing-s);border-block-end:1px solid var(--ymt-outline-variant);position:relative;padding:var(--ymt-spacing-xs) var(--ymt-spacing-s)}:host header>nav .primary-actions{grid-area:primary;overflow-x:auto}:host header>nav .secondary-actions{grid-area:secondary;overflow-x:auto}:host header>nav .template-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}:host main{overflow:hidden;background-color:var(--ymt-surface);height:100%}:host yuv-master-details{height:100%}:host yuv-master-details .masterPaneContainer{display:flex;flex-direction:column;height:100%;overflow:hidden}:host yuv-master-details .masterPaneContainer yuv-list{height:100%}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem]{--icon-size: 32px;--list-item-hover-background: var(--ymt-focus-background);display:grid;padding:var(--ymt-spacing-s) var(--ymt-spacing-s);border-block-end:1px solid var(--ymt-outline-variant);align-items:center;grid-template-columns:var(--icon-size) 1fr auto;grid-template-rows:repeat(2,auto);grid-template-areas:\"icon name name\" \"icon description description\" \"icon id dataObjectType\";column-gap:var(--ymt-spacing-s);row-gap:var(--ymt-spacing-s);cursor:pointer}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .icon{grid-area:icon;color:var(--ymt-text-color-subtle)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .id{grid-area:id;color:var(--ymt-text-color-subtle);font:var(--ymt-font-body-subtle)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .name{grid-area:name;color:var(--ymt-text-color-body);font:var(--ymt-font-body)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .description{grid-area:description;color:var(--ymt-text-color-subtle);font:var(--ymt-font-body)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem] .dataObjectType{grid-area:dataObjectType;color:var(--ymt-text-color-subtle);font:var(--ymt-font-body-subtle)}:host yuv-master-details .masterPaneContainer yuv-list [yuvListItem]:not(:last-child){border-block-end:1px solid var(--ymt-outline-variant)}:host yuv-master-details .masterPaneContainer yuv-pagination{border-block-start:1px solid var(--ymt-outline-variant)}:host yuv-master-details .detailsPaneContainer{display:flex;flex-direction:column;height:100%;overflow:hidden}:host yuv-master-details .detailsPaneContainer ymtmpl-template-details{height:100%}:host yuv-master-details .detailsPaneContainer .toolbar{flex:0 0 auto}:host yuv-master-details .detailsPaneContainer .nothing-selected{display:flex;flex-flow:column;justify-content:center;align-items:center;height:100%}:host yuv-master-details .detailsPaneContainer .nothing-selected svg{width:150px;height:150px;opacity:.5;fill:var(--ymt-text-color-subtle)}:host.smallScreen{--border-radius: 0}:host.smallScreen yuv-master-details{padding:0}\n"] }]
|
|
494
616
|
}], ctorParameters: () => [], propDecorators: { pagination: [{
|
|
495
617
|
type: HostBinding,
|
|
496
618
|
args: ['class.pagination']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-app-templates.mjs","sources":["../../../../projects/yuuvis/app-templates/src/lib/app-templates.service.ts","../../../../projects/yuuvis/app-templates/src/lib/app-templates.component.ts","../../../../projects/yuuvis/app-templates/src/lib/components/template-details/template-details.component.ts","../../../../projects/yuuvis/app-templates/src/lib/components/template-details/template-details.component.html","../../../../projects/yuuvis/app-templates/src/lib/overlays/create-template/create-template.component.ts","../../../../projects/yuuvis/app-templates/src/lib/overlays/create-template/create-template.component.html","../../../../projects/yuuvis/app-templates/src/lib/pages/management/template-management.component.ts","../../../../projects/yuuvis/app-templates/src/lib/pages/management/template-management.component.html","../../../../projects/yuuvis/app-templates/src/lib/lib.routes.ts","../../../../projects/yuuvis/app-templates/src/yuuvis-app-templates.ts"],"sourcesContent":["import { HttpErrorResponse, HttpParams } from '@angular/common/http';\nimport { inject, Injectable, signal } from '@angular/core';\nimport {\n ApiBase,\n BackendService,\n BaseObjectTypeField,\n ContentStreamAllowed,\n CoreApiObject,\n DmsService,\n GenericObjectType,\n Logger,\n SearchResponse,\n SystemService,\n TranslateService,\n} from '@yuuvis/client-core';\nimport {\n catchError,\n map,\n Observable,\n of,\n ReplaySubject,\n switchMap,\n tap,\n throwError,\n} from 'rxjs';\nimport {\n CreateTemplateResult,\n TEMPLATE_FILE_MIME_TYPE,\n TemplateObject,\n TemplateSearchResponse,\n} from '@yuuvis/app-templates/shared';\n\nimport { ConfirmService } from '@yuuvis/client-framework/common';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TemplateService {\n static PAGE_SIZE = 20;\n\n readonly #logger = inject(Logger);\n\n readonly #backendService = inject(BackendService);\n readonly #dmsService = inject(DmsService);\n readonly #confirmService = inject(ConfirmService);\n readonly #translateService = inject(TranslateService);\n readonly #systemService = inject(SystemService)\n\n private templates?: TemplateSearchResponse;\n\n private templatesDataSource = new ReplaySubject<TemplateSearchResponse>(1);\n public templates$: Observable<TemplateSearchResponse> =\n this.templatesDataSource.asObservable();\n\n private busyDataSource = signal<boolean>(false);\n public busy$ = this.busyDataSource.asReadonly();\n\n constructor() {}\n\n getAvailableDataObjectTypes(): GenericObjectType[] {\n return this.#systemService.getObjectTypes().filter((ot) => !ot.isFolder && ot.contentStreamAllowed !== ContentStreamAllowed.NOT_ALLOWED);\n }\n\n getPage(page?: number) {\n this.busyDataSource.set(true);\n\n this.#fetchTemplates(page)\n .subscribe({\n next: (res: TemplateSearchResponse) => {\n this.templates = res;\n this.templatesDataSource.next(this.templates);\n },\n error: (e: any) => {\n this.#logger.error('Failed to fetch templates', e);\n },\n })\n .add(() => this.busyDataSource.set(false));\n }\n\n createTemplate(\n name: string,\n description: string,\n dataObjectType: string\n ): Observable<TemplateObject> {\n let requestParams = {\n name: name,\n description: description,\n dataObjects: { objectData: dataObjectType },\n };\n\n return this.#backendService\n .post(`/template-service/api/objects/`, requestParams, ApiBase.none)\n .pipe(\n catchError((e: HttpErrorResponse) => {\n this.#logger.error('Failed to create template', e);\n return throwError(() => new Error(e.message));\n }),\n map((res: CoreApiObject) => new TemplateObject(res)\n )\n );\n }\n\n downloadTemplateContent(template: TemplateObject): void {\n return this.#backendService.download(\n this.#dmsService.getContentPath(template.id, undefined)\n );\n }\n\n replaceTemplateContent(\n template: TemplateObject,\n file: File\n ): Observable<boolean> {\n if (file.type != TEMPLATE_FILE_MIME_TYPE) {\n return throwError(\n () =>\n new Error(\n this.#translateService.instant(\n 'yuv.app.templates.action.replaceContent.error.unsupportedFileType'\n )\n )\n );\n }\n\n return this.#dmsService\n .uploadContent(template.id, file)\n .pipe(tap(() => this.refreshTemplates()));\n }\n\n toggleTemplateState(template: TemplateObject): Observable<boolean> {\n let requestParams = {\n published: !template.published,\n };\n\n return this.#confirmService\n .confirm(\n template.published\n ? {\n title: this.#translateService.instant(\n 'yuv.app.templates.action.unpublish.label'\n ),\n message: this.#translateService.instant(\n 'yuv.app.templates.action.unpublish.confirm.message',\n { template: template.name }\n ),\n }\n : {\n title: this.#translateService.instant(\n 'yuv.app.templates.action.publish.label'\n ),\n message: this.#translateService.instant(\n 'yuv.app.templates.action.publish.confirm.message',\n { template: template.name }\n ),\n }\n )\n .pipe(\n switchMap((confirmed: boolean) => {\n if (confirmed) {\n return this.#backendService\n .patch(\n `/template-service/api/objects/${template.id}`,\n requestParams,\n ApiBase.none\n )\n .pipe(\n map(() => true),\n tap(() => this.refreshTemplates())\n );\n } else return of(false);\n })\n );\n }\n\n deleteTemplate(template: TemplateObject): Observable<boolean> {\n return this.#confirmService\n .confirm({\n title: this.#translateService.instant(\n 'yuv.app.templates.action.delete.label'\n ),\n message: template.published\n ? this.#translateService.instant(\n 'yuv.app.templates.action.delete.public.confirm.message',\n { template: template.name }\n )\n : this.#translateService.instant(\n 'yuv.app.templates.action.delete.confirm.message',\n { template: template.name }\n ),\n })\n .pipe(\n switchMap((confirmed: boolean) => {\n if (confirmed) {\n return this.#backendService\n .delete(`/dms/objects/${template.id}`, ApiBase.core)\n .pipe(\n map(() => true),\n tap(() => this.refreshTemplates())\n );\n } else return of(false);\n })\n );\n }\n\n refreshTemplates() {\n this.getPage(this.templates?.pageNumber);\n }\n\n #fetchTemplates(pageNumber = 0): Observable<TemplateSearchResponse> {\n let filterParams = new HttpParams()\n .set('page', pageNumber)\n .set('size', TemplateService.PAGE_SIZE)\n .set('sort', 'name%2Casc');\n\n return this.#backendService\n .get(`/template-service/api/objects/?${filterParams}`, ApiBase.none)\n .pipe(\n map((res: SearchResponse) => ({\n pageNumber: pageNumber,\n pageSize: TemplateService.PAGE_SIZE,\n totalNumItems: res.totalNumItems,\n items: res.objects.map(\n (obj: CoreApiObject) => new TemplateObject(obj)\n ),\n }))\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { TranslateModule } from '@yuuvis/client-core';\nimport { AppLogoComponent } from '@yuuvis/client-shell';\nimport { APP_SCHEMA } from '@yuuvis/app-templates/shared';\n\nconst components = [AppLogoComponent];\n\nconst module = [CommonModule, TranslateModule, RouterModule];\n\n@Component({\n selector: 'ymtmpl-app-templates',\n standalone: true,\n imports: [...module, ...components],\n template: `\n <header>\n <yuv-app-logo [label]=\"appName\" routerLink=\"management\"></yuv-app-logo>\n </header>\n <main><router-outlet></router-outlet></main>\n `,\n styleUrl: './app-templates.component.scss',\n})\nexport class YuvTemplatesComponent {\n appName = APP_SCHEMA.name;\n appIcon = APP_SCHEMA.icon;\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { ObjectPreviewComponent } from '@yuuvis/client-framework/object-preview';\nimport { TemplateObject } from '@yuuvis/app-templates/shared';\n\nconst components = [\n ObjectPreviewComponent\n];\n\nconst modules = [\n CommonModule\n];\n\n@Component({\n selector: 'ymtmpl-template-details',\n templateUrl: './template-details.component.html',\n styleUrls: ['./template-details.component.scss'],\n standalone: true,\n imports: [...modules, ...components]\n})\nexport class TemplateDetailsComponent {\n @Input() templateObject!: TemplateObject;\n}","<yuv-object-preview [objectId]=\"templateObject.id\"></yuv-object-preview>","import { CommonModule } from '@angular/common';\nimport { Component, inject, linkedSignal, signal } from '@angular/core';\nimport {\n FormBuilder,\n FormGroup,\n ReactiveFormsModule,\n Validators,\n} from '@angular/forms';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { GenericObjectType, TranslateModule } from '@yuuvis/client-core';\nimport { StringComponent } from '@yuuvis/client-framework/forms';\nimport { YmtButtonDirective } from '@yuuvis/material';\nimport { TemplateService } from './../../app-templates.service';\nimport { BusyOverlayDirective, DialogComponent } from '@yuuvis/client-framework/common';\nimport { TemplateObject } from '@yuuvis/app-templates/shared';\n\nconst components = [BusyOverlayDirective, StringComponent, YmtButtonDirective, DialogComponent];\n\nconst modules = [\n CommonModule,\n ReactiveFormsModule,\n TranslateModule,\n MatFormFieldModule,\n MatSelectModule\n];\n\n@Component({\n selector: 'ymtmpl-create-template',\n templateUrl: './create-template.component.html',\n styleUrl: './create-template.component.scss',\n standalone: true,\n imports: [...modules, ...components],\n host: {\n '[class.busy]': '!busy()',\n },\n})\nexport class CreateTemplateComponent {\n readonly #fb = inject(FormBuilder);\n readonly #templateService = inject(TemplateService);\n readonly #dialogRef = inject(MatDialogRef<CreateTemplateComponent, TemplateObject>);\n\n busy = signal<boolean>(false);\n\n error = signal<string | undefined>(undefined);\n\n form: FormGroup = this.#fb.group({\n name: ['New template', Validators.required],\n description: [''],\n dataObjectType: ['system:document', Validators.required]\n });\n\n dataObjectTypes = signal<GenericObjectType[]>([]);\n\n changedInput = signal<any | undefined>(undefined);\n \n disabledSubmit = linkedSignal({\n source: this.changedInput,\n computation: () => {\n return this.busy() || this.form.invalid || !this.form.value.name;\n }\n });\n\n constructor() {\n this.#loadDataObjectTypes();\n }\n\n #loadDataObjectTypes() {\n this.dataObjectTypes.set(this.#templateService.getAvailableDataObjectTypes().sort((ot1, ot2) => ot1.id > ot2.id ? 1 : -1))\n }\n\n createTemplate() {\n let createdTemplate : TemplateObject;\n let createParams = this.form.value;\n\n this.busy.set(true);\n this.error.set(undefined);\n\n this.#templateService\n .createTemplate(\n createParams.name,\n createParams.description,\n createParams.dataObjectType\n )\n .subscribe({\n error: (e: any) => {\n this.error.set(e);\n this.busy.set(false);\n },\n next: (obj : TemplateObject) => {\n createdTemplate = obj;\n },\n complete: () => {\n this.#dialogRef.close(createdTemplate);\n },\n });\n }\n\n close() {\n this.#dialogRef.close();\n }\n\n ngAfterViewInit() {\n this.form.valueChanges.subscribe((value) => {\n this.changedInput.set(value);\n });\n }\n}\n","<yuv-dialog [yuvBusyOverlay]=\"busy()\" [headertitel]=\"'yuv.app.templates.action.create.headline' | translate\">\n <main class=\"yuv-dialog-content\">\n <form [formGroup]=\"form\">\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.name\" | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.description\" | translate}}</mat-label>\n <yuv-string formControlName=\"description\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.dataObjectType\" | translate}}</mat-label>\n <mat-select formControlName=\"dataObjectType\">\n @for (dataObjectType of dataObjectTypes(); track dataObjectType) {\n <mat-option [value]=\"dataObjectType.id\">{{ dataObjectType.id }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (error()) {\n <p class=\"error\">{{ error() }}</p>\n }\n </form>\n </main>\n <footer>\n <button ymtButton=\"secondary\" [disabled]=\"busy()\" (click)=\"close()\">\n {{ \"yuv.app.templates.action.create.button.cancel\" | translate }}\n </button>\n <button ymtButton=\"primary\" [disabled]=\"disabledSubmit()\" (click)=\"createTemplate()\">\n {{ 'yuv.object-flavor.apply-flavor.button.apply' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n","import { CommonModule, DOCUMENT } from '@angular/common';\nimport {\n Component,\n HostBinding,\n inject,\n OnInit,\n signal,\n viewChild\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { RouterModule } from '@angular/router';\nimport {\n DeviceScreen,\n DeviceService,\n Logger,\n NotificationService,\n TranslateModule,\n TranslateService\n} from '@yuuvis/client-core';\nimport {\n ListComponent,\n ListItemDirective,\n} from '@yuuvis/client-framework/list';\nimport { YuvMasterDetailsModule } from '@yuuvis/client-framework/master-details';\nimport {\n OverflowMenuItem,\n YuvOverflowMenuModule,\n} from '@yuuvis/client-framework/overflow-menu';\nimport {\n Pagination,\n PaginationComponent,\n} from '@yuuvis/client-framework/pagination';\nimport { tap } from 'rxjs';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport {\n APP_ICONS,\n TEMPLATE_FILE_MIME_TYPE,\n TemplateObject,\n TemplateSearchResponse,\n} from '@yuuvis/app-templates/shared';\nimport { TemplateDetailsComponent } from '../../components/template-details/template-details.component';\nimport { CreateTemplateComponent } from '../../overlays/create-template/create-template.component';\nimport { TemplateService } from '../../app-templates.service';\n\nconst components = [\n ListComponent,\n ListItemDirective,\n PaginationComponent,\n TemplateDetailsComponent,\n];\n\nconst modules = [\n CommonModule,\n TranslateModule,\n RouterModule,\n YuvOverflowMenuModule,\n YuvMasterDetailsModule,\n MatIconModule,\n MatButtonModule,\n MatTooltipModule,\n];\n\n@Component({\n selector: 'ymtmpl-templates-management',\n templateUrl: './template-management.component.html',\n styleUrl: './template-management.component.scss',\n standalone: true,\n imports: [...modules, ...components],\n host: {\n 'class.smallScreen': 'smallScreenLayout()',\n },\n})\nexport class TemplateManagementComponent implements OnInit {\n readonly layoutSettingsID = 'template-management.layout.settings';\n\n readonly #logger = inject(Logger);\n\n readonly #document = inject(DOCUMENT);\n readonly #deviceService = inject(DeviceService);\n readonly #notificationService = inject(NotificationService);\n readonly #dialog = inject(MatDialog);\n\n readonly #templateService = inject(TemplateService);\n readonly #translateService = inject(TranslateService);\n\n @HostBinding('class.pagination') pagination?: Pagination;\n\n busy = this.#templateService.busy$;\n\n icons = {\n ...APP_ICONS,\n };\n\n selectedTemplate = signal<TemplateObject | undefined>(undefined);\n\n smallScreenLayout = signal(false);\n\n layoutOptions = signal<{ masterSize: number; detailsSize: number }>({\n masterSize: 40,\n detailsSize: 60,\n });\n\n actions: OverflowMenuItem[] = [];\n\n #templates: TemplateObject[] = [];\n\n templates$ = this.#templateService.templates$.pipe(\n tap((response: TemplateSearchResponse) => {\n this.#templates = response.items;\n const selectedTemplate = this.selectedTemplate();\n if (selectedTemplate) {\n // check if the selected template is still in the list\n const found = this.#templates.find((t) => t.id === selectedTemplate.id);\n if (found) {\n // update the selected template instance and the actions\n this.selectedTemplate.set(found);\n this.#updateActions(this.selectedTemplate());\n } \n // if not, set selected template to undefined\n else this.selectedTemplate.set(undefined);\n }\n this.pagination =\n response && response.totalNumItems > response.pageSize\n ? {\n total: response.totalNumItems,\n page: response.pageNumber + 1,\n pages: Math.ceil(response.totalNumItems / response.pageSize),\n }\n : undefined;\n })\n );\n\n templateListComponent = viewChild.required(ListComponent);\n enableDetails = signal<boolean>(true);\n\n constructor() {\n this.#deviceService.screenChange$\n .pipe(takeUntilDestroyed())\n .subscribe((s: DeviceScreen) => {\n this.smallScreenLayout.set(\n s.size === 's' && s.orientation === 'portrait'\n );\n });\n }\n\n #updateActions(obj: TemplateObject | undefined) {\n this.actions = obj\n ? [\n {\n id: 'yuv.app.templates.action.replaceContent',\n icon: APP_ICONS.actionReplaceTemplateContent,\n label: this.#translateService.instant(\n 'yuv.app.templates.action.replaceContent.label'\n ),\n callback: () => this.replaceCurrentContent(),\n },\n {\n id: 'yuv.app.templates.action.downloadContent',\n icon: APP_ICONS.actionDownloadTemplateContent,\n label: this.#translateService.instant(\n 'yuv.app.templates.action.downloadContent.label'\n ),\n callback: () => this.downloadCurrentContent(),\n },\n {\n id: 'yuv.app.templates.action.delete',\n icon: APP_ICONS.actionDeleteTemplate,\n label: this.#translateService.instant(\n 'yuv.app.templates.action.delete.label'\n ),\n callback: () => this.deleteCurrent(),\n },\n {\n id: 'yuv.app.templates.action.toggleState',\n icon: this.selectedTemplate()?.published\n ? APP_ICONS.actionToggleStateToUnpublished\n : APP_ICONS.actionToggleStateToPublished,\n label: this.#translateService.instant(\n this.selectedTemplate()?.published\n ? 'yuv.app.templates.action.unpublish.label'\n : 'yuv.app.templates.action.publish.label'\n ),\n callback: () => this.toggleCurrentState(),\n },\n ]\n : [];\n }\n\n createNewTemplate() {\n this.#logger.debug('Create new template ...');\n\n this.#dialog.open(CreateTemplateComponent, {\n width: '400px',\n maxWidth: '90vw',\n }).afterClosed().subscribe((createdTemplate: TemplateObject | undefined)=>{\n if (createdTemplate){\n this.#templates.push(createdTemplate);\n this.#logger.debug(\"New template created and added to list\");\n }\n });\n }\n\n downloadCurrentContent() {\n const template = this.selectedTemplate();\n if (template) {\n this.#templateService.downloadTemplateContent(template);\n }\n }\n\n replaceCurrentContent() {\n const template = this.selectedTemplate();\n if (template) {\n this.#logger.debug('Replace content of template ' + template.id + ' ...');\n\n const fileInput = this.#document.createElement('input');\n\n fileInput.type = 'file';\n fileInput.multiple = false;\n fileInput.accept = TEMPLATE_FILE_MIME_TYPE;\n\n fileInput.onchange = (e) => {\n const file = (e.target as HTMLInputElement).files?.[0];\n if (file) {\n this.#templateService\n .replaceTemplateContent(template, file)\n .subscribe({\n next: () => {\n this.#notificationService.success(\n this.#translateService.instant(\n 'yuv.app.templates.action.replaceContent.success'\n )\n );\n },\n error: (err: any) => {\n this.#notificationService.error(err);\n },\n complete: () => {\n this.#logger.debug('Template content replaced');\n },\n });\n }\n };\n\n fileInput.click();\n fileInput.remove();\n }\n }\n\n toggleCurrentState() {\n const template = this.selectedTemplate();\n if (template) {\n this.#templateService\n .toggleTemplateState(template)\n .subscribe((res: boolean) => {\n if (res) {\n this.#updateActions(template);\n this.#logger.info('Template published state chenged');\n }\n });\n }\n }\n\n deleteCurrent() {\n const template = this.selectedTemplate();\n if (template) {\n const index: number = this.#templates.indexOf(template);\n this.#logger.debug('Delete template ' + template.id + ' ...');\n this.#templateService.deleteTemplate(template)\n .subscribe((res: boolean) => {\n if (res) {\n this.#templates.splice(index, 1);\n this.#logger.debug('Template deleted and removed from list');\n }\n });\n }\n }\n\n goToPage(pageNumber: number) {\n this.#templateService.getPage(pageNumber - 1);\n }\n\n onItemSelect(idx: number[]) {\n const item = this.#templates[idx[0]];\n if (item.id === this.selectedTemplate()?.id) return;\n\n this.selectedTemplate.set(item);\n\n this.#updateActions(this.selectedTemplate());\n }\n\n ngOnInit() {\n this.#templateService.refreshTemplates();\n }\n}\n","<header>\n <nav [attr.aria-label]=\"'yuv.app.templates.naviagtion.aria.label' | translate\">\n <div class=\"primary-actions\">\n <button mat-mini-fab (click)=\"createNewTemplate()\" [matTooltip]=\"'yuv.app.templates.action.create.label' | translate\">\n <mat-icon>{{icons.actionCreateNewTemplate}}</mat-icon> \n </button>\n </div>\n <div class=\"template-actions\">\n <yuv-overflow-menu [menuItems]=\"actions\"></yuv-overflow-menu>\n </div>\n <div class=\"secondary-actions\">\n @if (!smallScreenLayout()) {\n <button mat-icon-button (click)=\"enableDetails.set(!enableDetails())\" [matTooltip]=\"'yuv.app.templates.toggledetails.tooltip' | translate\" [ngClass]=\"{ enabled: enableDetails() }\">\n <mat-icon>{{icons.toggleRight}}</mat-icon>\n </button>\n }\n </div>\n </nav>\n</header>\n\n<main>\n <yuv-master-details\n [gutterSize]=\"1\"\n [detailsActive]=\"!smallScreenLayout() && enableDetails()\"\n [layoutOptions]=\"layoutOptions()\"\n [layoutSettingsID]=\"layoutSettingsID\"\n [mode]=\"smallScreenLayout() ? 'ontop' : 'aside'\">\n \n <ng-template #yuvMasterPane>\n <div class=\"masterPaneContainer\">\n @let templateObjects = (templates$ | async)?.items;\n @if (templateObjects?.length) {\n <yuv-list (itemSelect)=\"onItemSelect($event)\">\n @for (t of templateObjects; track t.id) {\n <div class=\"item\" [ngClass]=\"[t.published ? 'public' : '']\" yuvListItem [style.--i]=\"$index\">\n <mat-icon class=\"icon\">{{t.published ? 'export_notes' : 'article'}}</mat-icon>\n <div class=\"name\">{{ t.name }}</div>\n <div class=\"description\">{{ t.description }}</div>\n <div class=\"id\">{{ t.id.toUpperCase( ) }}</div>\n <div class=\"dataObjectType\">{{ t.dataObjectType }}</div> \n </div>\n }\n </yuv-list>\n @if (pagination) {\n <yuv-pagination [pagination]=\"pagination\" (pageChange)=\"goToPage($event)\"></yuv-pagination>\n }\n } @else {\n <div class=\"empty\">\n <p>{{ 'yuv.app.templates.list.empty' | translate }}</p>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #yuvDetailsPane>\n <div class=\"detailsPaneContainer\">\n @let templateObject = selectedTemplate();\n @if (templateObject) {\n @if (smallScreenLayout()) {\n <div class=\"toolbar\">\n <button (click)=\"selectedTemplate.set(undefined)\"> \n <mat-icon>{{icons.close}}</mat-icon> \n </button>\n </div>\n }\n <ymtmpl-template-details [templateObject]=\"templateObject\"></ymtmpl-template-details>\n } @else {\n <div class=\"nothing-selected\">\n <h2>{{ 'yuv.app.templates.list.selection.empty' | translate }}</h2>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 2H6C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H18C19.11 22 20 21.11 20 20V8L14 2M18 20H6V4H13V9H18V20M17.35 10L15.25 19H13.85L12.05 12.21L10.25 19H8.85L6.65 10H8.15L9.55 16.81L11.35 10H12.65L14.45 16.81L15.85 10H17.35Z\" /></svg>\n </div>\n }\n </div>\n </ng-template>\n\n </yuv-master-details>\n</main>\n\n<router-outlet name=\"modal\"></router-outlet>","import { Route } from '@angular/router';\nimport { YuvTemplatesComponent } from './app-templates.component';\nimport { TemplateManagementComponent } from './pages/management/template-management.component';\n\nexport const YuvTemplateManagerRoutes: Route[] = [\n {\n path: '',\n component: YuvTemplatesComponent,\n children: [\n { path: 'management', component: TemplateManagementComponent }, \n { path: '', redirectTo: 'management', pathMatch: 'full' },\n ]\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["components","modules","i1","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAqCa,eAAe,CAAA;aACnB,IAAS,CAAA,SAAA,GAAG,EAAH,CAAM;AAEb,IAAA,OAAO;AAEP,IAAA,eAAe;AACf,IAAA,WAAW;AACX,IAAA,eAAe;AACf,IAAA,iBAAiB;AACjB,IAAA,cAAc;AAWvB,IAAA,WAAA,GAAA;AAjBS,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AAExB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;AACxC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;AACxC,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC5C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC;AAIvC,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,aAAa,CAAyB,CAAC,CAAC;AACnE,QAAA,IAAA,CAAA,UAAU,GACf,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE;AAEjC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAU,KAAK,CAAC;AACxC,QAAA,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;;IAI/C,2BAA2B,GAAA;QACzB,OAAO,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,IAAI,EAAE,CAAC,oBAAoB,KAAK,oBAAoB,CAAC,WAAW,CAAC;;AAG1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|
+
{"version":3,"file":"yuuvis-app-templates.mjs","sources":["../../../../projects/yuuvis/app-templates/src/lib/app-templates.service.ts","../../../../projects/yuuvis/app-templates/src/lib/app-templates.component.ts","../../../../projects/yuuvis/app-templates/src/lib/components/template-details/template-details.component.ts","../../../../projects/yuuvis/app-templates/src/lib/components/template-details/template-details.component.html","../../../../projects/yuuvis/app-templates/src/lib/overlays/create-template/create-template.component.ts","../../../../projects/yuuvis/app-templates/src/lib/overlays/create-template/create-template.component.html","../../../../projects/yuuvis/app-templates/src/lib/overlays/edit-template/edit-template.component.ts","../../../../projects/yuuvis/app-templates/src/lib/overlays/edit-template/edit-template.component.html","../../../../projects/yuuvis/app-templates/src/lib/pages/management/template-management.component.ts","../../../../projects/yuuvis/app-templates/src/lib/pages/management/template-management.component.html","../../../../projects/yuuvis/app-templates/src/lib/lib.routes.ts","../../../../projects/yuuvis/app-templates/src/yuuvis-app-templates.ts"],"sourcesContent":["import { HttpErrorResponse, HttpParams } from '@angular/common/http';\nimport { inject, Injectable, signal } from '@angular/core';\nimport {\n ApiBase,\n BackendService,\n ContentStreamAllowed,\n CoreApiObject,\n DmsService,\n GenericObjectType,\n Logger,\n SearchResponse,\n SystemService,\n TranslateService,\n} from '@yuuvis/client-core';\nimport {\n catchError,\n map,\n Observable,\n of,\n ReplaySubject,\n switchMap,\n tap,\n throwError,\n} from 'rxjs';\nimport {\n TEMPLATE_FILE_MIME_TYPE,\n TemplateObject,\n TemplateSearchResponse,\n} from '@yuuvis/app-templates/shared';\n\nimport { ConfirmService } from '@yuuvis/client-framework/common';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TemplateService {\n static PAGE_SIZE = 20;\n\n readonly #logger = inject(Logger);\n\n readonly #backendService = inject(BackendService);\n readonly #dmsService = inject(DmsService);\n readonly #confirmService = inject(ConfirmService);\n readonly #translateService = inject(TranslateService);\n readonly #systemService = inject(SystemService)\n\n private templates?: TemplateSearchResponse;\n\n private templatesDataSource = new ReplaySubject<TemplateSearchResponse>(1);\n public templates$: Observable<TemplateSearchResponse> =\n this.templatesDataSource.asObservable();\n\n private busyDataSource = signal<boolean>(false);\n public busy$ = this.busyDataSource.asReadonly();\n\n constructor() {}\n\n getAvailableDataObjectTypes(): GenericObjectType[] {\n return this.#systemService.getObjectTypes().filter((ot) => !ot.isFolder && ot.contentStreamAllowed !== ContentStreamAllowed.NOT_ALLOWED);\n }\n\n getPage(page?: number) {\n this.busyDataSource.set(true);\n\n this.#fetchTemplates(page)\n .subscribe({\n next: (res: TemplateSearchResponse) => {\n this.templates = res;\n this.templatesDataSource.next(this.templates);\n },\n error: (e: any) => {\n this.#logger.error('Failed to fetch templates', e);\n },\n })\n .add(() => this.busyDataSource.set(false));\n }\n\n createTemplate(\n name: string,\n description: string,\n dataObjectType: string\n ): Observable<TemplateObject> {\n let requestParams = {\n name: name,\n description: description,\n dataObjects: { objectData: dataObjectType },\n };\n\n return this.#backendService\n .post(`/template-service/api/objects/`, requestParams, ApiBase.none)\n .pipe(\n catchError((e: HttpErrorResponse) => {\n this.#logger.error('Failed to create template', e);\n return throwError(() => new Error(e.message));\n }),\n map((res: CoreApiObject) => new TemplateObject(res)\n )\n );\n }\n\n downloadTemplateContent(template: TemplateObject): void {\n return this.#backendService.download(\n this.#dmsService.getContentPath(template.id, undefined)\n );\n }\n\n replaceTemplateContent(\n template: TemplateObject,\n file: File\n ): Observable<any> {\n if (file.type != TEMPLATE_FILE_MIME_TYPE) {\n return throwError(\n () =>\n new Error(\n this.#translateService.instant(\n 'yuv.app.templates.action.replaceContent.error.unsupportedFileType'\n )\n )\n );\n }\n return this.#dmsService\n .uploadContent(template.id, file)\n .pipe(\n catchError((e: HttpErrorResponse) => {\n this.#logger.error('Failed to create template', e);\n return throwError(() => new Error(e.message));\n }),\n \n );\n }\n\n toggleTemplateState(template: TemplateObject): Observable<boolean> {\n let requestParams = {\n published: !template.published,\n };\n\n return this.#confirmService\n .confirm(\n template.published\n ? {\n title: this.#translateService.instant(\n 'yuv.app.templates.action.unpublish.label'\n ),\n message: this.#translateService.instant(\n 'yuv.app.templates.action.unpublish.confirm.message',\n { template: template.name }\n ),\n }\n : {\n title: this.#translateService.instant(\n 'yuv.app.templates.action.publish.label'\n ),\n message: this.#translateService.instant(\n 'yuv.app.templates.action.publish.confirm.message',\n { template: template.name }\n ),\n }\n )\n .pipe(\n switchMap((confirmed: boolean) => {\n if (confirmed) {\n return this.#backendService\n .patch(\n `/template-service/api/objects/${template.id}`,\n requestParams,\n ApiBase.none\n )\n .pipe(\n map(() => true),\n tap(() => this.refreshTemplates())\n );\n } else return of(false);\n })\n );\n }\n\n updateTemplateData(id: string, requestParams: any): Observable<boolean> {\n \n return this.#backendService\n .patch(\n `/template-service/api/objects/${id}`,\n requestParams,\n ApiBase.none\n )\n .pipe(\n map(() => true),\n tap(() => this.refreshTemplates())\n );\n }\n\n deleteTemplate(template: TemplateObject): Observable<boolean> {\n return this.#confirmService\n .confirm({\n title: this.#translateService.instant(\n 'yuv.app.templates.action.delete.label'\n ),\n message: template.published\n ? this.#translateService.instant(\n 'yuv.app.templates.action.delete.public.confirm.message',\n { template: template.name }\n )\n : this.#translateService.instant(\n 'yuv.app.templates.action.delete.confirm.message',\n { template: template.name }\n ),\n })\n .pipe(\n switchMap((confirmed: boolean) => {\n if (confirmed) {\n return this.#backendService\n .delete(`/dms/objects/${template.id}`, ApiBase.core)\n .pipe(\n map(() => true),\n tap(() => this.refreshTemplates())\n );\n } else return of(false);\n })\n );\n }\n\n refreshTemplates() {\n this.getPage(this.templates?.pageNumber);\n }\n\n #fetchTemplates(pageNumber = 0): Observable<TemplateSearchResponse> {\n let filterParams = new HttpParams()\n .set('page', pageNumber)\n .set('size', TemplateService.PAGE_SIZE)\n .set('sort', 'name%2Casc');\n\n return this.#backendService\n .get(`/template-service/api/objects/?${filterParams}`, ApiBase.none)\n .pipe(\n map((res: SearchResponse) => ({\n pageNumber: pageNumber,\n pageSize: TemplateService.PAGE_SIZE,\n totalNumItems: res.totalNumItems,\n items: res.objects.map(\n (obj: CoreApiObject) => new TemplateObject(obj)\n ),\n }))\n );\n }\n\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, inject } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { TranslateModule } from '@yuuvis/client-core';\nimport { ShellService } from '@yuuvis/client-shell-core';\n\nimport { APP_ID } from '@yuuvis/app-templates/shared';\n\n@Component({\n selector: 'ymtmpl-app-templates',\n standalone: true,\n imports: [CommonModule, TranslateModule, RouterModule],\n template: `<router-outlet></router-outlet>`,\n styleUrl: './app-templates.component.scss',\n})\nexport class YuvTemplatesComponent {\n #shell = inject(ShellService);\n \n #app = this.#shell.getApp(APP_ID);\n appName = this.#app?.title as string;\n appIcon = this.#app?.iconName;\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { ObjectPreviewComponent } from '@yuuvis/client-framework/object-preview';\nimport { DmsObject} from '@yuuvis/client-core';\nconst components = [\n ObjectPreviewComponent\n];\n\nconst modules = [\n CommonModule\n];\n\n@Component({\n selector: 'ymtmpl-template-details',\n templateUrl: './template-details.component.html',\n styleUrls: ['./template-details.component.scss'],\n standalone: true,\n imports: [...modules, ...components]\n})\nexport class TemplateDetailsComponent {\n @Input() dmsObject!: DmsObject;\n}","<yuv-object-preview [dmsObject]=\"dmsObject\"></yuv-object-preview>","import { CommonModule } from '@angular/common';\nimport { Component, inject, linkedSignal, signal } from '@angular/core';\nimport {\n FormBuilder,\n FormGroup,\n ReactiveFormsModule,\n Validators,\n} from '@angular/forms';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { GenericObjectType, TranslateModule } from '@yuuvis/client-core';\nimport { StringComponent } from '@yuuvis/client-framework/forms';\nimport { YmtButtonDirective } from '@yuuvis/material';\nimport { TemplateService } from './../../app-templates.service';\nimport { BusyOverlayDirective, DialogComponent } from '@yuuvis/client-framework/common';\nimport { TemplateObject } from '@yuuvis/app-templates/shared';\n\nconst components = [BusyOverlayDirective, StringComponent, YmtButtonDirective, DialogComponent];\n\nconst modules = [\n CommonModule,\n ReactiveFormsModule,\n TranslateModule,\n MatFormFieldModule,\n MatSelectModule\n];\n\n@Component({\n selector: 'ymtmpl-create-template',\n templateUrl: './create-template.component.html',\n styleUrl: './create-template.component.scss',\n standalone: true,\n imports: [...modules, ...components],\n host: {\n '[class.busy]': '!busy()',\n },\n})\nexport class CreateTemplateComponent {\n readonly #fb = inject(FormBuilder);\n readonly #templateService = inject(TemplateService);\n readonly #dialogRef = inject(MatDialogRef<CreateTemplateComponent, TemplateObject>);\n\n busy = signal<boolean>(false);\n\n error = signal<string | undefined>(undefined);\n\n form: FormGroup = this.#fb.group({\n name: ['New template', Validators.required],\n description: [''],\n dataObjectType: ['system:document', Validators.required]\n });\n\n dataObjectTypes = signal<GenericObjectType[]>([]);\n\n changedInput = signal<any | undefined>(undefined);\n \n disabledSubmit = linkedSignal({\n source: this.changedInput,\n computation: () => {\n return this.busy() || this.form.invalid || !this.form.value.name;\n }\n });\n\n constructor() {\n this.#loadDataObjectTypes();\n }\n\n #loadDataObjectTypes() {\n this.dataObjectTypes.set(this.#templateService.getAvailableDataObjectTypes().sort((ot1, ot2) => ot1.id > ot2.id ? 1 : -1))\n }\n\n createTemplate() {\n let createdTemplate : TemplateObject;\n let createParams = this.form.value;\n\n this.busy.set(true);\n this.error.set(undefined);\n\n this.#templateService\n .createTemplate(\n createParams.name,\n createParams.description,\n createParams.dataObjectType\n )\n .subscribe({\n error: (e: any) => {\n this.error.set(e);\n this.busy.set(false);\n },\n next: (obj : TemplateObject) => {\n createdTemplate = obj;\n },\n complete: () => {\n this.#dialogRef.close(createdTemplate);\n },\n });\n }\n\n close() {\n this.#dialogRef.close();\n }\n\n ngAfterViewInit() {\n this.form.valueChanges.subscribe((value) => {\n this.changedInput.set(value);\n });\n }\n}\n","<yuv-dialog [yuvBusyOverlay]=\"busy()\" [headertitel]=\"'yuv.app.templates.action.create.headline' | translate\">\n <main class=\"yuv-dialog-content\">\n <form [formGroup]=\"form\">\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.name\" | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.description\" | translate}}</mat-label>\n <yuv-string formControlName=\"description\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.dataObjectType\" | translate}}</mat-label>\n <mat-select formControlName=\"dataObjectType\">\n @for (dataObjectType of dataObjectTypes(); track dataObjectType) {\n <mat-option [value]=\"dataObjectType.id\">{{ dataObjectType.id }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (error()) {\n <p class=\"error\">{{ error() }}</p>\n }\n </form>\n </main>\n <footer>\n <button ymtButton=\"secondary\" [disabled]=\"busy()\" (click)=\"close()\">\n {{ \"yuv.app.templates.action.button.cancel\" | translate }}\n </button>\n <button ymtButton=\"primary\" [disabled]=\"disabledSubmit()\" (click)=\"createTemplate()\">\n {{ 'yuv.app.templates.action.button.create' | translate }}\n </button>\n </footer>\n</yuv-dialog>\n","import { CommonModule } from '@angular/common';\nimport { Component, inject, linkedSignal, signal } from '@angular/core';\nimport {\n FormBuilder,\n FormGroup,\n ReactiveFormsModule,\n Validators,\n} from '@angular/forms';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { TranslateModule } from '@yuuvis/client-core';\nimport { StringComponent } from '@yuuvis/client-framework/forms';\nimport { YmtButtonDirective } from '@yuuvis/material';\nimport { TemplateService } from '../../app-templates.service';\nimport { BusyOverlayDirective, DialogComponent } from '@yuuvis/client-framework/common';\nimport { TemplateObject } from '@yuuvis/app-templates/shared';\n\nconst components = [BusyOverlayDirective, StringComponent, YmtButtonDirective, DialogComponent];\n\nconst modules = [\n CommonModule,\n ReactiveFormsModule,\n TranslateModule,\n MatFormFieldModule,\n MatSelectModule\n];\n\n@Component({\n selector: 'ymtmpl-edit-template',\n templateUrl: './edit-template.component.html',\n styleUrl: './edit-template.component.scss',\n standalone: true,\n imports: [...modules, ...components],\n host: {\n '[class.busy]': '!busy()',\n },\n})\nexport class EditTemplateComponent {\n readonly #fb = inject(FormBuilder);\n readonly #templateService = inject(TemplateService);\n readonly #dialogRef = inject(\n MatDialogRef<EditTemplateComponent, TemplateObject>\n );\n\n busy = signal<boolean>(false);\n\n error = signal<string | undefined>(undefined);\n\n data = inject<any>(MAT_DIALOG_DATA);\n\n changedInput = signal<any | undefined>(undefined);\n\n disabledSubmit = linkedSignal({\n source: this.changedInput,\n computation: () => {\n return this.busy() || this.form.invalid || !this.form.value.name;\n }\n });\n\n form: FormGroup;\n\n ngOnInit() {\n this.form = this.#fb.group({\n name: [this.data.template?.name || '', Validators.required],\n description: [this.data.template?.description || ''],\n dataObjectType: [this.data.template?.dataObjectType || ''],\n });\n }\n\n constructor() {}\n\n updateTemplate() {\n if(!this.form.dirty) {\n this.#dialogRef.close();\n return;\n }\n\n this.busy.set(true);\n this.error.set(undefined);\n\n this.#templateService\n .updateTemplateData(this.data.template.id, \n { name: this.form.value.name, description: this.form.value.description }\n )\n .subscribe({\n error: (e: any) => {\n this.error.set(e);\n this.busy.set(false);\n },\n next: () => {\n },\n complete: () => {\n this.#dialogRef.close();\n },\n });\n }\n\n close() {\n this.#dialogRef.close();\n }\n ngAfterViewInit() {\n this.form.valueChanges.subscribe((value) => {\n this.changedInput.set(value);\n });\n }\n}\n","<yuv-dialog [yuvBusyOverlay]=\"busy()\" [headertitel]=\"'yuv.app.templates.action.edit.label' | translate\">\n <main class=\"yuv-dialog-content\">\n <form [formGroup]=\"form\">\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.name\" | translate }}</mat-label>\n <yuv-string [required]=\"true\" formControlName=\"name\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.description\" | translate}}</mat-label>\n <yuv-string formControlName=\"description\"></yuv-string>\n </mat-form-field>\n <mat-form-field class=\"yuv-form-field\">\n <mat-label>{{\"yuv.app.templates.object.property.dataObjectType\" | translate}}</mat-label>\n <yuv-string formControlName=\"dataObjectType\" [readonly]=\"true\"></yuv-string>\n </mat-form-field>\n @if (error()) {\n <p class=\"error\">{{ error() }}</p>\n }\n </form>\n </main>\n <footer>\n <button ymtButton=\"secondary\" (click)=\"close()\">\n {{ \"yuv.app.templates.action.button.cancel\" | translate }}\n </button>\n <button ymtButton=\"primary\" [disabled]=\"disabledSubmit()\" (click)=\"updateTemplate()\">\n {{ \"yuv.app.templates.action.button.apply\" | translate }}\n </button>\n </footer>\n</yuv-dialog>\n","import { CommonModule, DOCUMENT } from '@angular/common';\nimport {\n Component,\n HostBinding,\n inject,\n OnInit,\n signal\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { RouterModule } from '@angular/router';\nimport {\n DeviceScreen,\n DeviceService,\n DmsObject,\n DmsService,\n EventService,\n Logger,\n NotificationService,\n TranslateModule,\n TranslateService,\n YuvEvent,\n YuvEventType\n} from '@yuuvis/client-core';\nimport {\n ListComponent,\n ListItemDirective,\n} from '@yuuvis/client-framework/list';\nimport { YuvMasterDetailsModule } from '@yuuvis/client-framework/master-details';\nimport {\n OverflowMenuItem,\n YuvOverflowMenuModule,\n} from '@yuuvis/client-framework/overflow-menu';\nimport {\n Pagination,\n PaginationComponent,\n} from '@yuuvis/client-framework/pagination';\nimport { tap } from 'rxjs';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport {\n APP_ICONS,\n TEMPLATE_FILE_MIME_TYPE,\n TemplateObject,\n TemplateSearchResponse,\n} from '@yuuvis/app-templates/shared';\nimport { TemplateDetailsComponent } from '../../components/template-details/template-details.component';\nimport { CreateTemplateComponent } from '../../overlays/create-template/create-template.component';\nimport { TemplateService } from '../../app-templates.service';\nimport { EditTemplateComponent } from '../../overlays/edit-template/edit-template.component';\n\nconst components = [\n ListComponent,\n ListItemDirective,\n PaginationComponent,\n TemplateDetailsComponent,\n];\n\nconst modules = [\n CommonModule,\n TranslateModule,\n RouterModule,\n YuvOverflowMenuModule,\n YuvMasterDetailsModule,\n MatIconModule,\n MatButtonModule,\n MatTooltipModule,\n];\n\n@Component({\n selector: 'ymtmpl-templates-management',\n templateUrl: './template-management.component.html',\n styleUrl: './template-management.component.scss',\n standalone: true,\n imports: [...modules, ...components],\n host: {\n 'class.smallScreen': 'smallScreenLayout()',\n },\n})\nexport class TemplateManagementComponent implements OnInit {\n readonly layoutSettingsID = 'template-management.layout.settings';\n\n readonly #logger = inject(Logger);\n\n readonly #document = inject(DOCUMENT);\n readonly #deviceService = inject(DeviceService);\n readonly #notificationService = inject(NotificationService);\n readonly #dialog = inject(MatDialog);\n\n readonly #templateService = inject(TemplateService);\n readonly #dmsService = inject(DmsService);\n readonly #translateService = inject(TranslateService);\n readonly #eventService = inject(EventService);\n \n @HostBinding('class.pagination') pagination?: Pagination;\n\n busy = this.#templateService.busy$;\n\n icons = {\n ...APP_ICONS,\n };\n\n selectedTemplate = signal<TemplateObject | undefined>(undefined);\n selectedDmsObject = signal<DmsObject | undefined>(undefined);\n\n smallScreenLayout = signal(false);\n\n layoutOptions = signal<{ masterSize: number; detailsSize: number }>({\n masterSize: 40,\n detailsSize: 60,\n });\n\n actions: OverflowMenuItem[] = [];\n\n #templates: TemplateObject[] = [];\n\n templates$ = this.#templateService.templates$.pipe(\n tap((response: TemplateSearchResponse) => {\n this.#templates = response.items;\n const selectedTemplate = this.selectedTemplate();\n if (selectedTemplate) {\n // check if the selected template is still in the list\n const found = this.#templates.find((t) => t.id === selectedTemplate.id);\n if (found) {\n // update the selected template instance and the actions\n this.selectedTemplate.set(found);\n this.#updateActions(this.selectedTemplate());\n } \n // if not, set selected template to undefined\n else this.selectedTemplate.set(undefined);\n }\n this.pagination =\n response && response.totalNumItems > response.pageSize\n ? {\n total: response.totalNumItems,\n page: response.pageNumber + 1,\n pages: Math.ceil(response.totalNumItems / response.pageSize),\n }\n : undefined;\n })\n );\n\n enableDetails = signal<boolean>(true);\n\n constructor() {\n this.#eventService.on(YuvEventType.DMS_OBJECT_UPDATED)\n .pipe(takeUntilDestroyed())\n .subscribe((e: YuvEvent) => {\n const id = e.data.id as string;\n let sel = this.selectedTemplate();\n if(sel && id === sel.id){\n this.#dmsService.getDmsObject(id).subscribe({\n next: (obj) => {\n this.selectedDmsObject.set(obj);\n }\n });\n }\n });\n \n this.#deviceService.screenChange$\n .pipe(takeUntilDestroyed())\n .subscribe((s: DeviceScreen) => {\n this.smallScreenLayout.set(\n s.size === 's' && s.orientation === 'portrait'\n );\n });\n }\n\n #updateActions(obj: TemplateObject | undefined) {\n this.actions = obj\n ? [ \n {\n id: 'yuv.app.templates.action.edit',\n icon: APP_ICONS.actionEditTemplate,\n label: this.#translateService.instant(\n 'yuv.app.templates.action.edit.label'\n ),\n callback: () => this.editTemplate(),\n },\n {\n id: 'yuv.app.templates.action.replaceContent',\n icon: APP_ICONS.actionReplaceTemplateContent,\n label: this.#translateService.instant(\n 'yuv.app.templates.action.replaceContent.label'\n ),\n callback: () => this.replaceCurrentContent(),\n },\n {\n id: 'yuv.app.templates.action.downloadContent',\n icon: APP_ICONS.actionDownloadTemplateContent,\n label: this.#translateService.instant(\n 'yuv.app.templates.action.downloadContent.label'\n ),\n callback: () => this.downloadCurrentContent(),\n },\n {\n id: 'yuv.app.templates.action.delete',\n icon: APP_ICONS.actionDeleteTemplate,\n label: this.#translateService.instant(\n 'yuv.app.templates.action.delete.label'\n ),\n callback: () => this.deleteCurrent(),\n },\n {\n id: 'yuv.app.templates.action.toggleState',\n icon: this.selectedTemplate()?.published\n ? APP_ICONS.actionToggleStateToUnpublished\n : APP_ICONS.actionToggleStateToPublished,\n label: this.#translateService.instant(\n this.selectedTemplate()?.published\n ? 'yuv.app.templates.action.unpublish.label'\n : 'yuv.app.templates.action.publish.label'\n ),\n callback: () => this.toggleCurrentState(),\n },\n ]\n : [];\n }\n\n createNewTemplate() {\n this.#logger.debug('Create new template ...');\n\n this.#dialog.open(CreateTemplateComponent, {\n width: '400px',\n maxWidth: '90vw',\n }).afterClosed().subscribe((createdTemplate: TemplateObject | undefined)=>{\n if (createdTemplate){\n this.#templates.push(createdTemplate);\n this.#logger.debug(\"New template created and added to list\");\n }\n });\n }\n\n editTemplate() {\n const template = this.selectedTemplate();\n if (template) {\n this.#logger.debug('Edit template ' + template.id + ' ...');\n // Open the TemplateDetailsComponent in edit mode or handle editing logic here\n // You may want to open a dialog similar to createNewTemplate, e.g.:\n this.#dialog.open(EditTemplateComponent, {\n data: { template },\n width: '400px',\n maxWidth: '90vw',\n }).afterClosed().subscribe(() => {\n // if (updatedTemplate) {\n // // Update the template in the list if needed\n // const idx = this.#templates.findIndex(t => t.id === updatedTemplate.id);\n // if (idx > -1) {\n // this.#templates[idx] = updatedTemplate;\n // this.selectedTemplate.set(updatedTemplate);\n // this.#logger.debug('Template updated');\n // }\n // }\n });\n }\n }\n\n downloadCurrentContent() {\n const template = this.selectedTemplate();\n if (template) {\n this.#templateService.downloadTemplateContent(template);\n }\n }\n\n replaceCurrentContent() {\n const template = this.selectedTemplate();\n if (template) {\n this.#logger.debug('Replace content of template ' + template.id + ' ...');\n\n const fileInput = this.#document.createElement('input');\n\n fileInput.type = 'file';\n fileInput.multiple = false;\n fileInput.accept = TEMPLATE_FILE_MIME_TYPE;\n\n fileInput.onchange = (e) => {\n const file = (e.target as HTMLInputElement).files?.[0];\n if (file) {\n this.#templateService\n .replaceTemplateContent(template, file)\n .subscribe({\n next: () => {\n this.#notificationService.success(\n this.#translateService.instant(\n 'yuv.app.templates.action.replaceContent.success'\n )\n );\n },\n error: (err: any) => {\n this.#notificationService.error(err);\n },\n complete: () => {\n this.#logger.debug('Template content replaced');\n },\n });\n }\n };\n\n fileInput.click();\n fileInput.remove();\n }\n }\n\n toggleCurrentState() {\n const template = this.selectedTemplate();\n if (template) {\n this.#templateService\n .toggleTemplateState(template)\n .subscribe((res: boolean) => {\n if (res) {\n this.#updateActions(template);\n this.#logger.info('Template published state chenged');\n }\n });\n }\n }\n\n deleteCurrent() {\n const template = this.selectedTemplate();\n if (template) {\n const index: number = this.#templates.indexOf(template);\n this.#logger.debug('Delete template ' + template.id + ' ...');\n this.#templateService.deleteTemplate(template)\n .subscribe((res: boolean) => {\n if (res) {\n this.#templates.splice(index, 1);\n this.#logger.debug('Template deleted and removed from list');\n }\n });\n }\n }\n\n goToPage(pageNumber: number) {\n this.#templateService.getPage(pageNumber - 1);\n }\n\n onItemSelect(idx: number[]) {\n const item = this.#templates[idx[0]];\n if (item.id === this.selectedTemplate()?.id) return;\n\n this.selectedTemplate.set(item);\n this.#dmsService.getDmsObject(item.id).subscribe({\n next: (obj) => this.selectedDmsObject.set(obj)\n })\n this.#updateActions(this.selectedTemplate());\n }\n\n ngOnInit() {\n this.#templateService.refreshTemplates();\n }\n}\n","<header>\n <nav [attr.aria-label]=\"'yuv.app.templates.naviagtion.aria.label' | translate\">\n <div class=\"primary-actions\">\n <button mat-mini-fab (click)=\"createNewTemplate()\" [matTooltip]=\"'yuv.app.templates.action.create.label' | translate\">\n <mat-icon>{{icons.actionCreateNewTemplate}}</mat-icon> \n </button>\n </div>\n <div class=\"template-actions\">\n <yuv-overflow-menu [menuItems]=\"actions\"></yuv-overflow-menu>\n </div>\n <div class=\"secondary-actions\">\n @if (!smallScreenLayout()) {\n <button mat-icon-button (click)=\"enableDetails.set(!enableDetails())\" [matTooltip]=\"'yuv.app.templates.toggledetails.tooltip' | translate\" [ngClass]=\"{ enabled: enableDetails() }\">\n <mat-icon>{{icons.toggleRight}}</mat-icon>\n </button>\n }\n </div>\n </nav>\n</header>\n\n<main>\n <yuv-master-details\n [gutterSize]=\"1\"\n [detailsActive]=\"!smallScreenLayout() && enableDetails()\"\n [layoutOptions]=\"layoutOptions()\"\n [layoutSettingsID]=\"layoutSettingsID\"\n [mode]=\"smallScreenLayout() ? 'ontop' : 'aside'\">\n \n <ng-template #yuvMasterPane>\n <div class=\"masterPaneContainer\">\n @let templateObjects = (templates$ | async)?.items;\n @if (templateObjects?.length) {\n <yuv-list (itemSelect)=\"onItemSelect($event)\">\n @for (t of templateObjects; track t.id) {\n <div class=\"item\" [ngClass]=\"[t.published ? 'public' : '']\" yuvListItem [style.--i]=\"$index\">\n <mat-icon class=\"icon\">{{t.published ? 'export_notes' : 'article'}}</mat-icon>\n <div class=\"name\">{{ t.name }}</div>\n <div class=\"description\">{{ t.description }}</div>\n <div class=\"id\">{{ t.id.toUpperCase( ) }}</div>\n <div class=\"dataObjectType\">{{ t.dataObjectType }}</div> \n </div>\n }\n </yuv-list>\n @if (pagination) {\n <yuv-pagination [pagination]=\"pagination\" (pageChange)=\"goToPage($event)\"></yuv-pagination>\n }\n } @else {\n <div class=\"empty\">\n <p>{{ 'yuv.app.templates.list.empty' | translate }}</p>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #yuvDetailsPane>\n <div class=\"detailsPaneContainer\">\n @let dmsObject = selectedDmsObject();\n @if (dmsObject) {\n @if (smallScreenLayout()) {\n <div class=\"toolbar\">\n <button (click)=\"selectedTemplate.set(undefined)\"> \n <mat-icon>{{icons.close}}</mat-icon> \n </button>\n </div>\n }\n <ymtmpl-template-details [dmsObject]=\"dmsObject\"></ymtmpl-template-details>\n } @else {\n <div class=\"nothing-selected\">\n <h2>{{ 'yuv.app.templates.list.selection.empty' | translate }}</h2>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 2H6C4.89 2 4 2.9 4 4V20C4 21.11 4.89 22 6 22H18C19.11 22 20 21.11 20 20V8L14 2M18 20H6V4H13V9H18V20M17.35 10L15.25 19H13.85L12.05 12.21L10.25 19H8.85L6.65 10H8.15L9.55 16.81L11.35 10H12.65L14.45 16.81L15.85 10H17.35Z\" /></svg>\n </div>\n }\n </div>\n </ng-template>\n\n </yuv-master-details>\n</main>\n\n<router-outlet name=\"modal\"></router-outlet>","import { Route } from '@angular/router';\nimport { YuvTemplatesComponent } from './app-templates.component';\nimport { TemplateManagementComponent } from './pages/management/template-management.component';\n\nexport const YuvTemplateManagerRoutes: Route[] = [\n {\n path: '',\n component: YuvTemplatesComponent,\n children: [\n { path: 'management', component: TemplateManagementComponent }, \n { path: '', redirectTo: 'management', pathMatch: 'full' },\n ]\n },\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["components","modules","i1","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmCa,eAAe,CAAA;aACnB,IAAS,CAAA,SAAA,GAAG,EAAH,CAAM;AAEb,IAAA,OAAO;AAEP,IAAA,eAAe;AACf,IAAA,WAAW;AACX,IAAA,eAAe;AACf,IAAA,iBAAiB;AACjB,IAAA,cAAc;AAWvB,IAAA,WAAA,GAAA;AAjBS,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AAExB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;AACxC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;AACxC,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC5C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC;AAIvC,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,aAAa,CAAyB,CAAC,CAAC;AACnE,QAAA,IAAA,CAAA,UAAU,GACf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;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class YuvTemplatesComponent {
|
|
3
|
+
#private;
|
|
3
4
|
appName: string;
|
|
4
|
-
appIcon: string;
|
|
5
|
+
appIcon: string | undefined;
|
|
5
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<YuvTemplatesComponent, never>;
|
|
6
7
|
static ɵcmp: i0.ɵɵComponentDeclaration<YuvTemplatesComponent, "ymtmpl-app-templates", never, {}, {}, never, never, true, never>;
|
|
7
8
|
}
|
|
@@ -15,8 +15,9 @@ export declare class TemplateService {
|
|
|
15
15
|
getPage(page?: number): void;
|
|
16
16
|
createTemplate(name: string, description: string, dataObjectType: string): Observable<TemplateObject>;
|
|
17
17
|
downloadTemplateContent(template: TemplateObject): void;
|
|
18
|
-
replaceTemplateContent(template: TemplateObject, file: File): Observable<
|
|
18
|
+
replaceTemplateContent(template: TemplateObject, file: File): Observable<any>;
|
|
19
19
|
toggleTemplateState(template: TemplateObject): Observable<boolean>;
|
|
20
|
+
updateTemplateData(id: string, requestParams: any): Observable<boolean>;
|
|
20
21
|
deleteTemplate(template: TemplateObject): Observable<boolean>;
|
|
21
22
|
refreshTemplates(): void;
|
|
22
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<TemplateService, never>;
|
package/lib/assets/i18n/de.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"yuv.app.templates.action.
|
|
3
|
-
"yuv.app.templates.action.
|
|
2
|
+
"yuv.app.templates.action.button.apply": "Übernehmen",
|
|
3
|
+
"yuv.app.templates.action.button.cancel": "Abbrechen",
|
|
4
|
+
"yuv.app.templates.action.button.create": "Erstellen",
|
|
4
5
|
"yuv.app.templates.action.create.headline": "Neue Vorlage erstellen",
|
|
5
6
|
"yuv.app.templates.action.create.label": "Neue Vorlage",
|
|
6
7
|
"yuv.app.templates.action.delete.confirm.message": "Möchten Sie die Vorlage '{{template}}' wirklich löschen?",
|
|
7
8
|
"yuv.app.templates.action.delete.label": "Vorlage löschen",
|
|
8
9
|
"yuv.app.templates.action.delete.public.confirm.message": "Möchten Sie die bereits veröffentlichte Vorlage '{{template}}' wirklich löschen?",
|
|
9
10
|
"yuv.app.templates.action.downloadContent.label": "Vorlagendatei herunterladen",
|
|
11
|
+
"yuv.app.templates.action.edit.label": "Vorlagenbeschreibung ändern",
|
|
10
12
|
"yuv.app.templates.action.publish.confirm.message": "Möchten Sie die Vorlage '{{template}}' veröffentlichen?",
|
|
11
13
|
"yuv.app.templates.action.publish.label": "Vorlage veröffentlichen",
|
|
12
14
|
"yuv.app.templates.action.replaceContent.error.unsupportedFileType": "Der MIME-Typ der ausgewählten Vorlagendatei wird nicht unterstützt.",
|
package/lib/assets/i18n/en.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"yuv.app.templates.action.
|
|
3
|
-
"yuv.app.templates.action.
|
|
2
|
+
"yuv.app.templates.action.button.apply": "Apply",
|
|
3
|
+
"yuv.app.templates.action.button.cancel": "Cancel",
|
|
4
|
+
"yuv.app.templates.action.button.create": "Create",
|
|
4
5
|
"yuv.app.templates.action.create.headline": "Create new template",
|
|
5
6
|
"yuv.app.templates.action.create.label": "New template",
|
|
6
7
|
"yuv.app.templates.action.delete.confirm.message": "Do you really want to delete the template '{{template}}'?",
|
|
7
8
|
"yuv.app.templates.action.delete.label": "Delete template",
|
|
8
9
|
"yuv.app.templates.action.delete.public.confirm.message": "Do you really want to delete the already published template '{{template}}'?",
|
|
9
10
|
"yuv.app.templates.action.downloadContent.label": "Download template file",
|
|
11
|
+
"yuv.app.templates.action.edit.label": "Change template description",
|
|
10
12
|
"yuv.app.templates.action.publish.confirm.message": "Do you want to publish the template '{{template}}'?",
|
|
11
13
|
"yuv.app.templates.action.publish.label": "Publish template",
|
|
12
14
|
"yuv.app.templates.action.replaceContent.error.unsupportedFileType": "The MIME type of the selected template file is not supported.",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DmsObject } from '@yuuvis/client-core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class TemplateDetailsComponent {
|
|
4
|
-
|
|
4
|
+
dmsObject: DmsObject;
|
|
5
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<TemplateDetailsComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TemplateDetailsComponent, "ymtmpl-template-details", never, { "
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TemplateDetailsComponent, "ymtmpl-template-details", never, { "dmsObject": { "alias": "dmsObject"; "required": false; }; }, {}, never, never, true, never>;
|
|
7
7
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class EditTemplateComponent {
|
|
4
|
+
#private;
|
|
5
|
+
busy: import("@angular/core").WritableSignal<boolean>;
|
|
6
|
+
error: import("@angular/core").WritableSignal<string | undefined>;
|
|
7
|
+
data: any;
|
|
8
|
+
changedInput: import("@angular/core").WritableSignal<any>;
|
|
9
|
+
disabledSubmit: import("@angular/core").WritableSignal<boolean>;
|
|
10
|
+
form: FormGroup;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
constructor();
|
|
13
|
+
updateTemplate(): void;
|
|
14
|
+
close(): void;
|
|
15
|
+
ngAfterViewInit(): void;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditTemplateComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EditTemplateComponent, "ymtmpl-edit-template", never, {}, {}, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { DmsObject } from '@yuuvis/client-core';
|
|
3
3
|
import { OverflowMenuItem } from '@yuuvis/client-framework/overflow-menu';
|
|
4
4
|
import { Pagination } from '@yuuvis/client-framework/pagination';
|
|
5
5
|
import { TemplateObject, TemplateSearchResponse } from '@yuuvis/app-templates/shared';
|
|
@@ -19,9 +19,11 @@ export declare class TemplateManagementComponent implements OnInit {
|
|
|
19
19
|
actionDeleteTemplate: string;
|
|
20
20
|
actionDownloadTemplateContent: string;
|
|
21
21
|
actionReplaceTemplateContent: string;
|
|
22
|
+
actionEditTemplate: string;
|
|
22
23
|
toggleRight: string;
|
|
23
24
|
};
|
|
24
25
|
selectedTemplate: import("@angular/core").WritableSignal<TemplateObject | undefined>;
|
|
26
|
+
selectedDmsObject: import("@angular/core").WritableSignal<DmsObject | undefined>;
|
|
25
27
|
smallScreenLayout: import("@angular/core").WritableSignal<boolean>;
|
|
26
28
|
layoutOptions: import("@angular/core").WritableSignal<{
|
|
27
29
|
masterSize: number;
|
|
@@ -29,10 +31,10 @@ export declare class TemplateManagementComponent implements OnInit {
|
|
|
29
31
|
}>;
|
|
30
32
|
actions: OverflowMenuItem[];
|
|
31
33
|
templates$: import("rxjs").Observable<TemplateSearchResponse>;
|
|
32
|
-
templateListComponent: import("@angular/core").Signal<ListComponent>;
|
|
33
34
|
enableDetails: import("@angular/core").WritableSignal<boolean>;
|
|
34
35
|
constructor();
|
|
35
36
|
createNewTemplate(): void;
|
|
37
|
+
editTemplate(): void;
|
|
36
38
|
downloadCurrentContent(): void;
|
|
37
39
|
replaceCurrentContent(): void;
|
|
38
40
|
toggleCurrentState(): void;
|
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CoreApiObject } from '@yuuvis/client-core';
|
|
2
|
-
import { AppSchema } from '@yuuvis/client-shell-core';
|
|
3
2
|
export declare const APP_ID = "io.yuuvis.app.templates";
|
|
4
3
|
export declare const APP_ICONS: {
|
|
5
4
|
close: string;
|
|
@@ -11,12 +10,12 @@ export declare const APP_ICONS: {
|
|
|
11
10
|
actionDeleteTemplate: string;
|
|
12
11
|
actionDownloadTemplateContent: string;
|
|
13
12
|
actionReplaceTemplateContent: string;
|
|
13
|
+
actionEditTemplate: string;
|
|
14
14
|
toggleRight: string;
|
|
15
15
|
};
|
|
16
16
|
export declare const APP_ACTIONS: {
|
|
17
17
|
apply: string;
|
|
18
18
|
};
|
|
19
|
-
export declare const APP_SCHEMA: AppSchema;
|
|
20
19
|
export declare const TEMPLATE_FILE_MIME_TYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
21
20
|
export declare class TemplateObject {
|
|
22
21
|
readonly id: string;
|