@firestitch/app-message 13.1.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/helpers/index-name-value.d.ts +1 -1
- package/app/helpers/index.d.ts +1 -1
- package/app/modules/app-message/app-message.module.d.ts +8 -8
- package/app/modules/app-message/injectors/app-message-config.injector.d.ts +3 -3
- package/app/modules/app-message/injectors/index.d.ts +1 -1
- package/app/modules/app-message/interfaces/app-message-config.d.ts +30 -30
- package/app/modules/app-message/interfaces/index.d.ts +1 -1
- package/app/modules/app-message/types/index.d.ts +1 -1
- package/app/modules/app-message/types/types.type.d.ts +49 -49
- package/app/modules/message-preview/components/index.d.ts +1 -1
- package/app/modules/message-preview/components/preview/index.d.ts +1 -1
- package/app/modules/message-preview/components/preview/preview.component.d.ts +11 -11
- package/app/modules/message-preview/message-preview.module.d.ts +11 -11
- package/app/modules/message-queues/components/queue/queue.component.d.ts +44 -44
- package/app/modules/message-queues/components/queues/queues.component.d.ts +31 -31
- package/app/modules/message-queues/components/recipient/recipient.component.d.ts +10 -10
- package/app/modules/message-queues/consts/index.d.ts +1 -1
- package/app/modules/message-queues/consts/message-queue-event-type.const.d.ts +5 -5
- package/app/modules/message-queues/consts/message-queue-states.const.d.ts +5 -5
- package/app/modules/message-queues/enums/email-message-queue-format.enum.d.ts +5 -5
- package/app/modules/message-queues/enums/index.d.ts +3 -3
- package/app/modules/message-queues/enums/message-queue-event-type.enum.d.ts +4 -4
- package/app/modules/message-queues/enums/message-queue-state.enum.d.ts +9 -9
- package/app/modules/message-queues/enums/message-queue-type.enum.d.ts +4 -4
- package/app/modules/message-queues/message-queues.module.d.ts +29 -29
- package/app/modules/message-queues/pipes/linkify.pipe.d.ts +7 -7
- package/app/modules/message-queues/pipes/truncate.pipe.d.ts +7 -7
- package/app/modules/message-queues/services/message-queue.service.d.ts +10 -10
- package/app/modules/message-templates/components/index.d.ts +2 -2
- package/app/modules/message-templates/components/template/index.d.ts +1 -1
- package/app/modules/message-templates/components/template/template.component.d.ts +23 -23
- package/app/modules/message-templates/components/templates/index.d.ts +1 -1
- package/app/modules/message-templates/components/templates/templates.component.d.ts +19 -19
- package/app/modules/message-templates/message-templates.module.d.ts +24 -24
- package/app/modules/messages/components/attachments/attachments.component.d.ts +18 -18
- package/app/modules/messages/components/attachments/index.d.ts +1 -1
- package/app/modules/messages/components/index.d.ts +3 -3
- package/app/modules/messages/components/message/index.d.ts +1 -1
- package/app/modules/messages/components/message/message.component.d.ts +30 -30
- package/app/modules/messages/components/messages/index.d.ts +1 -1
- package/app/modules/messages/components/messages/messages.component.d.ts +19 -19
- package/app/modules/messages/consts/email-message-formats.const.d.ts +5 -5
- package/app/modules/messages/consts/index.d.ts +1 -1
- package/app/modules/messages/enums/email-message-format.enum.d.ts +5 -5
- package/app/modules/messages/enums/index.d.ts +1 -1
- package/app/modules/messages/messages.module.d.ts +31 -31
- package/app/modules/webhooks/components/webhooks/webhooks.component.d.ts +15 -15
- package/app/modules/webhooks/webhooks.module.d.ts +9 -9
- package/esm2020/app/helpers/index-name-value.mjs +7 -7
- package/esm2020/app/helpers/index.mjs +1 -1
- package/esm2020/app/modules/app-message/app-message.module.mjs +16 -16
- package/esm2020/app/modules/app-message/injectors/app-message-config.injector.mjs +3 -3
- package/esm2020/app/modules/app-message/injectors/index.mjs +1 -1
- package/esm2020/app/modules/app-message/interfaces/app-message-config.mjs +1 -1
- package/esm2020/app/modules/app-message/interfaces/index.mjs +1 -1
- package/esm2020/app/modules/app-message/types/index.mjs +1 -1
- package/esm2020/app/modules/app-message/types/types.type.mjs +1 -1
- package/esm2020/app/modules/message-preview/components/index.mjs +1 -1
- package/esm2020/app/modules/message-preview/components/preview/index.mjs +1 -1
- package/esm2020/app/modules/message-preview/components/preview/preview.component.mjs +25 -25
- package/esm2020/app/modules/message-preview/message-preview.module.mjs +36 -38
- package/esm2020/app/modules/message-queues/components/queue/queue.component.mjs +209 -209
- package/esm2020/app/modules/message-queues/components/queues/queues.component.mjs +197 -197
- package/esm2020/app/modules/message-queues/components/recipient/recipient.component.mjs +25 -25
- package/esm2020/app/modules/message-queues/consts/index.mjs +1 -1
- package/esm2020/app/modules/message-queues/consts/message-queue-event-type.const.mjs +5 -5
- package/esm2020/app/modules/message-queues/consts/message-queue-states.const.mjs +10 -10
- package/esm2020/app/modules/message-queues/enums/email-message-queue-format.enum.mjs +6 -6
- package/esm2020/app/modules/message-queues/enums/index.mjs +3 -3
- package/esm2020/app/modules/message-queues/enums/message-queue-event-type.enum.mjs +5 -5
- package/esm2020/app/modules/message-queues/enums/message-queue-state.enum.mjs +10 -10
- package/esm2020/app/modules/message-queues/enums/message-queue-type.enum.mjs +5 -5
- package/esm2020/app/modules/message-queues/message-queues.module.mjs +112 -114
- package/esm2020/app/modules/message-queues/pipes/linkify.pipe.mjs +21 -21
- package/esm2020/app/modules/message-queues/pipes/truncate.pipe.mjs +21 -21
- package/esm2020/app/modules/message-queues/services/message-queue.service.mjs +28 -28
- package/esm2020/app/modules/message-templates/components/index.mjs +2 -2
- package/esm2020/app/modules/message-templates/components/template/index.mjs +1 -1
- package/esm2020/app/modules/message-templates/components/template/template.component.mjs +81 -81
- package/esm2020/app/modules/message-templates/components/templates/index.mjs +1 -1
- package/esm2020/app/modules/message-templates/components/templates/templates.component.mjs +80 -80
- package/esm2020/app/modules/message-templates/message-templates.module.mjs +92 -94
- package/esm2020/app/modules/messages/components/attachments/attachments.component.mjs +80 -80
- package/esm2020/app/modules/messages/components/attachments/index.mjs +1 -1
- package/esm2020/app/modules/messages/components/index.mjs +3 -3
- package/esm2020/app/modules/messages/components/message/index.mjs +1 -1
- package/esm2020/app/modules/messages/components/message/message.component.mjs +128 -128
- package/esm2020/app/modules/messages/components/messages/index.mjs +1 -1
- package/esm2020/app/modules/messages/components/messages/messages.component.mjs +71 -71
- package/esm2020/app/modules/messages/consts/email-message-formats.const.mjs +6 -6
- package/esm2020/app/modules/messages/consts/index.mjs +1 -1
- package/esm2020/app/modules/messages/enums/email-message-format.enum.mjs +6 -6
- package/esm2020/app/modules/messages/enums/index.mjs +1 -1
- package/esm2020/app/modules/messages/messages.module.mjs +119 -121
- package/esm2020/app/modules/webhooks/components/webhooks/webhooks.component.mjs +62 -62
- package/esm2020/app/modules/webhooks/webhooks.module.mjs +28 -30
- package/esm2020/firestitch-app-message.mjs +4 -4
- package/esm2020/public_api.mjs +15 -15
- package/fesm2015/firestitch-app-message.mjs +1213 -1223
- package/fesm2015/firestitch-app-message.mjs.map +1 -1
- package/fesm2020/firestitch-app-message.mjs +1217 -1227
- package/fesm2020/firestitch-app-message.mjs.map +1 -1
- package/{firestitch-app-message.d.ts → index.d.ts} +5 -5
- package/package.json +3 -3
- package/public_api.d.ts +16 -16
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { Component, Inject } from '@angular/core';
|
|
2
|
-
import { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
3
|
-
import { FsMessage } from '@firestitch/message';
|
|
4
|
-
import { tap } from 'rxjs/operators';
|
|
5
|
-
import { PreviewComponent } from '../../../../modules/message-preview/components';
|
|
6
|
-
import { FS_APP_MESSAGE_CONFIG } from '../../../app-message/injectors';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "@angular/material/dialog";
|
|
9
|
-
import * as i2 from "@firestitch/message";
|
|
10
|
-
import * as i3 from "@
|
|
11
|
-
import * as i4 from "@angular/
|
|
12
|
-
import * as i5 from "@angular/material/
|
|
13
|
-
import * as i6 from "@
|
|
14
|
-
import * as i7 from "@
|
|
15
|
-
import * as i8 from "@angular/material/
|
|
16
|
-
import * as i9 from "@firestitch/
|
|
17
|
-
import * as i10 from "@
|
|
18
|
-
import * as i11 from "@firestitch/
|
|
19
|
-
import * as i12 from "@
|
|
20
|
-
import * as i13 from "@
|
|
21
|
-
export class TemplateComponent {
|
|
22
|
-
constructor(_data, _config, _dialogRef, _message, _dialog) {
|
|
23
|
-
this._data = _data;
|
|
24
|
-
this._config = _config;
|
|
25
|
-
this._dialogRef = _dialogRef;
|
|
26
|
-
this._message = _message;
|
|
27
|
-
this._dialog = _dialog;
|
|
28
|
-
this.htmlEditorconfig = {
|
|
29
|
-
language: 'html',
|
|
30
|
-
insertSpaces: true,
|
|
31
|
-
tabSize: 2,
|
|
32
|
-
};
|
|
33
|
-
this.cssEditorconfig = {
|
|
34
|
-
language: 'scss',
|
|
35
|
-
insertSpaces: true,
|
|
36
|
-
tabSize: 2,
|
|
37
|
-
};
|
|
38
|
-
this.save = (event) => {
|
|
39
|
-
return this._config.saveMessageTemplate(this.messageTemplate)
|
|
40
|
-
.pipe(tap((messageTemplate) => {
|
|
41
|
-
this._message.success('Saved Changes');
|
|
42
|
-
if (event.submitter === 'save-close') {
|
|
43
|
-
this._dialogRef.close(messageTemplate);
|
|
44
|
-
}
|
|
45
|
-
}));
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
ngOnInit() {
|
|
49
|
-
if (this._data.messageTemplate.id) {
|
|
50
|
-
this._config.loadMessageTemplate(this._data.messageTemplate)
|
|
51
|
-
.subscribe(messageTemplate => {
|
|
52
|
-
this.messageTemplate = messageTemplate;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
this.messageTemplate = {};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
openPreview() {
|
|
60
|
-
this._dialog.open(PreviewComponent, {
|
|
61
|
-
data: {
|
|
62
|
-
styles: this.messageTemplate.styles,
|
|
63
|
-
html: this.messageTemplate.content,
|
|
64
|
-
},
|
|
65
|
-
width: '95%',
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
TemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
70
|
-
TemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
72
|
-
type: Component,
|
|
73
|
-
args: [{ template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"messageTemplate\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"messageTemplate\">\n <div mat-dialog-title>Message Template</div>\n <mat-dialog-content>\n <mat-form-field class=\"name\">\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"messageTemplate.name\"\n name=\"name\"
|
|
74
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
75
|
-
type: Inject,
|
|
76
|
-
args: [MAT_DIALOG_DATA]
|
|
77
|
-
}] }, { type: undefined, decorators: [{
|
|
78
|
-
type: Inject,
|
|
79
|
-
args: [FS_APP_MESSAGE_CONFIG]
|
|
80
|
-
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }, { type: i1.MatDialog }]; } });
|
|
81
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, Inject } from '@angular/core';
|
|
2
|
+
import { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
3
|
+
import { FsMessage } from '@firestitch/message';
|
|
4
|
+
import { tap } from 'rxjs/operators';
|
|
5
|
+
import { PreviewComponent } from '../../../../modules/message-preview/components';
|
|
6
|
+
import { FS_APP_MESSAGE_CONFIG } from '../../../app-message/injectors';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "@angular/material/dialog";
|
|
9
|
+
import * as i2 from "@firestitch/message";
|
|
10
|
+
import * as i3 from "@angular/common";
|
|
11
|
+
import * as i4 from "@angular/forms";
|
|
12
|
+
import * as i5 from "@angular/material/button";
|
|
13
|
+
import * as i6 from "@angular/material/tabs";
|
|
14
|
+
import * as i7 from "@angular/material/form-field";
|
|
15
|
+
import * as i8 from "@angular/material/input";
|
|
16
|
+
import * as i9 from "@firestitch/dialog";
|
|
17
|
+
import * as i10 from "@firestitch/label";
|
|
18
|
+
import * as i11 from "@firestitch/skeleton";
|
|
19
|
+
import * as i12 from "@firestitch/form";
|
|
20
|
+
import * as i13 from "@firestitch/text-editor";
|
|
21
|
+
export class TemplateComponent {
|
|
22
|
+
constructor(_data, _config, _dialogRef, _message, _dialog) {
|
|
23
|
+
this._data = _data;
|
|
24
|
+
this._config = _config;
|
|
25
|
+
this._dialogRef = _dialogRef;
|
|
26
|
+
this._message = _message;
|
|
27
|
+
this._dialog = _dialog;
|
|
28
|
+
this.htmlEditorconfig = {
|
|
29
|
+
language: 'html',
|
|
30
|
+
insertSpaces: true,
|
|
31
|
+
tabSize: 2,
|
|
32
|
+
};
|
|
33
|
+
this.cssEditorconfig = {
|
|
34
|
+
language: 'scss',
|
|
35
|
+
insertSpaces: true,
|
|
36
|
+
tabSize: 2,
|
|
37
|
+
};
|
|
38
|
+
this.save = (event) => {
|
|
39
|
+
return this._config.saveMessageTemplate(this.messageTemplate)
|
|
40
|
+
.pipe(tap((messageTemplate) => {
|
|
41
|
+
this._message.success('Saved Changes');
|
|
42
|
+
if (event.submitter === 'save-close') {
|
|
43
|
+
this._dialogRef.close(messageTemplate);
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
ngOnInit() {
|
|
49
|
+
if (this._data.messageTemplate.id) {
|
|
50
|
+
this._config.loadMessageTemplate(this._data.messageTemplate)
|
|
51
|
+
.subscribe(messageTemplate => {
|
|
52
|
+
this.messageTemplate = messageTemplate;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.messageTemplate = {};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
openPreview() {
|
|
60
|
+
this._dialog.open(PreviewComponent, {
|
|
61
|
+
data: {
|
|
62
|
+
styles: this.messageTemplate.styles,
|
|
63
|
+
html: this.messageTemplate.content,
|
|
64
|
+
},
|
|
65
|
+
width: '95%',
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
TemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TemplateComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: FS_APP_MESSAGE_CONFIG }, { token: i1.MatDialogRef }, { token: i2.FsMessage }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
+
TemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TemplateComponent, selector: "ng-component", ngImport: i0, template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"messageTemplate\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"messageTemplate\">\n <div mat-dialog-title>Message Template</div>\n <mat-dialog-content>\n <mat-form-field class=\"name\">\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"messageTemplate.name\"\n required\n name=\"name\">\n </mat-form-field>\n <div [@.disabled]=\"true\">\n <mat-tab-group\n mat-align-tabs=\"start\"\n [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <div class=\"content\">\n <fs-label-field>\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.content\"\n name=\"body\"\n [config]=\"htmlEditorconfig\">\n </fs-text-editor>\n <fs-label-message>\n {$content} will be replaced with the message content.\n </fs-label-message>\n </fs-label-field>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <div class=\"styles\">\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.styles\"\n name=\"styles\"\n [config]=\"cssEditorconfig\">\n </fs-text-editor>\n </div>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\" name=\"close\">Save</button>\n <button mat-button type=\"submit\" name=\"save-close\">Save & Close</button>\n <button mat-button (click)=\"openPreview()\" type=\"button\">Preview</button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [".name{width:100%}:host ::ng-deep .mat-tab-body-content,:host ::ng-deep .mat-tab-body{overflow:visible}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.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: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { kind: "component", type: i6.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "directive", type: i6.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i8.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: i9.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { kind: "component", type: i10.FsLabelFieldComponent, selector: "fs-label-field", inputs: ["bottomMargin", "topMargin", "labelMargin"] }, { kind: "component", type: i10.FsLabelMessageComponent, selector: "fs-label-message" }, { kind: "directive", type: i11.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "directive", type: i12.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i12.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "directive", type: i12.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i12.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i13.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }] });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TemplateComponent, decorators: [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{ template: "<form\n fsForm\n [submit]=\"save\"\n #form=\"ngForm\"\n *fsSkeleton=\"messageTemplate\"\n [confirmTabs]=\"false\">\n <fs-dialog *ngIf=\"messageTemplate\">\n <div mat-dialog-title>Message Template</div>\n <mat-dialog-content>\n <mat-form-field class=\"name\">\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"messageTemplate.name\"\n required\n name=\"name\">\n </mat-form-field>\n <div [@.disabled]=\"true\">\n <mat-tab-group\n mat-align-tabs=\"start\"\n [dynamicHeight]=\"false\">\n <mat-tab label=\"Content\">\n <ng-template matTabContent>\n <div class=\"content\">\n <fs-label-field>\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.content\"\n name=\"body\"\n [config]=\"htmlEditorconfig\">\n </fs-text-editor>\n <fs-label-message>\n {$content} will be replaced with the message content.\n </fs-label-message>\n </fs-label-field>\n </div>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <div class=\"styles\">\n <fs-text-editor\n [(ngModel)]=\"messageTemplate.styles\"\n name=\"styles\"\n [config]=\"cssEditorconfig\">\n </fs-text-editor>\n </div>\n </ng-template>\n </mat-tab>\n </mat-tab-group>\n </div>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button type=\"submit\" color=\"primary\" name=\"close\">Save</button>\n <button mat-button type=\"submit\" name=\"save-close\">Save & Close</button>\n <button mat-button (click)=\"openPreview()\" type=\"button\">Preview</button>\n <button mat-button [mat-dialog-close]=\"null\" type=\"button\">Cancel</button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: [".name{width:100%}:host ::ng-deep .mat-tab-body-content,:host ::ng-deep .mat-tab-body{overflow:visible}\n"] }]
|
|
74
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
75
|
+
type: Inject,
|
|
76
|
+
args: [MAT_DIALOG_DATA]
|
|
77
|
+
}] }, { type: undefined, decorators: [{
|
|
78
|
+
type: Inject,
|
|
79
|
+
args: [FS_APP_MESSAGE_CONFIG]
|
|
80
|
+
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }, { type: i1.MatDialog }]; } });
|
|
81
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVtcGxhdGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9tb2R1bGVzL21lc3NhZ2UtdGVtcGxhdGVzL2NvbXBvbmVudHMvdGVtcGxhdGUvdGVtcGxhdGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9tb2R1bGVzL21lc3NhZ2UtdGVtcGxhdGVzL2NvbXBv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Y29udGVudFwiXG4gICAgICAgICAgICAgICAgICAgIG5hbWU9XCJib2R5XCJcbiAgICAgICAgICAgICAgICAgICAgW2NvbmZpZ109XCJodG1sRWRpdG9yY29uZmlnXCI+XG4gICAgICAgICAgICAgICAgICA8L2ZzLXRleHQtZWRpdG9yPlxuICAgICAgICAgICAgICAgICAgPGZzLWxhYmVsLW1lc3NhZ2U+XG4gICAgICAgICAgICAgICAgICAgICYjMTIzOyRjb250ZW50JiMxMjU7IHdpbGwgYmUgcmVwbGFjZWQgd2l0aCB0aGUgbWVzc2FnZSBjb250ZW50LlxuICAgICAgICAgICAgICAgICAgPC9mcy1sYWJlbC1tZXNzYWdlPlxuICAgICAgICAgICAgICAgIDwvZnMtbGFiZWwtZmllbGQ+XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgICA8L21hdC10YWI+XG4gICAgICAgICAgPG1hdC10YWIgbGFiZWw9XCJTdHlsZXNcIj5cbiAgICAgICAgICAgIDxuZy10ZW1wbGF0ZSBtYXRUYWJDb250ZW50PlxuICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic3R5bGVzXCI+XG4gICAgICAgICAgICAgICAgPGZzLXRleHQtZWRpdG9yXG4gICAgICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cIm1lc3NhZ2VUZW1wbGF0ZS5zdHlsZXNcIlxuICAgICAgICAgICAgICAgICAgbmFtZT1cInN0eWxlc1wiXG4gICAgICAgICAgICAgICAgICBbY29uZmlnXT1cImNzc0VkaXRvcmNvbmZpZ1wiPlxuICAgICAgICAgICAgICAgIDwvZnMtdGV4dC1lZGl0b3I+XG4gICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgICA8L21hdC10YWI+XG4gICAgICAgIDwvbWF0LXRhYi1ncm91cD5cbiAgICAgIDwvZGl2PlxuICAgIDwvbWF0LWRpYWxvZy1jb250ZW50PlxuICAgIDxtYXQtZGlhbG9nLWFjdGlvbnM+XG4gICAgICA8YnV0dG9uIG1hdC1idXR0b24gdHlwZT1cInN1Ym1pdFwiIGNvbG9yPVwicHJpbWFyeVwiIG5hbWU9XCJjbG9zZVwiPlNhdmU8L2J1dHRvbj5cbiAgICAgIDxidXR0b24gbWF0LWJ1dHRvbiB0eXBlPVwic3VibWl0XCIgbmFtZT1cInNhdmUtY2xvc2VcIj5TYXZlICYgQ2xvc2U8L2J1dHRvbj5cbiAgICAgIDxidXR0b24gbWF0LWJ1dHRvbiAoY2xpY2spPVwib3BlblByZXZpZXcoKVwiIHR5cGU9XCJidXR0b25cIj5QcmV2aWV3PC9idXR0b24+XG4gICAgICA8YnV0dG9uIG1hdC1idXR0b24gW21hdC1kaWFsb2ctY2xvc2VdPVwibnVsbFwiIHR5cGU9XCJidXR0b25cIj5DYW5jZWw8L2J1dHRvbj5cbiAgICA8L21hdC1kaWFsb2ctYWN0aW9ucz5cbiAgPC9mcy1kaWFsb2c+XG48L2Zvcm0+XG4iXX0=
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './templates.component';
|
|
1
|
+
export * from './templates.component';
|
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvbWVzc2FnZS10ZW1wbGF0ZXMvY29tcG9uZW50cy90ZW1wbGF0ZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx1QkFBdUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vdGVtcGxhdGVzLmNvbXBvbmVudCc7XG4iXX0=
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { Component, ViewChild, Inject } from '@angular/core';
|
|
2
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
-
import { FsListComponent } from '@firestitch/list';
|
|
4
|
-
import { takeUntil } from 'rxjs/operators';
|
|
5
|
-
import { Subject } from 'rxjs';
|
|
6
|
-
import { TemplateComponent } from '../template';
|
|
7
|
-
import { FS_APP_MESSAGE_CONFIG } from '../../../app-message/injectors';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
import * as i1 from "@angular/material/dialog";
|
|
10
|
-
import * as i2 from "@firestitch/list";
|
|
11
|
-
export class TemplatesComponent {
|
|
12
|
-
constructor(_config, _dialog) {
|
|
13
|
-
this._config = _config;
|
|
14
|
-
this._dialog = _dialog;
|
|
15
|
-
this.list = null;
|
|
16
|
-
this.config = null;
|
|
17
|
-
this.messageQueueStates = [];
|
|
18
|
-
this._destroy$ = new Subject();
|
|
19
|
-
}
|
|
20
|
-
ngOnInit() {
|
|
21
|
-
this.config = {
|
|
22
|
-
actions: [
|
|
23
|
-
{
|
|
24
|
-
label: 'Create',
|
|
25
|
-
click: () => {
|
|
26
|
-
this.open({});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
status: false,
|
|
31
|
-
fetch: query => {
|
|
32
|
-
return this._config.loadMessageTemplates(query);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
if (this._config.deleteMessageTemplate) {
|
|
36
|
-
this.config.rowActions = [
|
|
37
|
-
{
|
|
38
|
-
click: data => {
|
|
39
|
-
return this._config.deleteMessageTemplate(data);
|
|
40
|
-
},
|
|
41
|
-
remove: {
|
|
42
|
-
title: 'Confirm',
|
|
43
|
-
template: 'Are you sure you would like to delete this template?',
|
|
44
|
-
},
|
|
45
|
-
menu: true,
|
|
46
|
-
label: 'Delete',
|
|
47
|
-
},
|
|
48
|
-
];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
open(messageTemplate) {
|
|
52
|
-
const dialogRef = this._dialog.open(TemplateComponent, {
|
|
53
|
-
data: {
|
|
54
|
-
messageTemplate,
|
|
55
|
-
},
|
|
56
|
-
width: '85%',
|
|
57
|
-
});
|
|
58
|
-
dialogRef.afterClosed()
|
|
59
|
-
.pipe(takeUntil(this._destroy$))
|
|
60
|
-
.subscribe(() => {
|
|
61
|
-
this.list.reload();
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
ngOnDestroy() {
|
|
65
|
-
this._destroy$.next();
|
|
66
|
-
this._destroy$.complete();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
TemplatesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
70
|
-
TemplatesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
72
|
-
type: Component,
|
|
73
|
-
args: [{ selector: 'fs-app-message-templates', template: "<fs-list [config]=\"config\">\n <fs-list-column title=\"Name\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n </ng-template>\n </fs-list-column>\n</fs-list>" }]
|
|
74
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
75
|
-
type: Inject,
|
|
76
|
-
args: [FS_APP_MESSAGE_CONFIG]
|
|
77
|
-
}] }, { type: i1.MatDialog }]; }, propDecorators: { list: [{
|
|
78
|
-
type: ViewChild,
|
|
79
|
-
args: [FsListComponent, { static: true }]
|
|
80
|
-
}] } });
|
|
1
|
+
import { Component, ViewChild, Inject } from '@angular/core';
|
|
2
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
3
|
+
import { FsListComponent } from '@firestitch/list';
|
|
4
|
+
import { takeUntil } from 'rxjs/operators';
|
|
5
|
+
import { Subject } from 'rxjs';
|
|
6
|
+
import { TemplateComponent } from '../template';
|
|
7
|
+
import { FS_APP_MESSAGE_CONFIG } from '../../../app-message/injectors';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@angular/material/dialog";
|
|
10
|
+
import * as i2 from "@firestitch/list";
|
|
11
|
+
export class TemplatesComponent {
|
|
12
|
+
constructor(_config, _dialog) {
|
|
13
|
+
this._config = _config;
|
|
14
|
+
this._dialog = _dialog;
|
|
15
|
+
this.list = null;
|
|
16
|
+
this.config = null;
|
|
17
|
+
this.messageQueueStates = [];
|
|
18
|
+
this._destroy$ = new Subject();
|
|
19
|
+
}
|
|
20
|
+
ngOnInit() {
|
|
21
|
+
this.config = {
|
|
22
|
+
actions: [
|
|
23
|
+
{
|
|
24
|
+
label: 'Create',
|
|
25
|
+
click: () => {
|
|
26
|
+
this.open({});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
status: false,
|
|
31
|
+
fetch: query => {
|
|
32
|
+
return this._config.loadMessageTemplates(query);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
if (this._config.deleteMessageTemplate) {
|
|
36
|
+
this.config.rowActions = [
|
|
37
|
+
{
|
|
38
|
+
click: data => {
|
|
39
|
+
return this._config.deleteMessageTemplate(data);
|
|
40
|
+
},
|
|
41
|
+
remove: {
|
|
42
|
+
title: 'Confirm',
|
|
43
|
+
template: 'Are you sure you would like to delete this template?',
|
|
44
|
+
},
|
|
45
|
+
menu: true,
|
|
46
|
+
label: 'Delete',
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
open(messageTemplate) {
|
|
52
|
+
const dialogRef = this._dialog.open(TemplateComponent, {
|
|
53
|
+
data: {
|
|
54
|
+
messageTemplate,
|
|
55
|
+
},
|
|
56
|
+
width: '85%',
|
|
57
|
+
});
|
|
58
|
+
dialogRef.afterClosed()
|
|
59
|
+
.pipe(takeUntil(this._destroy$))
|
|
60
|
+
.subscribe(() => {
|
|
61
|
+
this.list.reload();
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
ngOnDestroy() {
|
|
65
|
+
this._destroy$.next();
|
|
66
|
+
this._destroy$.complete();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
TemplatesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TemplatesComponent, deps: [{ token: FS_APP_MESSAGE_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
70
|
+
TemplatesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TemplatesComponent, selector: "fs-app-message-templates", viewQueries: [{ propertyName: "list", first: true, predicate: FsListComponent, descendants: true, static: true }], ngImport: i0, template: "<fs-list [config]=\"config\">\n <fs-list-column title=\"Name\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n </ng-template>\n </fs-list-column>\n</fs-list>", dependencies: [{ kind: "component", type: i2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { kind: "directive", type: i2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TemplatesComponent, decorators: [{
|
|
72
|
+
type: Component,
|
|
73
|
+
args: [{ selector: 'fs-app-message-templates', template: "<fs-list [config]=\"config\">\n <fs-list-column title=\"Name\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n </ng-template>\n </fs-list-column>\n</fs-list>" }]
|
|
74
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
75
|
+
type: Inject,
|
|
76
|
+
args: [FS_APP_MESSAGE_CONFIG]
|
|
77
|
+
}] }, { type: i1.MatDialog }]; }, propDecorators: { list: [{
|
|
78
|
+
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BfZGlhbG9nOiBNYXREaWFsb2csXG4gICkgeyB9XG5cbiAgcHVibGljIG5nT25Jbml0KCk6IHZvaWQge1xuICAgIHRoaXMuY29uZmlnID0ge1xuICAgICAgYWN0aW9uczogW1xuICAgICAgICB7XG4gICAgICAgICAgbGFiZWw6ICdDcmVhdGUnLFxuICAgICAgICAgIGNsaWNrOiAoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLm9wZW4oe30pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgXSxcbiAgICAgIHN0YXR1czogZmFsc2UsXG4gICAgICBmZXRjaDogcXVlcnkgPT4ge1xuICAgICAgICByZXR1cm4gdGhpcy5fY29uZmlnLmxvYWRNZXNzYWdlVGVtcGxhdGVzKHF1ZXJ5KTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAodGhpcy5fY29uZmlnLmRlbGV0ZU1lc3NhZ2VUZW1wbGF0ZSkge1xuICAgICAgdGhpcy5jb25maWcucm93QWN0aW9ucyA9IFtcbiAgICAgICAge1xuICAgICAgICAgIGNsaWNrOiBkYXRhID0+IHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jb25maWcuZGVsZXRlTWVzc2FnZVRlbXBsYXRlKGRhdGEpO1xuICAgICAgICAgIH0sXG4gICAgICAgICAgcmVtb3ZlOiB7XG4gICAgICAgICAgICB0aXRsZTogJ0NvbmZpcm0nLFxuICAgICAgICAgICAgdGVtcGxhdGU6ICdBcmUgeW91IHN1cmUgeW91IHdvdWxkIGxpa2UgdG8gZGVsZXRlIHRoaXMgdGVtcGxhdGU/JyxcbiAgICAgICAgICB9LFxuICAgICAgICAgIG1lbnU6IHRydWUsXG4gICAgICAgICAgbGFiZWw6ICdEZWxldGUnLFxuICAgICAgICB9LFxuICAgICAgXTtcbiAgICB9XG4gIH1cblxuICBwdWJsaWMgb3BlbihtZXNzYWdlVGVtcGxhdGUpOiB2b2lkIHtcbiAgICBjb25zdCBkaWFsb2dSZWYgPSB0aGlzLl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