@forgeroute/ui 0.5.39 → 0.5.40
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/fesm2022/{forgeroute-ui-core-ui-labels.es-Bw5Bobq_.mjs → forgeroute-ui-core-ui-labels.es-CZOL2U-t.mjs} +1 -25
- package/fesm2022/forgeroute-ui-core-ui-labels.es-CZOL2U-t.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-core.mjs +1 -25
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-editor.mjs +92 -93
- package/fesm2022/forgeroute-ui-editor.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-core.d.ts +0 -24
- package/types/forgeroute-ui-editor.d.ts +0 -1
- package/types/forgeroute-ui-square.d.ts +1 -1
- package/types/forgeroute-ui-stripe.d.ts +1 -1
- package/fesm2022/forgeroute-ui-core-ui-labels.es-Bw5Bobq_.mjs.map +0 -1
|
@@ -2991,8 +2991,14 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
2991
2991
|
}
|
|
2992
2992
|
openCustomColor(which) {
|
|
2993
2993
|
this.saveSelection();
|
|
2994
|
-
(which === "text" ? this.colorInputRef() : this.highlightInputRef())?.nativeElement
|
|
2995
|
-
|
|
2994
|
+
const input = (which === "text" ? this.colorInputRef() : this.highlightInputRef())?.nativeElement;
|
|
2995
|
+
if (!input) return;
|
|
2996
|
+
try {
|
|
2997
|
+
if (typeof input.showPicker === "function") input.showPicker();
|
|
2998
|
+
else input.click();
|
|
2999
|
+
} catch {
|
|
3000
|
+
input.click();
|
|
3001
|
+
}
|
|
2996
3002
|
}
|
|
2997
3003
|
applySpacing(value) {
|
|
2998
3004
|
if (!this.canWrite()) return;
|
|
@@ -3340,13 +3346,6 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3340
3346
|
});
|
|
3341
3347
|
this.syncBlock();
|
|
3342
3348
|
}
|
|
3343
|
-
blockHtml(key) {
|
|
3344
|
-
for (const g of this.blockGroups()) {
|
|
3345
|
-
const found = g.blocks.find((b) => b.key === key);
|
|
3346
|
-
if (found) return found.html;
|
|
3347
|
-
}
|
|
3348
|
-
return `<p>${this.labels.t("emailTemplateEditor.blockFallback")}</p>`;
|
|
3349
|
-
}
|
|
3350
3349
|
static {
|
|
3351
3350
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
3352
3351
|
minVersion: "12.0.0",
|
|
@@ -3668,34 +3667,34 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3668
3667
|
<!-- 3-Column Layout -->
|
|
3669
3668
|
<div class="editor-body">
|
|
3670
3669
|
<!-- LEFT PANEL: Details -->
|
|
3671
|
-
<aside class="panel-left" [attr.aria-label]="labels.t('emailTemplateEditor.templateDetails')">
|
|
3670
|
+
<aside class="panel-left" data-testid="editor-details" [attr.aria-label]="labels.t('emailTemplateEditor.templateDetails')">
|
|
3672
3671
|
<h3 class="panel-title">{{ labels.t('common.details') }}</h3>
|
|
3673
3672
|
|
|
3674
3673
|
<div class="form-field">
|
|
3675
|
-
<ui-text-input [label]="labels.t('common.name')" [required]="true" [(ngModel)]="name" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
|
|
3674
|
+
<ui-text-input data-testid="template-name" [label]="labels.t('common.name')" [required]="true" [(ngModel)]="name" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
|
|
3676
3675
|
[placeholder]="namePlaceholder()" [error]="nameErrorShown()" [showErrors]="nameTouched()" (blurred)="nameTouched.set(true)" />
|
|
3677
3676
|
</div>
|
|
3678
3677
|
|
|
3679
3678
|
<div class="form-field">
|
|
3680
|
-
<ui-text-input [label]="labels.t('common.subject')" [required]="true" [(ngModel)]="subject" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
|
|
3679
|
+
<ui-text-input data-testid="template-subject" [label]="labels.t('common.subject')" [required]="true" [(ngModel)]="subject" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
|
|
3681
3680
|
[placeholder]="subjectPlaceholder()" [error]="subjectErrorShown()" [showErrors]="subjectTouched()" (blurred)="subjectTouched.set(true)">
|
|
3682
3681
|
</ui-text-input>
|
|
3683
3682
|
</div>
|
|
3684
3683
|
|
|
3685
3684
|
@if (showCategory()) {
|
|
3686
3685
|
<div class="form-field">
|
|
3687
|
-
<ui-select [label]="labels.t('emailTemplateEditor.category')" [options]="categories()" [placeholder]="categoryPlaceholder()" [(ngModel)]="category" [disabled]="!canWrite()" />
|
|
3686
|
+
<ui-select data-testid="template-category" [label]="labels.t('emailTemplateEditor.category')" [options]="categories()" [placeholder]="categoryPlaceholder()" [(ngModel)]="category" [disabled]="!canWrite()" />
|
|
3688
3687
|
</div>
|
|
3689
3688
|
}
|
|
3690
3689
|
|
|
3691
3690
|
@if (showActiveRange()) {
|
|
3692
|
-
<ui-checkbox [label]="labels.t('emailTemplateEditor.useThisTemplateAllYear')" [(checked)]="useAllYear" [disabled]="!canWrite()" />
|
|
3691
|
+
<ui-checkbox data-testid="template-all-year" [label]="labels.t('emailTemplateEditor.useThisTemplateAllYear')" [(checked)]="useAllYear" [disabled]="!canWrite()" />
|
|
3693
3692
|
}
|
|
3694
3693
|
|
|
3695
3694
|
@if (showActiveRange() && !useAllYear()) {
|
|
3696
3695
|
<div class="form-row-dates" (focusout)="datesTouched.set(true)">
|
|
3697
|
-
<ui-date-input [label]="labels.t('emailTemplateEditor.activeFrom')" [ngModel]="activeFrom()" (ngModelChange)="onActiveFromChange($event)" [disabled]="!canWrite()" [min]="today" />
|
|
3698
|
-
<ui-date-input [label]="labels.t('emailTemplateEditor.activeTo')" [(ngModel)]="activeTo" [disabled]="!canWrite()" [min]="activeToMin()" [error]="datesError()" />
|
|
3696
|
+
<ui-date-input data-testid="template-active-from" [label]="labels.t('emailTemplateEditor.activeFrom')" [ngModel]="activeFrom()" (ngModelChange)="onActiveFromChange($event)" [disabled]="!canWrite()" [min]="today" />
|
|
3697
|
+
<ui-date-input data-testid="template-active-to" [label]="labels.t('emailTemplateEditor.activeTo')" [(ngModel)]="activeTo" [disabled]="!canWrite()" [min]="activeToMin()" [error]="datesError()" />
|
|
3699
3698
|
</div>
|
|
3700
3699
|
}
|
|
3701
3700
|
|
|
@@ -3705,20 +3704,20 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3705
3704
|
<h4 class="section-title">{{ labels.t('emailTemplateEditor.assignments') }}<span class="required" aria-hidden="true">*</span></h4>
|
|
3706
3705
|
<p class="section-desc">{{ assignmentsDescription() }}</p>
|
|
3707
3706
|
<ui-error [errorId]="idPrefix() + '-assignments-error'" [message]="assignmentErrorShown()" />
|
|
3708
|
-
<ui-search-input [placeholder]="labels.t('common.searchellipsis')" [ariaLabel]="labels.t('emailTemplateEditor.searchAssignments')" [(value)]="assignmentSearch" />
|
|
3707
|
+
<ui-search-input data-testid="assignment-search" [placeholder]="labels.t('common.searchellipsis')" [ariaLabel]="labels.t('emailTemplateEditor.searchAssignments')" [(value)]="assignmentSearch" />
|
|
3709
3708
|
@if (filteredAssignments().length === 0) {
|
|
3710
3709
|
<ui-empty-state iconType="search" [title]="labels.t('emailTemplateEditor.noAssignmentsFound')" [message]="labels.t('emailTemplateEditor.noAssignmentsMatchYourSearch')" />
|
|
3711
3710
|
}
|
|
3712
|
-
<div class="assignment-list" [hidden]="filteredAssignments().length === 0" (focusout)="onAssignmentsFocusOut($event)">
|
|
3711
|
+
<div class="assignment-list" data-testid="assignment-list" [hidden]="filteredAssignments().length === 0" (focusout)="onAssignmentsFocusOut($event)">
|
|
3713
3712
|
@for (item of filteredAssignments(); track item.key) {
|
|
3714
3713
|
@if (item.groupStart) {
|
|
3715
|
-
<div class="assignment-group" data-testid="assignment-group">{{ item.group }}</div>
|
|
3714
|
+
<div class="assignment-group" role="heading" aria-level="5" data-testid="assignment-group">{{ item.group }}</div>
|
|
3716
3715
|
}
|
|
3717
|
-
<div class="assignment-item" [class.assignment-readonly]="!canWrite()" [attr.role]="canWrite() ? 'switch' : null" [attr.tabindex]="canWrite() ? 0 : null"
|
|
3716
|
+
<div class="assignment-item" data-testid="assignment-item" [attr.data-assignment]="item.key" [class.assignment-readonly]="!canWrite()" [attr.role]="canWrite() ? 'switch' : null" [attr.tabindex]="canWrite() ? 0 : null"
|
|
3718
3717
|
[attr.aria-checked]="canWrite() ? item.assigned : null" [attr.aria-label]="canWrite() ? item.name : null"
|
|
3719
3718
|
(click)="toggleAssignment(item)" (keydown.enter)="toggleAssignment(item); $event.preventDefault()" (keydown.space)="toggleAssignment(item); $event.preventDefault()">
|
|
3720
3719
|
<div class="assignment-text">
|
|
3721
|
-
<strong>{{ item.name }}</strong>
|
|
3720
|
+
<strong data-testid="assignment-name">{{ item.name }}</strong>
|
|
3722
3721
|
<span>{{ item.description }}</span>
|
|
3723
3722
|
</div>
|
|
3724
3723
|
<div class="assignment-channels">
|
|
@@ -3736,18 +3735,18 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3736
3735
|
<!-- CENTER: Editor -->
|
|
3737
3736
|
<section class="panel-center" [attr.aria-label]="labels.t('emailTemplateEditor.emailDesign')">
|
|
3738
3737
|
<div class="editor-tabs" role="tablist" [attr.aria-label]="labels.t('emailTemplateEditor.editorView')">
|
|
3739
|
-
<button type="button" class="editor-tab" role="tab" [class.active]="activeEditorTab() === 'edit'" [attr.aria-selected]="activeEditorTab() === 'edit'" (click)="setEditorTab('edit')">
|
|
3738
|
+
<button type="button" class="editor-tab" data-testid="editor-tab-edit" role="tab" [class.active]="activeEditorTab() === 'edit'" [attr.aria-selected]="activeEditorTab() === 'edit'" (click)="setEditorTab('edit')">
|
|
3740
3739
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"/></svg>{{ labels.t('common.edit') }}</button>
|
|
3741
|
-
<button type="button" class="editor-tab" role="tab" [class.active]="activeEditorTab() === 'preview'" [attr.aria-selected]="activeEditorTab() === 'preview'" (click)="setEditorTab('preview')">
|
|
3740
|
+
<button type="button" class="editor-tab" data-testid="editor-tab-preview" role="tab" [class.active]="activeEditorTab() === 'preview'" [attr.aria-selected]="activeEditorTab() === 'preview'" (click)="setEditorTab('preview')">
|
|
3742
3741
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>{{ labels.t('common.preview') }}</button>
|
|
3743
|
-
<button type="button" class="editor-tab" role="tab" [class.active]="activeEditorTab() === 'mobile'" [attr.aria-selected]="activeEditorTab() === 'mobile'" (click)="setEditorTab('mobile')">
|
|
3742
|
+
<button type="button" class="editor-tab" data-testid="editor-tab-mobile" role="tab" [class.active]="activeEditorTab() === 'mobile'" [attr.aria-selected]="activeEditorTab() === 'mobile'" (click)="setEditorTab('mobile')">
|
|
3744
3743
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"/><line x1="12" y1="18" x2="12.01" y2="18"/></svg>{{ labels.t('common.mobile') }}</button>
|
|
3745
3744
|
</div>
|
|
3746
3745
|
|
|
3747
3746
|
@if (activeEditorTab() === 'edit') {
|
|
3748
3747
|
@if (canWrite()) {
|
|
3749
3748
|
<!-- Toolbar (the last group is the block spacing): mousedown preventDefault keeps focus (and the selection) in the editor -->
|
|
3750
|
-
<div class="editor-toolbar" role="toolbar" [attr.aria-label]="labels.t('emailTemplateEditor.textFormatting')" (mousedown)="preventFocusLoss($event)">
|
|
3749
|
+
<div class="editor-toolbar" data-testid="editor-toolbar" role="toolbar" [attr.aria-label]="labels.t('emailTemplateEditor.textFormatting')" (mousedown)="preventFocusLoss($event)">
|
|
3751
3750
|
<div class="toolbar-group">
|
|
3752
3751
|
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.undo')" [uiTooltip]="labels.t('emailTemplateEditor.undo')" (click)="execCommand('undo')">
|
|
3753
3752
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 7v6h6"/><path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6.69 3L3 13"/></svg>
|
|
@@ -3781,14 +3780,14 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3781
3780
|
<div class="toolbar-group">
|
|
3782
3781
|
<!-- The browser's own colour dialogs are the pickers; a button opens each so the toolbar keeps one look. -->
|
|
3783
3782
|
<input #colorInput type="color" class="hidden-color-input" [attr.aria-label]="labels.t('emailTemplateEditor.textColor')" tabindex="-1" [value]="currentColor()" (change)="applyTextColor($any($event.target).value)" (mousedown)="$event.stopPropagation()" />
|
|
3784
|
-
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.textColor')" [uiTooltip]="labels.t('emailTemplateEditor.tipTextColor')" data-testid="text-color-button"
|
|
3783
|
+
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.textColor')" [uiTooltip]="labels.t('emailTemplateEditor.tipTextColor')" data-testid="text-color-button" (mousedown)="saveSelection()" (click)="toggleColorPanel('text')">
|
|
3785
3784
|
<span class="color-indicator">
|
|
3786
3785
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><text y="20" font-size="20" font-weight="700">A</text></svg>
|
|
3787
3786
|
<span class="color-bar" [style.background]="currentColor()"></span>
|
|
3788
3787
|
</span>
|
|
3789
3788
|
</ui-button>
|
|
3790
3789
|
<input #highlightInput type="color" class="hidden-color-input" [attr.aria-label]="labels.t('emailTemplateEditor.highlightColor')" tabindex="-1" [value]="currentHighlight()" (change)="applyHighlight($any($event.target).value)" (mousedown)="$event.stopPropagation()" />
|
|
3791
|
-
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.highlightColor')" [uiTooltip]="labels.t('emailTemplateEditor.highlightColor')" data-testid="highlight-color-button"
|
|
3790
|
+
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.highlightColor')" [uiTooltip]="labels.t('emailTemplateEditor.highlightColor')" data-testid="highlight-color-button" (mousedown)="saveSelection()" (click)="toggleColorPanel('highlight')">
|
|
3792
3791
|
<span class="color-indicator">
|
|
3793
3792
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 11l-6 6v3h9l3-3"/><path d="M22 12l-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"/></svg>
|
|
3794
3793
|
<span class="color-bar" [style.background]="currentHighlight()"></span>
|
|
@@ -3886,7 +3885,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3886
3885
|
|
|
3887
3886
|
<!-- Colour picker (inline panel, for the text colour and the highlight): a grid of ready colours, a custom colour (the browser's own dialog) and Remove -->
|
|
3888
3887
|
@if (canWrite() && colorPanel(); as which) {
|
|
3889
|
-
<div class="link-dialog emoji-panel" role="group" [attr.aria-label]="labels.t(which === 'text' ? 'emailTemplateEditor.textColor' : 'emailTemplateEditor.highlightColor')" data-testid="color-panel" (mousedown)="preventFocusLoss($event)">
|
|
3888
|
+
<div class="link-dialog emoji-panel" role="group" [attr.aria-label]="labels.t(which === 'text' ? 'emailTemplateEditor.textColor' : 'emailTemplateEditor.highlightColor')" data-testid="color-panel" (mousedown)="preventFocusLoss($event)" (keydown.escape)="colorPanel.set(null)">
|
|
3890
3889
|
<div class="emoji-panel-head">
|
|
3891
3890
|
<span class="link-dialog-title">{{ labels.t(which === 'text' ? 'emailTemplateEditor.textColor' : 'emailTemplateEditor.highlightColor') }}</span>
|
|
3892
3891
|
<ui-button variant="secondary" size="sm" data-testid="color-remove" (click)="removeColor(which)">{{ labels.t('emailTemplateEditor.removeColor') }}</ui-button>
|
|
@@ -3895,7 +3894,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3895
3894
|
</div>
|
|
3896
3895
|
<div class="color-grid" data-testid="color-grid">
|
|
3897
3896
|
@for (c of colorSwatches; track c) {
|
|
3898
|
-
<button type="button" class="color-swatch" [style.background]="c" [attr.aria-label]="c" [attr.title]="c" [class.selected]="(which === 'text' ? currentColor() : currentHighlight()).toLowerCase() === c" (click)="pickColor(which, c)"></button>
|
|
3897
|
+
<button type="button" class="color-swatch" data-testid="color-swatch" [style.background]="c" [attr.aria-label]="c" [attr.title]="c" [class.selected]="(which === 'text' ? currentColor() : currentHighlight()).toLowerCase() === c" [attr.aria-pressed]="(which === 'text' ? currentColor() : currentHighlight()).toLowerCase() === c" (click)="pickColor(which, c)"></button>
|
|
3899
3898
|
}
|
|
3900
3899
|
</div>
|
|
3901
3900
|
</div>
|
|
@@ -3905,7 +3904,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3905
3904
|
@if (canWrite() && showEmojiPanel()) {
|
|
3906
3905
|
<div class="link-dialog emoji-panel" role="group" [attr.aria-label]="labels.t('emailTemplateEditor.emoji')" data-testid="emoji-panel" (mousedown)="preventFocusLoss($event)">
|
|
3907
3906
|
<div class="emoji-panel-head">
|
|
3908
|
-
<ui-text-input class="emoji-search" [ariaLabel]="labels.t('emailTemplateEditor.emojiSearch')" [placeholder]="labels.t('emailTemplateEditor.emojiSearch')" [(ngModel)]="emojiSearch" (mousedown)="saveSelection()" />
|
|
3907
|
+
<ui-text-input class="emoji-search" data-testid="emoji-search" [ariaLabel]="labels.t('emailTemplateEditor.emojiSearch')" [placeholder]="labels.t('emailTemplateEditor.emojiSearch')" [(ngModel)]="emojiSearch" (mousedown)="saveSelection()" />
|
|
3909
3908
|
<ui-select class="emoji-tone" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.emojiSkinTone')" [options]="skinToneOptions()" [(ngModel)]="emojiTone" (mousedown)="saveSelection()" />
|
|
3910
3909
|
<ui-button variant="secondary" size="sm" (click)="showEmojiPanel.set(false)">{{ labels.t('emailTemplateEditor.emojiClose') }}</ui-button>
|
|
3911
3910
|
</div>
|
|
@@ -3918,7 +3917,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3918
3917
|
}
|
|
3919
3918
|
<div class="emoji-grid" data-testid="emoji-grid">
|
|
3920
3919
|
@for (e of shownEmojis(); track e.char) {
|
|
3921
|
-
<button type="button" class="emoji-btn" [attr.aria-label]="emojiName(e)" [attr.title]="e.words.split(' ').slice(0, 3).join(' ')" (click)="insertEmoji(emojiWithTone(e))">{{ emojiWithTone(e) }}</button>
|
|
3920
|
+
<button type="button" class="emoji-btn" data-testid="emoji-option" [attr.aria-label]="emojiName(e)" [attr.title]="e.words.split(' ').slice(0, 3).join(' ')" (click)="insertEmoji(emojiWithTone(e))">{{ emojiWithTone(e) }}</button>
|
|
3922
3921
|
} @empty {
|
|
3923
3922
|
<span class="emoji-empty">{{ labels.t('emailTemplateEditor.emojiNoResults') }}</span>
|
|
3924
3923
|
}
|
|
@@ -3935,7 +3934,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3935
3934
|
</div>
|
|
3936
3935
|
<div class="emoji-grid">
|
|
3937
3936
|
@for (c of specialCharacters; track c) {
|
|
3938
|
-
<button type="button" class="emoji-btn special-btn" [attr.aria-label]="c" (click)="insertEmoji(c)">{{ c }}</button>
|
|
3937
|
+
<button type="button" class="emoji-btn special-btn" data-testid="special-option" [attr.aria-label]="c" (click)="insertEmoji(c)">{{ c }}</button>
|
|
3939
3938
|
}
|
|
3940
3939
|
</div>
|
|
3941
3940
|
</div>
|
|
@@ -3947,7 +3946,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3947
3946
|
<div class="link-dialog-inner">
|
|
3948
3947
|
<span class="link-dialog-title">{{ labels.t('emailTemplateEditor.insertImage2') }}</span>
|
|
3949
3948
|
@if (imageUpload()) {
|
|
3950
|
-
<input #imageFile type="file" class="hidden-file-input" accept="image/png,image/jpeg,image/webp,image/gif" tabindex="-1" [attr.aria-label]="labels.t('emailTemplateEditor.uploadImage')" (change)="onImageFile($event)" />
|
|
3949
|
+
<input #imageFile type="file" class="hidden-file-input" data-testid="image-file-input" accept="image/png,image/jpeg,image/webp,image/gif" tabindex="-1" [attr.aria-label]="labels.t('emailTemplateEditor.uploadImage')" (change)="onImageFile($event)" />
|
|
3951
3950
|
<ui-button variant="secondary" size="sm" [loading]="imageUploading()" (click)="imageFile.click()">{{ imageUploading() ? labels.t('emailTemplateEditor.uploadingImage') : labels.t('emailTemplateEditor.uploadImage') }}</ui-button>
|
|
3952
3951
|
<ui-error [errorId]="idPrefix() + '-image-upload-error'" [message]="imageUploadError()" />
|
|
3953
3952
|
}
|
|
@@ -3978,7 +3977,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3978
3977
|
@for (block of blocks(); track block.id) {
|
|
3979
3978
|
<div class="block-wrapper">
|
|
3980
3979
|
<!-- contenteditable, initialised ONCE after render so Angular never rewrites it and the caret never jumps -->
|
|
3981
|
-
<div #blockEditor class="block-content tpl-doc" role="textbox" aria-multiline="true" [attr.aria-label]="labels.t('emailTemplateEditor.documentLabel')"
|
|
3980
|
+
<div #blockEditor class="block-content tpl-doc" data-testid="email-document" role="textbox" aria-multiline="true" [attr.aria-label]="labels.t('emailTemplateEditor.documentLabel')"
|
|
3982
3981
|
[attr.data-block-id]="block.id" [attr.data-placeholder]="startPlaceholder()" [attr.contenteditable]="canWrite() ? 'true' : 'false'"
|
|
3983
3982
|
(input)="onBlockInput($event, block)" (beforeinput)="onBlockBeforeInput($any($event))" (focus)="onBlockFocus(block)" (keyup)="refreshContext()" (mouseup)="refreshContext()" (keydown.enter)="onDocEnter($event)"
|
|
3984
3983
|
(dragover)="onDocDragOver($event)" (drop)="onDocDrop($event)"></div>
|
|
@@ -3988,15 +3987,15 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
3988
3987
|
}
|
|
3989
3988
|
|
|
3990
3989
|
@if (activeEditorTab() === 'preview') {
|
|
3991
|
-
<div class="preview-frame">
|
|
3992
|
-
<iframe class="preview-content" [attr.title]="labels.t('emailTemplateEditor.emailPreview')" sandbox="" referrerpolicy="no-referrer" [srcdoc]="previewDoc()"></iframe>
|
|
3990
|
+
<div class="preview-frame" data-testid="preview-frame">
|
|
3991
|
+
<iframe class="preview-content" data-testid="preview-iframe" [attr.title]="labels.t('emailTemplateEditor.emailPreview')" sandbox="" referrerpolicy="no-referrer" [srcdoc]="previewDoc()"></iframe>
|
|
3993
3992
|
</div>
|
|
3994
3993
|
}
|
|
3995
3994
|
|
|
3996
3995
|
@if (activeEditorTab() === 'mobile') {
|
|
3997
|
-
<div class="preview-frame mobile">
|
|
3998
|
-
<div class="mobile-shell">
|
|
3999
|
-
<iframe class="preview-content" [attr.title]="labels.t('emailTemplateEditor.mobileEmailPreview')" sandbox="" referrerpolicy="no-referrer" [srcdoc]="previewDoc()"></iframe>
|
|
3996
|
+
<div class="preview-frame mobile" data-testid="mobile-preview-frame">
|
|
3997
|
+
<div class="mobile-shell" data-testid="mobile-shell">
|
|
3998
|
+
<iframe class="preview-content" data-testid="mobile-preview-iframe" [attr.title]="labels.t('emailTemplateEditor.mobileEmailPreview')" sandbox="" referrerpolicy="no-referrer" [srcdoc]="previewDoc()"></iframe>
|
|
4000
3999
|
</div>
|
|
4001
4000
|
</div>
|
|
4002
4001
|
}
|
|
@@ -4011,18 +4010,18 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
4011
4010
|
</div>
|
|
4012
4011
|
} @else {
|
|
4013
4012
|
<div class="right-tabs" role="tablist" [attr.aria-label]="labels.t('emailTemplateEditor.rightPanelSections')">
|
|
4014
|
-
<button type="button" class="right-tab" role="tab" [class.active]="activeRightTab() === 'blocks'" [attr.aria-selected]="activeRightTab() === 'blocks'" (click)="activeRightTab.set('blocks')">
|
|
4013
|
+
<button type="button" class="right-tab" data-testid="right-tab-blocks" role="tab" [class.active]="activeRightTab() === 'blocks'" [attr.aria-selected]="activeRightTab() === 'blocks'" (click)="activeRightTab.set('blocks')">
|
|
4015
4014
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>{{ labels.t('emailTemplateEditor.blocks') }}</button>
|
|
4016
|
-
<button type="button" class="right-tab" role="tab" [class.active]="activeRightTab() === 'variables'" [attr.aria-selected]="activeRightTab() === 'variables'" (click)="activeRightTab.set('variables')">
|
|
4015
|
+
<button type="button" class="right-tab" data-testid="right-tab-variables" role="tab" [class.active]="activeRightTab() === 'variables'" [attr.aria-selected]="activeRightTab() === 'variables'" (click)="activeRightTab.set('variables')">
|
|
4017
4016
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M12 3v18M3 12h18"/></svg>{{ labels.t('emailTemplateEditor.variables') }}</button>
|
|
4018
4017
|
@if (videosEnabled()) {
|
|
4019
|
-
<button type="button" class="right-tab" role="tab" [class.active]="activeRightTab() === 'video'" [attr.aria-selected]="activeRightTab() === 'video'" (click)="openVideoTab()">
|
|
4018
|
+
<button type="button" class="right-tab" data-testid="right-tab-video" role="tab" [class.active]="activeRightTab() === 'video'" [attr.aria-selected]="activeRightTab() === 'video'" (click)="openVideoTab()">
|
|
4020
4019
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>{{ labels.t('common.video') }}</button>
|
|
4021
4020
|
}
|
|
4022
4021
|
</div>
|
|
4023
4022
|
|
|
4024
4023
|
@if (activeRightTab() === 'blocks') {
|
|
4025
|
-
<div class="right-panel-body">
|
|
4024
|
+
<div class="right-panel-body" data-testid="blocks-panel">
|
|
4026
4025
|
<h4 class="right-section-title">{{ labels.t('emailTemplateEditor.contentBlocks') }}</h4>
|
|
4027
4026
|
<p class="right-section-desc">{{ labels.t('emailTemplateEditor.clickToInsertOrDrag') }}</p>
|
|
4028
4027
|
<ui-search-input [placeholder]="labels.t('emailTemplateEditor.searchBlocks')" [ariaLabel]="labels.t('emailTemplateEditor.searchBlocks2')" [(value)]="blockSearch" />
|
|
@@ -4032,7 +4031,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
4032
4031
|
}
|
|
4033
4032
|
@for (group of filteredBlockGroups(); track group.name) {
|
|
4034
4033
|
<div class="block-group">
|
|
4035
|
-
<button type="button" class="block-group-header" [attr.aria-expanded]="isOpen('b:' + group.name)" (click)="toggleGroup('b:' + group.name)">
|
|
4034
|
+
<button type="button" class="block-group-header" data-testid="block-group" [attr.aria-expanded]="isOpen('b:' + group.name)" (click)="toggleGroup('b:' + group.name)">
|
|
4036
4035
|
<svg class="chevron" [class.expanded]="isOpen('b:' + group.name)" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M9 18l6-6-6-6"/></svg>
|
|
4037
4036
|
<span>{{ group.name }}</span>
|
|
4038
4037
|
<span class="block-count">{{ group.blocks.length }}</span>
|
|
@@ -4041,7 +4040,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
4041
4040
|
<div class="block-list">
|
|
4042
4041
|
@for (block of group.blocks; track block.key) {
|
|
4043
4042
|
<!-- A div, not a button: Firefox does not start a drag from a <button>. Role, tabindex and Enter / Space keep it a keyboard control; a click inserts the block. -->
|
|
4044
|
-
<div role="button" tabindex="0" class="block-item" draggable="true" [attr.aria-label]="labels.t('emailTemplateEditor.insertNamed', { name: block.label })"
|
|
4043
|
+
<div role="button" tabindex="0" class="block-item" data-testid="block-item" [attr.data-block-key]="block.key" draggable="true" [attr.aria-label]="labels.t('emailTemplateEditor.insertNamed', { name: block.label })"
|
|
4045
4044
|
(dragstart)="onPaletteDragStart($event, block)" (dragend)="onBlockDragEnd()" (click)="insertBlock(block)"
|
|
4046
4045
|
(keydown.enter)="insertBlock(block); $event.preventDefault()" (keydown.space)="insertBlock(block); $event.preventDefault()">
|
|
4047
4046
|
<svg class="block-item-drag" width="10" height="10" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><circle cx="9" cy="6" r="1.5"/><circle cx="15" cy="6" r="1.5"/><circle cx="9" cy="12" r="1.5"/><circle cx="15" cy="12" r="1.5"/><circle cx="9" cy="18" r="1.5"/><circle cx="15" cy="18" r="1.5"/></svg>
|
|
@@ -4056,7 +4055,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
4056
4055
|
}
|
|
4057
4056
|
|
|
4058
4057
|
@if (activeRightTab() === 'variables') {
|
|
4059
|
-
<div class="right-panel-body">
|
|
4058
|
+
<div class="right-panel-body" data-testid="variables-panel">
|
|
4060
4059
|
<h4 class="right-section-title">{{ labels.t('emailTemplateEditor.templateVariables') }}</h4>
|
|
4061
4060
|
@if (variablesNeedAssignment()) {
|
|
4062
4061
|
<p class="right-section-desc" role="status" data-testid="variables-need-assignment">{{ labels.t('emailTemplateEditor.assignToSeeVariables') }}</p>
|
|
@@ -4065,7 +4064,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
4065
4064
|
}
|
|
4066
4065
|
@for (group of availableVariableGroups(); track group.name) {
|
|
4067
4066
|
<div class="block-group">
|
|
4068
|
-
<button type="button" class="block-group-header" [attr.aria-expanded]="isOpen('v:' + group.name)" (click)="toggleGroup('v:' + group.name)">
|
|
4067
|
+
<button type="button" class="block-group-header" data-testid="variable-group" [attr.aria-expanded]="isOpen('v:' + group.name)" (click)="toggleGroup('v:' + group.name)">
|
|
4069
4068
|
<svg class="chevron" [class.expanded]="isOpen('v:' + group.name)" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M9 18l6-6-6-6"/></svg>
|
|
4070
4069
|
<span>{{ group.name }}</span>
|
|
4071
4070
|
<span class="block-count">{{ group.variables.length }}</span>
|
|
@@ -4073,8 +4072,8 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
4073
4072
|
@if (isOpen('v:' + group.name)) {
|
|
4074
4073
|
<div class="variable-list">
|
|
4075
4074
|
@for (v of group.variables; track v.key) {
|
|
4076
|
-
<button type="button" class="variable-item" (mousedown)="saveSelection()" (click)="insertVariable(v)">
|
|
4077
|
-
<span class="var-tag">{{ '{{' + v.key + '}}' }}</span>
|
|
4075
|
+
<button type="button" class="variable-item" data-testid="variable-item" [attr.data-variable]="v.key" (mousedown)="saveSelection()" (click)="insertVariable(v)">
|
|
4076
|
+
<span class="var-tag" data-testid="variable-tag">{{ '{{' + v.key + '}}' }}</span>
|
|
4078
4077
|
<span class="var-example">{{ labels.t('emailTemplateEditor.example', { example: v.example }) }}</span>
|
|
4079
4078
|
<!-- A very short explanation of what the variable is: the host's description, else its label. -->
|
|
4080
4079
|
<span class="var-description">{{ v.description || v.label }}</span>
|
|
@@ -4088,7 +4087,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
4088
4087
|
}
|
|
4089
4088
|
|
|
4090
4089
|
@if (activeRightTab() === 'video' && videosEnabled()) {
|
|
4091
|
-
<div class="right-panel-body video-library-panel">
|
|
4090
|
+
<div class="right-panel-body video-library-panel" data-testid="video-panel">
|
|
4092
4091
|
<h4 class="right-section-title">{{ labels.t('emailTemplateEditor.videoLibrary') }}</h4>
|
|
4093
4092
|
<p class="right-section-hint">{{ labels.t('emailTemplateEditor.clickAVideoToAdd') }}</p>
|
|
4094
4093
|
|
|
@@ -4167,7 +4166,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
|
|
|
4167
4166
|
|
|
4168
4167
|
`,
|
|
4169
4168
|
isInline: true,
|
|
4170
|
-
styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0}.required{color:#ef4444;font-weight:400}.editor-page{display:flex;flex-direction:column;flex:1;min-height:0;background:#f8fafc;overflow:hidden}.editor-actions{display:flex;justify-content:space-between;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:0 0 12px;flex-shrink:0}.editor-heading-group{display:flex;align-items:center;gap:4px;min-width:0}.editor-heading{margin:0;font-size:1.25rem;font-weight:700;color:#1e293b;line-height:1.3;min-width:0}.save-wrap{display:inline-flex}.save-hint{margin:0;font-size:12px;color:#475569;flex-basis:100%;text-align:right}.editor-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}.readonly-note{margin:0;padding:8px 16px;font-size:.8125rem;color:#92400e;background:#fffbeb;border-bottom:1px solid #fde68a}.readonly-note.system-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.editor-body{display:grid;grid-template-columns:340px minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr);flex:1;min-height:0;overflow:hidden}.panel-left{background:#fff;border-right:1px solid #e2e8f0;padding:24px;overflow-y:auto;overflow-x:hidden}.panel-title{font-size:1.0625rem;font-weight:700;color:#1e293b;margin:0 0 20px}.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}.form-row-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.form-row-dates>*{min-width:0}.email-checks{margin:8px 12px 0}.email-checks-list{margin:0;padding-left:18px}.hidden-file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.assignments-section{border-top:1px solid #e2e8f0;padding-top:20px;margin-top:16px}.section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 6px}.section-desc{font-size:.8125rem;color:#64748b;line-height:1.5;margin:0 0 12px}.assignment-list{max-height:340px;overflow-y:auto;margin-top:12px;border:1px solid #e2e8f0;border-radius:8px}.assignment-group{position:sticky;top:0;z-index:1;padding:8px 14px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:.6875rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.assignment-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9;transition:background .1s}.assignment-item:last-child{border-bottom:none}.assignment-item:hover{background:#f8fafc}.assignment-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.assignment-item.assignment-readonly{cursor:default}.assignment-item.assignment-readonly:hover{background:transparent}.assignment-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.assignment-text strong{font-size:.8125rem;color:#1e293b}.assignment-text span{font-size:.75rem;color:#64748b}.assignment-channels{display:flex;gap:4px;flex-shrink:0}.channel-badge{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:#f1f5f9;color:#64748b;transition:all .15s}.channel-badge.active{background:#3b82f6;color:#fff}.channel-badge.disabled{opacity:.4;cursor:not-allowed}.config-desc{font-size:.875rem;color:#64748b;line-height:1.5;margin:0}.config-divider{border:none;border-top:1px solid #e2e8f0;margin:20px 0}.config-section{display:flex;flex-direction:column;gap:12px}.config-section-label{font-size:.6875rem;font-weight:700;color:#3b82f6;text-transform:uppercase;letter-spacing:.04em}.config-field{display:flex;flex-direction:column;gap:6px}.config-field-mt{margin-top:16px}.config-label{font-size:.8125rem;font-weight:600;color:#1e293b}.config-readonly{padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;font-size:.875rem;color:#1e293b}.config-hint{font-size:.75rem;color:#64748b}.test-save-note{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;font-size:.8125rem;color:#92400e;margin-top:12px}.test-save-note svg{flex-shrink:0}.panel-center{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.editor-tabs{display:flex;gap:2px;padding:12px 20px 0;background:#fff;border-bottom:1px solid #e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch}.editor-tab{display:flex;align-items:center;gap:6px;padding:10px 16px;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;background:#f8fafc;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;white-space:nowrap}.editor-tab:hover{background:#fff;color:#1e293b}.editor-tab.active{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd}.editor-tab:focus-visible,.right-tab:focus-visible,.block-group-header:focus-visible,.variable-item:focus-visible,.block-item:focus-visible,.video-lib-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.editor-toolbar{display:flex;align-items:center;gap:8px;padding:10px 20px;background:#fff;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.toolbar-group{display:flex;align-items:center;gap:2px;padding-right:8px;border-right:1px solid #e2e8f0}.toolbar-group:last-child{border-right:none;padding-right:0}.toolbar-select{display:block;min-width:96px}.toolbar-label{font-size:.75rem;font-weight:600;color:#64748b;white-space:nowrap;margin-right:6px}.hidden-color-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none;border:none;padding:0}.color-indicator{display:flex;flex-direction:column;align-items:center;gap:2px;color:#475569}.color-bar{display:block;width:16px;height:3px;border-radius:2px;border:1px solid rgba(0,0,0,.1)}.link-dialog{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 20px}.link-dialog-inner{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.link-dialog-title{font-size:.8125rem;font-weight:700;color:#1e293b;white-space:nowrap;padding-top:10px}.link-dialog-input{display:block;width:240px;max-width:100%}.link-dialog-actions{display:flex;gap:6px}.emoji-panel-head{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}.emoji-search{display:block;flex:1 1 200px;min-width:160px}.emoji-tone{display:block;min-width:120px}.emoji-tabs{display:flex;gap:2px;border-bottom:1px solid #e2e8f0;margin-bottom:8px;overflow-x:auto}.emoji-tab{flex:0 0 auto;width:40px;height:36px;border:0;border-bottom:2px solid transparent;background:transparent;font-size:18px;cursor:pointer;font-family:\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Noto Color Emoji\",sans-serif}.emoji-tab.active{border-bottom-color:#3b82f6;background:#eff6ff}.color-grid{display:grid;grid-template-columns:repeat(10,28px);gap:4px}.color-swatch{width:28px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,.15);cursor:pointer;padding:0}.color-swatch:hover{transform:scale(1.1)}.color-swatch:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.color-swatch.selected{outline:2px solid #1e293b;outline-offset:1px}.emoji-grid{display:flex;flex-wrap:wrap;gap:2px;max-height:220px;overflow-y:auto}.emoji-empty{font-size:.8125rem;color:#64748b;padding:8px 4px}.emoji-btn{width:36px;height:36px;padding:0;border:0;border-radius:6px;background:transparent;font-size:20px;line-height:1;cursor:pointer;font-family:\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Noto Color Emoji\",sans-serif}.emoji-btn.special-btn{font-family:inherit;font-size:16px}.emoji-btn:hover,.emoji-btn:focus-visible{background:#f1f5f9}.tb-sub{font-size:12px;font-weight:700;line-height:1}@media(pointer:coarse){.emoji-btn{width:44px;height:44px}}.preview-frame{flex:1;display:flex;justify-content:center;align-items:stretch;padding:24px;overflow-y:auto;background:#f1f5f9}.preview-frame.mobile{align-items:flex-start}.preview-content{display:block;flex:1 1 auto;max-width:602px;width:100%;box-sizing:border-box;min-height:400px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.mobile-shell{width:375px;max-width:100%;box-sizing:border-box;min-height:600px;border:2px solid #1e293b;border-radius:24px;padding:40px 12px 24px;background:#fff;box-shadow:0 8px 32px #0000001f}.mobile-shell .preview-content{border:none;border-radius:0;max-width:100%;height:520px;min-height:0}.block-wrapper{flex-shrink:0;width:100%;max-width:602px;margin:0 auto;box-sizing:border-box;padding:24px 28px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.blocks-canvas{flex:1 1 0;min-height:0;padding:16px 20px 24px 56px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#f1f5f9;display:flex;flex-direction:column}.block-content{min-width:0;padding:0;outline:none;font-size:15px;color:#1e293b;line-height:1.6;min-height:320px;overflow-wrap:anywhere}.block-content:empty:before{content:attr(data-placeholder);color:#64748b;font-style:italic;pointer-events:none}@media(pointer:coarse){.editor-tab,.right-tab,.block-group-header{min-height:44px}}.panel-right{background:#fff;border-left:1px solid #e2e8f0;display:flex;flex-direction:column;min-height:0;min-width:0}.right-tabs{display:flex;border-bottom:1px solid #e2e8f0}.right-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;min-height:44px;border:none;background:none;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;border-bottom:2px solid transparent}.right-tab:hover{color:#1e293b}.right-tab.active{color:#1d4ed8;background:#eff6ff;border-bottom-color:#3b82f6}.right-panel-body{flex:1;padding:20px;overflow-y:auto}.right-section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 12px}.right-section-desc{font-size:.8125rem;color:#64748b;margin:0 0 16px;line-height:1.5}.right-section-hint{font-size:.8125rem;color:#64748b;margin:0 0 12px;line-height:1.5}.block-group{border-bottom:1px solid #f1f5f9}.block-group-header{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:12px 0;border:none;background:none;font-size:.875rem;font-weight:600;color:#1e293b;cursor:pointer;font-family:inherit;text-align:left}.block-group-header .chevron{transition:transform .2s;color:#94a3b8}.block-group-header .chevron.expanded{transform:rotate(90deg)}.block-group-header span:nth-of-type(1){flex:1}.block-count{font-size:.75rem;font-weight:600;color:#475569;background:#f1f5f9;padding:2px 8px;border-radius:10px;margin-left:auto}.block-list{display:flex;flex-direction:column;gap:2px;padding-bottom:8px}.variable-list{display:flex;flex-direction:column;padding-bottom:8px}.variable-item+.variable-item{border-top:1px solid #f1f5f9;border-radius:0}.block-item{display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;min-height:44px;padding:8px 0;font-size:.8125rem;color:#64748b;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit;-webkit-user-select:none;user-select:none}.block-item:hover{background:#f8fafc;color:#1e293b}.block-item-drag{color:#cbd5e1;flex-shrink:0;cursor:grab}.variable-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:44px;padding:8px 0;min-width:0;width:100%;box-sizing:border-box;border:none;background:none;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit}.variable-item:hover{background:#f8fafc}.var-tag{max-width:100%;overflow-wrap:anywhere;font-size:.75rem;font-weight:600;color:#1d4ed8;background:#3b82f614;padding:2px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.var-example{font-size:.75rem;color:#64748b;overflow-wrap:anywhere}.var-description{font-size:.75rem;color:#64748b;line-height:1.4;overflow-wrap:anywhere}.video-library-panel{padding:0}.video-library-panel .right-section-title,.video-library-panel .right-section-hint{padding:0 16px}.video-library-panel .right-section-title{padding-top:16px}.video-config-section{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-bottom:1px solid #f1f5f9}.video-config-section:last-of-type{border-bottom:none}.video-lib-list{display:flex;flex-direction:column;gap:2px;padding:8px 8px 16px}.video-lib-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;text-align:left;font-family:inherit;transition:background .15s,border-color .15s}.video-lib-item:hover{background:#f8fafc;border-color:#e2e8f0}.video-lib-item.selected{background:#eff6ff;border-color:#93c5fd}.vli-thumb{position:relative;flex-shrink:0;width:56px;height:40px;border-radius:6px;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);display:flex;align-items:center;justify-content:center}.vli-dur{position:absolute;bottom:2px;right:3px;font-size:.625rem;font-weight:600;color:#fff;background:#000000a6;padding:1px 4px;border-radius:3px}.vli-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.vli-title{font-size:.8125rem;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vli-cat{font-size:.75rem;color:#475569}.vli-check{flex-shrink:0}.video-lib-loading{padding:8px}.video-lib-skeleton{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:4px}.vls-info{flex:1;display:flex;flex-direction:column;gap:6px}@media(max-width:1200px){.editor-body{grid-template-columns:280px minmax(0,1fr) 260px}}@media(max-width:900px){:host{flex:none}.editor-page{flex:none;min-height:100vh;min-height:100dvh;overflow:visible}.editor-body{display:flex;flex-direction:column;flex:none;overflow:visible}.panel-left{border-right:none;border-bottom:1px solid #e2e8f0;overflow:visible;padding:16px}.panel-center{overflow:visible;min-height:480px}.blocks-canvas{overflow:visible;min-height:320px}.panel-right{border-left:none;border-top:1px solid #e2e8f0}.right-panel-body{overflow:visible}.editor-toolbar,.link-dialog,.editor-tabs{padding-left:12px;padding-right:12px}.preview-frame{padding:12px}.form-row-dates{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}\n"],
|
|
4169
|
+
styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0}.required{color:#ef4444;font-weight:400}.editor-page{display:flex;flex-direction:column;flex:1;min-height:0;background:#f8fafc;overflow:hidden}.editor-actions{display:flex;justify-content:space-between;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:0 0 12px;flex-shrink:0}.editor-heading-group{display:flex;align-items:center;gap:4px;min-width:0}.editor-heading{margin:0;font-size:1.25rem;font-weight:700;color:#1e293b;line-height:1.3;min-width:0}.save-wrap{display:inline-flex}.save-hint{margin:0;font-size:12px;color:#475569;flex-basis:100%;text-align:right}.editor-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}.readonly-note{margin:0;padding:8px 16px;font-size:.8125rem;color:#92400e;background:#fffbeb;border-bottom:1px solid #fde68a}.readonly-note.system-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.editor-body{display:grid;grid-template-columns:340px minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr);flex:1;min-height:0;overflow:hidden}.panel-left{background:#fff;border-right:1px solid #e2e8f0;padding:24px;overflow-y:auto;overflow-x:hidden}.panel-title{font-size:1.0625rem;font-weight:700;color:#1e293b;margin:0 0 20px}.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}.form-row-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.form-row-dates>*{min-width:0}.email-checks{margin:8px 12px 0}.email-checks-list{margin:0;padding-left:18px}.hidden-file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.assignments-section{border-top:1px solid #e2e8f0;padding-top:20px;margin-top:16px}.section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 6px}.section-desc{font-size:.8125rem;color:#64748b;line-height:1.5;margin:0 0 12px}.assignment-list{max-height:340px;overflow-y:auto;margin-top:12px;border:1px solid #e2e8f0;border-radius:8px}.assignment-group{position:sticky;top:0;z-index:1;padding:8px 14px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:.6875rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.assignment-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9;transition:background .1s}.assignment-item:last-child{border-bottom:none}.assignment-item:hover{background:#f8fafc}.assignment-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.assignment-item.assignment-readonly{cursor:default}.assignment-item.assignment-readonly:hover{background:transparent}.assignment-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.assignment-text strong{font-size:.8125rem;color:#1e293b}.assignment-text span{font-size:.75rem;color:#64748b}.assignment-channels{display:flex;gap:4px;flex-shrink:0}.channel-badge{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:#f1f5f9;color:#64748b;transition:all .15s}.channel-badge.active{background:#3b82f6;color:#fff}.channel-badge.disabled{opacity:.4;cursor:not-allowed}.config-desc{font-size:.875rem;color:#64748b;line-height:1.5;margin:0}.config-section{display:flex;flex-direction:column;gap:12px}.config-field{display:flex;flex-direction:column;gap:6px}.config-field-mt{margin-top:16px}.test-save-note{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;font-size:.8125rem;color:#92400e;margin-top:12px}.test-save-note svg{flex-shrink:0}.panel-center{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.editor-tabs{display:flex;gap:2px;padding:12px 20px 0;background:#fff;border-bottom:1px solid #e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch}.editor-tab{display:flex;align-items:center;gap:6px;padding:10px 16px;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;background:#f8fafc;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;white-space:nowrap}.editor-tab:hover{background:#fff;color:#1e293b}.editor-tab.active{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd}.editor-tab:focus-visible,.right-tab:focus-visible,.block-group-header:focus-visible,.variable-item:focus-visible,.block-item:focus-visible,.video-lib-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.editor-toolbar{display:flex;align-items:center;gap:8px;padding:10px 20px;background:#fff;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.toolbar-group{display:flex;align-items:center;gap:2px;padding-right:8px;border-right:1px solid #e2e8f0}.toolbar-group:last-child{border-right:none;padding-right:0}.toolbar-select{display:block;min-width:96px}.hidden-color-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none;border:none;padding:0}.color-indicator{display:flex;flex-direction:column;align-items:center;gap:2px;color:#475569}.color-bar{display:block;width:16px;height:3px;border-radius:2px;border:1px solid rgba(0,0,0,.1)}.link-dialog{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 20px}.link-dialog-inner{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.link-dialog-title{font-size:.8125rem;font-weight:700;color:#1e293b;white-space:nowrap;padding-top:10px}.link-dialog-input{display:block;width:240px;max-width:100%}.link-dialog-actions{display:flex;gap:6px}.emoji-panel-head{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}.emoji-search{display:block;flex:1 1 200px;min-width:160px}.emoji-tone{display:block;min-width:120px}.emoji-tabs{display:flex;gap:2px;border-bottom:1px solid #e2e8f0;margin-bottom:8px;overflow-x:auto}.emoji-tab{flex:0 0 auto;width:40px;height:36px;border:0;border-bottom:2px solid transparent;background:transparent;font-size:18px;cursor:pointer;font-family:\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Noto Color Emoji\",sans-serif}.emoji-tab.active{border-bottom-color:#3b82f6;background:#eff6ff}.color-grid{display:grid;grid-template-columns:repeat(10,28px);gap:4px}.color-swatch{width:28px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,.15);cursor:pointer;padding:0}.color-swatch:hover{transform:scale(1.1)}.color-swatch:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.color-swatch.selected{outline:2px solid #1e293b;outline-offset:1px}@media(pointer:coarse){.color-grid{grid-template-columns:repeat(auto-fill,44px);max-height:240px;overflow-y:auto}.color-swatch{width:44px;height:44px}}.emoji-grid{display:flex;flex-wrap:wrap;gap:2px;max-height:220px;overflow-y:auto}.emoji-empty{font-size:.8125rem;color:#64748b;padding:8px 4px}.emoji-btn{width:36px;height:36px;padding:0;border:0;border-radius:6px;background:transparent;font-size:20px;line-height:1;cursor:pointer;font-family:\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Noto Color Emoji\",sans-serif}.emoji-btn.special-btn{font-family:inherit;font-size:16px}.emoji-btn:hover,.emoji-btn:focus-visible{background:#f1f5f9}.tb-sub{font-size:12px;font-weight:700;line-height:1}@media(pointer:coarse){.emoji-btn{width:44px;height:44px}}.preview-frame{flex:1;display:flex;justify-content:center;align-items:stretch;padding:24px;overflow-y:auto;background:#f1f5f9}.preview-frame.mobile{align-items:flex-start}.preview-content{display:block;flex:1 1 auto;max-width:602px;width:100%;box-sizing:border-box;min-height:400px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.mobile-shell{width:375px;max-width:100%;box-sizing:border-box;min-height:600px;border:2px solid #1e293b;border-radius:24px;padding:40px 12px 24px;background:#fff;box-shadow:0 8px 32px #0000001f}.mobile-shell .preview-content{border:none;border-radius:0;max-width:100%;height:520px;min-height:0}.block-wrapper{flex-shrink:0;width:100%;max-width:602px;margin:0 auto;box-sizing:border-box;padding:24px 28px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.blocks-canvas{flex:1 1 0;min-height:0;padding:16px 20px 24px 56px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#f1f5f9;display:flex;flex-direction:column}.block-content{min-width:0;padding:0;outline:none;font-size:15px;color:#1e293b;line-height:1.6;min-height:320px;overflow-wrap:anywhere}.block-content:empty:before{content:attr(data-placeholder);color:#64748b;font-style:italic;pointer-events:none}@media(pointer:coarse){.editor-tab,.right-tab,.block-group-header{min-height:44px}}.panel-right{background:#fff;border-left:1px solid #e2e8f0;display:flex;flex-direction:column;min-height:0;min-width:0}.right-tabs{display:flex;border-bottom:1px solid #e2e8f0}.right-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;min-height:44px;border:none;background:none;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;border-bottom:2px solid transparent}.right-tab:hover{color:#1e293b}.right-tab.active{color:#1d4ed8;background:#eff6ff;border-bottom-color:#3b82f6}.right-panel-body{flex:1;padding:20px;overflow-y:auto}.right-section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 12px}.right-section-desc{font-size:.8125rem;color:#64748b;margin:0 0 16px;line-height:1.5}.right-section-hint{font-size:.8125rem;color:#64748b;margin:0 0 12px;line-height:1.5}.block-group{border-bottom:1px solid #f1f5f9}.block-group-header{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:12px 0;border:none;background:none;font-size:.875rem;font-weight:600;color:#1e293b;cursor:pointer;font-family:inherit;text-align:left}.block-group-header .chevron{transition:transform .2s;color:#94a3b8}.block-group-header .chevron.expanded{transform:rotate(90deg)}.block-group-header span:nth-of-type(1){flex:1}.block-count{font-size:.75rem;font-weight:600;color:#475569;background:#f1f5f9;padding:2px 8px;border-radius:10px;margin-left:auto}.block-list{display:flex;flex-direction:column;gap:2px;padding-bottom:8px}.variable-list{display:flex;flex-direction:column;padding-bottom:8px}.variable-item+.variable-item{border-top:1px solid #f1f5f9;border-radius:0}.block-item{display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;min-height:44px;padding:8px 0;font-size:.8125rem;color:#64748b;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit;-webkit-user-select:none;user-select:none}.block-item:hover{background:#f8fafc;color:#1e293b}.block-item-drag{color:#cbd5e1;flex-shrink:0;cursor:grab}.variable-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:44px;padding:8px 0;min-width:0;width:100%;box-sizing:border-box;border:none;background:none;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit}.variable-item:hover{background:#f8fafc}.var-tag{max-width:100%;overflow-wrap:anywhere;font-size:.75rem;font-weight:600;color:#1d4ed8;background:#3b82f614;padding:2px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.var-example{font-size:.75rem;color:#64748b;overflow-wrap:anywhere}.var-description{font-size:.75rem;color:#64748b;line-height:1.4;overflow-wrap:anywhere}.video-library-panel{padding:0}.video-library-panel .right-section-title,.video-library-panel .right-section-hint{padding:0 16px}.video-library-panel .right-section-title{padding-top:16px}.video-config-section{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-bottom:1px solid #f1f5f9}.video-config-section:last-of-type{border-bottom:none}.video-lib-list{display:flex;flex-direction:column;gap:2px;padding:8px 8px 16px}.video-lib-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;text-align:left;font-family:inherit;transition:background .15s,border-color .15s}.video-lib-item:hover{background:#f8fafc;border-color:#e2e8f0}.video-lib-item.selected{background:#eff6ff;border-color:#93c5fd}.vli-thumb{position:relative;flex-shrink:0;width:56px;height:40px;border-radius:6px;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);display:flex;align-items:center;justify-content:center}.vli-dur{position:absolute;bottom:2px;right:3px;font-size:.625rem;font-weight:600;color:#fff;background:#000000a6;padding:1px 4px;border-radius:3px}.vli-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.vli-title{font-size:.8125rem;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vli-cat{font-size:.75rem;color:#475569}.vli-check{flex-shrink:0}.video-lib-loading{padding:8px}.video-lib-skeleton{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:4px}.vls-info{flex:1;display:flex;flex-direction:column;gap:6px}@media(max-width:1200px){.editor-body{grid-template-columns:280px minmax(0,1fr) 260px}}@media(max-width:900px){:host{flex:none}.editor-page{flex:none;min-height:100vh;min-height:100dvh;overflow:visible}.editor-body{display:flex;flex-direction:column;flex:none;overflow:visible}.panel-left{border-right:none;border-bottom:1px solid #e2e8f0;overflow:visible;padding:16px}.panel-center{overflow:visible;min-height:480px}.blocks-canvas{overflow:visible;min-height:320px}.panel-right{border-left:none;border-top:1px solid #e2e8f0}.right-panel-body{overflow:visible}.editor-toolbar,.link-dialog,.editor-tabs{padding-left:12px;padding-right:12px}.preview-frame{padding:12px}.form-row-dates{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}\n"],
|
|
4171
4170
|
dependencies: [
|
|
4172
4171
|
{
|
|
4173
4172
|
kind: "ngmodule",
|
|
@@ -4543,34 +4542,34 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4543
4542
|
<!-- 3-Column Layout -->
|
|
4544
4543
|
<div class="editor-body">
|
|
4545
4544
|
<!-- LEFT PANEL: Details -->
|
|
4546
|
-
<aside class="panel-left" [attr.aria-label]="labels.t('emailTemplateEditor.templateDetails')">
|
|
4545
|
+
<aside class="panel-left" data-testid="editor-details" [attr.aria-label]="labels.t('emailTemplateEditor.templateDetails')">
|
|
4547
4546
|
<h3 class="panel-title">{{ labels.t('common.details') }}</h3>
|
|
4548
4547
|
|
|
4549
4548
|
<div class="form-field">
|
|
4550
|
-
<ui-text-input [label]="labels.t('common.name')" [required]="true" [(ngModel)]="name" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
|
|
4549
|
+
<ui-text-input data-testid="template-name" [label]="labels.t('common.name')" [required]="true" [(ngModel)]="name" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
|
|
4551
4550
|
[placeholder]="namePlaceholder()" [error]="nameErrorShown()" [showErrors]="nameTouched()" (blurred)="nameTouched.set(true)" />
|
|
4552
4551
|
</div>
|
|
4553
4552
|
|
|
4554
4553
|
<div class="form-field">
|
|
4555
|
-
<ui-text-input [label]="labels.t('common.subject')" [required]="true" [(ngModel)]="subject" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
|
|
4554
|
+
<ui-text-input data-testid="template-subject" [label]="labels.t('common.subject')" [required]="true" [(ngModel)]="subject" [readonly]="!canWrite()" [maxlength]="maxTextLength()"
|
|
4556
4555
|
[placeholder]="subjectPlaceholder()" [error]="subjectErrorShown()" [showErrors]="subjectTouched()" (blurred)="subjectTouched.set(true)">
|
|
4557
4556
|
</ui-text-input>
|
|
4558
4557
|
</div>
|
|
4559
4558
|
|
|
4560
4559
|
@if (showCategory()) {
|
|
4561
4560
|
<div class="form-field">
|
|
4562
|
-
<ui-select [label]="labels.t('emailTemplateEditor.category')" [options]="categories()" [placeholder]="categoryPlaceholder()" [(ngModel)]="category" [disabled]="!canWrite()" />
|
|
4561
|
+
<ui-select data-testid="template-category" [label]="labels.t('emailTemplateEditor.category')" [options]="categories()" [placeholder]="categoryPlaceholder()" [(ngModel)]="category" [disabled]="!canWrite()" />
|
|
4563
4562
|
</div>
|
|
4564
4563
|
}
|
|
4565
4564
|
|
|
4566
4565
|
@if (showActiveRange()) {
|
|
4567
|
-
<ui-checkbox [label]="labels.t('emailTemplateEditor.useThisTemplateAllYear')" [(checked)]="useAllYear" [disabled]="!canWrite()" />
|
|
4566
|
+
<ui-checkbox data-testid="template-all-year" [label]="labels.t('emailTemplateEditor.useThisTemplateAllYear')" [(checked)]="useAllYear" [disabled]="!canWrite()" />
|
|
4568
4567
|
}
|
|
4569
4568
|
|
|
4570
4569
|
@if (showActiveRange() && !useAllYear()) {
|
|
4571
4570
|
<div class="form-row-dates" (focusout)="datesTouched.set(true)">
|
|
4572
|
-
<ui-date-input [label]="labels.t('emailTemplateEditor.activeFrom')" [ngModel]="activeFrom()" (ngModelChange)="onActiveFromChange($event)" [disabled]="!canWrite()" [min]="today" />
|
|
4573
|
-
<ui-date-input [label]="labels.t('emailTemplateEditor.activeTo')" [(ngModel)]="activeTo" [disabled]="!canWrite()" [min]="activeToMin()" [error]="datesError()" />
|
|
4571
|
+
<ui-date-input data-testid="template-active-from" [label]="labels.t('emailTemplateEditor.activeFrom')" [ngModel]="activeFrom()" (ngModelChange)="onActiveFromChange($event)" [disabled]="!canWrite()" [min]="today" />
|
|
4572
|
+
<ui-date-input data-testid="template-active-to" [label]="labels.t('emailTemplateEditor.activeTo')" [(ngModel)]="activeTo" [disabled]="!canWrite()" [min]="activeToMin()" [error]="datesError()" />
|
|
4574
4573
|
</div>
|
|
4575
4574
|
}
|
|
4576
4575
|
|
|
@@ -4580,20 +4579,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4580
4579
|
<h4 class="section-title">{{ labels.t('emailTemplateEditor.assignments') }}<span class="required" aria-hidden="true">*</span></h4>
|
|
4581
4580
|
<p class="section-desc">{{ assignmentsDescription() }}</p>
|
|
4582
4581
|
<ui-error [errorId]="idPrefix() + '-assignments-error'" [message]="assignmentErrorShown()" />
|
|
4583
|
-
<ui-search-input [placeholder]="labels.t('common.searchellipsis')" [ariaLabel]="labels.t('emailTemplateEditor.searchAssignments')" [(value)]="assignmentSearch" />
|
|
4582
|
+
<ui-search-input data-testid="assignment-search" [placeholder]="labels.t('common.searchellipsis')" [ariaLabel]="labels.t('emailTemplateEditor.searchAssignments')" [(value)]="assignmentSearch" />
|
|
4584
4583
|
@if (filteredAssignments().length === 0) {
|
|
4585
4584
|
<ui-empty-state iconType="search" [title]="labels.t('emailTemplateEditor.noAssignmentsFound')" [message]="labels.t('emailTemplateEditor.noAssignmentsMatchYourSearch')" />
|
|
4586
4585
|
}
|
|
4587
|
-
<div class="assignment-list" [hidden]="filteredAssignments().length === 0" (focusout)="onAssignmentsFocusOut($event)">
|
|
4586
|
+
<div class="assignment-list" data-testid="assignment-list" [hidden]="filteredAssignments().length === 0" (focusout)="onAssignmentsFocusOut($event)">
|
|
4588
4587
|
@for (item of filteredAssignments(); track item.key) {
|
|
4589
4588
|
@if (item.groupStart) {
|
|
4590
|
-
<div class="assignment-group" data-testid="assignment-group">{{ item.group }}</div>
|
|
4589
|
+
<div class="assignment-group" role="heading" aria-level="5" data-testid="assignment-group">{{ item.group }}</div>
|
|
4591
4590
|
}
|
|
4592
|
-
<div class="assignment-item" [class.assignment-readonly]="!canWrite()" [attr.role]="canWrite() ? 'switch' : null" [attr.tabindex]="canWrite() ? 0 : null"
|
|
4591
|
+
<div class="assignment-item" data-testid="assignment-item" [attr.data-assignment]="item.key" [class.assignment-readonly]="!canWrite()" [attr.role]="canWrite() ? 'switch' : null" [attr.tabindex]="canWrite() ? 0 : null"
|
|
4593
4592
|
[attr.aria-checked]="canWrite() ? item.assigned : null" [attr.aria-label]="canWrite() ? item.name : null"
|
|
4594
4593
|
(click)="toggleAssignment(item)" (keydown.enter)="toggleAssignment(item); $event.preventDefault()" (keydown.space)="toggleAssignment(item); $event.preventDefault()">
|
|
4595
4594
|
<div class="assignment-text">
|
|
4596
|
-
<strong>{{ item.name }}</strong>
|
|
4595
|
+
<strong data-testid="assignment-name">{{ item.name }}</strong>
|
|
4597
4596
|
<span>{{ item.description }}</span>
|
|
4598
4597
|
</div>
|
|
4599
4598
|
<div class="assignment-channels">
|
|
@@ -4611,18 +4610,18 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4611
4610
|
<!-- CENTER: Editor -->
|
|
4612
4611
|
<section class="panel-center" [attr.aria-label]="labels.t('emailTemplateEditor.emailDesign')">
|
|
4613
4612
|
<div class="editor-tabs" role="tablist" [attr.aria-label]="labels.t('emailTemplateEditor.editorView')">
|
|
4614
|
-
<button type="button" class="editor-tab" role="tab" [class.active]="activeEditorTab() === 'edit'" [attr.aria-selected]="activeEditorTab() === 'edit'" (click)="setEditorTab('edit')">
|
|
4613
|
+
<button type="button" class="editor-tab" data-testid="editor-tab-edit" role="tab" [class.active]="activeEditorTab() === 'edit'" [attr.aria-selected]="activeEditorTab() === 'edit'" (click)="setEditorTab('edit')">
|
|
4615
4614
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"/></svg>{{ labels.t('common.edit') }}</button>
|
|
4616
|
-
<button type="button" class="editor-tab" role="tab" [class.active]="activeEditorTab() === 'preview'" [attr.aria-selected]="activeEditorTab() === 'preview'" (click)="setEditorTab('preview')">
|
|
4615
|
+
<button type="button" class="editor-tab" data-testid="editor-tab-preview" role="tab" [class.active]="activeEditorTab() === 'preview'" [attr.aria-selected]="activeEditorTab() === 'preview'" (click)="setEditorTab('preview')">
|
|
4617
4616
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>{{ labels.t('common.preview') }}</button>
|
|
4618
|
-
<button type="button" class="editor-tab" role="tab" [class.active]="activeEditorTab() === 'mobile'" [attr.aria-selected]="activeEditorTab() === 'mobile'" (click)="setEditorTab('mobile')">
|
|
4617
|
+
<button type="button" class="editor-tab" data-testid="editor-tab-mobile" role="tab" [class.active]="activeEditorTab() === 'mobile'" [attr.aria-selected]="activeEditorTab() === 'mobile'" (click)="setEditorTab('mobile')">
|
|
4619
4618
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"/><line x1="12" y1="18" x2="12.01" y2="18"/></svg>{{ labels.t('common.mobile') }}</button>
|
|
4620
4619
|
</div>
|
|
4621
4620
|
|
|
4622
4621
|
@if (activeEditorTab() === 'edit') {
|
|
4623
4622
|
@if (canWrite()) {
|
|
4624
4623
|
<!-- Toolbar (the last group is the block spacing): mousedown preventDefault keeps focus (and the selection) in the editor -->
|
|
4625
|
-
<div class="editor-toolbar" role="toolbar" [attr.aria-label]="labels.t('emailTemplateEditor.textFormatting')" (mousedown)="preventFocusLoss($event)">
|
|
4624
|
+
<div class="editor-toolbar" data-testid="editor-toolbar" role="toolbar" [attr.aria-label]="labels.t('emailTemplateEditor.textFormatting')" (mousedown)="preventFocusLoss($event)">
|
|
4626
4625
|
<div class="toolbar-group">
|
|
4627
4626
|
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.undo')" [uiTooltip]="labels.t('emailTemplateEditor.undo')" (click)="execCommand('undo')">
|
|
4628
4627
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 7v6h6"/><path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6.69 3L3 13"/></svg>
|
|
@@ -4656,14 +4655,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4656
4655
|
<div class="toolbar-group">
|
|
4657
4656
|
<!-- The browser's own colour dialogs are the pickers; a button opens each so the toolbar keeps one look. -->
|
|
4658
4657
|
<input #colorInput type="color" class="hidden-color-input" [attr.aria-label]="labels.t('emailTemplateEditor.textColor')" tabindex="-1" [value]="currentColor()" (change)="applyTextColor($any($event.target).value)" (mousedown)="$event.stopPropagation()" />
|
|
4659
|
-
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.textColor')" [uiTooltip]="labels.t('emailTemplateEditor.tipTextColor')" data-testid="text-color-button"
|
|
4658
|
+
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.textColor')" [uiTooltip]="labels.t('emailTemplateEditor.tipTextColor')" data-testid="text-color-button" (mousedown)="saveSelection()" (click)="toggleColorPanel('text')">
|
|
4660
4659
|
<span class="color-indicator">
|
|
4661
4660
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><text y="20" font-size="20" font-weight="700">A</text></svg>
|
|
4662
4661
|
<span class="color-bar" [style.background]="currentColor()"></span>
|
|
4663
4662
|
</span>
|
|
4664
4663
|
</ui-button>
|
|
4665
4664
|
<input #highlightInput type="color" class="hidden-color-input" [attr.aria-label]="labels.t('emailTemplateEditor.highlightColor')" tabindex="-1" [value]="currentHighlight()" (change)="applyHighlight($any($event.target).value)" (mousedown)="$event.stopPropagation()" />
|
|
4666
|
-
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.highlightColor')" [uiTooltip]="labels.t('emailTemplateEditor.highlightColor')" data-testid="highlight-color-button"
|
|
4665
|
+
<ui-button variant="ghost" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.highlightColor')" [uiTooltip]="labels.t('emailTemplateEditor.highlightColor')" data-testid="highlight-color-button" (mousedown)="saveSelection()" (click)="toggleColorPanel('highlight')">
|
|
4667
4666
|
<span class="color-indicator">
|
|
4668
4667
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 11l-6 6v3h9l3-3"/><path d="M22 12l-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"/></svg>
|
|
4669
4668
|
<span class="color-bar" [style.background]="currentHighlight()"></span>
|
|
@@ -4761,7 +4760,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4761
4760
|
|
|
4762
4761
|
<!-- Colour picker (inline panel, for the text colour and the highlight): a grid of ready colours, a custom colour (the browser's own dialog) and Remove -->
|
|
4763
4762
|
@if (canWrite() && colorPanel(); as which) {
|
|
4764
|
-
<div class="link-dialog emoji-panel" role="group" [attr.aria-label]="labels.t(which === 'text' ? 'emailTemplateEditor.textColor' : 'emailTemplateEditor.highlightColor')" data-testid="color-panel" (mousedown)="preventFocusLoss($event)">
|
|
4763
|
+
<div class="link-dialog emoji-panel" role="group" [attr.aria-label]="labels.t(which === 'text' ? 'emailTemplateEditor.textColor' : 'emailTemplateEditor.highlightColor')" data-testid="color-panel" (mousedown)="preventFocusLoss($event)" (keydown.escape)="colorPanel.set(null)">
|
|
4765
4764
|
<div class="emoji-panel-head">
|
|
4766
4765
|
<span class="link-dialog-title">{{ labels.t(which === 'text' ? 'emailTemplateEditor.textColor' : 'emailTemplateEditor.highlightColor') }}</span>
|
|
4767
4766
|
<ui-button variant="secondary" size="sm" data-testid="color-remove" (click)="removeColor(which)">{{ labels.t('emailTemplateEditor.removeColor') }}</ui-button>
|
|
@@ -4770,7 +4769,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4770
4769
|
</div>
|
|
4771
4770
|
<div class="color-grid" data-testid="color-grid">
|
|
4772
4771
|
@for (c of colorSwatches; track c) {
|
|
4773
|
-
<button type="button" class="color-swatch" [style.background]="c" [attr.aria-label]="c" [attr.title]="c" [class.selected]="(which === 'text' ? currentColor() : currentHighlight()).toLowerCase() === c" (click)="pickColor(which, c)"></button>
|
|
4772
|
+
<button type="button" class="color-swatch" data-testid="color-swatch" [style.background]="c" [attr.aria-label]="c" [attr.title]="c" [class.selected]="(which === 'text' ? currentColor() : currentHighlight()).toLowerCase() === c" [attr.aria-pressed]="(which === 'text' ? currentColor() : currentHighlight()).toLowerCase() === c" (click)="pickColor(which, c)"></button>
|
|
4774
4773
|
}
|
|
4775
4774
|
</div>
|
|
4776
4775
|
</div>
|
|
@@ -4780,7 +4779,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4780
4779
|
@if (canWrite() && showEmojiPanel()) {
|
|
4781
4780
|
<div class="link-dialog emoji-panel" role="group" [attr.aria-label]="labels.t('emailTemplateEditor.emoji')" data-testid="emoji-panel" (mousedown)="preventFocusLoss($event)">
|
|
4782
4781
|
<div class="emoji-panel-head">
|
|
4783
|
-
<ui-text-input class="emoji-search" [ariaLabel]="labels.t('emailTemplateEditor.emojiSearch')" [placeholder]="labels.t('emailTemplateEditor.emojiSearch')" [(ngModel)]="emojiSearch" (mousedown)="saveSelection()" />
|
|
4782
|
+
<ui-text-input class="emoji-search" data-testid="emoji-search" [ariaLabel]="labels.t('emailTemplateEditor.emojiSearch')" [placeholder]="labels.t('emailTemplateEditor.emojiSearch')" [(ngModel)]="emojiSearch" (mousedown)="saveSelection()" />
|
|
4784
4783
|
<ui-select class="emoji-tone" size="sm" [ariaLabel]="labels.t('emailTemplateEditor.emojiSkinTone')" [options]="skinToneOptions()" [(ngModel)]="emojiTone" (mousedown)="saveSelection()" />
|
|
4785
4784
|
<ui-button variant="secondary" size="sm" (click)="showEmojiPanel.set(false)">{{ labels.t('emailTemplateEditor.emojiClose') }}</ui-button>
|
|
4786
4785
|
</div>
|
|
@@ -4793,7 +4792,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4793
4792
|
}
|
|
4794
4793
|
<div class="emoji-grid" data-testid="emoji-grid">
|
|
4795
4794
|
@for (e of shownEmojis(); track e.char) {
|
|
4796
|
-
<button type="button" class="emoji-btn" [attr.aria-label]="emojiName(e)" [attr.title]="e.words.split(' ').slice(0, 3).join(' ')" (click)="insertEmoji(emojiWithTone(e))">{{ emojiWithTone(e) }}</button>
|
|
4795
|
+
<button type="button" class="emoji-btn" data-testid="emoji-option" [attr.aria-label]="emojiName(e)" [attr.title]="e.words.split(' ').slice(0, 3).join(' ')" (click)="insertEmoji(emojiWithTone(e))">{{ emojiWithTone(e) }}</button>
|
|
4797
4796
|
} @empty {
|
|
4798
4797
|
<span class="emoji-empty">{{ labels.t('emailTemplateEditor.emojiNoResults') }}</span>
|
|
4799
4798
|
}
|
|
@@ -4810,7 +4809,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4810
4809
|
</div>
|
|
4811
4810
|
<div class="emoji-grid">
|
|
4812
4811
|
@for (c of specialCharacters; track c) {
|
|
4813
|
-
<button type="button" class="emoji-btn special-btn" [attr.aria-label]="c" (click)="insertEmoji(c)">{{ c }}</button>
|
|
4812
|
+
<button type="button" class="emoji-btn special-btn" data-testid="special-option" [attr.aria-label]="c" (click)="insertEmoji(c)">{{ c }}</button>
|
|
4814
4813
|
}
|
|
4815
4814
|
</div>
|
|
4816
4815
|
</div>
|
|
@@ -4822,7 +4821,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4822
4821
|
<div class="link-dialog-inner">
|
|
4823
4822
|
<span class="link-dialog-title">{{ labels.t('emailTemplateEditor.insertImage2') }}</span>
|
|
4824
4823
|
@if (imageUpload()) {
|
|
4825
|
-
<input #imageFile type="file" class="hidden-file-input" accept="image/png,image/jpeg,image/webp,image/gif" tabindex="-1" [attr.aria-label]="labels.t('emailTemplateEditor.uploadImage')" (change)="onImageFile($event)" />
|
|
4824
|
+
<input #imageFile type="file" class="hidden-file-input" data-testid="image-file-input" accept="image/png,image/jpeg,image/webp,image/gif" tabindex="-1" [attr.aria-label]="labels.t('emailTemplateEditor.uploadImage')" (change)="onImageFile($event)" />
|
|
4826
4825
|
<ui-button variant="secondary" size="sm" [loading]="imageUploading()" (click)="imageFile.click()">{{ imageUploading() ? labels.t('emailTemplateEditor.uploadingImage') : labels.t('emailTemplateEditor.uploadImage') }}</ui-button>
|
|
4827
4826
|
<ui-error [errorId]="idPrefix() + '-image-upload-error'" [message]="imageUploadError()" />
|
|
4828
4827
|
}
|
|
@@ -4853,7 +4852,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4853
4852
|
@for (block of blocks(); track block.id) {
|
|
4854
4853
|
<div class="block-wrapper">
|
|
4855
4854
|
<!-- contenteditable, initialised ONCE after render so Angular never rewrites it and the caret never jumps -->
|
|
4856
|
-
<div #blockEditor class="block-content tpl-doc" role="textbox" aria-multiline="true" [attr.aria-label]="labels.t('emailTemplateEditor.documentLabel')"
|
|
4855
|
+
<div #blockEditor class="block-content tpl-doc" data-testid="email-document" role="textbox" aria-multiline="true" [attr.aria-label]="labels.t('emailTemplateEditor.documentLabel')"
|
|
4857
4856
|
[attr.data-block-id]="block.id" [attr.data-placeholder]="startPlaceholder()" [attr.contenteditable]="canWrite() ? 'true' : 'false'"
|
|
4858
4857
|
(input)="onBlockInput($event, block)" (beforeinput)="onBlockBeforeInput($any($event))" (focus)="onBlockFocus(block)" (keyup)="refreshContext()" (mouseup)="refreshContext()" (keydown.enter)="onDocEnter($event)"
|
|
4859
4858
|
(dragover)="onDocDragOver($event)" (drop)="onDocDrop($event)"></div>
|
|
@@ -4863,15 +4862,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4863
4862
|
}
|
|
4864
4863
|
|
|
4865
4864
|
@if (activeEditorTab() === 'preview') {
|
|
4866
|
-
<div class="preview-frame">
|
|
4867
|
-
<iframe class="preview-content" [attr.title]="labels.t('emailTemplateEditor.emailPreview')" sandbox="" referrerpolicy="no-referrer" [srcdoc]="previewDoc()"></iframe>
|
|
4865
|
+
<div class="preview-frame" data-testid="preview-frame">
|
|
4866
|
+
<iframe class="preview-content" data-testid="preview-iframe" [attr.title]="labels.t('emailTemplateEditor.emailPreview')" sandbox="" referrerpolicy="no-referrer" [srcdoc]="previewDoc()"></iframe>
|
|
4868
4867
|
</div>
|
|
4869
4868
|
}
|
|
4870
4869
|
|
|
4871
4870
|
@if (activeEditorTab() === 'mobile') {
|
|
4872
|
-
<div class="preview-frame mobile">
|
|
4873
|
-
<div class="mobile-shell">
|
|
4874
|
-
<iframe class="preview-content" [attr.title]="labels.t('emailTemplateEditor.mobileEmailPreview')" sandbox="" referrerpolicy="no-referrer" [srcdoc]="previewDoc()"></iframe>
|
|
4871
|
+
<div class="preview-frame mobile" data-testid="mobile-preview-frame">
|
|
4872
|
+
<div class="mobile-shell" data-testid="mobile-shell">
|
|
4873
|
+
<iframe class="preview-content" data-testid="mobile-preview-iframe" [attr.title]="labels.t('emailTemplateEditor.mobileEmailPreview')" sandbox="" referrerpolicy="no-referrer" [srcdoc]="previewDoc()"></iframe>
|
|
4875
4874
|
</div>
|
|
4876
4875
|
</div>
|
|
4877
4876
|
}
|
|
@@ -4886,18 +4885,18 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4886
4885
|
</div>
|
|
4887
4886
|
} @else {
|
|
4888
4887
|
<div class="right-tabs" role="tablist" [attr.aria-label]="labels.t('emailTemplateEditor.rightPanelSections')">
|
|
4889
|
-
<button type="button" class="right-tab" role="tab" [class.active]="activeRightTab() === 'blocks'" [attr.aria-selected]="activeRightTab() === 'blocks'" (click)="activeRightTab.set('blocks')">
|
|
4888
|
+
<button type="button" class="right-tab" data-testid="right-tab-blocks" role="tab" [class.active]="activeRightTab() === 'blocks'" [attr.aria-selected]="activeRightTab() === 'blocks'" (click)="activeRightTab.set('blocks')">
|
|
4890
4889
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>{{ labels.t('emailTemplateEditor.blocks') }}</button>
|
|
4891
|
-
<button type="button" class="right-tab" role="tab" [class.active]="activeRightTab() === 'variables'" [attr.aria-selected]="activeRightTab() === 'variables'" (click)="activeRightTab.set('variables')">
|
|
4890
|
+
<button type="button" class="right-tab" data-testid="right-tab-variables" role="tab" [class.active]="activeRightTab() === 'variables'" [attr.aria-selected]="activeRightTab() === 'variables'" (click)="activeRightTab.set('variables')">
|
|
4892
4891
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M12 3v18M3 12h18"/></svg>{{ labels.t('emailTemplateEditor.variables') }}</button>
|
|
4893
4892
|
@if (videosEnabled()) {
|
|
4894
|
-
<button type="button" class="right-tab" role="tab" [class.active]="activeRightTab() === 'video'" [attr.aria-selected]="activeRightTab() === 'video'" (click)="openVideoTab()">
|
|
4893
|
+
<button type="button" class="right-tab" data-testid="right-tab-video" role="tab" [class.active]="activeRightTab() === 'video'" [attr.aria-selected]="activeRightTab() === 'video'" (click)="openVideoTab()">
|
|
4895
4894
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>{{ labels.t('common.video') }}</button>
|
|
4896
4895
|
}
|
|
4897
4896
|
</div>
|
|
4898
4897
|
|
|
4899
4898
|
@if (activeRightTab() === 'blocks') {
|
|
4900
|
-
<div class="right-panel-body">
|
|
4899
|
+
<div class="right-panel-body" data-testid="blocks-panel">
|
|
4901
4900
|
<h4 class="right-section-title">{{ labels.t('emailTemplateEditor.contentBlocks') }}</h4>
|
|
4902
4901
|
<p class="right-section-desc">{{ labels.t('emailTemplateEditor.clickToInsertOrDrag') }}</p>
|
|
4903
4902
|
<ui-search-input [placeholder]="labels.t('emailTemplateEditor.searchBlocks')" [ariaLabel]="labels.t('emailTemplateEditor.searchBlocks2')" [(value)]="blockSearch" />
|
|
@@ -4907,7 +4906,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4907
4906
|
}
|
|
4908
4907
|
@for (group of filteredBlockGroups(); track group.name) {
|
|
4909
4908
|
<div class="block-group">
|
|
4910
|
-
<button type="button" class="block-group-header" [attr.aria-expanded]="isOpen('b:' + group.name)" (click)="toggleGroup('b:' + group.name)">
|
|
4909
|
+
<button type="button" class="block-group-header" data-testid="block-group" [attr.aria-expanded]="isOpen('b:' + group.name)" (click)="toggleGroup('b:' + group.name)">
|
|
4911
4910
|
<svg class="chevron" [class.expanded]="isOpen('b:' + group.name)" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M9 18l6-6-6-6"/></svg>
|
|
4912
4911
|
<span>{{ group.name }}</span>
|
|
4913
4912
|
<span class="block-count">{{ group.blocks.length }}</span>
|
|
@@ -4916,7 +4915,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4916
4915
|
<div class="block-list">
|
|
4917
4916
|
@for (block of group.blocks; track block.key) {
|
|
4918
4917
|
<!-- A div, not a button: Firefox does not start a drag from a <button>. Role, tabindex and Enter / Space keep it a keyboard control; a click inserts the block. -->
|
|
4919
|
-
<div role="button" tabindex="0" class="block-item" draggable="true" [attr.aria-label]="labels.t('emailTemplateEditor.insertNamed', { name: block.label })"
|
|
4918
|
+
<div role="button" tabindex="0" class="block-item" data-testid="block-item" [attr.data-block-key]="block.key" draggable="true" [attr.aria-label]="labels.t('emailTemplateEditor.insertNamed', { name: block.label })"
|
|
4920
4919
|
(dragstart)="onPaletteDragStart($event, block)" (dragend)="onBlockDragEnd()" (click)="insertBlock(block)"
|
|
4921
4920
|
(keydown.enter)="insertBlock(block); $event.preventDefault()" (keydown.space)="insertBlock(block); $event.preventDefault()">
|
|
4922
4921
|
<svg class="block-item-drag" width="10" height="10" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><circle cx="9" cy="6" r="1.5"/><circle cx="15" cy="6" r="1.5"/><circle cx="9" cy="12" r="1.5"/><circle cx="15" cy="12" r="1.5"/><circle cx="9" cy="18" r="1.5"/><circle cx="15" cy="18" r="1.5"/></svg>
|
|
@@ -4931,7 +4930,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4931
4930
|
}
|
|
4932
4931
|
|
|
4933
4932
|
@if (activeRightTab() === 'variables') {
|
|
4934
|
-
<div class="right-panel-body">
|
|
4933
|
+
<div class="right-panel-body" data-testid="variables-panel">
|
|
4935
4934
|
<h4 class="right-section-title">{{ labels.t('emailTemplateEditor.templateVariables') }}</h4>
|
|
4936
4935
|
@if (variablesNeedAssignment()) {
|
|
4937
4936
|
<p class="right-section-desc" role="status" data-testid="variables-need-assignment">{{ labels.t('emailTemplateEditor.assignToSeeVariables') }}</p>
|
|
@@ -4940,7 +4939,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4940
4939
|
}
|
|
4941
4940
|
@for (group of availableVariableGroups(); track group.name) {
|
|
4942
4941
|
<div class="block-group">
|
|
4943
|
-
<button type="button" class="block-group-header" [attr.aria-expanded]="isOpen('v:' + group.name)" (click)="toggleGroup('v:' + group.name)">
|
|
4942
|
+
<button type="button" class="block-group-header" data-testid="variable-group" [attr.aria-expanded]="isOpen('v:' + group.name)" (click)="toggleGroup('v:' + group.name)">
|
|
4944
4943
|
<svg class="chevron" [class.expanded]="isOpen('v:' + group.name)" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M9 18l6-6-6-6"/></svg>
|
|
4945
4944
|
<span>{{ group.name }}</span>
|
|
4946
4945
|
<span class="block-count">{{ group.variables.length }}</span>
|
|
@@ -4948,8 +4947,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4948
4947
|
@if (isOpen('v:' + group.name)) {
|
|
4949
4948
|
<div class="variable-list">
|
|
4950
4949
|
@for (v of group.variables; track v.key) {
|
|
4951
|
-
<button type="button" class="variable-item" (mousedown)="saveSelection()" (click)="insertVariable(v)">
|
|
4952
|
-
<span class="var-tag">{{ '{{' + v.key + '}}' }}</span>
|
|
4950
|
+
<button type="button" class="variable-item" data-testid="variable-item" [attr.data-variable]="v.key" (mousedown)="saveSelection()" (click)="insertVariable(v)">
|
|
4951
|
+
<span class="var-tag" data-testid="variable-tag">{{ '{{' + v.key + '}}' }}</span>
|
|
4953
4952
|
<span class="var-example">{{ labels.t('emailTemplateEditor.example', { example: v.example }) }}</span>
|
|
4954
4953
|
<!-- A very short explanation of what the variable is: the host's description, else its label. -->
|
|
4955
4954
|
<span class="var-description">{{ v.description || v.label }}</span>
|
|
@@ -4963,7 +4962,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4963
4962
|
}
|
|
4964
4963
|
|
|
4965
4964
|
@if (activeRightTab() === 'video' && videosEnabled()) {
|
|
4966
|
-
<div class="right-panel-body video-library-panel">
|
|
4965
|
+
<div class="right-panel-body video-library-panel" data-testid="video-panel">
|
|
4967
4966
|
<h4 class="right-section-title">{{ labels.t('emailTemplateEditor.videoLibrary') }}</h4>
|
|
4968
4967
|
<p class="right-section-hint">{{ labels.t('emailTemplateEditor.clickAVideoToAdd') }}</p>
|
|
4969
4968
|
|
|
@@ -5041,7 +5040,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5041
5040
|
|
|
5042
5041
|
|
|
5043
5042
|
`,
|
|
5044
|
-
styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0}.required{color:#ef4444;font-weight:400}.editor-page{display:flex;flex-direction:column;flex:1;min-height:0;background:#f8fafc;overflow:hidden}.editor-actions{display:flex;justify-content:space-between;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:0 0 12px;flex-shrink:0}.editor-heading-group{display:flex;align-items:center;gap:4px;min-width:0}.editor-heading{margin:0;font-size:1.25rem;font-weight:700;color:#1e293b;line-height:1.3;min-width:0}.save-wrap{display:inline-flex}.save-hint{margin:0;font-size:12px;color:#475569;flex-basis:100%;text-align:right}.editor-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}.readonly-note{margin:0;padding:8px 16px;font-size:.8125rem;color:#92400e;background:#fffbeb;border-bottom:1px solid #fde68a}.readonly-note.system-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.editor-body{display:grid;grid-template-columns:340px minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr);flex:1;min-height:0;overflow:hidden}.panel-left{background:#fff;border-right:1px solid #e2e8f0;padding:24px;overflow-y:auto;overflow-x:hidden}.panel-title{font-size:1.0625rem;font-weight:700;color:#1e293b;margin:0 0 20px}.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}.form-row-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.form-row-dates>*{min-width:0}.email-checks{margin:8px 12px 0}.email-checks-list{margin:0;padding-left:18px}.hidden-file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.assignments-section{border-top:1px solid #e2e8f0;padding-top:20px;margin-top:16px}.section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 6px}.section-desc{font-size:.8125rem;color:#64748b;line-height:1.5;margin:0 0 12px}.assignment-list{max-height:340px;overflow-y:auto;margin-top:12px;border:1px solid #e2e8f0;border-radius:8px}.assignment-group{position:sticky;top:0;z-index:1;padding:8px 14px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:.6875rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.assignment-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9;transition:background .1s}.assignment-item:last-child{border-bottom:none}.assignment-item:hover{background:#f8fafc}.assignment-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.assignment-item.assignment-readonly{cursor:default}.assignment-item.assignment-readonly:hover{background:transparent}.assignment-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.assignment-text strong{font-size:.8125rem;color:#1e293b}.assignment-text span{font-size:.75rem;color:#64748b}.assignment-channels{display:flex;gap:4px;flex-shrink:0}.channel-badge{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:#f1f5f9;color:#64748b;transition:all .15s}.channel-badge.active{background:#3b82f6;color:#fff}.channel-badge.disabled{opacity:.4;cursor:not-allowed}.config-desc{font-size:.875rem;color:#64748b;line-height:1.5;margin:0}.config-divider{border:none;border-top:1px solid #e2e8f0;margin:20px 0}.config-section{display:flex;flex-direction:column;gap:12px}.config-section-label{font-size:.6875rem;font-weight:700;color:#3b82f6;text-transform:uppercase;letter-spacing:.04em}.config-field{display:flex;flex-direction:column;gap:6px}.config-field-mt{margin-top:16px}.config-label{font-size:.8125rem;font-weight:600;color:#1e293b}.config-readonly{padding:9px 12px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;font-size:.875rem;color:#1e293b}.config-hint{font-size:.75rem;color:#64748b}.test-save-note{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;font-size:.8125rem;color:#92400e;margin-top:12px}.test-save-note svg{flex-shrink:0}.panel-center{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.editor-tabs{display:flex;gap:2px;padding:12px 20px 0;background:#fff;border-bottom:1px solid #e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch}.editor-tab{display:flex;align-items:center;gap:6px;padding:10px 16px;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;background:#f8fafc;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;white-space:nowrap}.editor-tab:hover{background:#fff;color:#1e293b}.editor-tab.active{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd}.editor-tab:focus-visible,.right-tab:focus-visible,.block-group-header:focus-visible,.variable-item:focus-visible,.block-item:focus-visible,.video-lib-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.editor-toolbar{display:flex;align-items:center;gap:8px;padding:10px 20px;background:#fff;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.toolbar-group{display:flex;align-items:center;gap:2px;padding-right:8px;border-right:1px solid #e2e8f0}.toolbar-group:last-child{border-right:none;padding-right:0}.toolbar-select{display:block;min-width:96px}.toolbar-label{font-size:.75rem;font-weight:600;color:#64748b;white-space:nowrap;margin-right:6px}.hidden-color-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none;border:none;padding:0}.color-indicator{display:flex;flex-direction:column;align-items:center;gap:2px;color:#475569}.color-bar{display:block;width:16px;height:3px;border-radius:2px;border:1px solid rgba(0,0,0,.1)}.link-dialog{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 20px}.link-dialog-inner{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.link-dialog-title{font-size:.8125rem;font-weight:700;color:#1e293b;white-space:nowrap;padding-top:10px}.link-dialog-input{display:block;width:240px;max-width:100%}.link-dialog-actions{display:flex;gap:6px}.emoji-panel-head{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}.emoji-search{display:block;flex:1 1 200px;min-width:160px}.emoji-tone{display:block;min-width:120px}.emoji-tabs{display:flex;gap:2px;border-bottom:1px solid #e2e8f0;margin-bottom:8px;overflow-x:auto}.emoji-tab{flex:0 0 auto;width:40px;height:36px;border:0;border-bottom:2px solid transparent;background:transparent;font-size:18px;cursor:pointer;font-family:\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Noto Color Emoji\",sans-serif}.emoji-tab.active{border-bottom-color:#3b82f6;background:#eff6ff}.color-grid{display:grid;grid-template-columns:repeat(10,28px);gap:4px}.color-swatch{width:28px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,.15);cursor:pointer;padding:0}.color-swatch:hover{transform:scale(1.1)}.color-swatch:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.color-swatch.selected{outline:2px solid #1e293b;outline-offset:1px}.emoji-grid{display:flex;flex-wrap:wrap;gap:2px;max-height:220px;overflow-y:auto}.emoji-empty{font-size:.8125rem;color:#64748b;padding:8px 4px}.emoji-btn{width:36px;height:36px;padding:0;border:0;border-radius:6px;background:transparent;font-size:20px;line-height:1;cursor:pointer;font-family:\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Noto Color Emoji\",sans-serif}.emoji-btn.special-btn{font-family:inherit;font-size:16px}.emoji-btn:hover,.emoji-btn:focus-visible{background:#f1f5f9}.tb-sub{font-size:12px;font-weight:700;line-height:1}@media(pointer:coarse){.emoji-btn{width:44px;height:44px}}.preview-frame{flex:1;display:flex;justify-content:center;align-items:stretch;padding:24px;overflow-y:auto;background:#f1f5f9}.preview-frame.mobile{align-items:flex-start}.preview-content{display:block;flex:1 1 auto;max-width:602px;width:100%;box-sizing:border-box;min-height:400px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.mobile-shell{width:375px;max-width:100%;box-sizing:border-box;min-height:600px;border:2px solid #1e293b;border-radius:24px;padding:40px 12px 24px;background:#fff;box-shadow:0 8px 32px #0000001f}.mobile-shell .preview-content{border:none;border-radius:0;max-width:100%;height:520px;min-height:0}.block-wrapper{flex-shrink:0;width:100%;max-width:602px;margin:0 auto;box-sizing:border-box;padding:24px 28px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.blocks-canvas{flex:1 1 0;min-height:0;padding:16px 20px 24px 56px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#f1f5f9;display:flex;flex-direction:column}.block-content{min-width:0;padding:0;outline:none;font-size:15px;color:#1e293b;line-height:1.6;min-height:320px;overflow-wrap:anywhere}.block-content:empty:before{content:attr(data-placeholder);color:#64748b;font-style:italic;pointer-events:none}@media(pointer:coarse){.editor-tab,.right-tab,.block-group-header{min-height:44px}}.panel-right{background:#fff;border-left:1px solid #e2e8f0;display:flex;flex-direction:column;min-height:0;min-width:0}.right-tabs{display:flex;border-bottom:1px solid #e2e8f0}.right-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;min-height:44px;border:none;background:none;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;border-bottom:2px solid transparent}.right-tab:hover{color:#1e293b}.right-tab.active{color:#1d4ed8;background:#eff6ff;border-bottom-color:#3b82f6}.right-panel-body{flex:1;padding:20px;overflow-y:auto}.right-section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 12px}.right-section-desc{font-size:.8125rem;color:#64748b;margin:0 0 16px;line-height:1.5}.right-section-hint{font-size:.8125rem;color:#64748b;margin:0 0 12px;line-height:1.5}.block-group{border-bottom:1px solid #f1f5f9}.block-group-header{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:12px 0;border:none;background:none;font-size:.875rem;font-weight:600;color:#1e293b;cursor:pointer;font-family:inherit;text-align:left}.block-group-header .chevron{transition:transform .2s;color:#94a3b8}.block-group-header .chevron.expanded{transform:rotate(90deg)}.block-group-header span:nth-of-type(1){flex:1}.block-count{font-size:.75rem;font-weight:600;color:#475569;background:#f1f5f9;padding:2px 8px;border-radius:10px;margin-left:auto}.block-list{display:flex;flex-direction:column;gap:2px;padding-bottom:8px}.variable-list{display:flex;flex-direction:column;padding-bottom:8px}.variable-item+.variable-item{border-top:1px solid #f1f5f9;border-radius:0}.block-item{display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;min-height:44px;padding:8px 0;font-size:.8125rem;color:#64748b;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit;-webkit-user-select:none;user-select:none}.block-item:hover{background:#f8fafc;color:#1e293b}.block-item-drag{color:#cbd5e1;flex-shrink:0;cursor:grab}.variable-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:44px;padding:8px 0;min-width:0;width:100%;box-sizing:border-box;border:none;background:none;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit}.variable-item:hover{background:#f8fafc}.var-tag{max-width:100%;overflow-wrap:anywhere;font-size:.75rem;font-weight:600;color:#1d4ed8;background:#3b82f614;padding:2px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.var-example{font-size:.75rem;color:#64748b;overflow-wrap:anywhere}.var-description{font-size:.75rem;color:#64748b;line-height:1.4;overflow-wrap:anywhere}.video-library-panel{padding:0}.video-library-panel .right-section-title,.video-library-panel .right-section-hint{padding:0 16px}.video-library-panel .right-section-title{padding-top:16px}.video-config-section{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-bottom:1px solid #f1f5f9}.video-config-section:last-of-type{border-bottom:none}.video-lib-list{display:flex;flex-direction:column;gap:2px;padding:8px 8px 16px}.video-lib-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;text-align:left;font-family:inherit;transition:background .15s,border-color .15s}.video-lib-item:hover{background:#f8fafc;border-color:#e2e8f0}.video-lib-item.selected{background:#eff6ff;border-color:#93c5fd}.vli-thumb{position:relative;flex-shrink:0;width:56px;height:40px;border-radius:6px;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);display:flex;align-items:center;justify-content:center}.vli-dur{position:absolute;bottom:2px;right:3px;font-size:.625rem;font-weight:600;color:#fff;background:#000000a6;padding:1px 4px;border-radius:3px}.vli-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.vli-title{font-size:.8125rem;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vli-cat{font-size:.75rem;color:#475569}.vli-check{flex-shrink:0}.video-lib-loading{padding:8px}.video-lib-skeleton{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:4px}.vls-info{flex:1;display:flex;flex-direction:column;gap:6px}@media(max-width:1200px){.editor-body{grid-template-columns:280px minmax(0,1fr) 260px}}@media(max-width:900px){:host{flex:none}.editor-page{flex:none;min-height:100vh;min-height:100dvh;overflow:visible}.editor-body{display:flex;flex-direction:column;flex:none;overflow:visible}.panel-left{border-right:none;border-bottom:1px solid #e2e8f0;overflow:visible;padding:16px}.panel-center{overflow:visible;min-height:480px}.blocks-canvas{overflow:visible;min-height:320px}.panel-right{border-left:none;border-top:1px solid #e2e8f0}.right-panel-body{overflow:visible}.editor-toolbar,.link-dialog,.editor-tabs{padding-left:12px;padding-right:12px}.preview-frame{padding:12px}.form-row-dates{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}\n"]
|
|
5043
|
+
styles: [":host{display:flex;flex-direction:column;flex:1;min-height:0}.required{color:#ef4444;font-weight:400}.editor-page{display:flex;flex-direction:column;flex:1;min-height:0;background:#f8fafc;overflow:hidden}.editor-actions{display:flex;justify-content:space-between;align-items:center;gap:8px 16px;flex-wrap:wrap;padding:0 0 12px;flex-shrink:0}.editor-heading-group{display:flex;align-items:center;gap:4px;min-width:0}.editor-heading{margin:0;font-size:1.25rem;font-weight:700;color:#1e293b;line-height:1.3;min-width:0}.save-wrap{display:inline-flex}.save-hint{margin:0;font-size:12px;color:#475569;flex-basis:100%;text-align:right}.editor-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-left:auto}.readonly-note{margin:0;padding:8px 16px;font-size:.8125rem;color:#92400e;background:#fffbeb;border-bottom:1px solid #fde68a}.readonly-note.system-note{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.editor-body{display:grid;grid-template-columns:340px minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr);flex:1;min-height:0;overflow:hidden}.panel-left{background:#fff;border-right:1px solid #e2e8f0;padding:24px;overflow-y:auto;overflow-x:hidden}.panel-title{font-size:1.0625rem;font-weight:700;color:#1e293b;margin:0 0 20px}.form-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}.form-row-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.form-row-dates>*{min-width:0}.email-checks{margin:8px 12px 0}.email-checks-list{margin:0;padding-left:18px}.hidden-file-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.assignments-section{border-top:1px solid #e2e8f0;padding-top:20px;margin-top:16px}.section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 6px}.section-desc{font-size:.8125rem;color:#64748b;line-height:1.5;margin:0 0 12px}.assignment-list{max-height:340px;overflow-y:auto;margin-top:12px;border:1px solid #e2e8f0;border-radius:8px}.assignment-group{position:sticky;top:0;z-index:1;padding:8px 14px;background:#f8fafc;border-bottom:1px solid #e2e8f0;font-size:.6875rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.assignment-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;cursor:pointer;border-bottom:1px solid #f1f5f9;transition:background .1s}.assignment-item:last-child{border-bottom:none}.assignment-item:hover{background:#f8fafc}.assignment-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.assignment-item.assignment-readonly{cursor:default}.assignment-item.assignment-readonly:hover{background:transparent}.assignment-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}.assignment-text strong{font-size:.8125rem;color:#1e293b}.assignment-text span{font-size:.75rem;color:#64748b}.assignment-channels{display:flex;gap:4px;flex-shrink:0}.channel-badge{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background:#f1f5f9;color:#64748b;transition:all .15s}.channel-badge.active{background:#3b82f6;color:#fff}.channel-badge.disabled{opacity:.4;cursor:not-allowed}.config-desc{font-size:.875rem;color:#64748b;line-height:1.5;margin:0}.config-section{display:flex;flex-direction:column;gap:12px}.config-field{display:flex;flex-direction:column;gap:6px}.config-field-mt{margin-top:16px}.test-save-note{display:flex;align-items:center;gap:8px;padding:10px 14px;background:#fef3c7;border:1px solid #fcd34d;border-radius:8px;font-size:.8125rem;color:#92400e;margin-top:12px}.test-save-note svg{flex-shrink:0}.panel-center{display:flex;flex-direction:column;min-height:0;min-width:0;overflow:hidden}.editor-tabs{display:flex;gap:2px;padding:12px 20px 0;background:#fff;border-bottom:1px solid #e2e8f0;overflow-x:auto;-webkit-overflow-scrolling:touch}.editor-tab{display:flex;align-items:center;gap:6px;padding:10px 16px;border:1px solid #e2e8f0;border-bottom:none;border-radius:8px 8px 0 0;background:#f8fafc;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;white-space:nowrap}.editor-tab:hover{background:#fff;color:#1e293b}.editor-tab.active{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd}.editor-tab:focus-visible,.right-tab:focus-visible,.block-group-header:focus-visible,.variable-item:focus-visible,.block-item:focus-visible,.video-lib-item:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.editor-toolbar{display:flex;align-items:center;gap:8px;padding:10px 20px;background:#fff;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.toolbar-group{display:flex;align-items:center;gap:2px;padding-right:8px;border-right:1px solid #e2e8f0}.toolbar-group:last-child{border-right:none;padding-right:0}.toolbar-select{display:block;min-width:96px}.hidden-color-input{position:absolute;width:0;height:0;opacity:0;pointer-events:none;border:none;padding:0}.color-indicator{display:flex;flex-direction:column;align-items:center;gap:2px;color:#475569}.color-bar{display:block;width:16px;height:3px;border-radius:2px;border:1px solid rgba(0,0,0,.1)}.link-dialog{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 20px}.link-dialog-inner{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.link-dialog-title{font-size:.8125rem;font-weight:700;color:#1e293b;white-space:nowrap;padding-top:10px}.link-dialog-input{display:block;width:240px;max-width:100%}.link-dialog-actions{display:flex;gap:6px}.emoji-panel-head{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}.emoji-search{display:block;flex:1 1 200px;min-width:160px}.emoji-tone{display:block;min-width:120px}.emoji-tabs{display:flex;gap:2px;border-bottom:1px solid #e2e8f0;margin-bottom:8px;overflow-x:auto}.emoji-tab{flex:0 0 auto;width:40px;height:36px;border:0;border-bottom:2px solid transparent;background:transparent;font-size:18px;cursor:pointer;font-family:\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Noto Color Emoji\",sans-serif}.emoji-tab.active{border-bottom-color:#3b82f6;background:#eff6ff}.color-grid{display:grid;grid-template-columns:repeat(10,28px);gap:4px}.color-swatch{width:28px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,.15);cursor:pointer;padding:0}.color-swatch:hover{transform:scale(1.1)}.color-swatch:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.color-swatch.selected{outline:2px solid #1e293b;outline-offset:1px}@media(pointer:coarse){.color-grid{grid-template-columns:repeat(auto-fill,44px);max-height:240px;overflow-y:auto}.color-swatch{width:44px;height:44px}}.emoji-grid{display:flex;flex-wrap:wrap;gap:2px;max-height:220px;overflow-y:auto}.emoji-empty{font-size:.8125rem;color:#64748b;padding:8px 4px}.emoji-btn{width:36px;height:36px;padding:0;border:0;border-radius:6px;background:transparent;font-size:20px;line-height:1;cursor:pointer;font-family:\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Noto Color Emoji\",sans-serif}.emoji-btn.special-btn{font-family:inherit;font-size:16px}.emoji-btn:hover,.emoji-btn:focus-visible{background:#f1f5f9}.tb-sub{font-size:12px;font-weight:700;line-height:1}@media(pointer:coarse){.emoji-btn{width:44px;height:44px}}.preview-frame{flex:1;display:flex;justify-content:center;align-items:stretch;padding:24px;overflow-y:auto;background:#f1f5f9}.preview-frame.mobile{align-items:flex-start}.preview-content{display:block;flex:1 1 auto;max-width:602px;width:100%;box-sizing:border-box;min-height:400px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.mobile-shell{width:375px;max-width:100%;box-sizing:border-box;min-height:600px;border:2px solid #1e293b;border-radius:24px;padding:40px 12px 24px;background:#fff;box-shadow:0 8px 32px #0000001f}.mobile-shell .preview-content{border:none;border-radius:0;max-width:100%;height:520px;min-height:0}.block-wrapper{flex-shrink:0;width:100%;max-width:602px;margin:0 auto;box-sizing:border-box;padding:24px 28px;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.blocks-canvas{flex:1 1 0;min-height:0;padding:16px 20px 24px 56px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#f1f5f9;display:flex;flex-direction:column}.block-content{min-width:0;padding:0;outline:none;font-size:15px;color:#1e293b;line-height:1.6;min-height:320px;overflow-wrap:anywhere}.block-content:empty:before{content:attr(data-placeholder);color:#64748b;font-style:italic;pointer-events:none}@media(pointer:coarse){.editor-tab,.right-tab,.block-group-header{min-height:44px}}.panel-right{background:#fff;border-left:1px solid #e2e8f0;display:flex;flex-direction:column;min-height:0;min-width:0}.right-tabs{display:flex;border-bottom:1px solid #e2e8f0}.right-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;min-height:44px;border:none;background:none;font-size:.8125rem;font-weight:600;color:#64748b;cursor:pointer;font-family:inherit;border-bottom:2px solid transparent}.right-tab:hover{color:#1e293b}.right-tab.active{color:#1d4ed8;background:#eff6ff;border-bottom-color:#3b82f6}.right-panel-body{flex:1;padding:20px;overflow-y:auto}.right-section-title{font-size:.9375rem;font-weight:700;color:#1e293b;margin:0 0 12px}.right-section-desc{font-size:.8125rem;color:#64748b;margin:0 0 16px;line-height:1.5}.right-section-hint{font-size:.8125rem;color:#64748b;margin:0 0 12px;line-height:1.5}.block-group{border-bottom:1px solid #f1f5f9}.block-group-header{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:12px 0;border:none;background:none;font-size:.875rem;font-weight:600;color:#1e293b;cursor:pointer;font-family:inherit;text-align:left}.block-group-header .chevron{transition:transform .2s;color:#94a3b8}.block-group-header .chevron.expanded{transform:rotate(90deg)}.block-group-header span:nth-of-type(1){flex:1}.block-count{font-size:.75rem;font-weight:600;color:#475569;background:#f1f5f9;padding:2px 8px;border-radius:10px;margin-left:auto}.block-list{display:flex;flex-direction:column;gap:2px;padding-bottom:8px}.variable-list{display:flex;flex-direction:column;padding-bottom:8px}.variable-item+.variable-item{border-top:1px solid #f1f5f9;border-radius:0}.block-item{display:flex;align-items:center;gap:6px;box-sizing:border-box;width:100%;min-height:44px;padding:8px 0;font-size:.8125rem;color:#64748b;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit;-webkit-user-select:none;user-select:none}.block-item:hover{background:#f8fafc;color:#1e293b}.block-item-drag{color:#cbd5e1;flex-shrink:0;cursor:grab}.variable-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-height:44px;padding:8px 0;min-width:0;width:100%;box-sizing:border-box;border:none;background:none;cursor:pointer;text-align:left;border-radius:4px;font-family:inherit}.variable-item:hover{background:#f8fafc}.var-tag{max-width:100%;overflow-wrap:anywhere;font-size:.75rem;font-weight:600;color:#1d4ed8;background:#3b82f614;padding:2px 6px;border-radius:4px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.var-example{font-size:.75rem;color:#64748b;overflow-wrap:anywhere}.var-description{font-size:.75rem;color:#64748b;line-height:1.4;overflow-wrap:anywhere}.video-library-panel{padding:0}.video-library-panel .right-section-title,.video-library-panel .right-section-hint{padding:0 16px}.video-library-panel .right-section-title{padding-top:16px}.video-config-section{display:flex;flex-direction:column;gap:8px;padding:12px 16px;border-bottom:1px solid #f1f5f9}.video-config-section:last-of-type{border-bottom:none}.video-lib-list{display:flex;flex-direction:column;gap:2px;padding:8px 8px 16px}.video-lib-item{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;text-align:left;font-family:inherit;transition:background .15s,border-color .15s}.video-lib-item:hover{background:#f8fafc;border-color:#e2e8f0}.video-lib-item.selected{background:#eff6ff;border-color:#93c5fd}.vli-thumb{position:relative;flex-shrink:0;width:56px;height:40px;border-radius:6px;background:linear-gradient(135deg,#f1f5f9,#e2e8f0);display:flex;align-items:center;justify-content:center}.vli-dur{position:absolute;bottom:2px;right:3px;font-size:.625rem;font-weight:600;color:#fff;background:#000000a6;padding:1px 4px;border-radius:3px}.vli-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.vli-title{font-size:.8125rem;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vli-cat{font-size:.75rem;color:#475569}.vli-check{flex-shrink:0}.video-lib-loading{padding:8px}.video-lib-skeleton{display:flex;align-items:center;gap:10px;padding:8px;margin-bottom:4px}.vls-info{flex:1;display:flex;flex-direction:column;gap:6px}@media(max-width:1200px){.editor-body{grid-template-columns:280px minmax(0,1fr) 260px}}@media(max-width:900px){:host{flex:none}.editor-page{flex:none;min-height:100vh;min-height:100dvh;overflow:visible}.editor-body{display:flex;flex-direction:column;flex:none;overflow:visible}.panel-left{border-right:none;border-bottom:1px solid #e2e8f0;overflow:visible;padding:16px}.panel-center{overflow:visible;min-height:480px}.blocks-canvas{overflow:visible;min-height:320px}.panel-right{border-left:none;border-top:1px solid #e2e8f0}.right-panel-body{overflow:visible}.editor-toolbar,.link-dialog,.editor-tabs{padding-left:12px;padding-right:12px}.preview-frame{padding:12px}.form-row-dates{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}\n"]
|
|
5045
5044
|
}]
|
|
5046
5045
|
}],
|
|
5047
5046
|
ctorParameters: () => [],
|