@masterteam/system-settings 0.0.22 → 0.0.23

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.
@@ -1,2 +1,2 @@
1
- export { j as DEFAULT_DATE_FORMAT_OPTIONS, o as DEFAULT_EMAIL_DELIVERY_OPTIONS, D as DEFAULT_GENERAL_CONFIGURATION, k as DEFAULT_TIME_FORMAT_OPTIONS, l as DOTNET_DAY_DEFINITIONS, b as EMAIL_DELIVERY_ATTEMPT_STATUSES, q as EMAIL_DELIVERY_OPTIONS, f as EMAIL_DELIVERY_PERMISSIONS, x as EMAIL_DELIVERY_ROUTES, w as EMAIL_USER_INITIATED_TEST_OPERATION_KIND, h as EXPLORE_DEFAULT_VIEW_OPTIONS, s as EmailDeliveryAccessService, v as EmailUserTestDialog, F as FIXED_CURRENCIES, G as GENERAL_CONFIGURATION_SETTING_KEY, R as RATE_SOURCE_OPTIONS, m as SCHEDULE_ITEM_TYPE_OPTIONS, S as SystemSettings, n as SystemSettingsHolidayEditor, T as TIMESHEET_FREQUENCY_OPTIONS, W as WEEKEND_DAY_DEFINITIONS, d as areEmailTestRecipientsValid, u as buildEmailTemplatePlaceholderFields, t as collectEmailTemplatePlaceholders, c as createEmailTestRequestId, i as isConnectionTestAttempt, e as isEmailTestRequestPending, p as parseEmailTestRecipients, r as provideEmailDelivery } from './masterteam-system-settings-masterteam-system-settings-7I4TfgwP.mjs';
1
+ export { o as DEFAULT_DATE_FORMAT_OPTIONS, v as DEFAULT_EMAIL_DELIVERY_OPTIONS, D as DEFAULT_GENERAL_CONFIGURATION, q as DEFAULT_TIME_FORMAT_OPTIONS, s as DOTNET_DAY_DEFINITIONS, b as EMAIL_DELIVERY_ATTEMPT_STATUSES, w as EMAIL_DELIVERY_OPTIONS, f as EMAIL_DELIVERY_PERMISSIONS, H as EMAIL_DELIVERY_ROUTES, j as EMAIL_LAYOUT_CONTENT_SLOT, k as EMAIL_LAYOUT_MAX_BYTES, C as EMAIL_USER_INITIATED_TEST_OPERATION_KIND, n as EXPLORE_DEFAULT_VIEW_OPTIONS, y as EmailDeliveryAccessService, m as EmailHtmlPreview, h as EmailLayoutFacade, B as EmailUserTestDialog, l as EmailVisualEditor, F as FIXED_CURRENCIES, G as GENERAL_CONFIGURATION_SETTING_KEY, R as RATE_SOURCE_OPTIONS, t as SCHEDULE_ITEM_TYPE_OPTIONS, S as SystemSettings, u as SystemSettingsHolidayEditor, T as TIMESHEET_FREQUENCY_OPTIONS, W as WEEKEND_DAY_DEFINITIONS, d as areEmailTestRecipientsValid, J as buildEmailPreviewDocument, A as buildEmailTemplatePlaceholderFields, z as collectEmailTemplatePlaceholders, c as createEmailTestRequestId, I as emailDesignLeaveGuard, i as isConnectionTestAttempt, e as isEmailTestRequestPending, p as parseEmailTestRecipients, x as provideEmailDelivery, r as readLayoutErrorDiagnostics } from './masterteam-system-settings-masterteam-system-settings-C51hZw-Q.mjs';
2
2
  //# sourceMappingURL=masterteam-system-settings.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/system-settings",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/system-settings",
6
6
  "linkDirectory": false,
@@ -19,8 +19,8 @@
19
19
  "rxjs": "^7.8.2",
20
20
  "tailwindcss": "^4.2.2",
21
21
  "tailwindcss-primeui": "^0.6.1",
22
- "@masterteam/components": "^0.0.301",
23
- "@masterteam/forms": "^0.0.156",
22
+ "@masterteam/components": "^0.0.328",
23
+ "@masterteam/forms": "^0.0.169",
24
24
  "@masterteam/icons": "^0.0.17"
25
25
  },
26
26
  "sideEffects": false,
@@ -1,12 +1,13 @@
1
1
  import * as _angular_forms from '@angular/forms';
2
- import { FormGroup, FormControl } from '@angular/forms';
2
+ import { FormGroup, FormControl, ControlValueAccessor } from '@angular/forms';
3
3
  import * as _angular_core from '@angular/core';
4
4
  import { OnInit, InjectionToken, EnvironmentProviders } from '@angular/core';
5
5
  import { DatePicker } from 'primeng/datepicker';
6
6
  import { ModalService } from '@masterteam/components/modal';
7
7
  import { Observable } from 'rxjs';
8
8
  import * as _masterteam_system_settings from '@masterteam/system-settings';
9
- import { Routes } from '@angular/router';
9
+ import { Routes, CanDeactivateFn } from '@angular/router';
10
+ import { MTIcon } from '@masterteam/icons';
10
11
 
11
12
  type SystemSettingPrimitive = string | number | boolean | null;
12
13
  type SystemSettingObject = Record<string, unknown>;
@@ -1082,6 +1083,12 @@ declare class EmailUserTestDialog {
1082
1083
  readonly sourceLabel: _angular_core.InputSignal<string>;
1083
1084
  readonly placeholderKeys: _angular_core.InputSignal<readonly string[]>;
1084
1085
  readonly placeholderFields: _angular_core.InputSignal<readonly EmailTemplatePlaceholderField[]>;
1086
+ /**
1087
+ * When given, these values fill the placeholders and the per-placeholder
1088
+ * fields are not shown (the notification editor sends the same readable
1089
+ * samples as its preview).
1090
+ */
1091
+ readonly sampleValues: _angular_core.InputSignal<Readonly<Record<string, string>> | null>;
1085
1092
  protected readonly modal: ModalService;
1086
1093
  private readonly ref;
1087
1094
  private readonly destroyRef;
@@ -1114,10 +1121,306 @@ declare class EmailUserTestDialog {
1114
1121
  private retrieveStoredResult;
1115
1122
  protected t(key: string): string;
1116
1123
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailUserTestDialog, never>;
1117
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<EmailUserTestDialog, "mt-email-user-test-dialog", never, { "kind": { "alias": "kind"; "required": true; "isSignal": true; }; "eventId": { "alias": "eventId"; "required": false; "isSignal": true; }; "templateId": { "alias": "templateId"; "required": false; "isSignal": true; }; "alertId": { "alias": "alertId"; "required": false; "isSignal": true; }; "sourceLabel": { "alias": "sourceLabel"; "required": false; "isSignal": true; }; "placeholderKeys": { "alias": "placeholderKeys"; "required": false; "isSignal": true; }; "placeholderFields": { "alias": "placeholderFields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1124
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EmailUserTestDialog, "mt-email-user-test-dialog", never, { "kind": { "alias": "kind"; "required": true; "isSignal": true; }; "eventId": { "alias": "eventId"; "required": false; "isSignal": true; }; "templateId": { "alias": "templateId"; "required": false; "isSignal": true; }; "alertId": { "alias": "alertId"; "required": false; "isSignal": true; }; "sourceLabel": { "alias": "sourceLabel"; "required": false; "isSignal": true; }; "placeholderKeys": { "alias": "placeholderKeys"; "required": false; "isSignal": true; }; "placeholderFields": { "alias": "placeholderFields"; "required": false; "isSignal": true; }; "sampleValues": { "alias": "sampleValues"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1118
1125
  }
1119
1126
 
1120
1127
  declare const EMAIL_DELIVERY_ROUTES: Routes;
1121
1128
 
1122
- export { DEFAULT_DATE_FORMAT_OPTIONS, DEFAULT_EMAIL_DELIVERY_OPTIONS, DEFAULT_GENERAL_CONFIGURATION, DEFAULT_TIME_FORMAT_OPTIONS, DOTNET_DAY_DEFINITIONS, EMAIL_DELIVERY_ATTEMPT_STATUSES, EMAIL_DELIVERY_OPTIONS, EMAIL_DELIVERY_PERMISSIONS, EMAIL_DELIVERY_ROUTES, EMAIL_USER_INITIATED_TEST_OPERATION_KIND, EXPLORE_DEFAULT_VIEW_OPTIONS, EmailDeliveryAccessService, EmailUserTestDialog, FIXED_CURRENCIES, GENERAL_CONFIGURATION_SETTING_KEY, RATE_SOURCE_OPTIONS, SCHEDULE_ITEM_TYPE_OPTIONS, SystemSettings, SystemSettingsHolidayEditor, TIMESHEET_FREQUENCY_OPTIONS, WEEKEND_DAY_DEFINITIONS, areEmailTestRecipientsValid, buildEmailTemplatePlaceholderFields, collectEmailTemplatePlaceholders, createEmailTestRequestId, isConnectionTestAttempt, isEmailTestRequestPending, parseEmailTestRecipients, provideEmailDelivery };
1123
- export type { ApiResponse, AppResponse, CurrencyCatalogItem, CurrencySettingValue, CurrencyUnitLabel, EmailAttemptPage, EmailAttemptReplayRequest, EmailAttemptReplayResult, EmailAuthorizationStartResult, EmailConnectionCreateRequest, EmailConnectionDetails, EmailConnectionRecord, EmailConnectionSummary, EmailConnectionTestRequest, EmailConnectionTestResult, EmailConnectionUpdateRequest, EmailConnectionValidationResult, EmailCredentialMutation, EmailCredentialOperation, EmailCredentialStatus, EmailCredentialStorageKind, EmailDeliveryAccessibility, EmailDeliveryAttempt, EmailDeliveryOptions, EmailDeliveryPermission, EmailDeliveryProblem, EmailDeliveryStatus, EmailErrorCatalogEntry, EmailEvidenceDecisionRequest, EmailEvidenceDownload, EmailEvidenceRebuildResult, EmailFinalizationQuarantineItem, EmailFinalizationQuarantinePage, EmailHostEvidenceItem, EmailHostEvidencePage, EmailProviderActionDescriptor, EmailProviderAuthenticationModeDescriptor, EmailProviderDescriptor, EmailProviderFieldDescriptor, EmailSafeDiagnostic, EmailSendResult, EmailTemplatePlaceholderField, EmailTemplatePlaceholderProperty, EmailUserTestDispatchResult, EmailUserTestKind, ExploreDefaultView, FormatSchemaOption, GeneralConfigurationSettingValue, GlobalWorkingHoursSettingValue, HolidayItem, HolidayTableRow, HolidaysSettingValue, IconSelectOption, ScheduleItemTypeOption, SelectOption, SystemSetting, SystemSettingObject, SystemSettingPrimitive, SystemSettingValue, SystemSettingsForm, SystemSettingsFormatSchema, SystemSettingsSnapshot, TimeSheetFrequency, TimeSheetPolicySettingValue, TimezoneRegionOption, TimezoneSettingValue, UpdateSystemSettingItem, WeekendDayOption, WeekendSettingValue };
1129
+ /**
1130
+ * Shared notification email design (Pplus5.BE `NotificationEmailLayoutController`,
1131
+ * `api/notifications/email-layout`). One published base wraps every newly
1132
+ * prepared notification email; event templates hold business content only.
1133
+ */
1134
+ type EmailLayoutSource = 'published' | 'configured' | 'recommended';
1135
+ interface EmailLayoutDiagnostic {
1136
+ code: string;
1137
+ severity: string;
1138
+ path: string;
1139
+ }
1140
+ interface EmailLayoutSnapshot {
1141
+ body: string;
1142
+ source: EmailLayoutSource;
1143
+ /** `0` before the first publication — submit exactly that for the first publish. */
1144
+ revision: number;
1145
+ hash: string;
1146
+ clientBaseUrl: string;
1147
+ canRestore: boolean;
1148
+ diagnostics: EmailLayoutDiagnostic[];
1149
+ approvedImageOrigins: string[];
1150
+ }
1151
+ interface EmailLayoutPreview {
1152
+ html: string;
1153
+ text: string;
1154
+ sanitizedBody: string;
1155
+ layoutHash: string;
1156
+ contentHash: string;
1157
+ /** The live revision when the preview ran; differs from the baseline after someone else publishes. */
1158
+ effectiveRevision: number;
1159
+ fidelity: 'browser';
1160
+ approvedImageOrigins: string[];
1161
+ diagnostics: EmailLayoutDiagnostic[];
1162
+ }
1163
+ /** The one literal slot every base must contain exactly once. */
1164
+ declare const EMAIL_LAYOUT_CONTENT_SLOT = "{content}";
1165
+ /** UTF-8 byte limit for the base HTML. */
1166
+ declare const EMAIL_LAYOUT_MAX_BYTES: number;
1167
+
1168
+ /**
1169
+ * State for the Email design tab. The working draft lives here rather than in
1170
+ * the tab so switching between Connections / Activity / Email design keeps
1171
+ * unsaved edits; leaving the page asks first (`emailDesignLeaveGuard`).
1172
+ *
1173
+ * There is no server-side draft: the base is only ever previewed (render-only)
1174
+ * or published with the revision it was read at.
1175
+ */
1176
+ declare class EmailLayoutFacade {
1177
+ private readonly http;
1178
+ private readonly options;
1179
+ private readonly transloco;
1180
+ private readonly headers;
1181
+ readonly snapshot: _angular_core.WritableSignal<EmailLayoutSnapshot | null>;
1182
+ readonly draft: _angular_core.WritableSignal<string>;
1183
+ readonly loading: _angular_core.WritableSignal<boolean>;
1184
+ readonly loadErrorCode: _angular_core.WritableSignal<string | null>;
1185
+ readonly loadFailed: _angular_core.WritableSignal<boolean>;
1186
+ readonly saving: _angular_core.WritableSignal<"publish" | "restore" | null>;
1187
+ /** Someone else published since this draft's baseline was read. */
1188
+ readonly conflict: _angular_core.WritableSignal<boolean>;
1189
+ readonly dirty: _angular_core.Signal<boolean>;
1190
+ load(): Observable<EmailLayoutSnapshot>;
1191
+ /** Render-only: the server supplies a fixed bilingual sample; nothing is saved or sent. */
1192
+ preview(body: string): Observable<EmailLayoutPreview>;
1193
+ publish(): Observable<EmailLayoutSnapshot>;
1194
+ restorePrevious(): Observable<EmailLayoutSnapshot>;
1195
+ /**
1196
+ * Re-reads the live design after a conflict. `keepDraft` keeps the user's
1197
+ * edits on top of the newer baseline, so the next publish applies them
1198
+ * deliberately; otherwise the draft is replaced by what is live.
1199
+ */
1200
+ reloadLatest(keepDraft: boolean): Observable<EmailLayoutSnapshot>;
1201
+ discard(): void;
1202
+ describeCode(code: string | null): string;
1203
+ describeDiagnostic(diagnostic: EmailLayoutDiagnostic): string;
1204
+ readErrorCode(error: unknown): string | null;
1205
+ private adopt;
1206
+ private onWriteError;
1207
+ private url;
1208
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailLayoutFacade, never>;
1209
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EmailLayoutFacade>;
1210
+ }
1211
+ declare function readLayoutErrorDiagnostics(error: unknown): EmailLayoutDiagnostic[];
1212
+
1213
+ /**
1214
+ * Leaving the Email page with an unpublished design draft asks once. Switching
1215
+ * tabs inside the page is not a navigation away — the draft lives in
1216
+ * `EmailLayoutFacade` and is still there when the tab is reopened.
1217
+ */
1218
+ declare const emailDesignLeaveGuard: CanDeactivateFn<unknown>;
1219
+
1220
+ interface EmailPreviewDocumentOptions {
1221
+ showImages: boolean;
1222
+ approvedImageOrigins: readonly string[];
1223
+ /** Wrap a content fragment (an App message) in a minimal document. */
1224
+ fragment: boolean;
1225
+ direction: 'ltr' | 'rtl' | null;
1226
+ }
1227
+ /**
1228
+ * Renders server-composed notification HTML without letting it touch the app.
1229
+ *
1230
+ * The frame is an opaque origin (`sandbox=""`: no scripts, forms, popups,
1231
+ * same-origin or top navigation), sends no referrer, and the document carries
1232
+ * its own CSP: nothing loads except inline styles, and images only from the
1233
+ * approved origins once the viewer opts in. Links are stripped from this
1234
+ * preview-only copy so a click cannot navigate the frame; scrolling and
1235
+ * keyboard focus still work. The source is never injected into the app DOM.
1236
+ */
1237
+ declare class EmailHtmlPreview {
1238
+ readonly html: _angular_core.InputSignal<string>;
1239
+ readonly showImages: _angular_core.InputSignal<boolean>;
1240
+ readonly approvedImageOrigins: _angular_core.InputSignal<readonly string[]>;
1241
+ readonly fragment: _angular_core.InputSignal<boolean>;
1242
+ readonly direction: _angular_core.InputSignal<"rtl" | "ltr" | null>;
1243
+ readonly title: _angular_core.InputSignal<string>;
1244
+ readonly height: _angular_core.InputSignal<string>;
1245
+ private readonly frame;
1246
+ constructor();
1247
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailHtmlPreview, never>;
1248
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EmailHtmlPreview, "mt-email-html-preview", never, { "html": { "alias": "html"; "required": false; "isSignal": true; }; "showImages": { "alias": "showImages"; "required": false; "isSignal": true; }; "approvedImageOrigins": { "alias": "approvedImageOrigins"; "required": false; "isSignal": true; }; "fragment": { "alias": "fragment"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1249
+ }
1250
+ declare function buildEmailPreviewDocument(html: string, options: EmailPreviewDocumentOptions): string;
1251
+
1252
+ /**
1253
+ * Pure helpers for `mt-email-visual-editor`: building the editing document and
1254
+ * turning it back into the exact source format the backend expects.
1255
+ *
1256
+ * In the canvas, `{{token}}` placeholders and the layout's `{content}` slot are
1257
+ * shown as non-editable chips; serialization turns every chip back into its
1258
+ * literal text, so the stored HTML never contains editor markup.
1259
+ */
1260
+ interface EmailEditorPlaceholder {
1261
+ key: string;
1262
+ label: string;
1263
+ }
1264
+ type EmailImageError = 'no-origins' | 'url' | 'origin' | 'alt' | 'size';
1265
+ /**
1266
+ * Formatting the email policy keeps: inline `color`, `background-color` and
1267
+ * `font-size` on spans, and `text-align` on blocks. Classes (how Quill applies
1268
+ * alignment, size and font) are stripped, so everything here is an inline style.
1269
+ */
1270
+ interface EditorSwatch {
1271
+ key: string;
1272
+ value: string;
1273
+ }
1274
+ type EditorTextSize = 'small' | 'normal' | 'large' | 'huge';
1275
+
1276
+ type EditorMode = 'design' | 'html';
1277
+ type StylePanel = 'color' | 'highlight' | 'size';
1278
+ interface ToolbarAction {
1279
+ key: string;
1280
+ icon?: MTIcon;
1281
+ text?: string;
1282
+ run: () => void;
1283
+ }
1284
+ /**
1285
+ * Visual editor for notification email HTML (event content and the shared
1286
+ * base layout), with an HTML tab for the exact source.
1287
+ *
1288
+ * The canvas is a sandboxed, script-free iframe (`sandbox="allow-same-origin"`
1289
+ * so the host can edit it; nothing inside it can run) with its own CSP —
1290
+ * images and network stay blocked, as the contract asks. The browser's editing
1291
+ * DOM keeps tables, inline styles and `lang` / `dir`; `{{tokens}}` and the
1292
+ * layout's `{content}` slot are shown as chips and written back as literal
1293
+ * text. Opening content, or switching between Visual and HTML, never emits a
1294
+ * value: only a real edit does, so nothing is rewritten or marked unsaved just
1295
+ * by looking at it.
1296
+ */
1297
+ declare class EmailVisualEditor implements ControlValueAccessor {
1298
+ private readonly transloco;
1299
+ private readonly destroyRef;
1300
+ readonly label: _angular_core.InputSignal<string | undefined>;
1301
+ readonly hint: _angular_core.InputSignal<string | undefined>;
1302
+ /** Placeholders the content may use; their labels name the chips. */
1303
+ readonly placeholders: _angular_core.InputSignal<readonly EmailEditorPlaceholder[]>;
1304
+ /** Editing the shared base layout: `{content}` is shown as a protected slot. */
1305
+ readonly layout: _angular_core.InputSignal<boolean>;
1306
+ readonly height: _angular_core.InputSignal<string>;
1307
+ /** Reading direction of the whole canvas (a single-language field). */
1308
+ readonly direction: _angular_core.InputSignal<"rtl" | "ltr" | null>;
1309
+ /** Offer the English + Arabic starter on an empty email. */
1310
+ readonly starter: _angular_core.InputSignal<boolean>;
1311
+ /** The canvas or the HTML source received focus. */
1312
+ readonly focused: _angular_core.OutputEmitterRef<void>;
1313
+ /**
1314
+ * HTTPS origins the server accepts images from (`approvedImageOrigins` on the
1315
+ * layout read / preview). Empty means images are not allowed at all.
1316
+ */
1317
+ readonly approvedImageOrigins: _angular_core.InputSignal<readonly string[]>;
1318
+ protected readonly imageOpen: _angular_core.WritableSignal<boolean>;
1319
+ protected readonly imageError: _angular_core.WritableSignal<EmailImageError | null>;
1320
+ protected readonly editingImage: _angular_core.WritableSignal<HTMLImageElement | null>;
1321
+ protected readonly imageForm: {
1322
+ src: FormControl<string>;
1323
+ alt: FormControl<string>;
1324
+ width: FormControl<number | null>;
1325
+ height: FormControl<number | null>;
1326
+ };
1327
+ protected readonly imageMin = 16;
1328
+ protected readonly imageMax = 1200;
1329
+ protected readonly imageOriginsLabel: _angular_core.Signal<string>;
1330
+ protected readonly imageErrorText: _angular_core.Signal<string>;
1331
+ protected readonly mode: _angular_core.WritableSignal<EditorMode>;
1332
+ protected readonly value: _angular_core.WritableSignal<string>;
1333
+ protected readonly disabled: _angular_core.WritableSignal<boolean>;
1334
+ protected readonly linkOpen: _angular_core.WritableSignal<boolean>;
1335
+ /** The colour / size row under the toolbar. */
1336
+ protected readonly stylePanel: _angular_core.WritableSignal<StylePanel | null>;
1337
+ protected readonly textColors: readonly EditorSwatch[];
1338
+ protected readonly highlightColors: readonly EditorSwatch[];
1339
+ protected readonly textSizes: readonly {
1340
+ key: EditorTextSize;
1341
+ px: number | null;
1342
+ }[];
1343
+ protected readonly linkError: _angular_core.WritableSignal<boolean>;
1344
+ protected readonly linkControl: FormControl<string>;
1345
+ protected readonly sourceControl: FormControl<string>;
1346
+ protected readonly designBlocked: _angular_core.Signal<boolean>;
1347
+ protected readonly effectiveMode: _angular_core.Signal<EditorMode>;
1348
+ protected readonly isEmpty: _angular_core.Signal<boolean>;
1349
+ protected readonly modeOptions: _angular_core.Signal<{
1350
+ label: string;
1351
+ value: EditorMode;
1352
+ icon: MTIcon;
1353
+ }[]>;
1354
+ protected readonly blockActions: ToolbarAction[];
1355
+ protected readonly inlineActions: ToolbarAction[];
1356
+ protected readonly styleActions: ToolbarAction[];
1357
+ protected readonly alignActions: ToolbarAction[];
1358
+ protected readonly listActions: ToolbarAction[];
1359
+ protected readonly directionActions: ToolbarAction[];
1360
+ protected readonly historyActions: ToolbarAction[];
1361
+ private readonly frame;
1362
+ private readonly sourceHost;
1363
+ private readonly lang;
1364
+ /** The last value this editor emitted — writes of it are not re-rendered. */
1365
+ private lastEmitted;
1366
+ private renderedFrame;
1367
+ private renderedKey;
1368
+ private savedRange;
1369
+ /** Set while a multi-step command runs, so it emits once at the end. */
1370
+ private batching;
1371
+ private onChange;
1372
+ private onTouched;
1373
+ private detachCanvas;
1374
+ constructor();
1375
+ writeValue(value: string | null): void;
1376
+ registerOnChange(fn: (value: string) => void): void;
1377
+ registerOnTouched(fn: () => void): void;
1378
+ setDisabledState(disabled: boolean): void;
1379
+ /** Inserts `{{key}}` where the cursor is (as a chip in Visual, as text in HTML). */
1380
+ insertToken(key: string, label?: string): void;
1381
+ protected onModeChange(mode: string | number): void;
1382
+ protected startBilingual(): void;
1383
+ protected toggleStylePanel(panel: StylePanel): void;
1384
+ protected applyColor(swatch: EditorSwatch): void;
1385
+ protected removeColor(): void;
1386
+ protected applySize(size: EditorTextSize): void;
1387
+ protected swatchLabel(swatch: EditorSwatch): string;
1388
+ protected toggleLink(): void;
1389
+ protected useRecordLink(): void;
1390
+ protected applyLink(): void;
1391
+ protected removeLink(): void;
1392
+ /**
1393
+ * Opens the image row: for the image selected in the canvas (to change it),
1394
+ * otherwise for a new image at the cursor.
1395
+ */
1396
+ protected toggleImage(): void;
1397
+ protected applyImage(): void;
1398
+ protected removeImage(): void;
1399
+ protected closeImage(): void;
1400
+ protected actionLabel(key: string): string;
1401
+ private renderCanvas;
1402
+ private attachCanvas;
1403
+ private emitFromCanvas;
1404
+ private emit;
1405
+ private exec;
1406
+ /** Commands whose CSS form survives the email policy (spans with styles). */
1407
+ private execWithCss;
1408
+ /** Written as `<s>`: the policy strips `<strike>` and `text-decoration-line`. */
1409
+ private strike;
1410
+ private clearStyle;
1411
+ private formatBlock;
1412
+ /** Sets the reading direction (and language) of the block under the cursor. */
1413
+ private setDirection;
1414
+ /** Highlights (canvas-only class, never serialized) and selects one image. */
1415
+ private selectImage;
1416
+ private saveSelection;
1417
+ private restoreSelection;
1418
+ private placeCaret;
1419
+ private canvasDocument;
1420
+ private t;
1421
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailVisualEditor, never>;
1422
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EmailVisualEditor, "mt-email-visual-editor", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "placeholders": { "alias": "placeholders"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "starter": { "alias": "starter"; "required": false; "isSignal": true; }; "approvedImageOrigins": { "alias": "approvedImageOrigins"; "required": false; "isSignal": true; }; }, { "focused": "focused"; }, never, never, true, never>;
1423
+ }
1424
+
1425
+ export { DEFAULT_DATE_FORMAT_OPTIONS, DEFAULT_EMAIL_DELIVERY_OPTIONS, DEFAULT_GENERAL_CONFIGURATION, DEFAULT_TIME_FORMAT_OPTIONS, DOTNET_DAY_DEFINITIONS, EMAIL_DELIVERY_ATTEMPT_STATUSES, EMAIL_DELIVERY_OPTIONS, EMAIL_DELIVERY_PERMISSIONS, EMAIL_DELIVERY_ROUTES, EMAIL_LAYOUT_CONTENT_SLOT, EMAIL_LAYOUT_MAX_BYTES, EMAIL_USER_INITIATED_TEST_OPERATION_KIND, EXPLORE_DEFAULT_VIEW_OPTIONS, EmailDeliveryAccessService, EmailHtmlPreview, EmailLayoutFacade, EmailUserTestDialog, EmailVisualEditor, FIXED_CURRENCIES, GENERAL_CONFIGURATION_SETTING_KEY, RATE_SOURCE_OPTIONS, SCHEDULE_ITEM_TYPE_OPTIONS, SystemSettings, SystemSettingsHolidayEditor, TIMESHEET_FREQUENCY_OPTIONS, WEEKEND_DAY_DEFINITIONS, areEmailTestRecipientsValid, buildEmailPreviewDocument, buildEmailTemplatePlaceholderFields, collectEmailTemplatePlaceholders, createEmailTestRequestId, emailDesignLeaveGuard, isConnectionTestAttempt, isEmailTestRequestPending, parseEmailTestRecipients, provideEmailDelivery, readLayoutErrorDiagnostics };
1426
+ export type { ApiResponse, AppResponse, CurrencyCatalogItem, CurrencySettingValue, CurrencyUnitLabel, EmailAttemptPage, EmailAttemptReplayRequest, EmailAttemptReplayResult, EmailAuthorizationStartResult, EmailConnectionCreateRequest, EmailConnectionDetails, EmailConnectionRecord, EmailConnectionSummary, EmailConnectionTestRequest, EmailConnectionTestResult, EmailConnectionUpdateRequest, EmailConnectionValidationResult, EmailCredentialMutation, EmailCredentialOperation, EmailCredentialStatus, EmailCredentialStorageKind, EmailDeliveryAccessibility, EmailDeliveryAttempt, EmailDeliveryOptions, EmailDeliveryPermission, EmailDeliveryProblem, EmailDeliveryStatus, EmailEditorPlaceholder, EmailErrorCatalogEntry, EmailEvidenceDecisionRequest, EmailEvidenceDownload, EmailEvidenceRebuildResult, EmailFinalizationQuarantineItem, EmailFinalizationQuarantinePage, EmailHostEvidenceItem, EmailHostEvidencePage, EmailLayoutDiagnostic, EmailLayoutPreview, EmailLayoutSnapshot, EmailLayoutSource, EmailPreviewDocumentOptions, EmailProviderActionDescriptor, EmailProviderAuthenticationModeDescriptor, EmailProviderDescriptor, EmailProviderFieldDescriptor, EmailSafeDiagnostic, EmailSendResult, EmailTemplatePlaceholderField, EmailTemplatePlaceholderProperty, EmailUserTestDispatchResult, EmailUserTestKind, ExploreDefaultView, FormatSchemaOption, GeneralConfigurationSettingValue, GlobalWorkingHoursSettingValue, HolidayItem, HolidayTableRow, HolidaysSettingValue, IconSelectOption, ScheduleItemTypeOption, SelectOption, SystemSetting, SystemSettingObject, SystemSettingPrimitive, SystemSettingValue, SystemSettingsForm, SystemSettingsFormatSchema, SystemSettingsSnapshot, TimeSheetFrequency, TimeSheetPolicySettingValue, TimezoneRegionOption, TimezoneSettingValue, UpdateSystemSettingItem, WeekendDayOption, WeekendSettingValue };