@messaia/cdk-cms 15.0.0-rc67 → 15.0.0-rc69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/cms-routing.module.mjs +9 -2
- package/esm2020/lib/cms.module.mjs +15 -6
- package/esm2020/lib/comnponents/document-dialog/document-dialog.component.mjs +16 -67
- package/esm2020/lib/comnponents/document-form-base/document-form-base.component.mjs +90 -0
- package/esm2020/lib/comnponents/template-preview-dialog/template-preview-dialog.component.mjs +1 -1
- package/esm2020/lib/models/content-variable.mjs +3 -3
- package/esm2020/lib/models/content.mjs +3 -3
- package/esm2020/lib/models/document.mjs +53 -17
- package/esm2020/lib/models/faq.mjs +3 -3
- package/esm2020/lib/models/template.mjs +3 -3
- package/esm2020/lib/resolvers/document-list-projection.resolve.mjs +48 -0
- package/esm2020/lib/templates/document-form.template.mjs +18 -0
- package/fesm2015/messaia-cdk-cms.mjs +231 -97
- package/fesm2015/messaia-cdk-cms.mjs.map +1 -1
- package/fesm2020/messaia-cdk-cms.mjs +199 -65
- package/fesm2020/messaia-cdk-cms.mjs.map +1 -1
- package/lib/cms.module.d.ts +21 -18
- package/lib/comnponents/document-dialog/document-dialog.component.d.ts +5 -31
- package/lib/comnponents/document-form-base/document-form-base.component.d.ts +53 -0
- package/lib/models/document.d.ts +3 -7
- package/lib/resolvers/document-list-projection.resolve.d.ts +21 -0
- package/lib/templates/document-form.template.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import * as i5 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, Component, ViewChild, Inject, ViewEncapsulation, NgModule } from '@angular/core';
|
|
4
|
+
import { Injectable, Component, ViewChild, Directive, Inject, ViewEncapsulation, NgModule } from '@angular/core';
|
|
5
5
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
6
6
|
import * as i8 from '@angular/material/button';
|
|
7
7
|
import { MatButtonModule } from '@angular/material/button';
|
|
8
8
|
import * as i7$1 from '@angular/material/card';
|
|
9
9
|
import { MatCardModule } from '@angular/material/card';
|
|
10
|
-
import * as i10$1 from '@angular/material/checkbox';
|
|
11
10
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
12
11
|
import { MatChipsModule } from '@angular/material/chips';
|
|
12
|
+
import * as i2$1 from '@angular/material/dialog';
|
|
13
|
+
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
13
14
|
import * as i7 from '@angular/material/expansion';
|
|
14
15
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
15
|
-
import * as i9$
|
|
16
|
+
import * as i9$1 from '@angular/material/icon';
|
|
16
17
|
import { MatIconModule } from '@angular/material/icon';
|
|
17
|
-
import * as i11$
|
|
18
|
+
import * as i11$1 from '@angular/material/input';
|
|
18
19
|
import { MatInputModule } from '@angular/material/input';
|
|
19
20
|
import * as i12 from '@angular/material/progress-bar';
|
|
20
21
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
21
|
-
import * as i11$1 from '@angular/material/select';
|
|
22
22
|
import { MatSelectModule } from '@angular/material/select';
|
|
23
23
|
import * as i6$1 from '@ctrl/ngx-codemirror';
|
|
24
24
|
import { CodemirrorModule } from '@ctrl/ngx-codemirror';
|
|
25
25
|
import * as i2 from '@messaia/cdk';
|
|
26
|
-
import { prop, required, AuditEntity, Column, FormField, Display, Grid, FormFieldType, Utils, Api, Table, GenericService, GenericReactiveFormComponent, EnumService, AuthHelper, SaveAction, BaseComponent, ServiceLocator, GlobalRoles, VdCommonModule, VdLayoutModule, VdMediaModule, VdFormsModule, VdSelectModule, VdChipsModule } from '@messaia/cdk';
|
|
26
|
+
import { prop, required, AuditEntity, Column, FormField, Display, Grid, FormFieldType, Utils, Api, Table, GenericService, GenericReactiveFormComponent, EnumService, AuthHelper, SaveAction, BaseComponent, ServiceLocator, GlobalRoles, VdCommonModule, VdLayoutModule, VdMediaModule, VdFormsModule, VdSelectModule, VdChipsModule, VdFileModule } from '@messaia/cdk';
|
|
27
27
|
import * as i11 from '@messaia/cdk-base';
|
|
28
28
|
import { DocumentBase, VdDynamicListComponent, VdDynamicFormComponent, DocumentType, VdCdkBaseModule } from '@messaia/cdk-base';
|
|
29
29
|
import * as i10 from '@tinymce/tinymce-angular';
|
|
@@ -39,17 +39,14 @@ import { __decorate, __metadata } from 'tslib';
|
|
|
39
39
|
import { map } from 'rxjs/operators';
|
|
40
40
|
import * as i6 from '@angular/forms';
|
|
41
41
|
import * as i9 from '@angular/material/form-field';
|
|
42
|
-
import * as i4 from '@angular/material/dialog';
|
|
43
|
-
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
44
|
-
import * as i9$1 from '@angular/material/core';
|
|
45
42
|
import 'codemirror/addon/edit/closetag';
|
|
46
43
|
import 'codemirror/addon/edit/matchbrackets';
|
|
47
44
|
import 'codemirror/addon/selection/active-line';
|
|
48
45
|
import 'codemirror/mode/htmlmixed/htmlmixed';
|
|
49
46
|
import 'codemirror/mode/javascript/javascript';
|
|
50
47
|
import { saveAs } from 'file-saver';
|
|
51
|
-
import { of, map as map$1 } from 'rxjs';
|
|
52
48
|
import * as i1 from 'angular-auth-oidc-client';
|
|
49
|
+
import { map as map$1, of } from 'rxjs';
|
|
53
50
|
|
|
54
51
|
var ContentType;
|
|
55
52
|
(function (ContentType) {
|
|
@@ -225,7 +222,7 @@ __decorate([
|
|
|
225
222
|
filter: 'clientJoins.client.displayName',
|
|
226
223
|
sortBy: 'clientJoins.Min(client.displayName)',
|
|
227
224
|
content: (x) => Utils.joinArray(x.clientJoins?.map(y => y.clientName)),
|
|
228
|
-
display: Grid.
|
|
225
|
+
display: Grid.Lg,
|
|
229
226
|
maxWidth: 200,
|
|
230
227
|
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
231
228
|
}),
|
|
@@ -257,7 +254,7 @@ __decorate([
|
|
|
257
254
|
filter: 'departmentJoins.department.displayName',
|
|
258
255
|
sortBy: 'departmentJoins.Min(department.displayName)',
|
|
259
256
|
content: (x) => Utils.joinArray(x.departmentJoins?.map(y => y.departmentName)),
|
|
260
|
-
display: Grid.
|
|
257
|
+
display: Grid.Lg,
|
|
261
258
|
maxWidth: 200,
|
|
262
259
|
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
263
260
|
}),
|
|
@@ -556,37 +553,73 @@ let Document = class Document extends DocumentBase {
|
|
|
556
553
|
/**
|
|
557
554
|
* @property
|
|
558
555
|
*/
|
|
559
|
-
this.
|
|
556
|
+
this.clientId = AuthHelper.user.clientId;
|
|
557
|
+
/**
|
|
558
|
+
* @property
|
|
559
|
+
*/
|
|
560
|
+
this.departmentId = AuthHelper.user.departmentId;
|
|
561
|
+
/**
|
|
562
|
+
* @property
|
|
563
|
+
*/
|
|
564
|
+
this.path = 'docs';
|
|
560
565
|
Object.assign(this, init);
|
|
561
566
|
}
|
|
562
567
|
};
|
|
563
568
|
__decorate([
|
|
564
|
-
|
|
565
|
-
__metadata("design:type", Number)
|
|
566
|
-
], Document.prototype, "customerId", void 0);
|
|
567
|
-
__decorate([
|
|
569
|
+
required(),
|
|
568
570
|
Column({
|
|
569
|
-
index:
|
|
570
|
-
name: '
|
|
571
|
-
|
|
571
|
+
index: 10,
|
|
572
|
+
name: 'clientName',
|
|
573
|
+
filter: 'client.displayName',
|
|
574
|
+
sortBy: 'client.displayName',
|
|
572
575
|
endpoint: 'client?enabled=true&projection=id,name',
|
|
573
|
-
maxWidth:
|
|
574
|
-
display: Grid.
|
|
576
|
+
maxWidth: 200,
|
|
577
|
+
display: Grid.Lg,
|
|
578
|
+
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
575
579
|
}),
|
|
576
|
-
|
|
580
|
+
FormField({
|
|
581
|
+
row: 1,
|
|
582
|
+
endpoint: 'client',
|
|
583
|
+
projection: 'id,name',
|
|
584
|
+
params: (x) => { return { enabled: true }; },
|
|
585
|
+
readonly: (x) => x.id,
|
|
586
|
+
hide: (_, __, ctx) => ctx.currentUser?.isDepartmentAdmin
|
|
587
|
+
}),
|
|
588
|
+
Display($localize `:@@project:Project`),
|
|
577
589
|
__metadata("design:type", Number)
|
|
578
590
|
], Document.prototype, "clientId", void 0);
|
|
591
|
+
__decorate([
|
|
592
|
+
prop(),
|
|
593
|
+
Column({
|
|
594
|
+
index: 11,
|
|
595
|
+
name: 'departmentName',
|
|
596
|
+
filter: 'department.displayName',
|
|
597
|
+
sortBy: 'department.displayName',
|
|
598
|
+
endpoint: 'department?enabled=true&projection=id,name',
|
|
599
|
+
maxWidth: 200,
|
|
600
|
+
display: Grid.Lg,
|
|
601
|
+
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
602
|
+
}),
|
|
603
|
+
FormField({
|
|
604
|
+
row: 2,
|
|
605
|
+
endpoint: 'department',
|
|
606
|
+
projection: 'id,name',
|
|
607
|
+
params: (x) => { return { clientId: x.clientId, enabled: true }; },
|
|
608
|
+
fetchCondition: (x) => x.clientId > 0,
|
|
609
|
+
readonly: (x) => x.id || !x.clientId,
|
|
610
|
+
hide: (_, __, ctx) => ctx.currentUser?.isDepartmentAdmin
|
|
611
|
+
}),
|
|
612
|
+
Display($localize `:@@department:Department`),
|
|
613
|
+
__metadata("design:type", Number)
|
|
614
|
+
], Document.prototype, "departmentId", void 0);
|
|
579
615
|
__decorate([
|
|
580
616
|
required(),
|
|
581
617
|
__metadata("design:type", String)
|
|
582
618
|
], Document.prototype, "path", void 0);
|
|
583
|
-
__decorate([
|
|
584
|
-
prop(),
|
|
585
|
-
__metadata("design:type", Array)
|
|
586
|
-
], Document.prototype, "attachments", void 0);
|
|
587
619
|
Document = __decorate([
|
|
588
620
|
Table({
|
|
589
621
|
endpoint: 'document',
|
|
622
|
+
projection: ['id', 'createdDate', 'name', 'extension', 'publicLink'],
|
|
590
623
|
editable: false,
|
|
591
624
|
downloadable: true
|
|
592
625
|
}),
|
|
@@ -625,26 +658,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
625
658
|
args: [{ providedIn: 'root' }]
|
|
626
659
|
}], ctorParameters: function () { return []; } });
|
|
627
660
|
|
|
628
|
-
|
|
661
|
+
const DocumentFormTemplate = `
|
|
662
|
+
<div mat-dialog-title class="mat-headline-6" i18n="@@newDocument">New document</div>
|
|
663
|
+
<form *ngIf="form" [formGroup]="form" (ngSubmit)="save()">
|
|
664
|
+
<vd-generic-form [formGroup]="form" [fieldGroups]="fieldGroups" [context]="this">
|
|
665
|
+
<ng-template vd-file let-field="field" let-formGroup="formGroup">
|
|
666
|
+
<mat-form-field [attr.flex]="field.flex||0" layout-margin appearance="outline">
|
|
667
|
+
<mat-label>{{field.header}}</mat-label>
|
|
668
|
+
<div vd-file-input [formControlName]="field.name" (select)="upload($event)" [accept]="field.fileExtensions"></div>
|
|
669
|
+
</mat-form-field>
|
|
670
|
+
</ng-template>
|
|
671
|
+
</vd-generic-form>
|
|
672
|
+
<div mat-dialog-actions class="pad-top">
|
|
673
|
+
<button type="submit" mat-flat-button [disabled]="isSaving" color="primary" i18n="@@save">Save</button>
|
|
674
|
+
<button type="button" mat-button (click)="cancel()" i18n="@@cancel">Cancel</button>
|
|
675
|
+
</div>
|
|
676
|
+
</form>`;
|
|
677
|
+
|
|
678
|
+
class DocumentFormBaseComponent extends GenericReactiveFormComponent {
|
|
629
679
|
/**
|
|
630
680
|
* Constructor
|
|
631
681
|
*/
|
|
632
|
-
constructor(documentService, fileService, route, changeDetectorRef,
|
|
633
|
-
super(
|
|
682
|
+
constructor(entityType, documentService, fileService, dialogRef, route, changeDetectorRef, data) {
|
|
683
|
+
super(entityType, documentService, route, changeDetectorRef);
|
|
684
|
+
this.entityType = entityType;
|
|
634
685
|
this.documentService = documentService;
|
|
635
686
|
this.fileService = fileService;
|
|
687
|
+
this.dialogRef = dialogRef;
|
|
636
688
|
this.route = route;
|
|
637
689
|
this.changeDetectorRef = changeDetectorRef;
|
|
638
|
-
this.dialogRef = dialogRef;
|
|
639
690
|
this.data = data;
|
|
640
691
|
/**
|
|
641
692
|
* Upload progress
|
|
642
693
|
*/
|
|
643
694
|
this.uploadProgress = 0;
|
|
644
|
-
/**
|
|
645
|
-
* Used to disable some properties for client manager
|
|
646
|
-
*/
|
|
647
|
-
this.isClientManager = AuthHelper.hasRole('ClientAdministrator') || AuthHelper.hasRole('ClientManager');
|
|
648
695
|
/**
|
|
649
696
|
* settings: CmsSettings
|
|
650
697
|
*/
|
|
@@ -656,14 +703,10 @@ class DocumentDialogComponent extends GenericReactiveFormComponent {
|
|
|
656
703
|
* Uploads a new document
|
|
657
704
|
*/
|
|
658
705
|
upload(file) {
|
|
659
|
-
if (file != null
|
|
660
|
-
this.
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
path: this.formValue?.path,
|
|
664
|
-
isPublic: true,
|
|
665
|
-
preserveOriginalName: this.formValue?.preserveOriginalName
|
|
666
|
-
}).subscribe({
|
|
706
|
+
if (file != null) {
|
|
707
|
+
this.fileService
|
|
708
|
+
.upload(file, `upload`, new this.entityType(Object.assign(this.data || {}, this.formValue)))
|
|
709
|
+
.subscribe({
|
|
667
710
|
next: (event) => {
|
|
668
711
|
if (event.type === HttpEventType.UploadProgress) {
|
|
669
712
|
/* Calculate the progress percentage */
|
|
@@ -685,7 +728,7 @@ class DocumentDialogComponent extends GenericReactiveFormComponent {
|
|
|
685
728
|
* @param action
|
|
686
729
|
* @param response
|
|
687
730
|
*/
|
|
688
|
-
onAfterSubmit(
|
|
731
|
+
onAfterSubmit(_1 = SaveAction.SaveAndClose, _2 = null) {
|
|
689
732
|
this.isSaving = false;
|
|
690
733
|
this.cancel();
|
|
691
734
|
}
|
|
@@ -694,14 +737,53 @@ class DocumentDialogComponent extends GenericReactiveFormComponent {
|
|
|
694
737
|
*/
|
|
695
738
|
cancel() {
|
|
696
739
|
this.dialogRef.close();
|
|
740
|
+
this.reloadPage();
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Creates a new instance of the TEntity
|
|
744
|
+
*/
|
|
745
|
+
newInstance() {
|
|
746
|
+
return super.newInstance(Object.assign(new this.entityType({
|
|
747
|
+
clientId: this.currentUser?.clientId,
|
|
748
|
+
departmentId: this.currentUser?.departmentId
|
|
749
|
+
}), this.data || {}));
|
|
697
750
|
}
|
|
698
751
|
}
|
|
699
|
-
|
|
700
|
-
|
|
752
|
+
DocumentFormBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DocumentFormBaseComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
753
|
+
DocumentFormBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.0", type: DocumentFormBaseComponent, usesInheritance: true, ngImport: i0 });
|
|
754
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DocumentFormBaseComponent, decorators: [{
|
|
755
|
+
type: Directive
|
|
756
|
+
}], ctorParameters: function () { return [{ type: i0.Type }, { type: undefined }, { type: i2.FileService }, { type: i2$1.MatDialogRef }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: undefined }]; } });
|
|
757
|
+
|
|
758
|
+
class DocumentDialogComponent extends DocumentFormBaseComponent {
|
|
759
|
+
/**
|
|
760
|
+
* Constructor
|
|
761
|
+
*/
|
|
762
|
+
constructor(documentService, fileService, route, changeDetectorRef, dialogRef, data = new Document()) {
|
|
763
|
+
super(Document, documentService, fileService, dialogRef, route, changeDetectorRef, data);
|
|
764
|
+
this.documentService = documentService;
|
|
765
|
+
this.fileService = fileService;
|
|
766
|
+
this.route = route;
|
|
767
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
768
|
+
this.dialogRef = dialogRef;
|
|
769
|
+
this.data = data;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Event emitted before the form has built.
|
|
773
|
+
*/
|
|
774
|
+
onBeforeFormBuild() {
|
|
775
|
+
this.item.isPublic = true;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
DocumentDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DocumentDialogComponent, deps: [{ token: DocumentService }, { token: i2.FileService }, { token: i3$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i2$1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
779
|
+
DocumentDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.0", type: DocumentDialogComponent, selector: "document-dialog", usesInheritance: true, ngImport: i0, template: "\n <div mat-dialog-title class=\"mat-headline-6\" i18n=\"@@newDocument\">New document</div>\n <form *ngIf=\"form\" [formGroup]=\"form\" (ngSubmit)=\"save()\">\n <vd-generic-form [formGroup]=\"form\" [fieldGroups]=\"fieldGroups\" [context]=\"this\">\n <ng-template vd-file let-field=\"field\" let-formGroup=\"formGroup\">\n <mat-form-field [attr.flex]=\"field.flex||0\" layout-margin appearance=\"outline\">\n <mat-label>{{field.header}}</mat-label>\n <div vd-file-input [formControlName]=\"field.name\" (select)=\"upload($event)\" [accept]=\"field.fileExtensions\"></div>\n </mat-form-field>\n </ng-template>\n </vd-generic-form>\n <div mat-dialog-actions class=\"pad-top\">\n <button type=\"submit\" mat-flat-button [disabled]=\"isSaving\" color=\"primary\" i18n=\"@@save\">Save</button>\n <button type=\"button\" mat-button (click)=\"cancel()\" i18n=\"@@cancel\">Cancel</button>\n </div>\n </form>", isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: i2.RxwebFormDirective, selector: "[formGroup],[rxwebForm]", inputs: ["formGroup", "rxwebForm"] }, { kind: "directive", type: i2.RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.MatFormFieldReadonlyDirective, selector: "mat-form-field" }, { kind: "directive", type: i2.VdFileDirective, selector: "[vd-file]ng-template" }, { kind: "directive", type: i2.EmptyStringResetDirective, selector: "[ngModel],[formControlName],[formControl]" }, { kind: "component", type: i2.VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "component", type: i2.VdFileInputComponent, selector: "[vd-file-input]", inputs: ["accept", "placeholder", "required", "multiple", "disabled", "errorState"], outputs: ["select", "clear"] }, { kind: "directive", type: i2$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }] });
|
|
701
780
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DocumentDialogComponent, decorators: [{
|
|
702
781
|
type: Component,
|
|
703
|
-
args: [{
|
|
704
|
-
|
|
782
|
+
args: [{
|
|
783
|
+
selector: 'document-dialog',
|
|
784
|
+
template: DocumentFormTemplate
|
|
785
|
+
}]
|
|
786
|
+
}], ctorParameters: function () { return [{ type: DocumentService }, { type: i2.FileService }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i2$1.MatDialogRef }, { type: Document, decorators: [{
|
|
705
787
|
type: Inject,
|
|
706
788
|
args: [MAT_DIALOG_DATA]
|
|
707
789
|
}] }]; } });
|
|
@@ -837,7 +919,7 @@ __decorate([
|
|
|
837
919
|
filter: 'clientJoins.client.displayName',
|
|
838
920
|
sortBy: 'clientJoins.Min(client.displayName)',
|
|
839
921
|
content: (x) => Utils.joinArray(x.clientJoins?.map(y => y.clientName)),
|
|
840
|
-
display: Grid.
|
|
922
|
+
display: Grid.Lg,
|
|
841
923
|
maxWidth: 200,
|
|
842
924
|
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
843
925
|
}),
|
|
@@ -870,7 +952,7 @@ __decorate([
|
|
|
870
952
|
filter: 'departmentJoins.department.displayName',
|
|
871
953
|
sortBy: 'departmentJoins.Min(department.displayName)',
|
|
872
954
|
content: (x) => Utils.joinArray(x.departmentJoins?.map(y => y.departmentName)),
|
|
873
|
-
display: Grid.
|
|
955
|
+
display: Grid.Lg,
|
|
874
956
|
maxWidth: 200,
|
|
875
957
|
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
876
958
|
}),
|
|
@@ -1053,12 +1135,12 @@ class TemplatePreviewDialogComponent extends BaseComponent {
|
|
|
1053
1135
|
this.dialogRef.close();
|
|
1054
1136
|
}
|
|
1055
1137
|
}
|
|
1056
|
-
TemplatePreviewDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: TemplatePreviewDialogComponent, deps: [{ token: TemplatePreviewService }, { token:
|
|
1057
|
-
TemplatePreviewDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.0", type: TemplatePreviewDialogComponent, selector: "app-template-preview", usesInheritance: true, ngImport: i0, template: "<div mat-dialog-title class=\"mat-headline-6\">\r\n <div layout=\"row\" flex>\r\n <span i18n=\"@@templatePreview\">Template preview</span>\r\n <span flex></span>\r\n <div *ngIf=\"data.type == TemplateType.Pdf && pdfSrc\">\r\n <a mat-icon-button (click)=\"download()\">\r\n <mat-icon>download</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomIn()\">\r\n <mat-icon>zoom_in</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomOut()\">\r\n <mat-icon>zoom_out</mat-icon>\r\n </a>\r\n </div>\r\n </div>\r\n</div>\r\n<form #form=\"ngForm\" novalidate>\r\n <!-- #region Entity -->\r\n <div layout=\"row\" flex *ngIf=\"data.endpoint\">\r\n <mat-form-field flex layout-margin>\r\n <mat-label>{{data.entityName}}</mat-label>\r\n <vd-chips [(ngModel)]=\"data.entityId\" [endpoint]=\"data.endpoint\" [params]=\"{sortBy: 'id'}\" text=\"displayName\" name=\"entityId\" #entityId=\"ngModel\" [placeholder]=\"data.entityName\" required flex>\r\n <ng-template vd-chip let-entity=\"chip\">\r\n <span>{{entity[data.displayName]}}</span>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-entity=\"option\">\r\n <span>{{entity[data.displayName]}}</span>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-error *ngIf=\"entityId.errors?.required\"><span>{{data.entityName}}</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <div layout=\"column\" layout-gt-sm=\"row\" class=\"push-bottom\" flex *ngIf=\"isLoading\">\r\n <div flex layout-margin>\r\n <div class=\"push-bottom-sm\" i18n=\"@@pleaseWait\">Please Wait...</div>\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n </div>\r\n </div>\r\n\r\n <!-- #region PDF Content -->\r\n <mat-card>\r\n <pdf-viewer [src]=\"pdfSrc\" *ngIf=\"data.type == TemplateType.Pdf && pdfSrc\" [render-text]=\"true\" [zoom]=\"zoom\" [zoom-scale]=\"zoomScale\" [show-borders]=\"true\" [original-size]=\"false\" [autoresize]=\"true\"></pdf-viewer>\r\n </mat-card>\r\n <!-- #region Content -->\r\n\r\n <div *ngIf=\"data.type != TemplateType.Pdf\">\r\n <!-- #region Content -->\r\n <div layout=\"row\" layout-margin flex class=\"content\">\r\n <div *ngIf=\"data.content\" [innerHtml]=\"data.content\"></div>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Email-->\r\n <div layout-gt-sm=\"row\" layout=\"column\" class=\"push-top 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\" required email placeholder=\"Email\" i18n-placeholder=\"@@email\">\r\n <button mat-icon-button matSuffix (click)=\"sendMail()\" [disabled]=\"!email.valid\">\r\n <mat-icon>send</mat-icon>\r\n </button>\r\n <mat-error *ngIf=\"email.errors?.required\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n <mat-error *ngIf=\"!email.errors?.required && email.errors?.email\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isInvalid\"> is invalid</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n </div>\r\n\r\n <div mat-dialog-actions class=\"pad-top\">\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"cancel()\" i18n=\"@@close\">Close</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}pdf-viewer{display:block;margin-left:-16px;width:calc(100% + 32px);height:calc(100vh - 170px);background:#dbdbdb}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: i2.RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "component", type: i7$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconAnchor, selector: "a[mat-icon-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i2.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.MatFormFieldReadonlyDirective, selector: "mat-form-field" }, { kind: "directive", type: i2.EmptyStringResetDirective, selector: "[ngModel],[formControlName],[formControl]" }, { kind: "component", type: i2.VdChipsComponent, selector: "vd-chips", inputs: ["classType", "chips", "endpoint", "params", "projection", "paginated", "customValue", "context", "key", "searchField", "searchFields", "removable", "debounce", "autocompleteCssClass", "suffixButtons"], outputs: ["initSelect", "selected", "cleared", "launch", "chipFocus"] }, { kind: "directive", type: i2.VdAutocompleteOptionDirective, selector: "[vd-autocomplete-option]ng-template" }, { kind: "directive", type: i2.VdChipDirective, selector: "[vd-chip]ng-template" }, { kind: "directive", type: i11$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i13.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"] }] });
|
|
1138
|
+
TemplatePreviewDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: TemplatePreviewDialogComponent, deps: [{ token: TemplatePreviewService }, { token: i2$1.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i3$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1139
|
+
TemplatePreviewDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.0", type: TemplatePreviewDialogComponent, selector: "app-template-preview", usesInheritance: true, ngImport: i0, template: "<div mat-dialog-title class=\"mat-headline-6\">\r\n <div layout=\"row\" flex>\r\n <span i18n=\"@@templatePreview\">Template preview</span>\r\n <span flex></span>\r\n <div *ngIf=\"data.type == TemplateType.Pdf && pdfSrc\">\r\n <a mat-icon-button (click)=\"download()\">\r\n <mat-icon>download</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomIn()\">\r\n <mat-icon>zoom_in</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomOut()\">\r\n <mat-icon>zoom_out</mat-icon>\r\n </a>\r\n </div>\r\n </div>\r\n</div>\r\n<form #form=\"ngForm\" novalidate>\r\n <!-- #region Entity -->\r\n <div layout=\"row\" flex *ngIf=\"data.endpoint\">\r\n <mat-form-field flex layout-margin>\r\n <mat-label>{{data.entityName}}</mat-label>\r\n <vd-chips [(ngModel)]=\"data.entityId\" [endpoint]=\"data.endpoint\" [params]=\"{sortBy: 'id'}\" text=\"displayName\" name=\"entityId\" #entityId=\"ngModel\" [placeholder]=\"data.entityName\" required flex>\r\n <ng-template vd-chip let-entity=\"chip\">\r\n <span>{{entity[data.displayName]}}</span>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-entity=\"option\">\r\n <span>{{entity[data.displayName]}}</span>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-error *ngIf=\"entityId.errors?.required\"><span>{{data.entityName}}</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <div layout=\"column\" layout-gt-sm=\"row\" class=\"push-bottom\" flex *ngIf=\"isLoading\">\r\n <div flex layout-margin>\r\n <div class=\"push-bottom-sm\" i18n=\"@@pleaseWait\">Please Wait...</div>\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n </div>\r\n </div>\r\n\r\n <!-- #region PDF Content -->\r\n <mat-card>\r\n <pdf-viewer [src]=\"pdfSrc\" *ngIf=\"data.type == TemplateType.Pdf && pdfSrc\" [render-text]=\"true\" [zoom]=\"zoom\" [zoom-scale]=\"zoomScale\" [show-borders]=\"true\" [original-size]=\"false\" [autoresize]=\"true\"></pdf-viewer>\r\n </mat-card>\r\n <!-- #region Content -->\r\n\r\n <div *ngIf=\"data.type != TemplateType.Pdf\">\r\n <!-- #region Content -->\r\n <div layout=\"row\" layout-margin flex class=\"content\">\r\n <div *ngIf=\"data.content\" [innerHtml]=\"data.content\"></div>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Email-->\r\n <div layout-gt-sm=\"row\" layout=\"column\" class=\"push-top 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\" required email placeholder=\"Email\" i18n-placeholder=\"@@email\">\r\n <button mat-icon-button matSuffix (click)=\"sendMail()\" [disabled]=\"!email.valid\">\r\n <mat-icon>send</mat-icon>\r\n </button>\r\n <mat-error *ngIf=\"email.errors?.required\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n <mat-error *ngIf=\"!email.errors?.required && email.errors?.email\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isInvalid\"> is invalid</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n </div>\r\n\r\n <div mat-dialog-actions class=\"pad-top\">\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"cancel()\" i18n=\"@@close\">Close</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}pdf-viewer{display:block;margin-left:-16px;width:calc(100% + 32px);height:calc(100vh - 170px);background:#dbdbdb}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i6.EmailValidator, selector: "[email][formControlName],[email][formControl],[email][ngModel]", inputs: ["email"] }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i6.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: i2.RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "component", type: i7$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatIconAnchor, selector: "a[mat-icon-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i9$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i9.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i9.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i9.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i2.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.MatFormFieldReadonlyDirective, selector: "mat-form-field" }, { kind: "directive", type: i2.EmptyStringResetDirective, selector: "[ngModel],[formControlName],[formControl]" }, { kind: "component", type: i2.VdChipsComponent, selector: "vd-chips", inputs: ["classType", "chips", "endpoint", "params", "projection", "paginated", "customValue", "context", "key", "searchField", "searchFields", "removable", "debounce", "autocompleteCssClass", "suffixButtons"], outputs: ["initSelect", "selected", "cleared", "launch", "chipFocus"] }, { kind: "directive", type: i2.VdAutocompleteOptionDirective, selector: "[vd-autocomplete-option]ng-template" }, { kind: "directive", type: i2.VdChipDirective, selector: "[vd-chip]ng-template" }, { kind: "directive", type: i2$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i11$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i12.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i13.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"] }] });
|
|
1058
1140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: TemplatePreviewDialogComponent, decorators: [{
|
|
1059
1141
|
type: Component,
|
|
1060
1142
|
args: [{ selector: 'app-template-preview', template: "<div mat-dialog-title class=\"mat-headline-6\">\r\n <div layout=\"row\" flex>\r\n <span i18n=\"@@templatePreview\">Template preview</span>\r\n <span flex></span>\r\n <div *ngIf=\"data.type == TemplateType.Pdf && pdfSrc\">\r\n <a mat-icon-button (click)=\"download()\">\r\n <mat-icon>download</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomIn()\">\r\n <mat-icon>zoom_in</mat-icon>\r\n </a>\r\n <a mat-icon-button (click)=\"zoomOut()\">\r\n <mat-icon>zoom_out</mat-icon>\r\n </a>\r\n </div>\r\n </div>\r\n</div>\r\n<form #form=\"ngForm\" novalidate>\r\n <!-- #region Entity -->\r\n <div layout=\"row\" flex *ngIf=\"data.endpoint\">\r\n <mat-form-field flex layout-margin>\r\n <mat-label>{{data.entityName}}</mat-label>\r\n <vd-chips [(ngModel)]=\"data.entityId\" [endpoint]=\"data.endpoint\" [params]=\"{sortBy: 'id'}\" text=\"displayName\" name=\"entityId\" #entityId=\"ngModel\" [placeholder]=\"data.entityName\" required flex>\r\n <ng-template vd-chip let-entity=\"chip\">\r\n <span>{{entity[data.displayName]}}</span>\r\n </ng-template>\r\n <ng-template vd-autocomplete-option let-entity=\"option\">\r\n <span>{{entity[data.displayName]}}</span>\r\n </ng-template>\r\n </vd-chips>\r\n <mat-error *ngIf=\"entityId.errors?.required\"><span>{{data.entityName}}</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <div layout=\"column\" layout-gt-sm=\"row\" class=\"push-bottom\" flex *ngIf=\"isLoading\">\r\n <div flex layout-margin>\r\n <div class=\"push-bottom-sm\" i18n=\"@@pleaseWait\">Please Wait...</div>\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n </div>\r\n </div>\r\n\r\n <!-- #region PDF Content -->\r\n <mat-card>\r\n <pdf-viewer [src]=\"pdfSrc\" *ngIf=\"data.type == TemplateType.Pdf && pdfSrc\" [render-text]=\"true\" [zoom]=\"zoom\" [zoom-scale]=\"zoomScale\" [show-borders]=\"true\" [original-size]=\"false\" [autoresize]=\"true\"></pdf-viewer>\r\n </mat-card>\r\n <!-- #region Content -->\r\n\r\n <div *ngIf=\"data.type != TemplateType.Pdf\">\r\n <!-- #region Content -->\r\n <div layout=\"row\" layout-margin flex class=\"content\">\r\n <div *ngIf=\"data.content\" [innerHtml]=\"data.content\"></div>\r\n </div>\r\n <!-- #endregion -->\r\n\r\n <!-- #region Email-->\r\n <div layout-gt-sm=\"row\" layout=\"column\" class=\"push-top 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\" required email placeholder=\"Email\" i18n-placeholder=\"@@email\">\r\n <button mat-icon-button matSuffix (click)=\"sendMail()\" [disabled]=\"!email.valid\">\r\n <mat-icon>send</mat-icon>\r\n </button>\r\n <mat-error *ngIf=\"email.errors?.required\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isRequired\"> is required</span></mat-error>\r\n <mat-error *ngIf=\"!email.errors?.required && email.errors?.email\"><span i18n=\"@@email\">Email</span><span i18n=\"@@isInvalid\"> is invalid</span></mat-error>\r\n </mat-form-field>\r\n </div>\r\n <!-- #endregion -->\r\n </div>\r\n\r\n <div mat-dialog-actions class=\"pad-top\">\r\n <button type=\"button\" mat-flat-button color=\"primary\" (click)=\"cancel()\" i18n=\"@@close\">Close</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}pdf-viewer{display:block;margin-left:-16px;width:calc(100% + 32px);height:calc(100vh - 170px);background:#dbdbdb}\n"] }]
|
|
1061
|
-
}], ctorParameters: function () { return [{ type: TemplatePreviewService }, { type:
|
|
1143
|
+
}], ctorParameters: function () { return [{ type: TemplatePreviewService }, { type: i2$1.MatDialogRef }, { type: TemplatePreview, decorators: [{
|
|
1062
1144
|
type: Inject,
|
|
1063
1145
|
args: [MAT_DIALOG_DATA]
|
|
1064
1146
|
}] }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }]; } });
|
|
@@ -1193,12 +1275,12 @@ class TemplateFormComponent extends GenericReactiveFormComponent {
|
|
|
1193
1275
|
}).afterClosed().subscribe();
|
|
1194
1276
|
}
|
|
1195
1277
|
}
|
|
1196
|
-
TemplateFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: TemplateFormComponent, deps: [{ token: TemplateService }, { token: i2.FileService }, { token:
|
|
1278
|
+
TemplateFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: TemplateFormComponent, deps: [{ token: TemplateService }, { token: i2.FileService }, { token: i2$1.MatDialog }, { token: i3$1.ActivatedRoute }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1197
1279
|
TemplateFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.0", type: TemplateFormComponent, 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 [item]=\"item\"> </vd-audit>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<mat-action-row>\r\n\t\t\t\t\t\t<button type=\"button\" mat-flat-button color=\"accent\" (click)=\"back()\" i18n=\"@@close\">Close</button>\r\n\t\t\t\t\t\t<span flex></span>\r\n\t\t\t\t\t</mat-action-row>\r\n\t\t\t\t</mat-expansion-panel>\r\n\t\t\t\t<!-- #endregion -->\r\n\t\t\t</mat-accordion>\r\n\t\t</vd-layout-card-over>\r\n\t</form>\r\n</vd-layout-nav>", styles: ["codemirror{width:100%}.CodeMirror{height:500px}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6$1.CodemirrorComponent, selector: "ngx-codemirror", inputs: ["className", "name", "autoFocus", "options", "preserveScrollPosition"], outputs: ["cursorActivity", "focusChange", "scroll", "drop"] }, { kind: "directive", type: i6.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.AsyncValidationDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["async"] }, { kind: "directive", type: i2.RxwebFormDirective, selector: "[formGroup],[rxwebForm]", inputs: ["formGroup", "rxwebForm"] }, { kind: "directive", type: i2.RxFormControlDirective, selector: "[ngModel],[formControlName],[formControl]", inputs: ["rxalpha", "rxalphaNumeric", "rxascii", "rxcompare", "rxcompose", "rxcontains", "rxcreditCard", "rxdataUri", "rxdifferent", "rxdigit", "rxemail", "rxendsWith", "rxeven", "rxextension", "rxfactor", "rxfileSize", "rxgreaterThanEqualTo", "rxgreaterThan", "rxhexColor", "rxjson", "rxlatitude", "rxlatLong", "rxleapYear", "rxlessThan", "rxlessThanEqualTo", "rxlongitude", "rxlowerCase", "rxmac", "rxmaxDate", "rxmaxLength", "rxmaxNumber", "rxminDate", "rxminLength", "rxminNumber", "rxnumeric", "rxodd", "rxpassword", "rxport", "rxprimeNumber", "rxrequired", "rxrange", "rxrule", "rxstartsWith", "rxtime", "rxupperCase", "rxurl", "rxunique", "rxnotEmpty", "rxcusip", "rxgrid", "rxdate"] }, { kind: "directive", type: i7.MatAccordion, selector: "mat-accordion", inputs: ["multi", "hideToggle", "displayMode", "togglePosition"], exportAs: ["matAccordion"] }, { kind: "component", type: i7.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "directive", type: i7.MatExpansionPanelActionRow, selector: "mat-action-row" }, { kind: "component", type: i7.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "directive", type: i7.MatExpansionPanelTitle, selector: "mat-panel-title" }, { kind: "directive", type: i7.MatExpansionPanelContent, selector: "ng-template[matExpansionPanelContent]" }, { kind: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i2.VdLayoutNavComponent, selector: "vd-layout-nav", inputs: ["toolbarTitle", "editMode", "actions", "data", "context", "icon", "logo", "color", "hideToggle", "backNavigationRoute", "navigationRoute"], outputs: ["reload"] }, { kind: "component", type: i2.VdLayoutCardOverComponent, selector: "vd-layout-card-over", inputs: ["cardTitle", "cardSubtitle", "cardWidth", "color"] }, { kind: "directive", type: i2.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }, { kind: "directive", type: i2.EmptyStringResetDirective, selector: "[ngModel],[formControlName],[formControl]" }, { kind: "component", type: i2.VdGenericFormComponent, selector: "vd-generic-form", inputs: ["formGroup", "classType", "formDefinition", "fieldGroups", "groupName", "fieldSets", "context", "debugValue", "readonly", "separatorKeysCodes"] }, { kind: "component", type: i11.VdAuditComponent, selector: "vd-audit", inputs: ["item"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1198
1280
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: TemplateFormComponent, decorators: [{
|
|
1199
1281
|
type: Component,
|
|
1200
1282
|
args: [{ selector: 'app-template-form', encapsulation: ViewEncapsulation.None, 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 [item]=\"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"] }]
|
|
1201
|
-
}], ctorParameters: function () { return [{ type: TemplateService }, { type: i2.FileService }, { type:
|
|
1283
|
+
}], ctorParameters: function () { return [{ type: TemplateService }, { type: i2.FileService }, { type: i2$1.MatDialog }, { type: i3$1.ActivatedRoute }, { type: i0.ChangeDetectorRef }]; } });
|
|
1202
1284
|
|
|
1203
1285
|
/**
|
|
1204
1286
|
* @class
|
|
@@ -1269,7 +1351,7 @@ __decorate([
|
|
|
1269
1351
|
filter: 'clientJoins.client.displayName',
|
|
1270
1352
|
sortBy: 'clientJoins.Min(client.displayName)',
|
|
1271
1353
|
content: (x) => Utils.joinArray(x.clientJoins?.map(y => y.clientName)),
|
|
1272
|
-
display: Grid.
|
|
1354
|
+
display: Grid.Lg,
|
|
1273
1355
|
maxWidth: 200,
|
|
1274
1356
|
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
1275
1357
|
}),
|
|
@@ -1301,7 +1383,7 @@ __decorate([
|
|
|
1301
1383
|
filter: 'departmentJoins.department.displayName',
|
|
1302
1384
|
sortBy: 'departmentJoins.Min(department.displayName)',
|
|
1303
1385
|
content: (x) => Utils.joinArray(x.departmentJoins?.map(y => y.departmentName)),
|
|
1304
|
-
display: Grid.
|
|
1386
|
+
display: Grid.Lg,
|
|
1305
1387
|
maxWidth: 200,
|
|
1306
1388
|
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
1307
1389
|
}),
|
|
@@ -1425,7 +1507,7 @@ __decorate([
|
|
|
1425
1507
|
filter: 'clientJoins.client.displayName',
|
|
1426
1508
|
sortBy: 'clientJoins.Min(client.displayName)',
|
|
1427
1509
|
content: (x) => Utils.joinArray(x.clientJoins?.map(y => y.clientName)),
|
|
1428
|
-
display: Grid.
|
|
1510
|
+
display: Grid.Lg,
|
|
1429
1511
|
maxWidth: 200,
|
|
1430
1512
|
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
1431
1513
|
}),
|
|
@@ -1457,7 +1539,7 @@ __decorate([
|
|
|
1457
1539
|
filter: 'departmentJoins.department.displayName',
|
|
1458
1540
|
sortBy: 'departmentJoins.Min(department.displayName)',
|
|
1459
1541
|
content: (x) => Utils.joinArray(x.departmentJoins?.map(y => y.departmentName)),
|
|
1460
|
-
display: Grid.
|
|
1542
|
+
display: Grid.Lg,
|
|
1461
1543
|
maxWidth: 200,
|
|
1462
1544
|
hide: (_, ctx) => !ctx.isAdmin || (!ctx.settings?.multitenantable && !ctx.settings?.multiClients),
|
|
1463
1545
|
}),
|
|
@@ -1567,6 +1649,47 @@ Slider = __decorate([
|
|
|
1567
1649
|
Table()
|
|
1568
1650
|
], Slider);
|
|
1569
1651
|
|
|
1652
|
+
/**
|
|
1653
|
+
* Includes resolve service
|
|
1654
|
+
*/
|
|
1655
|
+
class DocumentListProjectionResolve {
|
|
1656
|
+
/**
|
|
1657
|
+
* Constructor
|
|
1658
|
+
* @param oidcSecurityService
|
|
1659
|
+
*/
|
|
1660
|
+
constructor(oidcSecurityService) {
|
|
1661
|
+
this.oidcSecurityService = oidcSecurityService;
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* Resolves includes
|
|
1665
|
+
*/
|
|
1666
|
+
resolve() {
|
|
1667
|
+
var projection = [];
|
|
1668
|
+
return this.oidcSecurityService.checkAuth().pipe(map$1(x => {
|
|
1669
|
+
AuthHelper.user.isAuthenticated = x.isAuthenticated;
|
|
1670
|
+
if (x.userData) {
|
|
1671
|
+
AuthHelper.user = Object.assign(x.userData, {
|
|
1672
|
+
id: x.userData.sub,
|
|
1673
|
+
isAuthenticated: x.isAuthenticated
|
|
1674
|
+
});
|
|
1675
|
+
let settings = ServiceLocator.getService(CmsSettings);
|
|
1676
|
+
if (AuthHelper.hasRole(GlobalRoles.Administrator) && (settings?.multitenantable || settings?.multiClients)) {
|
|
1677
|
+
projection.push('client(displayName:clientName)');
|
|
1678
|
+
}
|
|
1679
|
+
if ((AuthHelper.hasRole(GlobalRoles.Administrator) || AuthHelper.hasRole(GlobalRoles.ClientAdministrator)) && (settings?.multitenantable || settings?.multiDepartments)) {
|
|
1680
|
+
projection.push('department(displayName:departmentName)');
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
return projection;
|
|
1684
|
+
}));
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
DocumentListProjectionResolve.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DocumentListProjectionResolve, deps: [{ token: i1.OidcSecurityService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1688
|
+
DocumentListProjectionResolve.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DocumentListProjectionResolve });
|
|
1689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: DocumentListProjectionResolve, decorators: [{
|
|
1690
|
+
type: Injectable
|
|
1691
|
+
}], ctorParameters: function () { return [{ type: i1.OidcSecurityService }]; } });
|
|
1692
|
+
|
|
1570
1693
|
/**
|
|
1571
1694
|
* Excluded columns resolve service
|
|
1572
1695
|
*/
|
|
@@ -1724,6 +1847,10 @@ const ListResolve = {
|
|
|
1724
1847
|
projection: ListProjectionResolve,
|
|
1725
1848
|
excludedColumns: ExcludedColumnsResolve
|
|
1726
1849
|
};
|
|
1850
|
+
const DocsListResolve = {
|
|
1851
|
+
settings: SettingsResolve,
|
|
1852
|
+
projection: DocumentListProjectionResolve,
|
|
1853
|
+
};
|
|
1727
1854
|
const FormResolve = {
|
|
1728
1855
|
settings: SettingsResolve,
|
|
1729
1856
|
updateIncludes: FormIncludesResolve,
|
|
@@ -1750,7 +1877,7 @@ const routes = [
|
|
|
1750
1877
|
{ path: 'sliders', component: VdDynamicListComponent, data: { classType: Slider }, resolve: ListResolve },
|
|
1751
1878
|
{ path: 'sliders/edit/:id', component: VdDynamicFormComponent, data: { classType: Slider, subtitle: $localize `:@@slider:Slider` }, resolve: FormResolve },
|
|
1752
1879
|
{ path: 'sliders/add', component: VdDynamicFormComponent, data: { classType: Slider, query: { clientId: AuthHelper.user.clientId }, subtitle: $localize `:@@slider:Slider` }, resolve: FormResolve },
|
|
1753
|
-
{ path: 'documents', component: VdDynamicListComponent, data: { classType: Document, addDialogType: DocumentDialogComponent, query: { type: DocumentType.Document } }, resolve:
|
|
1880
|
+
{ path: 'documents', component: VdDynamicListComponent, data: { classType: Document, addDialogType: DocumentDialogComponent, query: { type: DocumentType.Document } }, resolve: DocsListResolve },
|
|
1754
1881
|
];
|
|
1755
1882
|
class VdCmsRoutingModule {
|
|
1756
1883
|
}
|
|
@@ -1759,6 +1886,7 @@ VdCmsRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
|
|
|
1759
1886
|
VdCmsRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: VdCmsRoutingModule, providers: [
|
|
1760
1887
|
SettingsResolve,
|
|
1761
1888
|
ListProjectionResolve,
|
|
1889
|
+
DocumentListProjectionResolve,
|
|
1762
1890
|
FormIncludesResolve,
|
|
1763
1891
|
ExcludedColumnsResolve,
|
|
1764
1892
|
ExcludedFieldsResolve,
|
|
@@ -1772,6 +1900,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1772
1900
|
providers: [
|
|
1773
1901
|
SettingsResolve,
|
|
1774
1902
|
ListProjectionResolve,
|
|
1903
|
+
DocumentListProjectionResolve,
|
|
1775
1904
|
FormIncludesResolve,
|
|
1776
1905
|
ExcludedColumnsResolve,
|
|
1777
1906
|
ExcludedFieldsResolve,
|
|
@@ -1790,6 +1919,7 @@ MaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
|
|
|
1790
1919
|
MatChipsModule,
|
|
1791
1920
|
MatAutocompleteModule,
|
|
1792
1921
|
MatCheckboxModule,
|
|
1922
|
+
MatDialogModule,
|
|
1793
1923
|
MatInputModule,
|
|
1794
1924
|
MatSelectModule,
|
|
1795
1925
|
MatProgressBarModule] });
|
|
@@ -1800,6 +1930,7 @@ MaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
|
|
|
1800
1930
|
MatChipsModule,
|
|
1801
1931
|
MatAutocompleteModule,
|
|
1802
1932
|
MatCheckboxModule,
|
|
1933
|
+
MatDialogModule,
|
|
1803
1934
|
MatInputModule,
|
|
1804
1935
|
MatSelectModule,
|
|
1805
1936
|
MatProgressBarModule] });
|
|
@@ -1814,6 +1945,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1814
1945
|
MatChipsModule,
|
|
1815
1946
|
MatAutocompleteModule,
|
|
1816
1947
|
MatCheckboxModule,
|
|
1948
|
+
MatDialogModule,
|
|
1817
1949
|
MatInputModule,
|
|
1818
1950
|
MatSelectModule,
|
|
1819
1951
|
MatProgressBarModule
|
|
@@ -1828,13 +1960,15 @@ VdModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1
|
|
|
1828
1960
|
VdMediaModule,
|
|
1829
1961
|
VdFormsModule,
|
|
1830
1962
|
VdSelectModule,
|
|
1831
|
-
VdChipsModule
|
|
1963
|
+
VdChipsModule,
|
|
1964
|
+
VdFileModule] });
|
|
1832
1965
|
VdModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: VdModule, imports: [VdCommonModule,
|
|
1833
1966
|
VdLayoutModule,
|
|
1834
1967
|
VdMediaModule,
|
|
1835
1968
|
VdFormsModule,
|
|
1836
1969
|
VdSelectModule,
|
|
1837
|
-
VdChipsModule
|
|
1970
|
+
VdChipsModule,
|
|
1971
|
+
VdFileModule] });
|
|
1838
1972
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: VdModule, decorators: [{
|
|
1839
1973
|
type: NgModule,
|
|
1840
1974
|
args: [{
|
|
@@ -1844,7 +1978,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1844
1978
|
VdMediaModule,
|
|
1845
1979
|
VdFormsModule,
|
|
1846
1980
|
VdSelectModule,
|
|
1847
|
-
VdChipsModule
|
|
1981
|
+
VdChipsModule,
|
|
1982
|
+
VdFileModule
|
|
1848
1983
|
]
|
|
1849
1984
|
}]
|
|
1850
1985
|
}] });
|
|
@@ -1973,6 +2108,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
1973
2108
|
* Generated bundle index. Do not edit.
|
|
1974
2109
|
*/
|
|
1975
2110
|
|
|
1976
|
-
export { CmsSettings, Content, ContentClient, ContentDepartment, ContentFormComponent, ContentService, ContentType, ContentVariable, ContentVariableClient, ContentVariableDepartment, ContentVariableService, Document, DocumentDialogComponent, DocumentGenericService, DocumentService, Faq, FaqClient, FaqDepartment, FaqScope, FaqService, FormIncludesResolve, ListProjectionResolve, MaterialModule, Slider, SliderService, Template, TemplateClient, TemplateDepartment, TemplateFormComponent, TemplatePreview, TemplatePreviewDialogComponent, TemplatePreviewService, TemplateService, TemplateType, VdCmsModule, VdModule, WrapTag };
|
|
1977
|
-
//# sourceMappingURL=messaia-cdk-cms.mjs.map
|
|
2111
|
+
export { CmsSettings, Content, ContentClient, ContentDepartment, ContentFormComponent, ContentService, ContentType, ContentVariable, ContentVariableClient, ContentVariableDepartment, ContentVariableService, Document, DocumentDialogComponent, DocumentFormBaseComponent, DocumentFormTemplate, DocumentGenericService, DocumentService, Faq, FaqClient, FaqDepartment, FaqScope, FaqService, FormIncludesResolve, ListProjectionResolve, MaterialModule, Slider, SliderService, Template, TemplateClient, TemplateDepartment, TemplateFormComponent, TemplatePreview, TemplatePreviewDialogComponent, TemplatePreviewService, TemplateService, TemplateType, VdCmsModule, VdModule, WrapTag };
|
|
1978
2112
|
//# sourceMappingURL=messaia-cdk-cms.mjs.map
|