@messaia/cdk-cms 20.2.7 → 21.0.0-rc.10
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.
|
@@ -6,26 +6,24 @@ import * as i2 from '@messaia/cdk';
|
|
|
6
6
|
import { prop, required, AuditEntity, Column, FormField, Display, Grid, FormFieldType, Utils, Api, Table, GenericService, GenericReactiveFormComponent, EnumService, RxReactiveFormsModule, MatFormFieldEditorDirective, VdLayoutNavComponent, VdLayoutCardOverComponent, VdGenericFormComponent, VdEditorDirective, AuthHelper, SaveAction, VdFileInputComponent, BaseComponent, VdChipsComponent, GlobalRoles } from '@messaia/cdk';
|
|
7
7
|
import { VdAuditComponent, DocumentBase, VdDynamicListComponent, VdDynamicFormComponent, DocumentType } from '@messaia/cdk-base';
|
|
8
8
|
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
9
|
-
import * as i5 from '@angular/common';
|
|
10
|
-
import { CommonModule } from '@angular/common';
|
|
11
9
|
import * as i3 from '@angular/common/http';
|
|
12
10
|
import { HttpEventType, HttpResponse } from '@angular/common/http';
|
|
13
|
-
import * as
|
|
11
|
+
import * as i5 from '@angular/forms';
|
|
14
12
|
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
15
|
-
import * as
|
|
13
|
+
import * as i9 from '@angular/material/button';
|
|
16
14
|
import { MatButtonModule } from '@angular/material/button';
|
|
17
|
-
import * as
|
|
15
|
+
import * as i7 from '@angular/material/expansion';
|
|
18
16
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
19
|
-
import * as
|
|
17
|
+
import * as i8 from '@angular/material/form-field';
|
|
20
18
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
21
|
-
import * as
|
|
19
|
+
import * as i6 from '@tinymce/tinymce-angular';
|
|
22
20
|
import { EditorModule } from '@tinymce/tinymce-angular';
|
|
23
21
|
import { of, map as map$1 } from 'rxjs';
|
|
24
22
|
import { __decorate, __metadata } from 'tslib';
|
|
25
23
|
import { map } from 'rxjs/operators';
|
|
26
24
|
import * as i4 from '@angular/material/dialog';
|
|
27
25
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
28
|
-
import * as
|
|
26
|
+
import * as i7$2 from '@ctrl/ngx-codemirror';
|
|
29
27
|
import { CodemirrorModule } from '@ctrl/ngx-codemirror';
|
|
30
28
|
import 'codemirror/addon/edit/closetag';
|
|
31
29
|
import 'codemirror/addon/edit/matchbrackets';
|
|
@@ -36,9 +34,9 @@ import { saveAs } from 'file-saver';
|
|
|
36
34
|
import { MatCard } from '@angular/material/card';
|
|
37
35
|
import { MatDivider } from '@angular/material/divider';
|
|
38
36
|
import { MatIcon } from '@angular/material/icon';
|
|
39
|
-
import * as
|
|
37
|
+
import * as i5$1 from '@angular/material/progress-bar';
|
|
40
38
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
41
|
-
import * as
|
|
39
|
+
import * as i7$1 from 'ng2-pdf-viewer';
|
|
42
40
|
import { PdfViewerModule } from 'ng2-pdf-viewer';
|
|
43
41
|
import * as i1 from 'angular-auth-oidc-client';
|
|
44
42
|
|
|
@@ -702,34 +700,24 @@ class ContentFormComponent extends GenericReactiveFormComponent {
|
|
|
702
700
|
}
|
|
703
701
|
}
|
|
704
702
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ContentFormComponent, deps: [{ token: ContentService }, { token: i2.FileService }, { token: i3.HttpClient }, { token: i3$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
705
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
706
|
-
//-----------------------
|
|
707
|
-
ReactiveFormsModule }, { 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],[formArray],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: "ngmodule", type: RxReactiveFormsModule }, { 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: "ngmodule", type: EditorModule }, { kind: "component", type: i7.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "licenseKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }, { kind: "ngmodule", type:
|
|
708
|
-
//-----------------------
|
|
709
|
-
MatExpansionModule }, { kind: "directive", type: i8.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i8.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "directive", type: i8.MatExpansionPanelActionRow, selector: "mat-action-row" }, { kind: "component", type: i8.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i8.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i8.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { 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.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i10.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatFormFieldEditorDirective, selector: "[tinyMatFormControl]", inputs: ["errorStateMatcher", "disabled", "id", "placeholder", "required", "value"], outputs: ["editorChange"] }, { kind: "component", type:
|
|
710
|
-
//-----------------------
|
|
711
|
-
VdLayoutNavComponent, selector: "vd-layout-nav", inputs: ["toolbarTitle", "editMode", "actions", "data", "context", "hideToolbar", "icon", "logo", "color", "hideToggle", "backNavigationRoute", "navigationRoute"], outputs: ["reload"] }, { kind: "component", type: VdLayoutCardOverComponent, selector: "vd-layout-card-over", inputs: ["cardTitle", "cardSubtitle", "cardWidth", "color"] }, { kind: "component", type: VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "directive", type: VdEditorDirective, selector: "[vd-editor]ng-template" }, { kind: "component", type: VdAuditComponent, selector: "vd-audit", inputs: ["entity"] }] });
|
|
703
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ContentFormComponent, isStandalone: true, selector: "app-content-form", viewQueries: [{ propertyName: "formElement", first: true, predicate: ["form"], descendants: true }, { propertyName: "editorComponent", first: true, predicate: ["editor"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"Content\" i18n-toolbarTitle=\"@@content\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n @if (form) {\r\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"save()\">\r\n <vd-layout-card-over class=\"accordion\" cardWidth=\"70\" color=\"primary\" flex>\r\n <mat-accordion [multi]=\"!isEditMode\">\r\n <!-- #region Details -->\r\n <mat-expansion-panel expanded=\"true\" id=\"details\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title i18n=\"@@details\">Details</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [context]=\"this\">\r\n <ng-template vd-editor let-field=\"field\" let-formGroup=\"formGroup\">\r\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin appearance=\"outline\" flex>\r\n <mat-label>{{field.label}}</mat-label>\r\n <editor [formControlName]=\"field.name\" [init]=\"editorConfig\" tinyMatFormControl flex></editor>\r\n @if (field.hint) {\r\n <mat-hint>{{field.hint}}</mat-hint>\r\n }\r\n @for (errorMessage of formGroup.controls[field.name]['errorMessages']; track errorMessage) {\r\n <mat-error>{{errorMessage}}</mat-error>\r\n }\r\n </mat-form-field>\r\n </ng-template>\r\n </vd-generic-form>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode || true) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Audit -->\r\n @if (isEditMode) {\r\n <mat-expansion-panel id=\"audit\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@audit\">Audit</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-audit [entity]=\"item\"> </vd-audit>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"button\" mat-flat-button color=\"accent\" (click)=\"back()\" i18n=\"@@close\">Close</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n }\r\n <!-- #endregion -->\r\n </mat-accordion>\r\n </vd-layout-card-over>\r\n </form>\r\n }\r\n</vd-layout-nav>", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: RxReactiveFormsModule }, { 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: "ngmodule", type: EditorModule }, { kind: "component", type: i6.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "licenseKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }, { kind: "ngmodule", type: MatExpansionModule }, { 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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i9.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatFormFieldEditorDirective, selector: "[tinyMatFormControl]", inputs: ["errorStateMatcher", "disabled", "id", "placeholder", "required", "value"], outputs: ["editorChange"] }, { kind: "component", type: VdLayoutNavComponent, selector: "vd-layout-nav", inputs: ["toolbarTitle", "editMode", "actions", "data", "context", "hideToolbar", "icon", "logo", "color", "hideToggle", "backNavigationRoute", "navigationRoute"], outputs: ["reload"] }, { kind: "component", type: VdLayoutCardOverComponent, selector: "vd-layout-card-over", inputs: ["cardTitle", "cardSubtitle", "cardWidth", "color"] }, { kind: "component", type: VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "directive", type: VdEditorDirective, selector: "[vd-editor]ng-template" }, { kind: "component", type: VdAuditComponent, selector: "vd-audit", inputs: ["entity"] }] });
|
|
712
704
|
}
|
|
713
705
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ContentFormComponent, decorators: [{
|
|
714
706
|
type: Component,
|
|
715
707
|
args: [{ selector: 'app-content-form', imports: [
|
|
716
|
-
CommonModule,
|
|
717
|
-
//-----------------------
|
|
718
708
|
ReactiveFormsModule,
|
|
719
709
|
RxReactiveFormsModule,
|
|
720
710
|
EditorModule,
|
|
721
|
-
//-----------------------
|
|
722
711
|
MatExpansionModule,
|
|
723
712
|
MatFormFieldModule,
|
|
724
713
|
MatButtonModule,
|
|
725
714
|
MatFormFieldEditorDirective,
|
|
726
|
-
//-----------------------
|
|
727
715
|
VdLayoutNavComponent,
|
|
728
716
|
VdLayoutCardOverComponent,
|
|
729
717
|
VdGenericFormComponent,
|
|
730
718
|
VdEditorDirective,
|
|
731
719
|
VdAuditComponent
|
|
732
|
-
], template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"Content\" i18n-toolbarTitle=\"@@content\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n\
|
|
720
|
+
], template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"Content\" i18n-toolbarTitle=\"@@content\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n @if (form) {\r\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"save()\">\r\n <vd-layout-card-over class=\"accordion\" cardWidth=\"70\" color=\"primary\" flex>\r\n <mat-accordion [multi]=\"!isEditMode\">\r\n <!-- #region Details -->\r\n <mat-expansion-panel expanded=\"true\" id=\"details\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title i18n=\"@@details\">Details</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [context]=\"this\">\r\n <ng-template vd-editor let-field=\"field\" let-formGroup=\"formGroup\">\r\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin appearance=\"outline\" flex>\r\n <mat-label>{{field.label}}</mat-label>\r\n <editor [formControlName]=\"field.name\" [init]=\"editorConfig\" tinyMatFormControl flex></editor>\r\n @if (field.hint) {\r\n <mat-hint>{{field.hint}}</mat-hint>\r\n }\r\n @for (errorMessage of formGroup.controls[field.name]['errorMessages']; track errorMessage) {\r\n <mat-error>{{errorMessage}}</mat-error>\r\n }\r\n </mat-form-field>\r\n </ng-template>\r\n </vd-generic-form>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode || true) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Audit -->\r\n @if (isEditMode) {\r\n <mat-expansion-panel id=\"audit\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@audit\">Audit</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-audit [entity]=\"item\"> </vd-audit>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"button\" mat-flat-button color=\"accent\" (click)=\"back()\" i18n=\"@@close\">Close</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n }\r\n <!-- #endregion -->\r\n </mat-accordion>\r\n </vd-layout-card-over>\r\n </form>\r\n }\r\n</vd-layout-nav>" }]
|
|
733
721
|
}], ctorParameters: () => [{ type: ContentService }, { type: i2.FileService }, { type: i3.HttpClient }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }], propDecorators: { formElement: [{
|
|
734
722
|
type: ViewChild,
|
|
735
723
|
args: ['form', { static: false }]
|
|
@@ -856,22 +844,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
856
844
|
args: [{ providedIn: 'root' }]
|
|
857
845
|
}], ctorParameters: () => [] });
|
|
858
846
|
|
|
859
|
-
const DocumentFormTemplate = `
|
|
847
|
+
const DocumentFormTemplate = /* html */ `
|
|
860
848
|
<div mat-dialog-title class="mat-headline-6" i18n="@@newDocument">New document</div>
|
|
861
|
-
|
|
862
|
-
<
|
|
863
|
-
<
|
|
864
|
-
<
|
|
865
|
-
<mat-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
<
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
849
|
+
@if(form){
|
|
850
|
+
<form [formGroup]="form" (ngSubmit)="save()">
|
|
851
|
+
<vd-generic-form [formGroup]="form" [fieldGroups]="fieldGroups" [context]="this">
|
|
852
|
+
<ng-template vd-file let-field="field" let-formGroup="formGroup">
|
|
853
|
+
<mat-form-field [attr.flex]="field.flex||0" layout-margin appearance="outline">
|
|
854
|
+
<mat-label>{{field.header}}</mat-label>
|
|
855
|
+
<div vd-file-input [formControlName]="field.name" (select)="upload($event)" [accept]="field.fileExtensions"></div>
|
|
856
|
+
</mat-form-field>
|
|
857
|
+
</ng-template>
|
|
858
|
+
</vd-generic-form>
|
|
859
|
+
<div mat-dialog-actions class="pad-top">
|
|
860
|
+
<button type="submit" mat-flat-button [disabled]="isSaving" color="primary" i18n="@@save">Save</button>
|
|
861
|
+
<button type="button" mat-button (click)="cancel()" i18n="@@cancel">Cancel</button>
|
|
862
|
+
</div>
|
|
863
|
+
</form>
|
|
864
|
+
}`;
|
|
875
865
|
|
|
876
866
|
class DocumentFormBaseComponent extends GenericReactiveFormComponent {
|
|
877
867
|
entityType;
|
|
@@ -985,7 +975,7 @@ class DocumentDialogComponent extends DocumentFormBaseComponent {
|
|
|
985
975
|
this.item.isPublic = true;
|
|
986
976
|
}
|
|
987
977
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", 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 });
|
|
988
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
978
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DocumentDialogComponent, isStandalone: true, selector: "document-dialog", usesInheritance: true, ngImport: i0, template: "\n <div mat-dialog-title class=\"mat-headline-6\" i18n=\"@@newDocument\">New document</div>\n @if(form){\n <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>\n }", isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatDialogModule }, { 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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "component", type: VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "component", type: VdFileInputComponent, selector: "[vd-file-input]", inputs: ["accept", "placeholder", "required", "multiple", "disabled", "errorState"], outputs: ["select", "clear"] }] });
|
|
989
979
|
}
|
|
990
980
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DocumentDialogComponent, decorators: [{
|
|
991
981
|
type: Component,
|
|
@@ -993,7 +983,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
993
983
|
selector: 'document-dialog',
|
|
994
984
|
template: DocumentFormTemplate,
|
|
995
985
|
imports: [
|
|
996
|
-
CommonModule,
|
|
997
986
|
ReactiveFormsModule,
|
|
998
987
|
MatDialogModule,
|
|
999
988
|
MatFormFieldModule,
|
|
@@ -1308,34 +1297,24 @@ class FaqFormComponent extends GenericReactiveFormComponent {
|
|
|
1308
1297
|
return (!this.canCreate || (!this.settings?.multitenantable && !this.settings?.multiClients)) || this.isClientAdmin;
|
|
1309
1298
|
}
|
|
1310
1299
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FaqFormComponent, deps: [{ token: FaqService }, { token: i2.FileService }, { token: i3.HttpClient }, { token: i3$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1311
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1312
|
-
//-----------------------
|
|
1313
|
-
ReactiveFormsModule }, { 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],[formArray],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: "ngmodule", type: RxReactiveFormsModule }, { 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: "ngmodule", type: EditorModule }, { kind: "component", type: i7.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "licenseKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }, { kind: "ngmodule", type:
|
|
1314
|
-
//-----------------------
|
|
1315
|
-
MatExpansionModule }, { kind: "directive", type: i8.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i8.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "directive", type: i8.MatExpansionPanelActionRow, selector: "mat-action-row" }, { kind: "component", type: i8.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i8.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i8.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }, { kind: "ngmodule", type: MatFormFieldModule }, { 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.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i10.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatFormFieldEditorDirective, selector: "[tinyMatFormControl]", inputs: ["errorStateMatcher", "disabled", "id", "placeholder", "required", "value"], outputs: ["editorChange"] }, { kind: "component", type:
|
|
1316
|
-
//-----------------------
|
|
1317
|
-
VdLayoutNavComponent, selector: "vd-layout-nav", inputs: ["toolbarTitle", "editMode", "actions", "data", "context", "hideToolbar", "icon", "logo", "color", "hideToggle", "backNavigationRoute", "navigationRoute"], outputs: ["reload"] }, { kind: "component", type: VdLayoutCardOverComponent, selector: "vd-layout-card-over", inputs: ["cardTitle", "cardSubtitle", "cardWidth", "color"] }, { kind: "component", type: VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "directive", type: VdEditorDirective, selector: "[vd-editor]ng-template" }, { kind: "component", type: VdAuditComponent, selector: "vd-audit", inputs: ["entity"] }] });
|
|
1300
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: FaqFormComponent, isStandalone: true, selector: "app-faq-form", usesInheritance: true, ngImport: i0, template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"FAQ\" i18n-toolbarTitle=\"@@faq\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n @if (form) {\r\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"save()\">\r\n <vd-layout-card-over class=\"accordion\" cardWidth=\"70\" color=\"primary\" flex>\r\n <mat-accordion [multi]=\"!isEditMode\">\r\n <!-- #region Details -->\r\n <mat-expansion-panel expanded=\"true\" id=\"details\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title i18n=\"@@details\">Details</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [context]=\"this\">\r\n <ng-template vd-editor let-field=\"field\" let-formGroup=\"formGroup\">\r\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin appearance=\"outline\" flex>\r\n <mat-label>{{field.label}}</mat-label>\r\n <editor [formControlName]=\"field.name\" [init]=\"editorConfig\" tinyMatFormControl flex></editor>\r\n @if (field.hint) {\r\n <mat-hint>{{field.hint}}</mat-hint>\r\n }\r\n @for (errorMessage of formGroup.controls[field.name]['errorMessages']; track errorMessage) {\r\n <mat-error>{{errorMessage}}</mat-error>\r\n }\r\n </mat-form-field>\r\n </ng-template>\r\n </vd-generic-form>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode || true) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Audit -->\r\n @if (isEditMode) {\r\n <mat-expansion-panel id=\"audit\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@audit\">Audit</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-audit [entity]=\"item\"> </vd-audit>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"button\" mat-flat-button color=\"accent\" (click)=\"back()\" i18n=\"@@close\">Close</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n }\r\n <!-- #endregion -->\r\n </mat-accordion>\r\n </vd-layout-card-over>\r\n </form>\r\n }\r\n</vd-layout-nav>", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: RxReactiveFormsModule }, { 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: "ngmodule", type: EditorModule }, { kind: "component", type: i6.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "licenseKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "disabled"] }, { kind: "ngmodule", type: MatExpansionModule }, { 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: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i9.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: MatFormFieldEditorDirective, selector: "[tinyMatFormControl]", inputs: ["errorStateMatcher", "disabled", "id", "placeholder", "required", "value"], outputs: ["editorChange"] }, { kind: "component", type: VdLayoutNavComponent, selector: "vd-layout-nav", inputs: ["toolbarTitle", "editMode", "actions", "data", "context", "hideToolbar", "icon", "logo", "color", "hideToggle", "backNavigationRoute", "navigationRoute"], outputs: ["reload"] }, { kind: "component", type: VdLayoutCardOverComponent, selector: "vd-layout-card-over", inputs: ["cardTitle", "cardSubtitle", "cardWidth", "color"] }, { kind: "component", type: VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "directive", type: VdEditorDirective, selector: "[vd-editor]ng-template" }, { kind: "component", type: VdAuditComponent, selector: "vd-audit", inputs: ["entity"] }] });
|
|
1318
1301
|
}
|
|
1319
1302
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FaqFormComponent, decorators: [{
|
|
1320
1303
|
type: Component,
|
|
1321
1304
|
args: [{ selector: 'app-faq-form', imports: [
|
|
1322
|
-
CommonModule,
|
|
1323
|
-
//-----------------------
|
|
1324
1305
|
ReactiveFormsModule,
|
|
1325
1306
|
RxReactiveFormsModule,
|
|
1326
1307
|
EditorModule,
|
|
1327
|
-
//-----------------------
|
|
1328
1308
|
MatExpansionModule,
|
|
1329
1309
|
MatFormFieldModule,
|
|
1330
1310
|
MatButtonModule,
|
|
1331
1311
|
MatFormFieldEditorDirective,
|
|
1332
|
-
//-----------------------
|
|
1333
1312
|
VdLayoutNavComponent,
|
|
1334
1313
|
VdLayoutCardOverComponent,
|
|
1335
1314
|
VdGenericFormComponent,
|
|
1336
1315
|
VdEditorDirective,
|
|
1337
1316
|
VdAuditComponent
|
|
1338
|
-
], template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"FAQ\" i18n-toolbarTitle=\"@@faq\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n\
|
|
1317
|
+
], template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"FAQ\" i18n-toolbarTitle=\"@@faq\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n @if (form) {\r\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"save()\">\r\n <vd-layout-card-over class=\"accordion\" cardWidth=\"70\" color=\"primary\" flex>\r\n <mat-accordion [multi]=\"!isEditMode\">\r\n <!-- #region Details -->\r\n <mat-expansion-panel expanded=\"true\" id=\"details\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title i18n=\"@@details\">Details</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [context]=\"this\">\r\n <ng-template vd-editor let-field=\"field\" let-formGroup=\"formGroup\">\r\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin appearance=\"outline\" flex>\r\n <mat-label>{{field.label}}</mat-label>\r\n <editor [formControlName]=\"field.name\" [init]=\"editorConfig\" tinyMatFormControl flex></editor>\r\n @if (field.hint) {\r\n <mat-hint>{{field.hint}}</mat-hint>\r\n }\r\n @for (errorMessage of formGroup.controls[field.name]['errorMessages']; track errorMessage) {\r\n <mat-error>{{errorMessage}}</mat-error>\r\n }\r\n </mat-form-field>\r\n </ng-template>\r\n </vd-generic-form>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode || true) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Audit -->\r\n @if (isEditMode) {\r\n <mat-expansion-panel id=\"audit\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@audit\">Audit</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-audit [entity]=\"item\"> </vd-audit>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"button\" mat-flat-button color=\"accent\" (click)=\"back()\" i18n=\"@@close\">Close</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n }\r\n <!-- #endregion -->\r\n </mat-accordion>\r\n </vd-layout-card-over>\r\n </form>\r\n }\r\n</vd-layout-nav>" }]
|
|
1339
1318
|
}], ctorParameters: () => [{ type: FaqService }, { type: i2.FileService }, { type: i3.HttpClient }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }] });
|
|
1340
1319
|
|
|
1341
1320
|
var TemplateType;
|
|
@@ -1344,6 +1323,13 @@ var TemplateType;
|
|
|
1344
1323
|
TemplateType[TemplateType["Pdf"] = 1] = "Pdf";
|
|
1345
1324
|
})(TemplateType || (TemplateType = {}));
|
|
1346
1325
|
|
|
1326
|
+
var TemplateEngine;
|
|
1327
|
+
(function (TemplateEngine) {
|
|
1328
|
+
TemplateEngine[TemplateEngine["Razor"] = 0] = "Razor";
|
|
1329
|
+
TemplateEngine[TemplateEngine["Fluid"] = 1] = "Fluid";
|
|
1330
|
+
TemplateEngine[TemplateEngine["Scriban"] = 2] = "Scriban";
|
|
1331
|
+
})(TemplateEngine || (TemplateEngine = {}));
|
|
1332
|
+
|
|
1347
1333
|
/**
|
|
1348
1334
|
* @class
|
|
1349
1335
|
*/
|
|
@@ -1420,58 +1406,112 @@ __decorate([
|
|
|
1420
1406
|
|
|
1421
1407
|
let Template = class Template extends AuditEntity {
|
|
1422
1408
|
/**
|
|
1423
|
-
* @property
|
|
1409
|
+
* @property Defines the template engine (e.g. Razor, Fluid).
|
|
1410
|
+
* @description Determines how the template content is processed and rendered.
|
|
1411
|
+
* @type {TemplateEngine | undefined}
|
|
1412
|
+
*/
|
|
1413
|
+
engine;
|
|
1414
|
+
/**
|
|
1415
|
+
* @property Defines the template type (e.g. Email, PDF).
|
|
1416
|
+
* @description Determines how the template content is interpreted and rendered.
|
|
1417
|
+
* @type {TemplateType}
|
|
1424
1418
|
*/
|
|
1425
1419
|
type = TemplateType.Email;
|
|
1426
1420
|
/**
|
|
1427
|
-
* @property
|
|
1421
|
+
* @property Human-readable name of the template.
|
|
1422
|
+
* @description Used for identification in lists and selectors.
|
|
1423
|
+
* @type {string | undefined}
|
|
1428
1424
|
*/
|
|
1429
1425
|
name;
|
|
1430
1426
|
/**
|
|
1431
|
-
* @property
|
|
1427
|
+
* @property Draft template reference.
|
|
1428
|
+
* @description Selecting a draft loads its content into the editor.
|
|
1429
|
+
* @type {string | undefined}
|
|
1432
1430
|
*/
|
|
1433
1431
|
draft;
|
|
1434
1432
|
/**
|
|
1435
|
-
* @property
|
|
1433
|
+
* @property Template subject.
|
|
1434
|
+
* @description Typically used for email-based templates.
|
|
1435
|
+
* @type {string | undefined}
|
|
1436
1436
|
*/
|
|
1437
1437
|
subject;
|
|
1438
1438
|
/**
|
|
1439
|
-
* @property
|
|
1439
|
+
* @property Unique template key.
|
|
1440
|
+
* @description Used for programmatic access and lookup.
|
|
1441
|
+
* @type {string | undefined}
|
|
1440
1442
|
*/
|
|
1441
1443
|
key;
|
|
1442
1444
|
/**
|
|
1443
|
-
* @property
|
|
1445
|
+
* @property Internal notice.
|
|
1446
|
+
* @description Informational text not included in rendered output.
|
|
1447
|
+
* @type {string | undefined}
|
|
1444
1448
|
*/
|
|
1445
1449
|
notice;
|
|
1446
1450
|
/**
|
|
1447
|
-
* @property
|
|
1451
|
+
* @property Email address.
|
|
1452
|
+
* @description Optional sender or reply-to address.
|
|
1453
|
+
* @type {string | undefined}
|
|
1448
1454
|
*/
|
|
1449
1455
|
email;
|
|
1450
1456
|
/**
|
|
1451
|
-
* @property
|
|
1457
|
+
* @property Template content.
|
|
1458
|
+
* @description Main rendered body (HTML, text, etc.).
|
|
1459
|
+
* @type {string | undefined}
|
|
1452
1460
|
*/
|
|
1453
1461
|
content;
|
|
1454
1462
|
/**
|
|
1455
|
-
* @property
|
|
1463
|
+
* @property Dummy data.
|
|
1464
|
+
* @description Sample data used for previewing the template.
|
|
1465
|
+
* @type {string | undefined}
|
|
1456
1466
|
*/
|
|
1457
1467
|
dummyData;
|
|
1458
1468
|
/**
|
|
1459
|
-
* @property
|
|
1469
|
+
* @property Client associations.
|
|
1470
|
+
* @description Controls template visibility in multi-client environments.
|
|
1471
|
+
* @type {TemplateClient[] | undefined}
|
|
1460
1472
|
*/
|
|
1461
1473
|
clientJoins;
|
|
1462
1474
|
/**
|
|
1463
|
-
* @property
|
|
1475
|
+
* @property Department associations.
|
|
1476
|
+
* @description Further restricts template visibility by department.
|
|
1477
|
+
* @type {TemplateDepartment[] | undefined}
|
|
1464
1478
|
*/
|
|
1465
1479
|
departmentJoins;
|
|
1466
1480
|
/**
|
|
1467
|
-
* @property
|
|
1481
|
+
* @property Reviewed flag.
|
|
1482
|
+
* @description Indicates whether the template is active and selectable.
|
|
1483
|
+
* @type {boolean | undefined}
|
|
1484
|
+
*/
|
|
1485
|
+
reviewed;
|
|
1486
|
+
/**
|
|
1487
|
+
* @property Enabled flag.
|
|
1488
|
+
* @description Indicates whether the template is active and selectable.
|
|
1489
|
+
* @type {boolean | undefined}
|
|
1468
1490
|
*/
|
|
1469
1491
|
enabled;
|
|
1470
1492
|
/**
|
|
1471
|
-
* @property
|
|
1493
|
+
* @property Attachments.
|
|
1494
|
+
* @description Files attached to the template (e.g. email attachments).
|
|
1495
|
+
* @type {Attachment[]}
|
|
1472
1496
|
*/
|
|
1473
1497
|
attachments = [];
|
|
1474
1498
|
};
|
|
1499
|
+
__decorate([
|
|
1500
|
+
required(),
|
|
1501
|
+
Column({
|
|
1502
|
+
index: 20,
|
|
1503
|
+
enumType: TemplateEngine,
|
|
1504
|
+
maxWidth: 150,
|
|
1505
|
+
display: Grid.Lg
|
|
1506
|
+
}),
|
|
1507
|
+
FormField({
|
|
1508
|
+
row: 20,
|
|
1509
|
+
enumType: TemplateEngine,
|
|
1510
|
+
fieldSets: ['details']
|
|
1511
|
+
}),
|
|
1512
|
+
Display($localize `:@@engine:Engine`),
|
|
1513
|
+
__metadata("design:type", Number)
|
|
1514
|
+
], Template.prototype, "engine", void 0);
|
|
1475
1515
|
__decorate([
|
|
1476
1516
|
required(),
|
|
1477
1517
|
FormField({
|
|
@@ -1484,7 +1524,7 @@ __decorate([
|
|
|
1484
1524
|
], Template.prototype, "type", void 0);
|
|
1485
1525
|
__decorate([
|
|
1486
1526
|
required(),
|
|
1487
|
-
Column(),
|
|
1527
|
+
Column({ index: 1 }),
|
|
1488
1528
|
FormField({
|
|
1489
1529
|
row: 10,
|
|
1490
1530
|
fieldSets: ['details']
|
|
@@ -1507,7 +1547,7 @@ __decorate([
|
|
|
1507
1547
|
], Template.prototype, "draft", void 0);
|
|
1508
1548
|
__decorate([
|
|
1509
1549
|
prop(),
|
|
1510
|
-
Column({ maxWidth: 250, display: Grid.Lg }),
|
|
1550
|
+
Column({ index: 10, maxWidth: 250, display: Grid.Lg }),
|
|
1511
1551
|
FormField({
|
|
1512
1552
|
row: 30,
|
|
1513
1553
|
fieldSets: ['details']
|
|
@@ -1517,9 +1557,9 @@ __decorate([
|
|
|
1517
1557
|
], Template.prototype, "subject", void 0);
|
|
1518
1558
|
__decorate([
|
|
1519
1559
|
required(),
|
|
1520
|
-
Column({ maxWidth: 150, display: Grid.Lg }),
|
|
1560
|
+
Column({ index: 30, maxWidth: 150, display: Grid.Lg }),
|
|
1521
1561
|
FormField({
|
|
1522
|
-
row:
|
|
1562
|
+
row: 10,
|
|
1523
1563
|
fieldSets: ['details']
|
|
1524
1564
|
}),
|
|
1525
1565
|
Display('Key'),
|
|
@@ -1551,7 +1591,7 @@ __decorate([
|
|
|
1551
1591
|
__decorate([
|
|
1552
1592
|
required({ conditionalExpression: (x) => true }),
|
|
1553
1593
|
Column({
|
|
1554
|
-
index:
|
|
1594
|
+
index: 40,
|
|
1555
1595
|
filter: 'clientJoins.client.displayName',
|
|
1556
1596
|
sortBy: 'clientJoins.Min(client.displayName)',
|
|
1557
1597
|
content: (x) => x ? Utils.joinArray(x.clientJoins?.map(y => y.client?.displayName ?? '') ?? []) : undefined,
|
|
@@ -1562,13 +1602,11 @@ __decorate([
|
|
|
1562
1602
|
FormField({
|
|
1563
1603
|
row: 1,
|
|
1564
1604
|
endpoint: 'client',
|
|
1565
|
-
params: () => {
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
};
|
|
1571
|
-
},
|
|
1605
|
+
params: () => ({
|
|
1606
|
+
enabled: true,
|
|
1607
|
+
projection: 'id,displayName',
|
|
1608
|
+
sortBy: 'id'
|
|
1609
|
+
}),
|
|
1572
1610
|
multiple: true,
|
|
1573
1611
|
triggerMode: 'chip',
|
|
1574
1612
|
fieldSets: ['details'],
|
|
@@ -1584,7 +1622,7 @@ __decorate([
|
|
|
1584
1622
|
__decorate([
|
|
1585
1623
|
prop(),
|
|
1586
1624
|
Column({
|
|
1587
|
-
index:
|
|
1625
|
+
index: 50,
|
|
1588
1626
|
filter: 'departmentJoins.department.displayName',
|
|
1589
1627
|
sortBy: 'departmentJoins.Min(department.displayName)',
|
|
1590
1628
|
content: (x) => x ? Utils.joinArray(x.departmentJoins?.map(y => y.department?.displayName ?? '') ?? []) : undefined,
|
|
@@ -1595,14 +1633,12 @@ __decorate([
|
|
|
1595
1633
|
FormField({
|
|
1596
1634
|
row: 2,
|
|
1597
1635
|
endpoint: 'department',
|
|
1598
|
-
params: (x) => {
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
};
|
|
1605
|
-
},
|
|
1636
|
+
params: (x) => ({
|
|
1637
|
+
enabled: true,
|
|
1638
|
+
projection: 'id,displayName',
|
|
1639
|
+
sortBy: 'id',
|
|
1640
|
+
clientId: x.clientJoins?.map(y => y.clientId)
|
|
1641
|
+
}),
|
|
1606
1642
|
multiple: true,
|
|
1607
1643
|
triggerMode: 'chip',
|
|
1608
1644
|
fieldSets: ['details'],
|
|
@@ -1617,7 +1653,22 @@ __decorate([
|
|
|
1617
1653
|
], Template.prototype, "departmentJoins", void 0);
|
|
1618
1654
|
__decorate([
|
|
1619
1655
|
prop(),
|
|
1620
|
-
Column({
|
|
1656
|
+
Column({
|
|
1657
|
+
index: 60,
|
|
1658
|
+
width: 100,
|
|
1659
|
+
disabled: true
|
|
1660
|
+
}),
|
|
1661
|
+
FormField({
|
|
1662
|
+
row: 100,
|
|
1663
|
+
fieldSets: ['details'],
|
|
1664
|
+
readonly: _ => true
|
|
1665
|
+
}),
|
|
1666
|
+
Display($localize `:@@reviewed:Reviewed`),
|
|
1667
|
+
__metadata("design:type", Boolean)
|
|
1668
|
+
], Template.prototype, "reviewed", void 0);
|
|
1669
|
+
__decorate([
|
|
1670
|
+
prop(),
|
|
1671
|
+
Column({ index: 70, event: 'toggle' }),
|
|
1621
1672
|
FormField({
|
|
1622
1673
|
row: 100,
|
|
1623
1674
|
fieldSets: ['details']
|
|
@@ -1632,7 +1683,7 @@ __decorate([
|
|
|
1632
1683
|
Template = __decorate([
|
|
1633
1684
|
Table({
|
|
1634
1685
|
endpoint: 'template',
|
|
1635
|
-
projection: ['id', 'createdDate', 'name', 'key', 'subject', 'type', 'enabled'],
|
|
1686
|
+
projection: ['id', 'createdDate', 'name', 'key', 'subject', 'engine', 'type', 'reviewed', 'enabled'],
|
|
1636
1687
|
duplicable: true
|
|
1637
1688
|
})
|
|
1638
1689
|
], Template);
|
|
@@ -1888,12 +1939,11 @@ class TemplatePreviewDialogComponent extends BaseComponent {
|
|
|
1888
1939
|
}
|
|
1889
1940
|
}
|
|
1890
1941
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", 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 });
|
|
1891
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1942
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: TemplatePreviewDialogComponent, isStandalone: true, 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 @if (data.type == TemplateType.Pdf && pdfSrc ||true) {\r\n <div>\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 }\r\n</div>\r\n<form #form=\"ngForm\" novalidate layout=\"column\" flex>\r\n <!-- #region Entity -->\r\n @if (data.endpoint) {\r\n <div layout=\"row\" flex>\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 @if (entityId.errors!['required']) {\r\n <mat-error><span>{{data.entityName}}</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n }\r\n </mat-form-field>\r\n </div>\r\n }\r\n <!-- #endregion -->\r\n\r\n @if (isLoading) {\r\n <div layout=\"column\" layout-gt-sm=\"row\" class=\"push-bottom\" flex>\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\r\n <!-- #region PDF Content -->\r\n @if (data.type == TemplateType.Pdf) {\r\n <mat-card flex>\r\n @if (data.type == TemplateType.Pdf && pdfSrc) {\r\n <pdf-viewer [src]=\"pdfSrc\" [render-text]=\"true\" [zoom]=\"zoom\" [zoom-scale]=\"zoomScale\" [show-borders]=\"true\" [original-size]=\"false\" [autoresize]=\"true\"></pdf-viewer>\r\n }\r\n </mat-card>\r\n }\r\n <!-- #region Content -->\r\n\r\n @if (data.type != TemplateType.Pdf) {\r\n <div 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 <!-- #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 @if (email.errors && email.errors!['required']) {\r\n <mat-error><span i18n=\"@@email\">Email</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n }\r\n @if (!email.errors!['required'] && email.errors!['email']) {\r\n <mat-error><span i18n=\"@@email\">Email</span><span i18n=\"@@isInvalid\"> is invalid</span></mat-error>\r\n }\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n </div>\r\n }\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: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i8.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i8.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i5$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PdfViewerModule }, { kind: "component", type: i7$1.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"] }] });
|
|
1892
1943
|
}
|
|
1893
1944
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: TemplatePreviewDialogComponent, decorators: [{
|
|
1894
1945
|
type: Component,
|
|
1895
1946
|
args: [{ selector: 'app-template-preview', imports: [
|
|
1896
|
-
CommonModule,
|
|
1897
1947
|
MatIcon,
|
|
1898
1948
|
MatFormFieldModule,
|
|
1899
1949
|
MatProgressBarModule,
|
|
@@ -1902,7 +1952,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1902
1952
|
VdChipsComponent,
|
|
1903
1953
|
FormsModule,
|
|
1904
1954
|
PdfViewerModule
|
|
1905
|
-
], template: "<div mat-dialog-title>\r\n
|
|
1955
|
+
], template: "<div mat-dialog-title>\r\n <span i18n=\"@@templatePreview\">Template preview</span>\r\n <span flex></span>\r\n @if (data.type == TemplateType.Pdf && pdfSrc ||true) {\r\n <div>\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 }\r\n</div>\r\n<form #form=\"ngForm\" novalidate layout=\"column\" flex>\r\n <!-- #region Entity -->\r\n @if (data.endpoint) {\r\n <div layout=\"row\" flex>\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 @if (entityId.errors!['required']) {\r\n <mat-error><span>{{data.entityName}}</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n }\r\n </mat-form-field>\r\n </div>\r\n }\r\n <!-- #endregion -->\r\n\r\n @if (isLoading) {\r\n <div layout=\"column\" layout-gt-sm=\"row\" class=\"push-bottom\" flex>\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\r\n <!-- #region PDF Content -->\r\n @if (data.type == TemplateType.Pdf) {\r\n <mat-card flex>\r\n @if (data.type == TemplateType.Pdf && pdfSrc) {\r\n <pdf-viewer [src]=\"pdfSrc\" [render-text]=\"true\" [zoom]=\"zoom\" [zoom-scale]=\"zoomScale\" [show-borders]=\"true\" [original-size]=\"false\" [autoresize]=\"true\"></pdf-viewer>\r\n }\r\n </mat-card>\r\n }\r\n <!-- #region Content -->\r\n\r\n @if (data.type != TemplateType.Pdf) {\r\n <div 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 <!-- #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 @if (email.errors && email.errors!['required']) {\r\n <mat-error><span i18n=\"@@email\">Email</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n }\r\n @if (!email.errors!['required'] && email.errors!['email']) {\r\n <mat-error><span i18n=\"@@email\">Email</span><span i18n=\"@@isInvalid\"> is invalid</span></mat-error>\r\n }\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n </div>\r\n }\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"] }]
|
|
1906
1956
|
}], ctorParameters: () => [{ type: TemplatePreviewService }, { type: i4.MatDialogRef }, { type: TemplatePreview, decorators: [{
|
|
1907
1957
|
type: Inject,
|
|
1908
1958
|
args: [MAT_DIALOG_DATA]
|
|
@@ -2064,12 +2114,11 @@ class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
|
2064
2114
|
});
|
|
2065
2115
|
}
|
|
2066
2116
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", 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 });
|
|
2067
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: TemplateFormComponent, isStandalone: true, 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: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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],[formArray],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: "ngmodule", type: RxReactiveFormsModule }, { 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: "ngmodule", type: CodemirrorModule }, { kind: "component", type: i8$2.CodemirrorComponent, selector: "ngx-codemirror", inputs: ["className", "name", "autoFocus", "options", "preserveScrollPosition"], outputs: ["cursorActivity", "focusChange", "scroll", "drop", "codeMirrorLoaded"] }, { kind: "ngmodule", type: MatExpansionModule }, { kind: "directive", type: i8.MatAccordion, selector: "mat-accordion", inputs: ["hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i8.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["hideToggle", "togglePosition"], outputs: ["afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "directive", type: i8.MatExpansionPanelActionRow, selector: "mat-action-row" }, { kind: "component", type: i8.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["expandedHeight", "collapsedHeight", "tabIndex"] }, { kind: "directive", type: i8.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i8.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i10.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: VdLayoutNavComponent, selector: "vd-layout-nav", inputs: ["toolbarTitle", "editMode", "actions", "data", "context", "hideToolbar", "icon", "logo", "color", "hideToggle", "backNavigationRoute", "navigationRoute"], outputs: ["reload"] }, { kind: "component", type: VdLayoutCardOverComponent, selector: "vd-layout-card-over", inputs: ["cardTitle", "cardSubtitle", "cardWidth", "color"] }, { kind: "component", type: VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "component", type: VdAuditComponent, selector: "vd-audit", inputs: ["entity"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: TemplateFormComponent, isStandalone: true, 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 @if (form) {\r\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"save()\">\r\n <vd-layout-card-over class=\"accordion\" cardWidth=\"70\" color=\"primary\" flex>\r\n <mat-accordion [multi]=\"!isEditMode\">\r\n <!-- #region Details -->\r\n <mat-expansion-panel expanded=\"true\" id=\"details\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title i18n=\"@@details\">Details</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [fieldSets]=\"['details']\" [context]=\"this\"></vd-generic-form>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Content -->\r\n <mat-expansion-panel id=\"content\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@content\">Content</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <div layout-margin>\r\n <ngx-codemirror formControlName=\"content\" rows=\"160\" [options]=\"editorOptions\"></ngx-codemirror>\r\n </div>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"showPreview()\" [disabled]=\"isSaving || !form.pristine\" i18n=\"@@preview\">Preview</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Content -->\r\n <mat-expansion-panel id=\"testData\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@testData\">Test Data</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <div layout-margin>\r\n <ngx-codemirror formControlName=\"dummyData\" rows=\"120\" [options]=\"jsonEditorOptions\"></ngx-codemirror>\r\n </div>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"showPreview()\" [disabled]=\"isSaving || !form.pristine\" i18n=\"@@preview\">Preview</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Audit -->\r\n @if (isEditMode) {\r\n <mat-expansion-panel id=\"audit\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@audit\">Audit</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-audit [entity]=\"item\"> </vd-audit>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"button\" mat-flat-button color=\"accent\" (click)=\"back()\" i18n=\"@@close\">Close</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n }\r\n <!-- #endregion -->\r\n </mat-accordion>\r\n </vd-layout-card-over>\r\n </form>\r\n }\r\n</vd-layout-nav>", styles: ["codemirror{width:100%}.CodeMirror{height:500px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: RxReactiveFormsModule }, { 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: "ngmodule", type: CodemirrorModule }, { kind: "component", type: i7$2.CodemirrorComponent, selector: "ngx-codemirror", inputs: ["className", "name", "autoFocus", "options", "preserveScrollPosition"], outputs: ["cursorActivity", "focusChange", "scroll", "drop", "codeMirrorLoaded"] }, { kind: "ngmodule", type: MatExpansionModule }, { 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: "ngmodule", type: MatButtonModule }, { kind: "component", type: i9.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: VdLayoutNavComponent, selector: "vd-layout-nav", inputs: ["toolbarTitle", "editMode", "actions", "data", "context", "hideToolbar", "icon", "logo", "color", "hideToggle", "backNavigationRoute", "navigationRoute"], outputs: ["reload"] }, { kind: "component", type: VdLayoutCardOverComponent, selector: "vd-layout-card-over", inputs: ["cardTitle", "cardSubtitle", "cardWidth", "color"] }, { kind: "component", type: VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "component", type: VdAuditComponent, selector: "vd-audit", inputs: ["entity"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
2068
2118
|
}
|
|
2069
2119
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: TemplateFormComponent, decorators: [{
|
|
2070
2120
|
type: Component,
|
|
2071
2121
|
args: [{ selector: 'app-template-form', encapsulation: ViewEncapsulation.None, imports: [
|
|
2072
|
-
CommonModule,
|
|
2073
2122
|
ReactiveFormsModule,
|
|
2074
2123
|
RxReactiveFormsModule,
|
|
2075
2124
|
CodemirrorModule,
|
|
@@ -2079,7 +2128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
2079
2128
|
VdLayoutCardOverComponent,
|
|
2080
2129
|
VdGenericFormComponent,
|
|
2081
2130
|
VdAuditComponent
|
|
2082
|
-
], template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"Template\" i18n-toolbarTitle=\"@@template\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n\
|
|
2131
|
+
], template: "<vd-layout-nav color=\"primary\" [backNavigationRoute]=\"listRoute\" toolbarTitle=\"Template\" i18n-toolbarTitle=\"@@template\" [editMode]=\"isEditMode\" [actions]=\"toolbarActions\" [data]=\"item\" [context]=\"this\">\r\n @if (form) {\r\n <form [formGroup]=\"form\" novalidate (ngSubmit)=\"save()\">\r\n <vd-layout-card-over class=\"accordion\" cardWidth=\"70\" color=\"primary\" flex>\r\n <mat-accordion [multi]=\"!isEditMode\">\r\n <!-- #region Details -->\r\n <mat-expansion-panel expanded=\"true\" id=\"details\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title i18n=\"@@details\">Details</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [fieldSets]=\"['details']\" [context]=\"this\"></vd-generic-form>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Content -->\r\n <mat-expansion-panel id=\"content\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@content\">Content</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <div layout-margin>\r\n <ngx-codemirror formControlName=\"content\" rows=\"160\" [options]=\"editorOptions\"></ngx-codemirror>\r\n </div>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"showPreview()\" [disabled]=\"isSaving || !form.pristine\" i18n=\"@@preview\">Preview</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Content -->\r\n <mat-expansion-panel id=\"testData\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@testData\">Test Data</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <div layout-margin>\r\n <ngx-codemirror formControlName=\"dummyData\" rows=\"120\" [options]=\"jsonEditorOptions\"></ngx-codemirror>\r\n </div>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"submit\" mat-flat-button color=\"primary\" [disabled]=\"isSaving\" i18n=\"@@save\">Save</button>\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"apply()\" [disabled]=\"isSaving\" i18n=\"@@apply\">Apply</button>\r\n }\r\n @if (isEditMode) {\r\n <button type=\"button\" mat-button (click)=\"showPreview()\" [disabled]=\"isSaving || !form.pristine\" i18n=\"@@preview\">Preview</button>\r\n }\r\n <button type=\"button\" mat-button (click)=\"back()\" i18n=\"@@cancel\">Cancel</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n <!-- #endregion -->\r\n <!-- #region Audit -->\r\n @if (isEditMode) {\r\n <mat-expansion-panel id=\"audit\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>\r\n <span i18n=\"@@audit\">Audit</span>\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <ng-template matExpansionPanelContent>\r\n <vd-audit [entity]=\"item\"> </vd-audit>\r\n </ng-template>\r\n <mat-action-row>\r\n <button type=\"button\" mat-flat-button color=\"accent\" (click)=\"back()\" i18n=\"@@close\">Close</button>\r\n <span flex></span>\r\n </mat-action-row>\r\n </mat-expansion-panel>\r\n }\r\n <!-- #endregion -->\r\n </mat-accordion>\r\n </vd-layout-card-over>\r\n </form>\r\n }\r\n</vd-layout-nav>", styles: ["codemirror{width:100%}.CodeMirror{height:500px}\n"] }]
|
|
2083
2132
|
}], ctorParameters: () => [{ type: TemplateService }, { type: TemplateDocService }, { type: i2.FileService }, { type: i4.MatDialog }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }] });
|
|
2084
2133
|
|
|
2085
2134
|
/**
|
|
@@ -2809,5 +2858,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
2809
2858
|
* Generated bundle index. Do not edit.
|
|
2810
2859
|
*/
|
|
2811
2860
|
|
|
2812
|
-
export { CmsSettings, Content, ContentClient, ContentDepartment, ContentFormComponent, ContentService, ContentType, ContentVariable, ContentVariableClient, ContentVariableDepartment, ContentVariableService, Document, DocumentDialogComponent, DocumentFormBaseComponent, DocumentFormTemplate, DocumentGenericService, DocumentListProjectionResolve, DocumentService, ExcludedColumnsResolve, ExcludedFieldsResolve, Faq, FaqClient, FaqDepartment, FaqScope, FaqService, FormIncludesResolve, FormValidationResolve, ListProjectionResolve, SettingsResolve, Slider, SliderService, Template, TemplateClient, TemplateDepartment, TemplateDocService, TemplateFormComponent, TemplatePreview, TemplatePreviewDialogComponent, TemplatePreviewService, TemplateService, TemplateType, VdCmsModule, VdCmsRoutingModule, WrapTag };
|
|
2861
|
+
export { CmsSettings, Content, ContentClient, ContentDepartment, ContentFormComponent, ContentService, ContentType, ContentVariable, ContentVariableClient, ContentVariableDepartment, ContentVariableService, Document, DocumentDialogComponent, DocumentFormBaseComponent, DocumentFormTemplate, DocumentGenericService, DocumentListProjectionResolve, DocumentService, ExcludedColumnsResolve, ExcludedFieldsResolve, Faq, FaqClient, FaqDepartment, FaqScope, FaqService, FormIncludesResolve, FormValidationResolve, ListProjectionResolve, SettingsResolve, Slider, SliderService, Template, TemplateClient, TemplateDepartment, TemplateDocService, TemplateEngine, TemplateFormComponent, TemplatePreview, TemplatePreviewDialogComponent, TemplatePreviewService, TemplateService, TemplateType, VdCmsModule, VdCmsRoutingModule, WrapTag };
|
|
2813
2862
|
//# sourceMappingURL=messaia-cdk-cms.mjs.map
|