@messaia/cdk-cms 19.0.0-rc09 → 19.0.0-rc11
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.
|
@@ -9,7 +9,7 @@ import * as i7$1 from '@angular/material/card';
|
|
|
9
9
|
import { MatCardModule } from '@angular/material/card';
|
|
10
10
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
11
11
|
import { MatChipsModule } from '@angular/material/chips';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i4 from '@angular/material/dialog';
|
|
13
13
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
14
14
|
import * as i13 from '@angular/material/divider';
|
|
15
15
|
import { MatDividerModule } from '@angular/material/divider';
|
|
@@ -22,7 +22,7 @@ import { MatInputModule } from '@angular/material/input';
|
|
|
22
22
|
import * as i12 from '@angular/material/progress-bar';
|
|
23
23
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
24
24
|
import { MatSelectModule } from '@angular/material/select';
|
|
25
|
-
import * as
|
|
25
|
+
import * as i7$2 from '@ctrl/ngx-codemirror';
|
|
26
26
|
import { CodemirrorModule } from '@ctrl/ngx-codemirror';
|
|
27
27
|
import * as i2 from '@messaia/cdk';
|
|
28
28
|
import { prop, required, AuditEntity, Column, FormField, Display, Grid, FormFieldType, Utils, Api, Table, GenericService, GenericReactiveFormComponent, EnumService, AuthHelper, SaveAction, BaseComponent, ServiceLocator, GlobalRoles, VdCommonModule, VdLayoutModule, VdMediaModule, VdSelectModule, VdChipsModule, VdFileModule } from '@messaia/cdk';
|
|
@@ -882,7 +882,7 @@ class DocumentFormBaseComponent extends GenericReactiveFormComponent {
|
|
|
882
882
|
}
|
|
883
883
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentFormBaseComponent, decorators: [{
|
|
884
884
|
type: Directive
|
|
885
|
-
}], ctorParameters: () => [{ type: i0.Type }, { type: undefined }, { type: i2.FileService }, { type:
|
|
885
|
+
}], ctorParameters: () => [{ type: i0.Type }, { type: undefined }, { type: i2.FileService }, { type: i4.MatDialogRef }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: undefined }] });
|
|
886
886
|
|
|
887
887
|
class DocumentDialogComponent extends DocumentFormBaseComponent {
|
|
888
888
|
documentService;
|
|
@@ -909,8 +909,8 @@ class DocumentDialogComponent extends DocumentFormBaseComponent {
|
|
|
909
909
|
onBeforeFormBuild() {
|
|
910
910
|
this.item.isPublic = true;
|
|
911
911
|
}
|
|
912
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentDialogComponent, deps: [{ token: DocumentService }, { token: i2.FileService }, { token: i3$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token:
|
|
913
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentDialogComponent, isStandalone: false, selector: "document-dialog", usesInheritance: true, ngImport: i0, template: "\n <div mat-dialog-title class=\"mat-headline-6\" i18n=\"@@newDocument\">New document</div>\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"save()\">\n <vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [context]=\"this\">\n <ng-template vd-file let-field=\"field\" let-formGroup=\"formGroup\">\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin appearance=\"outline\">\n <mat-label>{{field.header}}</mat-label>\n <div vd-file-input [formControlName]=\"field.name\" (select)=\"upload($event)\" [accept]=\"field.fileExtensions\"></div>\n </mat-form-field>\n </ng-template>\n </vd-generic-form>\n <div mat-dialog-actions class=\"pad-top\">\n <button type=\"submit\" mat-flat-button [disabled]=\"isSaving\" color=\"primary\" i18n=\"@@save\">Save</button>\n <button type=\"button\" mat-button (click)=\"cancel()\" i18n=\"@@cancel\">Cancel</button>\n </div>\n </form>", isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: i2.RxwebFormDirective, selector: "[formGroup],[rxwebForm]", inputs: ["formGroup", "rxwebForm"] }, { kind: "directive", type: i2.RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.EmptyStringResetDirective, selector: "[ngModel],[formControlName],[formControl]" }, { kind: "directive", type: i2.MatFormFieldReadonlyDirective, selector: "mat-form-field" }, { kind: "directive", type: i2.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.VdFileDirective, selector: "[vd-file]ng-template" }, { kind: "component", type: i2.VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "component", type: i2.VdFileInputComponent, selector: "[vd-file-input]", inputs: ["accept", "placeholder", "required", "multiple", "disabled", "errorState"], outputs: ["select", "clear"] }, { kind: "directive", type:
|
|
912
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentDialogComponent, deps: [{ token: DocumentService }, { token: i2.FileService }, { token: i3$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i4.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
913
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: DocumentDialogComponent, isStandalone: false, selector: "document-dialog", usesInheritance: true, ngImport: i0, template: "\n <div mat-dialog-title class=\"mat-headline-6\" i18n=\"@@newDocument\">New document</div>\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"save()\">\n <vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [context]=\"this\">\n <ng-template vd-file let-field=\"field\" let-formGroup=\"formGroup\">\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin appearance=\"outline\">\n <mat-label>{{field.header}}</mat-label>\n <div vd-file-input [formControlName]=\"field.name\" (select)=\"upload($event)\" [accept]=\"field.fileExtensions\"></div>\n </mat-form-field>\n </ng-template>\n </vd-generic-form>\n <div mat-dialog-actions class=\"pad-top\">\n <button type=\"submit\" mat-flat-button [disabled]=\"isSaving\" color=\"primary\" i18n=\"@@save\">Save</button>\n <button type=\"button\" mat-button (click)=\"cancel()\" i18n=\"@@cancel\">Cancel</button>\n </div>\n </form>", isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: i2.RxwebFormDirective, selector: "[formGroup],[rxwebForm]", inputs: ["formGroup", "rxwebForm"] }, { kind: "directive", type: i2.RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.EmptyStringResetDirective, selector: "[ngModel],[formControlName],[formControl]" }, { kind: "directive", type: i2.MatFormFieldReadonlyDirective, selector: "mat-form-field" }, { kind: "directive", type: i2.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.VdFileDirective, selector: "[vd-file]ng-template" }, { kind: "component", type: i2.VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "component", type: i2.VdFileInputComponent, selector: "[vd-file-input]", inputs: ["accept", "placeholder", "required", "multiple", "disabled", "errorState"], outputs: ["select", "clear"] }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
|
|
914
914
|
}
|
|
915
915
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: DocumentDialogComponent, decorators: [{
|
|
916
916
|
type: Component,
|
|
@@ -919,7 +919,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
919
919
|
template: DocumentFormTemplate,
|
|
920
920
|
standalone: false
|
|
921
921
|
}]
|
|
922
|
-
}], ctorParameters: () => [{ type: DocumentService }, { type: i2.FileService }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type:
|
|
922
|
+
}], ctorParameters: () => [{ type: DocumentService }, { type: i2.FileService }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i4.MatDialogRef }, { type: Document, decorators: [{
|
|
923
923
|
type: Inject,
|
|
924
924
|
args: [MAT_DIALOG_DATA]
|
|
925
925
|
}] }] });
|
|
@@ -1013,6 +1013,10 @@ let Template = class Template extends AuditEntity {
|
|
|
1013
1013
|
* @property
|
|
1014
1014
|
*/
|
|
1015
1015
|
name;
|
|
1016
|
+
/**
|
|
1017
|
+
* @property
|
|
1018
|
+
*/
|
|
1019
|
+
draft;
|
|
1016
1020
|
/**
|
|
1017
1021
|
* @property
|
|
1018
1022
|
*/
|
|
@@ -1057,7 +1061,7 @@ let Template = class Template extends AuditEntity {
|
|
|
1057
1061
|
__decorate([
|
|
1058
1062
|
required(),
|
|
1059
1063
|
FormField({
|
|
1060
|
-
row:
|
|
1064
|
+
row: 20,
|
|
1061
1065
|
enumType: TemplateType,
|
|
1062
1066
|
fieldSets: ['details']
|
|
1063
1067
|
}),
|
|
@@ -1068,17 +1072,30 @@ __decorate([
|
|
|
1068
1072
|
required(),
|
|
1069
1073
|
Column(),
|
|
1070
1074
|
FormField({
|
|
1071
|
-
row:
|
|
1075
|
+
row: 10,
|
|
1072
1076
|
fieldSets: ['details']
|
|
1073
1077
|
}),
|
|
1074
1078
|
Display($localize `:@@name:Name`),
|
|
1075
1079
|
__metadata("design:type", String)
|
|
1076
1080
|
], Template.prototype, "name", void 0);
|
|
1081
|
+
__decorate([
|
|
1082
|
+
prop(),
|
|
1083
|
+
FormField({
|
|
1084
|
+
row: 15,
|
|
1085
|
+
endpoint: 'templateDoc',
|
|
1086
|
+
optionTextProperty: 'key',
|
|
1087
|
+
optionValueProperty: 'key',
|
|
1088
|
+
fieldSets: ['details'],
|
|
1089
|
+
change: (_, __, ___, ctx) => ctx?.loadDraft()
|
|
1090
|
+
}),
|
|
1091
|
+
Display($localize `:@@draft:Draft`),
|
|
1092
|
+
__metadata("design:type", String)
|
|
1093
|
+
], Template.prototype, "draft", void 0);
|
|
1077
1094
|
__decorate([
|
|
1078
1095
|
prop(),
|
|
1079
1096
|
Column({ maxWidth: 250, display: Grid.Lg }),
|
|
1080
1097
|
FormField({
|
|
1081
|
-
row:
|
|
1098
|
+
row: 30,
|
|
1082
1099
|
fieldSets: ['details']
|
|
1083
1100
|
}),
|
|
1084
1101
|
Display($localize `:@@subject:Subject`),
|
|
@@ -1088,7 +1105,7 @@ __decorate([
|
|
|
1088
1105
|
required(),
|
|
1089
1106
|
Column({ maxWidth: 150, display: Grid.Lg }),
|
|
1090
1107
|
FormField({
|
|
1091
|
-
row:
|
|
1108
|
+
row: 20,
|
|
1092
1109
|
fieldSets: ['details']
|
|
1093
1110
|
}),
|
|
1094
1111
|
Display('Key'),
|
|
@@ -1097,7 +1114,7 @@ __decorate([
|
|
|
1097
1114
|
__decorate([
|
|
1098
1115
|
prop(),
|
|
1099
1116
|
FormField({
|
|
1100
|
-
row:
|
|
1117
|
+
row: 40,
|
|
1101
1118
|
type: FormFieldType.TextArea,
|
|
1102
1119
|
fieldSets: ['details']
|
|
1103
1120
|
}),
|
|
@@ -1188,7 +1205,7 @@ __decorate([
|
|
|
1188
1205
|
prop(),
|
|
1189
1206
|
Column({ event: 'toggle' }),
|
|
1190
1207
|
FormField({
|
|
1191
|
-
row:
|
|
1208
|
+
row: 100,
|
|
1192
1209
|
fieldSets: ['details']
|
|
1193
1210
|
}),
|
|
1194
1211
|
Display($localize `:@@enabled:Enabled`),
|
|
@@ -1252,6 +1269,21 @@ class TemplatePreview {
|
|
|
1252
1269
|
}
|
|
1253
1270
|
}
|
|
1254
1271
|
|
|
1272
|
+
class TemplateDocService extends GenericService {
|
|
1273
|
+
/**
|
|
1274
|
+
* Constructor
|
|
1275
|
+
*/
|
|
1276
|
+
constructor() {
|
|
1277
|
+
super('templateDoc');
|
|
1278
|
+
}
|
|
1279
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TemplateDocService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1280
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TemplateDocService, providedIn: 'root' });
|
|
1281
|
+
}
|
|
1282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TemplateDocService, decorators: [{
|
|
1283
|
+
type: Injectable,
|
|
1284
|
+
args: [{ providedIn: 'root' }]
|
|
1285
|
+
}], ctorParameters: () => [] });
|
|
1286
|
+
|
|
1255
1287
|
class TemplateService extends GenericService {
|
|
1256
1288
|
/**
|
|
1257
1289
|
* Constructor
|
|
@@ -1441,13 +1473,13 @@ class TemplatePreviewDialogComponent extends BaseComponent {
|
|
|
1441
1473
|
this.dialogRef.removePanelClass('full-screen');
|
|
1442
1474
|
}
|
|
1443
1475
|
}
|
|
1444
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TemplatePreviewDialogComponent, deps: [{ token: TemplatePreviewService }, { token:
|
|
1445
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TemplatePreviewDialogComponent, isStandalone: false, selector: "app-template-preview", viewQueries: [{ propertyName: "iframeRef", first: true, predicate: ["iframeRef"], descendants: true }, { propertyName: "emailModel", first: true, predicate: ["email"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div mat-dialog-title>\r\n <span i18n=\"@@templatePreview\">Template preview</span>\r\n <span flex></span>\r\n <div *ngIf=\"data.type == TemplateType.Pdf && pdfSrc ||true\">\r\n <a mat-icon-button (click)=\"download()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">download</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomIn()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">zoom_in</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomOut()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">zoom_out</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"toggleMaximize()\" class=\"maximize-button\">\r\n <mat-icon>{{ isMaximized ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>\r\n </a>\r\n </div>\r\n</div>\r\n<form #form=\"ngForm\" novalidate layout=\"column\" flex>\r\n <!-- #region Entity -->\r\n <div layout=\"row\" flex *ngIf=\"data.endpoint\">\r\n <mat-form-field flex layout-margin>\r\n <mat-label>{{data.entityName}}</mat-label>\r\n <vd-chips [(ngModel)]=\"data.entityId\" [endpoint]=\"data.endpoint\" [params]=\"{sortBy: 'id'}\" text=\"displayName\" name=\"entityId\" #entityId=\"ngModel\" [placeholder]=\"data.entityName??''\" required flex>\r\n <ng-template vd-chip let-entity=\"chip\">\r\n <span>{{entity[data.displayName??'']}}</span>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-entity=\"option\">\r\n <span>{{entity[data.displayName??'']}}</span>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-error *ngIf=\"entityId.errors?.required\"><span>{{data.entityName}}</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <div layout=\"column\" layout-gt-sm=\"row\" class=\"push-bottom\" flex *ngIf=\"isLoading\">\r\n <div flex layout-margin>\r\n <div class=\"push-bottom-sm\" i18n=\"@@pleaseWait\">Please Wait...</div>\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n </div>\r\n </div>\r\n\r\n <!-- #region PDF Content -->\r\n <mat-card *ngIf=\"data.type == TemplateType.Pdf\" flex>\r\n <pdf-viewer [src]=\"pdfSrc\" *ngIf=\"data.type == TemplateType.Pdf && pdfSrc\" [render-text]=\"true\" [zoom]=\"zoom\" [zoom-scale]=\"zoomScale\" [show-borders]=\"true\" [original-size]=\"false\" [autoresize]=\"true\"></pdf-viewer>\r\n </mat-card>\r\n <!-- #region Content -->\r\n\r\n <div *ngIf=\"data.type != TemplateType.Pdf\" layout=\"column\" class=\"pad-top-none\" layout-padding margin-layout flex>\r\n <!-- #region Content -->\r\n <div class=\"pad-top-none\" layout-padding margin-layout flex>\r\n <iframe #iframeRef frameborder=\"0\"></iframe>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Email-->\r\n <div layout-gt-sm=\"row\" layout=\"column\" class=\"pad-top\">\r\n <mat-form-field flex layout-margin>\r\n <mat-label i18n=\"@@email\">Email</mat-label>\r\n <input matInput type=\"email\" name=\"email\" [(ngModel)]=\"data.email\" #email=\"ngModel\" email placeholder=\"Email\" i18n-placeholder=\"@@email\">\r\n <mat-error *ngIf=\"email.errors?.required\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n <mat-error *ngIf=\"!email.errors?.required && email.errors?.email\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isInvalid\"> is invalid</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div mat-dialog-actions class=\"pad-left\">\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"cancel()\" [autofocus]=\"true\" i18n=\"@@close\">Close</button>\r\n <button type=\"button\" mat-flat-button (click)=\"sendMail()\" [disabled]=\"data.email == undefined || !emailModel?.valid\" i18n=\"@@sendMail\">Send mail</button>\r\n </div>\r\n</form>", styles: [".content{overflow:scroll;min-height:200px;max-height:500px;border:1px solid #e5e5e5;border-radius:4px;padding:8px}iframe{width:100%;height:100%;min-height:200px;border:1px solid #e5e5e5;border-radius:4px}pdf-viewer{display:block;margin-left:-16px;width:calc(100% + 32px);height:calc(100vh - 170px);background:#dbdbdb}.mat-mdc-dialog-title{display:flex;padding:8px 12px;align-items:center}.dialog-content{width:100%;height:100%;box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: i2.RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "component", type: i7$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i9$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i11$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i2.EmptyStringResetDirective, selector: "[ngModel],[formControlName],[formControl]" }, { kind: "directive", type: i2.MatFormFieldReadonlyDirective, selector: "mat-form-field" }, { kind: "directive", type: i2.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "component", type: i2.VdChipsComponent, selector: "vd-chips", inputs: ["classType", "chips", "endpoint", "params", "projection", "paginated", "customValue", "context", "key", "searchField", "searchFields", "filters", "removable", "selectFirst", "debounce", "autocompleteCssClass", "suffixButtons"], outputs: ["initSelect", "selected", "cleared", "launch", "chipFocus"] }, { kind: "directive", type: i2.VdAutocompleteOptionDirective, selector: "[vd-autocomplete-option]ng-template" }, { kind: "directive", type: i2.VdChipDirective, selector: "[vd-chip]ng-template" }, { kind: "directive", type: i2$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i13.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i14.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }] });
|
|
1476
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TemplatePreviewDialogComponent, deps: [{ token: TemplatePreviewService }, { token: i4.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i3$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1477
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TemplatePreviewDialogComponent, isStandalone: false, selector: "app-template-preview", viewQueries: [{ propertyName: "iframeRef", first: true, predicate: ["iframeRef"], descendants: true }, { propertyName: "emailModel", first: true, predicate: ["email"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div mat-dialog-title>\r\n <span i18n=\"@@templatePreview\">Template preview</span>\r\n <span flex></span>\r\n <div *ngIf=\"data.type == TemplateType.Pdf && pdfSrc ||true\">\r\n <a mat-icon-button (click)=\"download()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">download</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomIn()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">zoom_in</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomOut()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">zoom_out</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"toggleMaximize()\" class=\"maximize-button\">\r\n <mat-icon>{{ isMaximized ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>\r\n </a>\r\n </div>\r\n</div>\r\n<form #form=\"ngForm\" novalidate layout=\"column\" flex>\r\n <!-- #region Entity -->\r\n <div layout=\"row\" flex *ngIf=\"data.endpoint\">\r\n <mat-form-field flex layout-margin>\r\n <mat-label>{{data.entityName}}</mat-label>\r\n <vd-chips [(ngModel)]=\"data.entityId\" [endpoint]=\"data.endpoint\" [params]=\"{sortBy: 'id'}\" text=\"displayName\" name=\"entityId\" #entityId=\"ngModel\" [placeholder]=\"data.entityName??''\" required flex>\r\n <ng-template vd-chip let-entity=\"chip\">\r\n <span>{{entity[data.displayName??'']}}</span>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-entity=\"option\">\r\n <span>{{entity[data.displayName??'']}}</span>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-error *ngIf=\"entityId.errors?.required\"><span>{{data.entityName}}</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <div layout=\"column\" layout-gt-sm=\"row\" class=\"push-bottom\" flex *ngIf=\"isLoading\">\r\n <div flex layout-margin>\r\n <div class=\"push-bottom-sm\" i18n=\"@@pleaseWait\">Please Wait...</div>\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n </div>\r\n </div>\r\n\r\n <!-- #region PDF Content -->\r\n <mat-card *ngIf=\"data.type == TemplateType.Pdf\" flex>\r\n <pdf-viewer [src]=\"pdfSrc\" *ngIf=\"data.type == TemplateType.Pdf && pdfSrc\" [render-text]=\"true\" [zoom]=\"zoom\" [zoom-scale]=\"zoomScale\" [show-borders]=\"true\" [original-size]=\"false\" [autoresize]=\"true\"></pdf-viewer>\r\n </mat-card>\r\n <!-- #region Content -->\r\n\r\n <div *ngIf=\"data.type != TemplateType.Pdf\" layout=\"column\" class=\"pad-top-none\" layout-padding margin-layout flex>\r\n <!-- #region Content -->\r\n <div class=\"pad-top-none\" layout-padding margin-layout flex>\r\n <iframe #iframeRef frameborder=\"0\"></iframe>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Email-->\r\n <div layout-gt-sm=\"row\" layout=\"column\" class=\"pad-top\">\r\n <mat-form-field flex layout-margin>\r\n <mat-label i18n=\"@@email\">Email</mat-label>\r\n <input matInput type=\"email\" name=\"email\" [(ngModel)]=\"data.email\" #email=\"ngModel\" email placeholder=\"Email\" i18n-placeholder=\"@@email\">\r\n <mat-error *ngIf=\"email.errors?.required\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n <mat-error *ngIf=\"!email.errors?.required && email.errors?.email\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isInvalid\"> is invalid</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div mat-dialog-actions class=\"pad-left\">\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"cancel()\" [autofocus]=\"true\" i18n=\"@@close\">Close</button>\r\n <button type=\"button\" mat-flat-button (click)=\"sendMail()\" [disabled]=\"data.email == undefined || !emailModel?.valid\" i18n=\"@@sendMail\">Send mail</button>\r\n </div>\r\n</form>", styles: [".content{overflow:scroll;min-height:200px;max-height:500px;border:1px solid #e5e5e5;border-radius:4px;padding:8px}iframe{width:100%;height:100%;min-height:200px;border:1px solid #e5e5e5;border-radius:4px}pdf-viewer{display:block;margin-left:-16px;width:calc(100% + 32px);height:calc(100vh - 170px);background:#dbdbdb}.mat-mdc-dialog-title{display:flex;padding:8px 12px;align-items:center}.dialog-content{width:100%;height:100%;box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: i2.RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "component", type: i7$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i9$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i11$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i2.EmptyStringResetDirective, selector: "[ngModel],[formControlName],[formControl]" }, { kind: "directive", type: i2.MatFormFieldReadonlyDirective, selector: "mat-form-field" }, { kind: "directive", type: i2.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "component", type: i2.VdChipsComponent, selector: "vd-chips", inputs: ["classType", "chips", "endpoint", "params", "projection", "paginated", "customValue", "context", "key", "searchField", "searchFields", "filters", "removable", "selectFirst", "debounce", "autocompleteCssClass", "suffixButtons"], outputs: ["initSelect", "selected", "cleared", "launch", "chipFocus"] }, { kind: "directive", type: i2.VdAutocompleteOptionDirective, selector: "[vd-autocomplete-option]ng-template" }, { kind: "directive", type: i2.VdChipDirective, selector: "[vd-chip]ng-template" }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i13.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i14.PdfViewerComponent, selector: "pdf-viewer", inputs: ["src", "c-maps-url", "page", "render-text", "render-text-mode", "original-size", "show-all", "stick-to-page", "zoom", "zoom-scale", "rotation", "external-link-target", "autoresize", "fit-to-page", "show-borders"], outputs: ["after-load-complete", "page-rendered", "pages-initialized", "text-layer-rendered", "error", "on-progress", "pageChange"] }] });
|
|
1446
1478
|
}
|
|
1447
1479
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TemplatePreviewDialogComponent, decorators: [{
|
|
1448
1480
|
type: Component,
|
|
1449
1481
|
args: [{ selector: 'app-template-preview', standalone: false, template: "<div mat-dialog-title>\r\n <span i18n=\"@@templatePreview\">Template preview</span>\r\n <span flex></span>\r\n <div *ngIf=\"data.type == TemplateType.Pdf && pdfSrc ||true\">\r\n <a mat-icon-button (click)=\"download()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">download</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomIn()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">zoom_in</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomOut()\">\r\n <mat-icon fontSet=\"material-symbols-outlined\">zoom_out</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"toggleMaximize()\" class=\"maximize-button\">\r\n <mat-icon>{{ isMaximized ? 'fullscreen_exit' : 'fullscreen' }}</mat-icon>\r\n </a>\r\n </div>\r\n</div>\r\n<form #form=\"ngForm\" novalidate layout=\"column\" flex>\r\n <!-- #region Entity -->\r\n <div layout=\"row\" flex *ngIf=\"data.endpoint\">\r\n <mat-form-field flex layout-margin>\r\n <mat-label>{{data.entityName}}</mat-label>\r\n <vd-chips [(ngModel)]=\"data.entityId\" [endpoint]=\"data.endpoint\" [params]=\"{sortBy: 'id'}\" text=\"displayName\" name=\"entityId\" #entityId=\"ngModel\" [placeholder]=\"data.entityName??''\" required flex>\r\n <ng-template vd-chip let-entity=\"chip\">\r\n <span>{{entity[data.displayName??'']}}</span>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-entity=\"option\">\r\n <span>{{entity[data.displayName??'']}}</span>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-error *ngIf=\"entityId.errors?.required\"><span>{{data.entityName}}</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <div layout=\"column\" layout-gt-sm=\"row\" class=\"push-bottom\" flex *ngIf=\"isLoading\">\r\n <div flex layout-margin>\r\n <div class=\"push-bottom-sm\" i18n=\"@@pleaseWait\">Please Wait...</div>\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n </div>\r\n </div>\r\n\r\n <!-- #region PDF Content -->\r\n <mat-card *ngIf=\"data.type == TemplateType.Pdf\" flex>\r\n <pdf-viewer [src]=\"pdfSrc\" *ngIf=\"data.type == TemplateType.Pdf && pdfSrc\" [render-text]=\"true\" [zoom]=\"zoom\" [zoom-scale]=\"zoomScale\" [show-borders]=\"true\" [original-size]=\"false\" [autoresize]=\"true\"></pdf-viewer>\r\n </mat-card>\r\n <!-- #region Content -->\r\n\r\n <div *ngIf=\"data.type != TemplateType.Pdf\" layout=\"column\" class=\"pad-top-none\" layout-padding margin-layout flex>\r\n <!-- #region Content -->\r\n <div class=\"pad-top-none\" layout-padding margin-layout flex>\r\n <iframe #iframeRef frameborder=\"0\"></iframe>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Email-->\r\n <div layout-gt-sm=\"row\" layout=\"column\" class=\"pad-top\">\r\n <mat-form-field flex layout-margin>\r\n <mat-label i18n=\"@@email\">Email</mat-label>\r\n <input matInput type=\"email\" name=\"email\" [(ngModel)]=\"data.email\" #email=\"ngModel\" email placeholder=\"Email\" i18n-placeholder=\"@@email\">\r\n <mat-error *ngIf=\"email.errors?.required\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n <mat-error *ngIf=\"!email.errors?.required && email.errors?.email\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isInvalid\"> is invalid</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n </div>\r\n <mat-divider></mat-divider>\r\n <div mat-dialog-actions class=\"pad-left\">\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"cancel()\" [autofocus]=\"true\" i18n=\"@@close\">Close</button>\r\n <button type=\"button\" mat-flat-button (click)=\"sendMail()\" [disabled]=\"data.email == undefined || !emailModel?.valid\" i18n=\"@@sendMail\">Send mail</button>\r\n </div>\r\n</form>", styles: [".content{overflow:scroll;min-height:200px;max-height:500px;border:1px solid #e5e5e5;border-radius:4px;padding:8px}iframe{width:100%;height:100%;min-height:200px;border:1px solid #e5e5e5;border-radius:4px}pdf-viewer{display:block;margin-left:-16px;width:calc(100% + 32px);height:calc(100vh - 170px);background:#dbdbdb}.mat-mdc-dialog-title{display:flex;padding:8px 12px;align-items:center}.dialog-content{width:100%;height:100%;box-sizing:border-box}\n"] }]
|
|
1450
|
-
}], ctorParameters: () => [{ type: TemplatePreviewService }, { type:
|
|
1482
|
+
}], ctorParameters: () => [{ type: TemplatePreviewService }, { type: i4.MatDialogRef }, { type: TemplatePreview, decorators: [{
|
|
1451
1483
|
type: Inject,
|
|
1452
1484
|
args: [MAT_DIALOG_DATA]
|
|
1453
1485
|
}] }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }], propDecorators: { iframeRef: [{
|
|
@@ -1460,24 +1492,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
|
1460
1492
|
|
|
1461
1493
|
class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
1462
1494
|
service;
|
|
1495
|
+
templateDocService;
|
|
1463
1496
|
fileService;
|
|
1464
1497
|
dialog;
|
|
1465
1498
|
route;
|
|
1466
1499
|
changeDetectorRef;
|
|
1467
1500
|
/**
|
|
1468
|
-
*
|
|
1501
|
+
* Represents the available template types.
|
|
1469
1502
|
*/
|
|
1470
1503
|
TemplateType = TemplateType;
|
|
1471
1504
|
/**
|
|
1472
|
-
* settings
|
|
1505
|
+
* Stores CMS settings.
|
|
1473
1506
|
*/
|
|
1474
1507
|
settings = new CmsSettings();
|
|
1475
1508
|
/**
|
|
1476
|
-
*
|
|
1509
|
+
* Retrieves the attachments form control.
|
|
1477
1510
|
*/
|
|
1478
1511
|
get attachmentsControl() { return this.form.controls.attachments; }
|
|
1479
1512
|
/**
|
|
1480
|
-
*
|
|
1513
|
+
* Configuration options for the HTML editor.
|
|
1481
1514
|
*/
|
|
1482
1515
|
editorOptions = {
|
|
1483
1516
|
lineNumbers: true,
|
|
@@ -1488,7 +1521,7 @@ class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
|
1488
1521
|
profile: 'xhtml'
|
|
1489
1522
|
};
|
|
1490
1523
|
/**
|
|
1491
|
-
*
|
|
1524
|
+
* Configuration options for the JSON editor.
|
|
1492
1525
|
*/
|
|
1493
1526
|
jsonEditorOptions = {
|
|
1494
1527
|
lineNumbers: true,
|
|
@@ -1506,11 +1539,12 @@ class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
|
1506
1539
|
tabSize: 2
|
|
1507
1540
|
};
|
|
1508
1541
|
/**
|
|
1509
|
-
*
|
|
1542
|
+
* Initializes an instance of TemplateFormComponent.
|
|
1510
1543
|
*/
|
|
1511
|
-
constructor(service, fileService, dialog, route, changeDetectorRef) {
|
|
1544
|
+
constructor(service, templateDocService, fileService, dialog, route, changeDetectorRef) {
|
|
1512
1545
|
super(Template, service, route, changeDetectorRef);
|
|
1513
1546
|
this.service = service;
|
|
1547
|
+
this.templateDocService = templateDocService;
|
|
1514
1548
|
this.fileService = fileService;
|
|
1515
1549
|
this.dialog = dialog;
|
|
1516
1550
|
this.route = route;
|
|
@@ -1524,8 +1558,8 @@ class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
|
1524
1558
|
}
|
|
1525
1559
|
}
|
|
1526
1560
|
/**
|
|
1527
|
-
* Removes
|
|
1528
|
-
* @param attachment
|
|
1561
|
+
* Removes an attachment from the form.
|
|
1562
|
+
* @param attachment The attachment to remove.
|
|
1529
1563
|
*/
|
|
1530
1564
|
removeAttachment(attachment) {
|
|
1531
1565
|
if (Array.isArray(this.item?.attachments)) {
|
|
@@ -1547,8 +1581,8 @@ class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
|
1547
1581
|
}
|
|
1548
1582
|
}
|
|
1549
1583
|
/**
|
|
1550
|
-
*
|
|
1551
|
-
* @param file
|
|
1584
|
+
* Handles file upload for attachments.
|
|
1585
|
+
* @param $event The file input event.
|
|
1552
1586
|
*/
|
|
1553
1587
|
uploadAttachment($event) {
|
|
1554
1588
|
let file = (($event?.target).files ?? [])[0];
|
|
@@ -1569,8 +1603,8 @@ class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
|
1569
1603
|
}
|
|
1570
1604
|
}
|
|
1571
1605
|
/**
|
|
1572
|
-
*
|
|
1573
|
-
* @param attachment
|
|
1606
|
+
* Initiates a download for the specified attachment.
|
|
1607
|
+
* @param attachment The attachment to download.
|
|
1574
1608
|
*/
|
|
1575
1609
|
downloadAttachment(attachment) {
|
|
1576
1610
|
if (attachment.id) {
|
|
@@ -1580,7 +1614,7 @@ class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
|
1580
1614
|
}
|
|
1581
1615
|
}
|
|
1582
1616
|
/**
|
|
1583
|
-
*
|
|
1617
|
+
* Opens a preview dialog for the template.
|
|
1584
1618
|
*/
|
|
1585
1619
|
showPreview() {
|
|
1586
1620
|
this.dialog.open(TemplatePreviewDialogComponent, {
|
|
@@ -1592,13 +1626,25 @@ class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
|
1592
1626
|
panelClass: ['dialog-full-screen']
|
|
1593
1627
|
}).afterClosed().subscribe();
|
|
1594
1628
|
}
|
|
1595
|
-
|
|
1596
|
-
|
|
1629
|
+
/**
|
|
1630
|
+
* Loads a draft version of the template.
|
|
1631
|
+
*/
|
|
1632
|
+
loadDraft() {
|
|
1633
|
+
this.templateDocService.get(`${this.item?.draft}`).subscribe(x => {
|
|
1634
|
+
this.form.patchValue({
|
|
1635
|
+
subject: x.subject?.length > 0 ? x.subject : this.item?.subject,
|
|
1636
|
+
content: x.content
|
|
1637
|
+
});
|
|
1638
|
+
this.form.markAllAsTouched();
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TemplateFormComponent, deps: [{ token: TemplateService }, { token: TemplateDocService }, { token: i2.FileService }, { token: i4.MatDialog }, { token: i3$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1642
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: TemplateFormComponent, isStandalone: false, selector: "app-template-form", usesInheritance: true, ngImport: i0, template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"Template\" i18n-toolbarTitle=\"@@template\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n\t<form *ngIf=\"form\" [formGroup]=\"form\" novalidate (ngSubmit)=\"save()\">\r\n\t\t<vd-layout-card-over class=\"accordion\" cardWidth=\"70\" color=\"primary\" flex>\r\n\t\t\t<mat-accordion [multi]=\"!isEditMode\">\r\n\t\t\t\t<!-- #region Details -->\r\n\t\t\t\t<mat-expansion-panel expanded=\"true\" id=\"details\">\r\n\t\t\t\t\t<mat-expansion-panel-header>\r\n\t\t\t\t\t\t<mat-panel-title i18n=\"@@details\">Details</mat-panel-title>\r\n\t\t\t\t\t</mat-expansion-panel-header>\r\n\t\t\t\t\t<ng-template matExpansionPanelContent>\r\n\t\t\t\t\t\t<vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [fieldSets]=\"['details']\" [context]=\"this\"></vd-generic-form>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<mat-action-row>\r\n\t\t\t\t\t\t<button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"apply()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n\t\t\t\t\t\t<span flex></span>\r\n\t\t\t\t\t</mat-action-row>\r\n\t\t\t\t</mat-expansion-panel>\r\n\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t<!-- #region Content -->\r\n\t\t\t\t<mat-expansion-panel id=\"content\">\r\n\t\t\t\t\t<mat-expansion-panel-header>\r\n\t\t\t\t\t\t<mat-panel-title>\r\n\t\t\t\t\t\t\t<span i18n=\"@@content\">Content</span>\r\n\t\t\t\t\t\t</mat-panel-title>\r\n\t\t\t\t\t</mat-expansion-panel-header>\r\n\t\t\t\t\t<ng-template matExpansionPanelContent>\r\n\t\t\t\t\t\t<div layout-margin>\r\n\t\t\t\t\t\t\t<ngx-codemirror formControlName=\"content\" rows=\"160\" [options]=\"editorOptions\"></ngx-codemirror>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<mat-action-row>\r\n\t\t\t\t\t\t<button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"apply()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"showPreview()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving || !form.pristine\" i18n=\"@@preview\">Preview</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n\t\t\t\t\t\t<span flex></span>\r\n\t\t\t\t\t</mat-action-row>\r\n\t\t\t\t</mat-expansion-panel>\r\n\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t<!-- #region Content -->\r\n\t\t\t\t<mat-expansion-panel id=\"testData\">\r\n\t\t\t\t\t<mat-expansion-panel-header>\r\n\t\t\t\t\t\t<mat-panel-title>\r\n\t\t\t\t\t\t\t<span i18n=\"@@testData\">Test Data</span>\r\n\t\t\t\t\t\t</mat-panel-title>\r\n\t\t\t\t\t</mat-expansion-panel-header>\r\n\t\t\t\t\t<ng-template matExpansionPanelContent>\r\n\t\t\t\t\t\t<div layout-margin>\r\n\t\t\t\t\t\t\t<ngx-codemirror formControlName=\"dummyData\" rows=\"120\" [options]=\"jsonEditorOptions\"></ngx-codemirror>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<mat-action-row>\r\n\t\t\t\t\t\t<button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"apply()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"showPreview()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving || !form.pristine\" i18n=\"@@preview\">Preview</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n\t\t\t\t\t\t<span flex></span>\r\n\t\t\t\t\t</mat-action-row>\r\n\t\t\t\t</mat-expansion-panel>\r\n\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t<!-- #region Audit -->\r\n\t\t\t\t<mat-expansion-panel id=\"audit\" *ngIf=\"isEditMode\">\r\n\t\t\t\t\t<mat-expansion-panel-header>\r\n\t\t\t\t\t\t<mat-panel-title>\r\n\t\t\t\t\t\t\t<span i18n=\"@@audit\">Audit</span>\r\n\t\t\t\t\t\t</mat-panel-title>\r\n\t\t\t\t\t</mat-expansion-panel-header>\r\n\t\t\t\t\t<ng-template matExpansionPanelContent>\r\n\t\t\t\t\t\t<vd-audit [entity]=\"item\"> </vd-audit>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<mat-action-row>\r\n\t\t\t\t\t\t<button type=\"button\" mat-flat-button color=\"accent\" (click)=\"back()\" i18n=\"@@close\">Close</button>\r\n\t\t\t\t\t\t<span flex></span>\r\n\t\t\t\t\t</mat-action-row>\r\n\t\t\t\t</mat-expansion-panel>\r\n\t\t\t\t<!-- #endregion -->\r\n\t\t\t</mat-accordion>\r\n\t\t</vd-layout-card-over>\r\n\t</form>\r\n</vd-layout-nav>", styles: ["codemirror{width:100%}.CodeMirror{height:500px}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7$2.CodemirrorComponent, selector: "ngx-codemirror", inputs: ["className", "name", "autoFocus", "options", "preserveScrollPosition"], outputs: ["cursorActivity", "focusChange", "scroll", "drop", "codeMirrorLoaded"] }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: i2.RxwebFormDirective, selector: "[formGroup],[rxwebForm]", inputs: ["formGroup", "rxwebForm"] }, { kind: "directive", type: i2.RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "directive", type: i7.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i7.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "directive", type: i7.MatExpansionPanelActionRow, selector: "mat-action-row" }, { kind: "component", type: i7.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i7.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i7.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.VdLayoutNavComponent, selector: "vd-layout-nav", inputs: ["toolbarTitle", "editMode", "actions", "data", "context", "hideToolbar", "icon", "logo", "color", "hideToggle", "backNavigationRoute", "navigationRoute"], outputs: ["reload"] }, { kind: "component", type: i2.VdLayoutCardOverComponent, selector: "vd-layout-card-over", inputs: ["cardTitle", "cardSubtitle", "cardWidth", "color"] }, { kind: "directive", type: i2.EmptyStringResetDirective, selector: "[ngModel],[formControlName],[formControl]" }, { kind: "directive", type: i2.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "component", type: i2.VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "component", type: i11.VdAuditComponent, selector: "vd-audit", inputs: ["entity"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1597
1643
|
}
|
|
1598
1644
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: TemplateFormComponent, decorators: [{
|
|
1599
1645
|
type: Component,
|
|
1600
1646
|
args: [{ selector: 'app-template-form', encapsulation: ViewEncapsulation.None, standalone: false, template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"Template\" i18n-toolbarTitle=\"@@template\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n\t<form *ngIf=\"form\" [formGroup]=\"form\" novalidate (ngSubmit)=\"save()\">\r\n\t\t<vd-layout-card-over class=\"accordion\" cardWidth=\"70\" color=\"primary\" flex>\r\n\t\t\t<mat-accordion [multi]=\"!isEditMode\">\r\n\t\t\t\t<!-- #region Details -->\r\n\t\t\t\t<mat-expansion-panel expanded=\"true\" id=\"details\">\r\n\t\t\t\t\t<mat-expansion-panel-header>\r\n\t\t\t\t\t\t<mat-panel-title i18n=\"@@details\">Details</mat-panel-title>\r\n\t\t\t\t\t</mat-expansion-panel-header>\r\n\t\t\t\t\t<ng-template matExpansionPanelContent>\r\n\t\t\t\t\t\t<vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [fieldSets]=\"['details']\" [context]=\"this\"></vd-generic-form>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<mat-action-row>\r\n\t\t\t\t\t\t<button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"apply()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n\t\t\t\t\t\t<span flex></span>\r\n\t\t\t\t\t</mat-action-row>\r\n\t\t\t\t</mat-expansion-panel>\r\n\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t<!-- #region Content -->\r\n\t\t\t\t<mat-expansion-panel id=\"content\">\r\n\t\t\t\t\t<mat-expansion-panel-header>\r\n\t\t\t\t\t\t<mat-panel-title>\r\n\t\t\t\t\t\t\t<span i18n=\"@@content\">Content</span>\r\n\t\t\t\t\t\t</mat-panel-title>\r\n\t\t\t\t\t</mat-expansion-panel-header>\r\n\t\t\t\t\t<ng-template matExpansionPanelContent>\r\n\t\t\t\t\t\t<div layout-margin>\r\n\t\t\t\t\t\t\t<ngx-codemirror formControlName=\"content\" rows=\"160\" [options]=\"editorOptions\"></ngx-codemirror>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<mat-action-row>\r\n\t\t\t\t\t\t<button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"apply()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"showPreview()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving || !form.pristine\" i18n=\"@@preview\">Preview</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n\t\t\t\t\t\t<span flex></span>\r\n\t\t\t\t\t</mat-action-row>\r\n\t\t\t\t</mat-expansion-panel>\r\n\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t<!-- #region Content -->\r\n\t\t\t\t<mat-expansion-panel id=\"testData\">\r\n\t\t\t\t\t<mat-expansion-panel-header>\r\n\t\t\t\t\t\t<mat-panel-title>\r\n\t\t\t\t\t\t\t<span i18n=\"@@testData\">Test Data</span>\r\n\t\t\t\t\t\t</mat-panel-title>\r\n\t\t\t\t\t</mat-expansion-panel-header>\r\n\t\t\t\t\t<ng-template matExpansionPanelContent>\r\n\t\t\t\t\t\t<div layout-margin>\r\n\t\t\t\t\t\t\t<ngx-codemirror formControlName=\"dummyData\" rows=\"120\" [options]=\"jsonEditorOptions\"></ngx-codemirror>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<mat-action-row>\r\n\t\t\t\t\t\t<button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"apply()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"showPreview()\" *ngIf=\"isEditMode\" [disabled]=\"isSaving || !form.pristine\" i18n=\"@@preview\">Preview</button>\r\n\t\t\t\t\t\t<button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n\t\t\t\t\t\t<span flex></span>\r\n\t\t\t\t\t</mat-action-row>\r\n\t\t\t\t</mat-expansion-panel>\r\n\t\t\t\t<!-- #endregion -->\r\n\r\n\t\t\t\t<!-- #region Audit -->\r\n\t\t\t\t<mat-expansion-panel id=\"audit\" *ngIf=\"isEditMode\">\r\n\t\t\t\t\t<mat-expansion-panel-header>\r\n\t\t\t\t\t\t<mat-panel-title>\r\n\t\t\t\t\t\t\t<span i18n=\"@@audit\">Audit</span>\r\n\t\t\t\t\t\t</mat-panel-title>\r\n\t\t\t\t\t</mat-expansion-panel-header>\r\n\t\t\t\t\t<ng-template matExpansionPanelContent>\r\n\t\t\t\t\t\t<vd-audit [entity]=\"item\"> </vd-audit>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<mat-action-row>\r\n\t\t\t\t\t\t<button type=\"button\" mat-flat-button color=\"accent\" (click)=\"back()\" i18n=\"@@close\">Close</button>\r\n\t\t\t\t\t\t<span flex></span>\r\n\t\t\t\t\t</mat-action-row>\r\n\t\t\t\t</mat-expansion-panel>\r\n\t\t\t\t<!-- #endregion -->\r\n\t\t\t</mat-accordion>\r\n\t\t</vd-layout-card-over>\r\n\t</form>\r\n</vd-layout-nav>", styles: ["codemirror{width:100%}.CodeMirror{height:500px}\n"] }]
|
|
1601
|
-
}], ctorParameters: () => [{ type: TemplateService }, { type: i2.FileService }, { type:
|
|
1647
|
+
}], ctorParameters: () => [{ type: TemplateService }, { type: TemplateDocService }, { type: i2.FileService }, { type: i4.MatDialog }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }] });
|
|
1602
1648
|
|
|
1603
1649
|
/**
|
|
1604
1650
|
* @class
|
|
@@ -2071,21 +2117,21 @@ let Slider = class Slider extends AuditEntity {
|
|
|
2071
2117
|
};
|
|
2072
2118
|
__decorate([
|
|
2073
2119
|
required(),
|
|
2074
|
-
FormField({ row:
|
|
2120
|
+
FormField({ row: 10 }),
|
|
2075
2121
|
Column({}),
|
|
2076
2122
|
Display($localize `:@@name:Name`),
|
|
2077
2123
|
__metadata("design:type", String)
|
|
2078
2124
|
], Slider.prototype, "name", void 0);
|
|
2079
2125
|
__decorate([
|
|
2080
2126
|
required(),
|
|
2081
|
-
FormField({ row:
|
|
2127
|
+
FormField({ row: 20 }),
|
|
2082
2128
|
Column({ maxWidth: 150, display: Grid.Lg }),
|
|
2083
2129
|
Display($localize `:@@group:Group`),
|
|
2084
2130
|
__metadata("design:type", String)
|
|
2085
2131
|
], Slider.prototype, "group", void 0);
|
|
2086
2132
|
__decorate([
|
|
2087
2133
|
required(),
|
|
2088
|
-
FormField({ row:
|
|
2134
|
+
FormField({ row: 50, type: FormFieldType.Editor }),
|
|
2089
2135
|
Display($localize `:@@content:Content`),
|
|
2090
2136
|
__metadata("design:type", String)
|
|
2091
2137
|
], Slider.prototype, "content", void 0);
|
|
@@ -2096,7 +2142,6 @@ __decorate([
|
|
|
2096
2142
|
__decorate([
|
|
2097
2143
|
FormField({
|
|
2098
2144
|
row: 30,
|
|
2099
|
-
flex: 80,
|
|
2100
2145
|
filePath: 'images/sliders',
|
|
2101
2146
|
isPublicFile: true,
|
|
2102
2147
|
fileExtensions: '.png,.jpg',
|
|
@@ -2107,7 +2152,10 @@ __decorate([
|
|
|
2107
2152
|
__metadata("design:type", String)
|
|
2108
2153
|
], Slider.prototype, "image", void 0);
|
|
2109
2154
|
__decorate([
|
|
2110
|
-
FormField({
|
|
2155
|
+
FormField({
|
|
2156
|
+
row: 1,
|
|
2157
|
+
endpoint: 'client?enabled=true&projection=id,name'
|
|
2158
|
+
}),
|
|
2111
2159
|
Column({
|
|
2112
2160
|
name: 'client.displayName',
|
|
2113
2161
|
maxWidth: 250,
|
|
@@ -2119,13 +2167,13 @@ __decorate([
|
|
|
2119
2167
|
], Slider.prototype, "clientId", void 0);
|
|
2120
2168
|
__decorate([
|
|
2121
2169
|
prop(),
|
|
2122
|
-
FormField({ row:
|
|
2170
|
+
FormField({ row: 20 }),
|
|
2123
2171
|
Display($localize `:@@ordering:Ordering`),
|
|
2124
2172
|
__metadata("design:type", Number)
|
|
2125
2173
|
], Slider.prototype, "ordering", void 0);
|
|
2126
2174
|
__decorate([
|
|
2127
2175
|
prop(),
|
|
2128
|
-
FormField({ row:
|
|
2176
|
+
FormField({ row: 100 }),
|
|
2129
2177
|
Column({ event: 'toggle' }),
|
|
2130
2178
|
Display($localize `:@@enabled:Enabled`),
|
|
2131
2179
|
__metadata("design:type", Boolean)
|