@masterteam/system-settings 0.0.23 → 0.0.24
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/assets/i18n/ar.json +67 -7
- package/assets/i18n/en.json +72 -12
- package/assets/system-settings.css +1 -1
- package/fesm2022/{masterteam-system-settings-email-delivery-shell-D9NShoTc.mjs → masterteam-system-settings-email-delivery-shell-DhJ_GMml.mjs} +53 -16
- package/fesm2022/{masterteam-system-settings-email-delivery-shell-D9NShoTc.mjs.map → masterteam-system-settings-email-delivery-shell-DhJ_GMml.mjs.map} +1 -1
- package/fesm2022/{masterteam-system-settings-masterteam-system-settings-C51hZw-Q.mjs → masterteam-system-settings-masterteam-system-settings-KfJrvCL9.mjs} +456 -33
- package/fesm2022/masterteam-system-settings-masterteam-system-settings-KfJrvCL9.mjs.map +1 -0
- package/fesm2022/masterteam-system-settings.mjs +1 -1
- package/package.json +1 -1
- package/types/masterteam-system-settings.d.ts +167 -5
- package/fesm2022/masterteam-system-settings-masterteam-system-settings-C51hZw-Q.mjs.map +0 -1
|
@@ -8,7 +8,7 @@ import { EmptyState } from '@masterteam/components/empty-state';
|
|
|
8
8
|
import { Page } from '@masterteam/components/page';
|
|
9
9
|
import { ToastService } from '@masterteam/components/toast';
|
|
10
10
|
import { Tooltip } from '@masterteam/components/tooltip';
|
|
11
|
-
import { E as EmailDeliveryFacade, i as isConnectionTestAttempt, a as EmailDeliveryStatus, g as getEmailDeliveryStatusMap, b as EMAIL_DELIVERY_ATTEMPT_STATUSES, c as createEmailTestRequestId, d as areEmailTestRecipientsValid, p as parseEmailTestRecipients, e as isEmailTestRequestPending, f as EMAIL_DELIVERY_PERMISSIONS, h as EmailLayoutFacade, j as
|
|
11
|
+
import { E as EmailDeliveryFacade, i as isConnectionTestAttempt, a as EmailDeliveryStatus, g as getEmailDeliveryStatusMap, b as EMAIL_DELIVERY_ATTEMPT_STATUSES, c as createEmailTestRequestId, d as areEmailTestRecipientsValid, p as parseEmailTestRecipients, e as isEmailTestRequestPending, f as EMAIL_DELIVERY_PERMISSIONS, h as EmailLayoutFacade, j as emailStylesKey, k as EMAIL_LAYOUT_CONTENT_SLOT, l as EMAIL_LAYOUT_MAX_BYTES, r as readLayoutErrorDiagnostics, m as EmailVisualEditor, n as EmailContentStylesEditor, o as EmailHtmlPreview } from './masterteam-system-settings-masterteam-system-settings-KfJrvCL9.mjs';
|
|
12
12
|
import { Icon } from '@masterteam/icons';
|
|
13
13
|
import { Button } from '@masterteam/components/button';
|
|
14
14
|
import { ModalService } from '@masterteam/components/modal';
|
|
@@ -27,6 +27,7 @@ import { DynamicForm } from '@masterteam/forms/dynamic-form';
|
|
|
27
27
|
import { Menu } from '@masterteam/components/menu';
|
|
28
28
|
import * as i1$1 from 'primeng/skeleton';
|
|
29
29
|
import { SkeletonModule, Skeleton } from 'primeng/skeleton';
|
|
30
|
+
import { Tabs } from '@masterteam/components/tabs';
|
|
30
31
|
|
|
31
32
|
class EmailOperatorReasonDialog {
|
|
32
33
|
itemName = input.required(...(ngDevMode ? [{ debugName: "itemName" }] : /* istanbul ignore next */ []));
|
|
@@ -2077,6 +2078,29 @@ class EmailDeliveryDesign {
|
|
|
2077
2078
|
sourceControl = new FormControl('', { nonNullable: true });
|
|
2078
2079
|
narrow = new FormControl(false, { nonNullable: true });
|
|
2079
2080
|
narrowValue = signal(false, ...(ngDevMode ? [{ debugName: "narrowValue" }] : /* istanbul ignore next */ []));
|
|
2081
|
+
lang = signal(this.transloco.getActiveLang(), ...(ngDevMode ? [{ debugName: "lang" }] : /* istanbul ignore next */ []));
|
|
2082
|
+
editorTab = signal('design', ...(ngDevMode ? [{ debugName: "editorTab" }] : /* istanbul ignore next */ []));
|
|
2083
|
+
editorTabs = computed(() => {
|
|
2084
|
+
this.lang();
|
|
2085
|
+
return [
|
|
2086
|
+
{
|
|
2087
|
+
label: this.t('tabs.design'),
|
|
2088
|
+
value: 'design',
|
|
2089
|
+
icon: 'editor.pencil-01',
|
|
2090
|
+
},
|
|
2091
|
+
{ label: this.t('tabs.styles'), value: 'styles', icon: 'editor.palette' },
|
|
2092
|
+
];
|
|
2093
|
+
}, ...(ngDevMode ? [{ debugName: "editorTabs" }] : /* istanbul ignore next */ []));
|
|
2094
|
+
/** The design being edited, keyed so a preview can tell if it is current. */
|
|
2095
|
+
designDraft = computed(() => {
|
|
2096
|
+
const body = this.facade.draft();
|
|
2097
|
+
const styles = this.facade.stylesDraft();
|
|
2098
|
+
return {
|
|
2099
|
+
body,
|
|
2100
|
+
styles,
|
|
2101
|
+
key: JSON.stringify([body, emailStylesKey(styles)]),
|
|
2102
|
+
};
|
|
2103
|
+
}, ...(ngDevMode ? [{ debugName: "designDraft" }] : /* istanbul ignore next */ []));
|
|
2080
2104
|
preview = signal({ status: 'idle' }, ...(ngDevMode ? [{ debugName: "preview" }] : /* istanbul ignore next */ []));
|
|
2081
2105
|
/** Last successful render — kept on screen (dimmed) while the next one runs. */
|
|
2082
2106
|
rendered = signal(null, ...(ngDevMode ? [{ debugName: "rendered" }] : /* istanbul ignore next */ []));
|
|
@@ -2095,10 +2119,10 @@ class EmailDeliveryDesign {
|
|
|
2095
2119
|
overLimit = computed(() => this.byteSize() > EMAIL_LAYOUT_MAX_BYTES, ...(ngDevMode ? [{ debugName: "overLimit" }] : /* istanbul ignore next */ []));
|
|
2096
2120
|
/** The size only matters, and is only shown, close to the limit. */
|
|
2097
2121
|
nearLimit = computed(() => this.byteSize() >= EMAIL_LAYOUT_MAX_BYTES * 0.8, ...(ngDevMode ? [{ debugName: "nearLimit" }] : /* istanbul ignore next */ []));
|
|
2098
|
-
/** A preview only counts while it was rendered from exactly the current
|
|
2122
|
+
/** A preview only counts while it was rendered from exactly the current HTML and styles. */
|
|
2099
2123
|
freshPreview = computed(() => {
|
|
2100
2124
|
const state = this.preview();
|
|
2101
|
-
return state.status === 'ready' && state.
|
|
2125
|
+
return state.status === 'ready' && state.key === this.designDraft().key
|
|
2102
2126
|
? state.result
|
|
2103
2127
|
: null;
|
|
2104
2128
|
}, ...(ngDevMode ? [{ debugName: "freshPreview" }] : /* istanbul ignore next */ []));
|
|
@@ -2151,18 +2175,22 @@ class EmailDeliveryDesign {
|
|
|
2151
2175
|
this.narrow.valueChanges
|
|
2152
2176
|
.pipe(takeUntilDestroyed())
|
|
2153
2177
|
.subscribe((value) => this.narrowValue.set(value));
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2178
|
+
this.transloco.langChanges$
|
|
2179
|
+
.pipe(takeUntilDestroyed())
|
|
2180
|
+
.subscribe((lang) => this.lang.set(lang));
|
|
2181
|
+
// One preview stream per editor: a pause in editing the HTML or the styles
|
|
2182
|
+
// cancels the previous request and renders the current design; Retry
|
|
2183
|
+
// re-renders the same design.
|
|
2184
|
+
const draft$ = toObservable(this.designDraft);
|
|
2185
|
+
merge(draft$.pipe(debounceTime(500), distinctUntilChanged((left, right) => left.key === right.key)), this.retry$.pipe(map(() => this.designDraft())))
|
|
2186
|
+
.pipe(switchMap(({ body, styles, key }) => {
|
|
2159
2187
|
if (!this.facade.snapshot())
|
|
2160
2188
|
return of({ status: 'idle' });
|
|
2161
|
-
return this.facade.preview(body).pipe(map((result) => ({ status: 'ready',
|
|
2189
|
+
return this.facade.preview(body, styles).pipe(map((result) => ({ status: 'ready', key, result })), catchError((error) => of({
|
|
2162
2190
|
status: 'error',
|
|
2163
|
-
|
|
2191
|
+
key,
|
|
2164
2192
|
code: this.facade.readErrorCode(error),
|
|
2165
|
-
})), startWith({ status: 'updating',
|
|
2193
|
+
})), startWith({ status: 'updating', key }));
|
|
2166
2194
|
}), takeUntilDestroyed())
|
|
2167
2195
|
.subscribe((state) => {
|
|
2168
2196
|
this.preview.set(state);
|
|
@@ -2194,6 +2222,13 @@ class EmailDeliveryDesign {
|
|
|
2194
2222
|
error: () => undefined,
|
|
2195
2223
|
});
|
|
2196
2224
|
}
|
|
2225
|
+
onEditorTab(tab) {
|
|
2226
|
+
if (tab === 'design' || tab === 'styles')
|
|
2227
|
+
this.editorTab.set(tab);
|
|
2228
|
+
}
|
|
2229
|
+
onStylesChange(styles) {
|
|
2230
|
+
this.facade.stylesDraft.set(styles);
|
|
2231
|
+
}
|
|
2197
2232
|
retryPreview() {
|
|
2198
2233
|
this.retry$.next();
|
|
2199
2234
|
}
|
|
@@ -2275,7 +2310,7 @@ class EmailDeliveryDesign {
|
|
|
2275
2310
|
return this.transloco.translate(`email-delivery.design.${key}`);
|
|
2276
2311
|
}
|
|
2277
2312
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailDeliveryDesign, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2278
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmailDeliveryDesign, isStandalone: true, selector: "mt-email-delivery-design", host: { listeners: { "window:beforeunload": "onBeforeUnload($event)" } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design'\">\n @if (facade.loading() && !facade.snapshot()) {\n <div class=\"grid grid-cols-1 gap-4 xl:grid-cols-2\" aria-live=\"polite\">\n <p-skeleton width=\"100%\" height=\"32rem\" borderRadius=\"0.375rem\" />\n <p-skeleton width=\"100%\" height=\"32rem\" borderRadius=\"0.375rem\" />\n </div>\n } @else if (facade.loadFailed() && !facade.snapshot()) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('load-error-title')\"\n [description]=\"describeCode(facade.loadErrorCode())\"\n [actionLabel]=\"t('actions.retry')\"\n actionIcon=\"arrow.refresh-cw-01\"\n (actionClick)=\"reload()\"\n />\n } @else if (facade.snapshot(); as snapshot) {\n <div class=\"flex min-w-0 flex-col gap-4\">\n <!-- Status and actions -->\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-surface bg-content px-4 py-3\"\n >\n <div class=\"flex min-w-0 flex-wrap items-center gap-2 text-sm\">\n <span\n class=\"rounded-md border border-surface bg-surface-50 px-2 py-0.5 font-medium\"\n >\n {{ t(\"source.\" + snapshot.source) }}\n @if (snapshot.revision > 0) {\n \u00B7 {{ t(\"revision\", { revision: snapshot.revision }) }}\n }\n </span>\n @if (facade.dirty()) {\n <span\n class=\"rounded-md border border-amber-200 bg-amber-50 px-2 py-0.5 font-medium text-amber-700\"\n >\n {{ t(\"unsaved\") }}\n </span>\n }\n </div>\n <div class=\"flex flex-wrap items-center gap-2\">\n @if (snapshot.canRestore) {\n <mt-button\n icon=\"arrow.refresh-cw-01\"\n [label]=\"t('actions.restore')\"\n severity=\"secondary\"\n variant=\"outlined\"\n [loading]=\"facade.saving() === 'restore'\"\n [disabled]=\"facade.saving() !== null\"\n (onClick)=\"restorePrevious()\"\n />\n }\n <mt-button\n [label]=\"t('actions.discard')\"\n severity=\"secondary\"\n variant=\"text\"\n [disabled]=\"!facade.dirty() || facade.saving() !== null\"\n (onClick)=\"discard()\"\n />\n <mt-button\n icon=\"general.check\"\n [label]=\"t('actions.publish')\"\n [tooltip]=\"publishBlockedReason()\"\n [loading]=\"facade.saving() === 'publish'\"\n [disabled]=\"!canPublish()\"\n (onClick)=\"publish()\"\n />\n </div>\n </div>\n\n @if (facade.conflict() || baselineMoved()) {\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700\"\n role=\"alert\"\n >\n <span>{{ t(\"conflict\") }}</span>\n <div class=\"flex flex-wrap gap-2\">\n <mt-button\n [label]=\"t('actions.keep-mine')\"\n size=\"small\"\n severity=\"secondary\"\n variant=\"outlined\"\n (onClick)=\"resolveConflict(true)\"\n />\n <mt-button\n [label]=\"t('actions.load-latest')\"\n size=\"small\"\n severity=\"secondary\"\n (onClick)=\"resolveConflict(false)\"\n />\n </div>\n </div>\n }\n\n @if (blockingDiagnostics().length > 0) {\n <div\n class=\"rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\n role=\"alert\"\n >\n <p class=\"font-medium\">{{ t(\"blocked\") }}</p>\n <ul class=\"mt-1 list-disc ps-5\">\n @for (diagnostic of blockingDiagnostics(); track $index) {\n <li>{{ describeDiagnostic(diagnostic) }}</li>\n }\n </ul>\n </div>\n }\n\n @if (writeDiagnostics().length > 0) {\n <div\n class=\"rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\n role=\"alert\"\n >\n <ul class=\"list-disc ps-5\">\n @for (diagnostic of writeDiagnostics(); track $index) {\n <li>{{ describeDiagnostic(diagnostic) }}</li>\n }\n </ul>\n </div>\n }\n\n <div class=\"grid min-w-0 grid-cols-1 gap-4 xl:grid-cols-2\">\n <!-- HTML source -->\n <section\n class=\"flex min-w-0 flex-col overflow-hidden rounded-md border border-surface bg-content\"\n >\n <header\n class=\"flex items-center justify-between gap-2 border-b border-surface bg-surface-50 px-4 py-2.5\"\n >\n <h3 class=\"text-sm font-semibold\">{{ t(\"source-title\") }}</h3>\n @if (nearLimit()) {\n <span\n class=\"text-xs\"\n [class.text-red-600]=\"overLimit()\"\n [class.text-amber-700]=\"!overLimit()\"\n >{{ sizeLabel() }}</span\n >\n }\n </header>\n <div class=\"flex flex-col gap-2 p-4\">\n <mt-email-visual-editor\n [formControl]=\"sourceControl\"\n [label]=\"t('source-label')\"\n [hint]=\"t('source-hint')\"\n [layout]=\"true\"\n [approvedImageOrigins]=\"snapshot.approvedImageOrigins\"\n height=\"34rem\"\n />\n @if (slotCount() !== 1) {\n <p class=\"text-sm text-red-600\" role=\"alert\">\n {{ t(slotCount() === 0 ? \"slot-missing\" : \"slot-duplicate\") }}\n </p>\n }\n </div>\n </section>\n\n <!-- Live preview -->\n <section\n class=\"flex min-w-0 flex-col overflow-hidden rounded-md border border-surface bg-content\"\n >\n <header\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface bg-surface-50 px-4 py-2.5\"\n >\n <div class=\"flex items-center gap-2\">\n <h3 class=\"text-sm font-semibold\">{{ t(\"preview-title\") }}</h3>\n <span class=\"text-xs text-muted-color\" aria-live=\"polite\">{{\n preview().status === \"updating\" ? t(\"preview-updating\") : \"\"\n }}</span>\n </div>\n <mt-toggle-field [formControl]=\"narrow\" [label]=\"t('narrow')\" />\n </header>\n <div class=\"flex flex-col gap-3 p-4\">\n @if (preview().status === \"error\") {\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\n role=\"alert\"\n >\n <span>{{ describeCode(previewErrorCode()) }}</span>\n <mt-button\n [label]=\"t('actions.retry')\"\n size=\"small\"\n severity=\"secondary\"\n variant=\"outlined\"\n (onClick)=\"retryPreview()\"\n />\n </div>\n }\n <!-- 39rem = the editor frame (34rem) plus its label and toolbar, so\n both columns end level. -->\n @if (rendered(); as rendered) {\n <div\n class=\"mx-auto w-full overflow-hidden rounded-md border border-surface transition-opacity\"\n [class.max-w-[375px]]=\"narrowValue()\"\n [class.opacity-60]=\"!freshPreview()\"\n >\n <mt-email-html-preview\n [html]=\"rendered.html\"\n [showImages]=\"true\"\n [approvedImageOrigins]=\"rendered.approvedImageOrigins\"\n [title]=\"t('preview-title')\"\n height=\"39rem\"\n />\n </div>\n @if (rendered.diagnostics.length > 0) {\n <ul class=\"list-disc ps-5 text-sm text-amber-700\">\n @for (diagnostic of rendered.diagnostics; track $index) {\n <li>{{ describeDiagnostic(diagnostic) }}</li>\n }\n </ul>\n }\n } @else if (preview().status !== \"error\") {\n <p-skeleton width=\"100%\" height=\"39rem\" borderRadius=\"0.375rem\" />\n }\n </div>\n </section>\n </div>\n </div>\n }\n</ng-container>\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "component", type: EmailVisualEditor, selector: "mt-email-visual-editor", inputs: ["label", "hint", "placeholders", "layout", "height", "direction", "starter", "approvedImageOrigins"], outputs: ["focused"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: EmailHtmlPreview, selector: "mt-email-html-preview", inputs: ["html", "showImages", "approvedImageOrigins", "fragment", "direction", "title", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2313
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmailDeliveryDesign, isStandalone: true, selector: "mt-email-delivery-design", host: { listeners: { "window:beforeunload": "onBeforeUnload($event)" } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design'\">\r\n @if (facade.loading() && !facade.snapshot()) {\r\n <div class=\"grid grid-cols-1 gap-4 xl:grid-cols-2\" aria-live=\"polite\">\r\n <p-skeleton width=\"100%\" height=\"32rem\" borderRadius=\"0.375rem\" />\r\n <p-skeleton width=\"100%\" height=\"32rem\" borderRadius=\"0.375rem\" />\r\n </div>\r\n } @else if (facade.loadFailed() && !facade.snapshot()) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('load-error-title')\"\r\n [description]=\"describeCode(facade.loadErrorCode())\"\r\n [actionLabel]=\"t('actions.retry')\"\r\n actionIcon=\"arrow.refresh-cw-01\"\r\n (actionClick)=\"reload()\"\r\n />\r\n } @else if (facade.snapshot(); as snapshot) {\r\n <div class=\"flex min-w-0 flex-col gap-4\">\r\n <!-- Status and actions -->\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-surface bg-content px-4 py-3\"\r\n >\r\n <div class=\"flex min-w-0 flex-wrap items-center gap-2 text-sm\">\r\n <span\r\n class=\"rounded-md border border-surface bg-surface-50 px-2 py-0.5 font-medium\"\r\n >\r\n {{ t(\"source.\" + snapshot.source) }}\r\n @if (snapshot.revision > 0) {\r\n \u00B7 {{ t(\"revision\", { revision: snapshot.revision }) }}\r\n }\r\n </span>\r\n @if (facade.dirty()) {\r\n <span\r\n class=\"rounded-md border border-amber-200 bg-amber-50 px-2 py-0.5 font-medium text-amber-700\"\r\n >\r\n {{ t(\"unsaved\") }}\r\n </span>\r\n }\r\n </div>\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @if (snapshot.canRestore) {\r\n <mt-button\r\n icon=\"arrow.refresh-cw-01\"\r\n [label]=\"t('actions.restore')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n [loading]=\"facade.saving() === 'restore'\"\r\n [disabled]=\"facade.saving() !== null\"\r\n (onClick)=\"restorePrevious()\"\r\n />\r\n }\r\n <mt-button\r\n [label]=\"t('actions.discard')\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n [disabled]=\"!facade.dirty() || facade.saving() !== null\"\r\n (onClick)=\"discard()\"\r\n />\r\n <mt-button\r\n icon=\"general.check\"\r\n [label]=\"t('actions.publish')\"\r\n [tooltip]=\"publishBlockedReason()\"\r\n [loading]=\"facade.saving() === 'publish'\"\r\n [disabled]=\"!canPublish()\"\r\n (onClick)=\"publish()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (facade.conflict() || baselineMoved()) {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n <span>{{ t(\"conflict\") }}</span>\r\n <div class=\"flex flex-wrap gap-2\">\r\n <mt-button\r\n [label]=\"t('actions.keep-mine')\"\r\n size=\"small\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n (onClick)=\"resolveConflict(true)\"\r\n />\r\n <mt-button\r\n [label]=\"t('actions.load-latest')\"\r\n size=\"small\"\r\n severity=\"secondary\"\r\n (onClick)=\"resolveConflict(false)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (blockingDiagnostics().length > 0) {\r\n <div\r\n class=\"rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n <p class=\"font-medium\">{{ t(\"blocked\") }}</p>\r\n <ul class=\"mt-1 list-disc ps-5\">\r\n @for (diagnostic of blockingDiagnostics(); track $index) {\r\n <li>{{ describeDiagnostic(diagnostic) }}</li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n\r\n @if (writeDiagnostics().length > 0) {\r\n <div\r\n class=\"rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n <ul class=\"list-disc ps-5\">\r\n @for (diagnostic of writeDiagnostics(); track $index) {\r\n <li>{{ describeDiagnostic(diagnostic) }}</li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n\r\n <div class=\"grid min-w-0 grid-cols-1 gap-4 xl:grid-cols-2\">\r\n <!-- HTML source -->\r\n <section\r\n class=\"flex min-w-0 flex-col overflow-hidden rounded-md border border-surface bg-content\"\r\n >\r\n <header\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface bg-surface-50 px-4 py-2\"\r\n >\r\n <mt-tabs\r\n size=\"small\"\r\n [options]=\"editorTabs()\"\r\n [active]=\"editorTab()\"\r\n (activeChange)=\"onEditorTab($event)\"\r\n />\r\n @if (nearLimit()) {\r\n <span\r\n class=\"text-xs\"\r\n [class.text-red-600]=\"overLimit()\"\r\n [class.text-amber-700]=\"!overLimit()\"\r\n >{{ sizeLabel() }}</span\r\n >\r\n }\r\n </header>\r\n <div class=\"flex flex-col gap-2 p-4\">\r\n <!-- The HTML editor stays mounted so switching tabs keeps its state. -->\r\n <div [class.hidden]=\"editorTab() !== 'design'\">\r\n <mt-email-visual-editor\r\n [formControl]=\"sourceControl\"\r\n [label]=\"t('source-label')\"\r\n [hint]=\"t('source-hint')\"\r\n [layout]=\"true\"\r\n [approvedImageOrigins]=\"snapshot.approvedImageOrigins\"\r\n height=\"34rem\"\r\n />\r\n </div>\r\n @if (editorTab() === \"styles\") {\r\n <div class=\"h-[39rem] overflow-y-auto pe-1\">\r\n <mt-email-content-styles\r\n [styles]=\"facade.stylesDraft()\"\r\n [disabled]=\"facade.saving() !== null\"\r\n (stylesChange)=\"onStylesChange($event)\"\r\n />\r\n </div>\r\n }\r\n @if (slotCount() !== 1) {\r\n <p class=\"text-sm text-red-600\" role=\"alert\">\r\n {{ t(slotCount() === 0 ? \"slot-missing\" : \"slot-duplicate\") }}\r\n </p>\r\n }\r\n </div>\r\n </section>\r\n\r\n <!-- Live preview -->\r\n <section\r\n class=\"flex min-w-0 flex-col overflow-hidden rounded-md border border-surface bg-content\"\r\n >\r\n <header\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface bg-surface-50 px-4 py-2.5\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <h3 class=\"text-sm font-semibold\">{{ t(\"preview-title\") }}</h3>\r\n <span class=\"text-xs text-muted-color\" aria-live=\"polite\">{{\r\n preview().status === \"updating\" ? t(\"preview-updating\") : \"\"\r\n }}</span>\r\n </div>\r\n <mt-toggle-field [formControl]=\"narrow\" [label]=\"t('narrow')\" />\r\n </header>\r\n <div class=\"flex flex-col gap-3 p-4\">\r\n @if (preview().status === \"error\") {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n <span>{{ describeCode(previewErrorCode()) }}</span>\r\n <mt-button\r\n [label]=\"t('actions.retry')\"\r\n size=\"small\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n (onClick)=\"retryPreview()\"\r\n />\r\n </div>\r\n }\r\n <!-- 39rem = the editor frame (34rem) plus its label and toolbar, so\r\n both columns end level. -->\r\n @if (rendered(); as rendered) {\r\n <div\r\n class=\"mx-auto w-full overflow-hidden rounded-md border border-surface transition-opacity\"\r\n [class.max-w-[375px]]=\"narrowValue()\"\r\n [class.opacity-60]=\"!freshPreview()\"\r\n >\r\n <mt-email-html-preview\r\n [html]=\"rendered.html\"\r\n [showImages]=\"true\"\r\n [approvedImageOrigins]=\"rendered.approvedImageOrigins\"\r\n [title]=\"t('preview-title')\"\r\n height=\"39rem\"\r\n />\r\n </div>\r\n @if (rendered.diagnostics.length > 0) {\r\n <ul class=\"list-disc ps-5 text-sm text-amber-700\">\r\n @for (diagnostic of rendered.diagnostics; track $index) {\r\n <li>{{ describeDiagnostic(diagnostic) }}</li>\r\n }\r\n </ul>\r\n }\r\n } @else if (preview().status !== \"error\") {\r\n <p-skeleton width=\"100%\" height=\"39rem\" borderRadius=\"0.375rem\" />\r\n }\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n }\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "component", type: EmailVisualEditor, selector: "mt-email-visual-editor", inputs: ["label", "hint", "placeholders", "layout", "height", "direction", "starter", "approvedImageOrigins"], outputs: ["focused"] }, { kind: "component", type: EmailContentStylesEditor, selector: "mt-email-content-styles", inputs: ["styles", "disabled"], outputs: ["stylesChange"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "mode", "moreLabel", "defaultIcon", "size", "fluid", "disabled", "searchThreshold"], outputs: ["activeChange", "onChange"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: EmailHtmlPreview, selector: "mt-email-html-preview", inputs: ["html", "showImages", "approvedImageOrigins", "fragment", "direction", "title", "height"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2279
2314
|
}
|
|
2280
2315
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailDeliveryDesign, decorators: [{
|
|
2281
2316
|
type: Component,
|
|
@@ -2285,10 +2320,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
2285
2320
|
Button,
|
|
2286
2321
|
EmptyState,
|
|
2287
2322
|
EmailVisualEditor,
|
|
2323
|
+
EmailContentStylesEditor,
|
|
2324
|
+
Tabs,
|
|
2288
2325
|
ToggleField,
|
|
2289
2326
|
Skeleton,
|
|
2290
2327
|
EmailHtmlPreview,
|
|
2291
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design'\">\n @if (facade.loading() && !facade.snapshot()) {\n <div class=\"grid grid-cols-1 gap-4 xl:grid-cols-2\" aria-live=\"polite\">\n <p-skeleton width=\"100%\" height=\"32rem\" borderRadius=\"0.375rem\" />\n <p-skeleton width=\"100%\" height=\"32rem\" borderRadius=\"0.375rem\" />\n </div>\n } @else if (facade.loadFailed() && !facade.snapshot()) {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('load-error-title')\"\n [description]=\"describeCode(facade.loadErrorCode())\"\n [actionLabel]=\"t('actions.retry')\"\n actionIcon=\"arrow.refresh-cw-01\"\n (actionClick)=\"reload()\"\n />\n } @else if (facade.snapshot(); as snapshot) {\n <div class=\"flex min-w-0 flex-col gap-4\">\n <!-- Status and actions -->\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-surface bg-content px-4 py-3\"\n >\n <div class=\"flex min-w-0 flex-wrap items-center gap-2 text-sm\">\n <span\n class=\"rounded-md border border-surface bg-surface-50 px-2 py-0.5 font-medium\"\n >\n {{ t(\"source.\" + snapshot.source) }}\n @if (snapshot.revision > 0) {\n \u00B7 {{ t(\"revision\", { revision: snapshot.revision }) }}\n }\n </span>\n @if (facade.dirty()) {\n <span\n class=\"rounded-md border border-amber-200 bg-amber-50 px-2 py-0.5 font-medium text-amber-700\"\n >\n {{ t(\"unsaved\") }}\n </span>\n }\n </div>\n <div class=\"flex flex-wrap items-center gap-2\">\n @if (snapshot.canRestore) {\n <mt-button\n icon=\"arrow.refresh-cw-01\"\n [label]=\"t('actions.restore')\"\n severity=\"secondary\"\n variant=\"outlined\"\n [loading]=\"facade.saving() === 'restore'\"\n [disabled]=\"facade.saving() !== null\"\n (onClick)=\"restorePrevious()\"\n />\n }\n <mt-button\n [label]=\"t('actions.discard')\"\n severity=\"secondary\"\n variant=\"text\"\n [disabled]=\"!facade.dirty() || facade.saving() !== null\"\n (onClick)=\"discard()\"\n />\n <mt-button\n icon=\"general.check\"\n [label]=\"t('actions.publish')\"\n [tooltip]=\"publishBlockedReason()\"\n [loading]=\"facade.saving() === 'publish'\"\n [disabled]=\"!canPublish()\"\n (onClick)=\"publish()\"\n />\n </div>\n </div>\n\n @if (facade.conflict() || baselineMoved()) {\n <div\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700\"\n role=\"alert\"\n >\n <span>{{ t(\"conflict\") }}</span>\n <div class=\"flex flex-wrap gap-2\">\n <mt-button\n [label]=\"t('actions.keep-mine')\"\n size=\"small\"\n severity=\"secondary\"\n variant=\"outlined\"\n (onClick)=\"resolveConflict(true)\"\n />\n <mt-button\n [label]=\"t('actions.load-latest')\"\n size=\"small\"\n severity=\"secondary\"\n (onClick)=\"resolveConflict(false)\"\n />\n </div>\n </div>\n }\n\n @if (blockingDiagnostics().length > 0) {\n <div\n class=\"rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\n role=\"alert\"\n >\n <p class=\"font-medium\">{{ t(\"blocked\") }}</p>\n <ul class=\"mt-1 list-disc ps-5\">\n @for (diagnostic of blockingDiagnostics(); track $index) {\n <li>{{ describeDiagnostic(diagnostic) }}</li>\n }\n </ul>\n </div>\n }\n\n @if (writeDiagnostics().length > 0) {\n <div\n class=\"rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\n role=\"alert\"\n >\n <ul class=\"list-disc ps-5\">\n @for (diagnostic of writeDiagnostics(); track $index) {\n <li>{{ describeDiagnostic(diagnostic) }}</li>\n }\n </ul>\n </div>\n }\n\n <div class=\"grid min-w-0 grid-cols-1 gap-4 xl:grid-cols-2\">\n <!-- HTML source -->\n <section\n class=\"flex min-w-0 flex-col overflow-hidden rounded-md border border-surface bg-content\"\n >\n <header\n class=\"flex items-center justify-between gap-2 border-b border-surface bg-surface-50 px-4 py-2
|
|
2328
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design'\">\r\n @if (facade.loading() && !facade.snapshot()) {\r\n <div class=\"grid grid-cols-1 gap-4 xl:grid-cols-2\" aria-live=\"polite\">\r\n <p-skeleton width=\"100%\" height=\"32rem\" borderRadius=\"0.375rem\" />\r\n <p-skeleton width=\"100%\" height=\"32rem\" borderRadius=\"0.375rem\" />\r\n </div>\r\n } @else if (facade.loadFailed() && !facade.snapshot()) {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('load-error-title')\"\r\n [description]=\"describeCode(facade.loadErrorCode())\"\r\n [actionLabel]=\"t('actions.retry')\"\r\n actionIcon=\"arrow.refresh-cw-01\"\r\n (actionClick)=\"reload()\"\r\n />\r\n } @else if (facade.snapshot(); as snapshot) {\r\n <div class=\"flex min-w-0 flex-col gap-4\">\r\n <!-- Status and actions -->\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-surface bg-content px-4 py-3\"\r\n >\r\n <div class=\"flex min-w-0 flex-wrap items-center gap-2 text-sm\">\r\n <span\r\n class=\"rounded-md border border-surface bg-surface-50 px-2 py-0.5 font-medium\"\r\n >\r\n {{ t(\"source.\" + snapshot.source) }}\r\n @if (snapshot.revision > 0) {\r\n \u00B7 {{ t(\"revision\", { revision: snapshot.revision }) }}\r\n }\r\n </span>\r\n @if (facade.dirty()) {\r\n <span\r\n class=\"rounded-md border border-amber-200 bg-amber-50 px-2 py-0.5 font-medium text-amber-700\"\r\n >\r\n {{ t(\"unsaved\") }}\r\n </span>\r\n }\r\n </div>\r\n <div class=\"flex flex-wrap items-center gap-2\">\r\n @if (snapshot.canRestore) {\r\n <mt-button\r\n icon=\"arrow.refresh-cw-01\"\r\n [label]=\"t('actions.restore')\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n [loading]=\"facade.saving() === 'restore'\"\r\n [disabled]=\"facade.saving() !== null\"\r\n (onClick)=\"restorePrevious()\"\r\n />\r\n }\r\n <mt-button\r\n [label]=\"t('actions.discard')\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n [disabled]=\"!facade.dirty() || facade.saving() !== null\"\r\n (onClick)=\"discard()\"\r\n />\r\n <mt-button\r\n icon=\"general.check\"\r\n [label]=\"t('actions.publish')\"\r\n [tooltip]=\"publishBlockedReason()\"\r\n [loading]=\"facade.saving() === 'publish'\"\r\n [disabled]=\"!canPublish()\"\r\n (onClick)=\"publish()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (facade.conflict() || baselineMoved()) {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-700\"\r\n role=\"alert\"\r\n >\r\n <span>{{ t(\"conflict\") }}</span>\r\n <div class=\"flex flex-wrap gap-2\">\r\n <mt-button\r\n [label]=\"t('actions.keep-mine')\"\r\n size=\"small\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n (onClick)=\"resolveConflict(true)\"\r\n />\r\n <mt-button\r\n [label]=\"t('actions.load-latest')\"\r\n size=\"small\"\r\n severity=\"secondary\"\r\n (onClick)=\"resolveConflict(false)\"\r\n />\r\n </div>\r\n </div>\r\n }\r\n\r\n @if (blockingDiagnostics().length > 0) {\r\n <div\r\n class=\"rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n <p class=\"font-medium\">{{ t(\"blocked\") }}</p>\r\n <ul class=\"mt-1 list-disc ps-5\">\r\n @for (diagnostic of blockingDiagnostics(); track $index) {\r\n <li>{{ describeDiagnostic(diagnostic) }}</li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n\r\n @if (writeDiagnostics().length > 0) {\r\n <div\r\n class=\"rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n <ul class=\"list-disc ps-5\">\r\n @for (diagnostic of writeDiagnostics(); track $index) {\r\n <li>{{ describeDiagnostic(diagnostic) }}</li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n\r\n <div class=\"grid min-w-0 grid-cols-1 gap-4 xl:grid-cols-2\">\r\n <!-- HTML source -->\r\n <section\r\n class=\"flex min-w-0 flex-col overflow-hidden rounded-md border border-surface bg-content\"\r\n >\r\n <header\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface bg-surface-50 px-4 py-2\"\r\n >\r\n <mt-tabs\r\n size=\"small\"\r\n [options]=\"editorTabs()\"\r\n [active]=\"editorTab()\"\r\n (activeChange)=\"onEditorTab($event)\"\r\n />\r\n @if (nearLimit()) {\r\n <span\r\n class=\"text-xs\"\r\n [class.text-red-600]=\"overLimit()\"\r\n [class.text-amber-700]=\"!overLimit()\"\r\n >{{ sizeLabel() }}</span\r\n >\r\n }\r\n </header>\r\n <div class=\"flex flex-col gap-2 p-4\">\r\n <!-- The HTML editor stays mounted so switching tabs keeps its state. -->\r\n <div [class.hidden]=\"editorTab() !== 'design'\">\r\n <mt-email-visual-editor\r\n [formControl]=\"sourceControl\"\r\n [label]=\"t('source-label')\"\r\n [hint]=\"t('source-hint')\"\r\n [layout]=\"true\"\r\n [approvedImageOrigins]=\"snapshot.approvedImageOrigins\"\r\n height=\"34rem\"\r\n />\r\n </div>\r\n @if (editorTab() === \"styles\") {\r\n <div class=\"h-[39rem] overflow-y-auto pe-1\">\r\n <mt-email-content-styles\r\n [styles]=\"facade.stylesDraft()\"\r\n [disabled]=\"facade.saving() !== null\"\r\n (stylesChange)=\"onStylesChange($event)\"\r\n />\r\n </div>\r\n }\r\n @if (slotCount() !== 1) {\r\n <p class=\"text-sm text-red-600\" role=\"alert\">\r\n {{ t(slotCount() === 0 ? \"slot-missing\" : \"slot-duplicate\") }}\r\n </p>\r\n }\r\n </div>\r\n </section>\r\n\r\n <!-- Live preview -->\r\n <section\r\n class=\"flex min-w-0 flex-col overflow-hidden rounded-md border border-surface bg-content\"\r\n >\r\n <header\r\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-surface bg-surface-50 px-4 py-2.5\"\r\n >\r\n <div class=\"flex items-center gap-2\">\r\n <h3 class=\"text-sm font-semibold\">{{ t(\"preview-title\") }}</h3>\r\n <span class=\"text-xs text-muted-color\" aria-live=\"polite\">{{\r\n preview().status === \"updating\" ? t(\"preview-updating\") : \"\"\r\n }}</span>\r\n </div>\r\n <mt-toggle-field [formControl]=\"narrow\" [label]=\"t('narrow')\" />\r\n </header>\r\n <div class=\"flex flex-col gap-3 p-4\">\r\n @if (preview().status === \"error\") {\r\n <div\r\n class=\"flex flex-wrap items-center justify-between gap-3 rounded-md border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700\"\r\n role=\"alert\"\r\n >\r\n <span>{{ describeCode(previewErrorCode()) }}</span>\r\n <mt-button\r\n [label]=\"t('actions.retry')\"\r\n size=\"small\"\r\n severity=\"secondary\"\r\n variant=\"outlined\"\r\n (onClick)=\"retryPreview()\"\r\n />\r\n </div>\r\n }\r\n <!-- 39rem = the editor frame (34rem) plus its label and toolbar, so\r\n both columns end level. -->\r\n @if (rendered(); as rendered) {\r\n <div\r\n class=\"mx-auto w-full overflow-hidden rounded-md border border-surface transition-opacity\"\r\n [class.max-w-[375px]]=\"narrowValue()\"\r\n [class.opacity-60]=\"!freshPreview()\"\r\n >\r\n <mt-email-html-preview\r\n [html]=\"rendered.html\"\r\n [showImages]=\"true\"\r\n [approvedImageOrigins]=\"rendered.approvedImageOrigins\"\r\n [title]=\"t('preview-title')\"\r\n height=\"39rem\"\r\n />\r\n </div>\r\n @if (rendered.diagnostics.length > 0) {\r\n <ul class=\"list-disc ps-5 text-sm text-amber-700\">\r\n @for (diagnostic of rendered.diagnostics; track $index) {\r\n <li>{{ describeDiagnostic(diagnostic) }}</li>\r\n }\r\n </ul>\r\n }\r\n } @else if (preview().status !== \"error\") {\r\n <p-skeleton width=\"100%\" height=\"39rem\" borderRadius=\"0.375rem\" />\r\n }\r\n </div>\r\n </section>\r\n </div>\r\n </div>\r\n }\r\n</ng-container>\r\n" }]
|
|
2292
2329
|
}], ctorParameters: () => [], propDecorators: { onBeforeUnload: [{
|
|
2293
2330
|
type: HostListener,
|
|
2294
2331
|
args: ['window:beforeunload', ['$event']]
|
|
@@ -2431,7 +2468,7 @@ class EmailDeliveryShell {
|
|
|
2431
2468
|
return this.transloco.translate(`email-delivery.${key}`);
|
|
2432
2469
|
}
|
|
2433
2470
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailDeliveryShell, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2434
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmailDeliveryShell, isStandalone: true, selector: "mt-email-delivery-shell", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery'\">\n <mt-page\n [title]=\"t('title')\"\n avatarIcon=\"communication.mail-01\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-blue-100)',\n '--p-avatar-color': 'var(--p-blue-700)',\n }\"\n [tabs]=\"canView() ? tabs() : []\"\n [activeTab]=\"activeTab()\"\n contentClass=\"min-h-0 max-[1025px]:p-4 max-[640px]:p-3\"\n backButton\n (backButtonClick)=\"goBack()\"\n (tabChange)=\"onTabChange($event)\"\n >\n <!-- Declared unconditionally: a content query cannot reach a template that\n only exists inside a control-flow block, so the condition lives here. -->\n <ng-template #titleEnd>\n @if (canView() && readiness(); as state) {\n <span class=\"shrink-0\" [mtTooltip]=\"readinessHint()\">\n <mt-email-delivery-status kind=\"readiness\" [value]=\"state\" />\n </span>\n }\n </ng-template>\n\n @if (facade.permissionsLoading()) {\n <div class=\"p-6 text-sm text-muted-color\" aria-live=\"polite\">\n {{ t(\"access-checking\") }}\n </div>\n } @else if (canView()) {\n <div\n class=\"flex min-h-0 flex-col gap-4 [&_.mt-actions-column]:w-[5rem] [&_mt-card]:rounded-md [&_mt-table_:has(>.p-datatable)]:rounded-md\"\n >\n <mt-breadcrumb\n [items]=\"breadcrumbItems()\"\n styleClass=\"mx-1 flex justify-start\"\n />\n\n @if (activeTab() === \"activity\") {\n <mt-email-delivery-activity />\n } @else if (activeTab() === \"design\") {\n <mt-email-delivery-design />\n } @else {\n <mt-email-delivery-connections />\n }\n </div>\n } @else if (facade.permissionsError()) {\n <!-- A failed access read is not a denial; say so and offer the retry,\n otherwise a transient 500 reads as \"you do not have access\". -->\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('access-error-title')\"\n [description]=\"t('access-error-description')\"\n [actionLabel]=\"t('access-retry')\"\n actionIcon=\"arrow.refresh-cw-01\"\n (actionClick)=\"retryPermissions()\"\n />\n } @else {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('access-denied-title')\"\n [description]=\"t('access-denied-description')\"\n />\n }\n </mt-page>\n</ng-container>\n", dependencies: [{ kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Breadcrumb, selector: "mt-breadcrumb", inputs: ["items", "styleClass"], outputs: ["onItemClick"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: EmailDeliveryStatus, selector: "mt-email-delivery-status", inputs: ["value", "kind"] }, { kind: "component", type: EmailDeliveryConnections, selector: "mt-email-delivery-connections" }, { kind: "component", type: EmailDeliveryActivity, selector: "mt-email-delivery-activity" }, { kind: "component", type: EmailDeliveryDesign, selector: "mt-email-delivery-design" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2471
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmailDeliveryShell, isStandalone: true, selector: "mt-email-delivery-shell", ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery'\">\r\n <mt-page\r\n [title]=\"t('title')\"\r\n avatarIcon=\"communication.mail-01\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-blue-100)',\r\n '--p-avatar-color': 'var(--p-blue-700)',\r\n }\"\r\n [tabs]=\"canView() ? tabs() : []\"\r\n [activeTab]=\"activeTab()\"\r\n contentClass=\"min-h-0 max-[1025px]:p-4 max-[640px]:p-3\"\r\n backButton\r\n (backButtonClick)=\"goBack()\"\r\n (tabChange)=\"onTabChange($event)\"\r\n >\r\n <!-- Declared unconditionally: a content query cannot reach a template that\r\n only exists inside a control-flow block, so the condition lives here. -->\r\n <ng-template #titleEnd>\r\n @if (canView() && readiness(); as state) {\r\n <span class=\"shrink-0\" [mtTooltip]=\"readinessHint()\">\r\n <mt-email-delivery-status kind=\"readiness\" [value]=\"state\" />\r\n </span>\r\n }\r\n </ng-template>\r\n\r\n @if (facade.permissionsLoading()) {\r\n <div class=\"p-6 text-sm text-muted-color\" aria-live=\"polite\">\r\n {{ t(\"access-checking\") }}\r\n </div>\r\n } @else if (canView()) {\r\n <div\r\n class=\"flex min-h-0 flex-col gap-4 [&_.mt-actions-column]:w-[5rem] [&_mt-card]:rounded-md [&_mt-table_:has(>.p-datatable)]:rounded-md\"\r\n >\r\n <mt-breadcrumb\r\n [items]=\"breadcrumbItems()\"\r\n styleClass=\"mx-1 flex justify-start\"\r\n />\r\n\r\n @if (activeTab() === \"activity\") {\r\n <mt-email-delivery-activity />\r\n } @else if (activeTab() === \"design\") {\r\n <mt-email-delivery-design />\r\n } @else {\r\n <mt-email-delivery-connections />\r\n }\r\n </div>\r\n } @else if (facade.permissionsError()) {\r\n <!-- A failed access read is not a denial; say so and offer the retry,\r\n otherwise a transient 500 reads as \"you do not have access\". -->\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('access-error-title')\"\r\n [description]=\"t('access-error-description')\"\r\n [actionLabel]=\"t('access-retry')\"\r\n actionIcon=\"arrow.refresh-cw-01\"\r\n (actionClick)=\"retryPermissions()\"\r\n />\r\n } @else {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('access-denied-title')\"\r\n [description]=\"t('access-denied-description')\"\r\n />\r\n }\r\n </mt-page>\r\n</ng-container>\r\n", dependencies: [{ kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Breadcrumb, selector: "mt-breadcrumb", inputs: ["items", "styleClass"], outputs: ["onItemClick"] }, { kind: "component", type: EmptyState, selector: "mt-empty-state", inputs: ["variant", "illustration", "title", "description", "actionLabel", "actionIcon"], outputs: ["actionClick"] }, { kind: "directive", type: Tooltip, selector: "[mtTooltip]" }, { kind: "component", type: EmailDeliveryStatus, selector: "mt-email-delivery-status", inputs: ["value", "kind"] }, { kind: "component", type: EmailDeliveryConnections, selector: "mt-email-delivery-connections" }, { kind: "component", type: EmailDeliveryActivity, selector: "mt-email-delivery-activity" }, { kind: "component", type: EmailDeliveryDesign, selector: "mt-email-delivery-design" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2435
2472
|
}
|
|
2436
2473
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailDeliveryShell, decorators: [{
|
|
2437
2474
|
type: Component,
|
|
@@ -2445,7 +2482,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
2445
2482
|
EmailDeliveryConnections,
|
|
2446
2483
|
EmailDeliveryActivity,
|
|
2447
2484
|
EmailDeliveryDesign,
|
|
2448
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery'\">\n <mt-page\n [title]=\"t('title')\"\n avatarIcon=\"communication.mail-01\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-blue-100)',\n '--p-avatar-color': 'var(--p-blue-700)',\n }\"\n [tabs]=\"canView() ? tabs() : []\"\n [activeTab]=\"activeTab()\"\n contentClass=\"min-h-0 max-[1025px]:p-4 max-[640px]:p-3\"\n backButton\n (backButtonClick)=\"goBack()\"\n (tabChange)=\"onTabChange($event)\"\n >\n <!-- Declared unconditionally: a content query cannot reach a template that\n only exists inside a control-flow block, so the condition lives here. -->\n <ng-template #titleEnd>\n @if (canView() && readiness(); as state) {\n <span class=\"shrink-0\" [mtTooltip]=\"readinessHint()\">\n <mt-email-delivery-status kind=\"readiness\" [value]=\"state\" />\n </span>\n }\n </ng-template>\n\n @if (facade.permissionsLoading()) {\n <div class=\"p-6 text-sm text-muted-color\" aria-live=\"polite\">\n {{ t(\"access-checking\") }}\n </div>\n } @else if (canView()) {\n <div\n class=\"flex min-h-0 flex-col gap-4 [&_.mt-actions-column]:w-[5rem] [&_mt-card]:rounded-md [&_mt-table_:has(>.p-datatable)]:rounded-md\"\n >\n <mt-breadcrumb\n [items]=\"breadcrumbItems()\"\n styleClass=\"mx-1 flex justify-start\"\n />\n\n @if (activeTab() === \"activity\") {\n <mt-email-delivery-activity />\n } @else if (activeTab() === \"design\") {\n <mt-email-delivery-design />\n } @else {\n <mt-email-delivery-connections />\n }\n </div>\n } @else if (facade.permissionsError()) {\n <!-- A failed access read is not a denial; say so and offer the retry,\n otherwise a transient 500 reads as \"you do not have access\". -->\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('access-error-title')\"\n [description]=\"t('access-error-description')\"\n [actionLabel]=\"t('access-retry')\"\n actionIcon=\"arrow.refresh-cw-01\"\n (actionClick)=\"retryPermissions()\"\n />\n } @else {\n <mt-empty-state\n illustration=\"none\"\n [title]=\"t('access-denied-title')\"\n [description]=\"t('access-denied-description')\"\n />\n }\n </mt-page>\n</ng-container>\n" }]
|
|
2485
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery'\">\r\n <mt-page\r\n [title]=\"t('title')\"\r\n avatarIcon=\"communication.mail-01\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-blue-100)',\r\n '--p-avatar-color': 'var(--p-blue-700)',\r\n }\"\r\n [tabs]=\"canView() ? tabs() : []\"\r\n [activeTab]=\"activeTab()\"\r\n contentClass=\"min-h-0 max-[1025px]:p-4 max-[640px]:p-3\"\r\n backButton\r\n (backButtonClick)=\"goBack()\"\r\n (tabChange)=\"onTabChange($event)\"\r\n >\r\n <!-- Declared unconditionally: a content query cannot reach a template that\r\n only exists inside a control-flow block, so the condition lives here. -->\r\n <ng-template #titleEnd>\r\n @if (canView() && readiness(); as state) {\r\n <span class=\"shrink-0\" [mtTooltip]=\"readinessHint()\">\r\n <mt-email-delivery-status kind=\"readiness\" [value]=\"state\" />\r\n </span>\r\n }\r\n </ng-template>\r\n\r\n @if (facade.permissionsLoading()) {\r\n <div class=\"p-6 text-sm text-muted-color\" aria-live=\"polite\">\r\n {{ t(\"access-checking\") }}\r\n </div>\r\n } @else if (canView()) {\r\n <div\r\n class=\"flex min-h-0 flex-col gap-4 [&_.mt-actions-column]:w-[5rem] [&_mt-card]:rounded-md [&_mt-table_:has(>.p-datatable)]:rounded-md\"\r\n >\r\n <mt-breadcrumb\r\n [items]=\"breadcrumbItems()\"\r\n styleClass=\"mx-1 flex justify-start\"\r\n />\r\n\r\n @if (activeTab() === \"activity\") {\r\n <mt-email-delivery-activity />\r\n } @else if (activeTab() === \"design\") {\r\n <mt-email-delivery-design />\r\n } @else {\r\n <mt-email-delivery-connections />\r\n }\r\n </div>\r\n } @else if (facade.permissionsError()) {\r\n <!-- A failed access read is not a denial; say so and offer the retry,\r\n otherwise a transient 500 reads as \"you do not have access\". -->\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('access-error-title')\"\r\n [description]=\"t('access-error-description')\"\r\n [actionLabel]=\"t('access-retry')\"\r\n actionIcon=\"arrow.refresh-cw-01\"\r\n (actionClick)=\"retryPermissions()\"\r\n />\r\n } @else {\r\n <mt-empty-state\r\n illustration=\"none\"\r\n [title]=\"t('access-denied-title')\"\r\n [description]=\"t('access-denied-description')\"\r\n />\r\n }\r\n </mt-page>\r\n</ng-container>\r\n" }]
|
|
2449
2486
|
}], ctorParameters: () => [] });
|
|
2450
2487
|
const PRODUCT_SETTINGS_ROUTE = '/control-panel/product-settings';
|
|
2451
2488
|
function toTab(value) {
|
|
@@ -2455,4 +2492,4 @@ function toTab(value) {
|
|
|
2455
2492
|
}
|
|
2456
2493
|
|
|
2457
2494
|
export { EmailDeliveryShell };
|
|
2458
|
-
//# sourceMappingURL=masterteam-system-settings-email-delivery-shell-
|
|
2495
|
+
//# sourceMappingURL=masterteam-system-settings-email-delivery-shell-DhJ_GMml.mjs.map
|