@dev.smartpricing/message-composer-layer 4.2.4 → 4.2.6-mjml.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/Email/Editor/Blocks/ButtonBlock.vue +2 -2
- package/app/components/Email/Editor/Blocks/DiscountCodeBlock.vue +5 -4
- package/app/components/Email/Editor/Blocks/DividerBlock.vue +0 -1
- package/app/components/Email/Editor/Blocks/FooterBlock.vue +1 -1
- package/app/components/Email/Editor/Blocks/GridBlock.vue +6 -10
- package/app/components/Email/Editor/Blocks/HeadingBlock.vue +1 -1
- package/app/components/Email/Editor/Blocks/IndexBlock.vue +14 -3
- package/app/components/Email/Editor/Blocks/ParagraphBlock.vue +1 -1
- package/app/components/Email/Editor/Blocks/UnsubscribeLinkBlock.vue +1 -1
- package/app/components/Email/SendTestEmailModal.vue +14 -2
- package/app/composables/composerContext.ts +2 -1
- package/i18n/locales/de.ts +660 -686
- package/i18n/locales/en.ts +659 -685
- package/i18n/locales/es.ts +664 -690
- package/i18n/locales/fr.ts +667 -693
- package/i18n/locales/it.ts +661 -687
- package/package.json +7 -3
- package/i18n/check-translations.ts +0 -56
|
@@ -44,7 +44,7 @@ const buttonStyles = computed(() => {
|
|
|
44
44
|
props.block.settings.shape === 'square'
|
|
45
45
|
? '0px'
|
|
46
46
|
: props.block.settings.shape === 'rounded'
|
|
47
|
-
? '
|
|
47
|
+
? '4px'
|
|
48
48
|
: '50px',
|
|
49
49
|
padding: '12px 24px',
|
|
50
50
|
border: 'none',
|
|
@@ -69,7 +69,7 @@ const containerStyles = computed(() => ({
|
|
|
69
69
|
: props.block.settings.alignment === 'center'
|
|
70
70
|
? 'center'
|
|
71
71
|
: 'flex-end',
|
|
72
|
-
padding: '
|
|
72
|
+
padding: '0',
|
|
73
73
|
}))
|
|
74
74
|
|
|
75
75
|
defineOptions({
|
|
@@ -35,15 +35,16 @@ const discountCodeStyles = computed(() => {
|
|
|
35
35
|
props.block.settings.style === 'square'
|
|
36
36
|
? '0px'
|
|
37
37
|
: props.block.settings.style === 'rounded'
|
|
38
|
-
? '
|
|
38
|
+
? '4px'
|
|
39
39
|
: '50px',
|
|
40
|
-
padding: '
|
|
40
|
+
padding: '12px 8px',
|
|
41
41
|
textAlign: 'center',
|
|
42
|
-
display: 'inline-block',
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
if (props.block.settings.width === 'full_width') {
|
|
46
45
|
styles.width = '100%'
|
|
46
|
+
} else {
|
|
47
|
+
styles.display = 'inline-block'
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
return styles
|
|
@@ -52,7 +53,7 @@ const discountCodeStyles = computed(() => {
|
|
|
52
53
|
const containerStyles = computed(() => {
|
|
53
54
|
return {
|
|
54
55
|
backgroundColor: props.block.settings.backgroundBlock,
|
|
55
|
-
padding: '
|
|
56
|
+
padding: '0',
|
|
56
57
|
textAlign: 'center' as const,
|
|
57
58
|
}
|
|
58
59
|
})
|
|
@@ -72,22 +72,18 @@ defineOptions({
|
|
|
72
72
|
|
|
73
73
|
<template>
|
|
74
74
|
<div
|
|
75
|
-
class="rounded p-4"
|
|
76
75
|
:style="{ backgroundColor: block.settings.backgroundColor }"
|
|
77
76
|
:data-testid="gridBlockTestIds.container"
|
|
78
77
|
>
|
|
79
|
-
<div
|
|
80
|
-
class="grid gap-4"
|
|
81
|
-
:class="{
|
|
82
|
-
'grid-cols-1': block.settings.columns === 1,
|
|
83
|
-
'grid-cols-2': block.settings.columns === 2,
|
|
84
|
-
'grid-cols-3': block.settings.columns === 3,
|
|
85
|
-
}"
|
|
86
|
-
>
|
|
78
|
+
<div class="flex items-center">
|
|
87
79
|
<div
|
|
88
80
|
v-for="(column, index) in block.settings.columnData"
|
|
89
81
|
:key="column.id"
|
|
90
|
-
class="
|
|
82
|
+
class="overflow-hidden [&_img]:w-full self-stretch flex flex-col justify-center"
|
|
83
|
+
:class="
|
|
84
|
+
column.blocks.length === 0 ? 'min-h-32 border border-dashed border-neutral-300/50' : ''
|
|
85
|
+
"
|
|
86
|
+
:style="{ width: `${100 / block.settings.columns}%` }"
|
|
91
87
|
:data-testid="`${gridBlockTestIds.column}-${column.id}`"
|
|
92
88
|
>
|
|
93
89
|
<!-- Column blocks -->
|
|
@@ -96,10 +96,10 @@ defineOptions({
|
|
|
96
96
|
:data-block-id="block.id"
|
|
97
97
|
:data-block-type="block.type"
|
|
98
98
|
:data-testid="`${indexBlockTestIds.container}-${block.id}`"
|
|
99
|
-
class="group relative
|
|
99
|
+
class="group relative transition-colors"
|
|
100
100
|
:class="{
|
|
101
|
-
'
|
|
102
|
-
'
|
|
101
|
+
'outline-2 outline-primary-500 outline': isSelected,
|
|
102
|
+
'outline-transparent hover:outline-2 hover:outline-neutral-300 hover:outline': !isSelected,
|
|
103
103
|
'cursor-move': showDragHandle,
|
|
104
104
|
}"
|
|
105
105
|
@click.stop="handleClick"
|
|
@@ -153,3 +153,14 @@ defineOptions({
|
|
|
153
153
|
</div>
|
|
154
154
|
</UPopover>
|
|
155
155
|
</template>
|
|
156
|
+
|
|
157
|
+
<style scoped>
|
|
158
|
+
:deep(.ProseMirror ul) {
|
|
159
|
+
list-style-type: disc;
|
|
160
|
+
padding-left: 1.5em;
|
|
161
|
+
}
|
|
162
|
+
:deep(.ProseMirror ol) {
|
|
163
|
+
list-style-type: decimal;
|
|
164
|
+
padding-left: 1.5em;
|
|
165
|
+
}
|
|
166
|
+
</style>
|
|
@@ -91,11 +91,13 @@ const defaultSenderEmail = computed(
|
|
|
91
91
|
() => composerContext.organizationData?.value?.senderEmail ?? '',
|
|
92
92
|
)
|
|
93
93
|
|
|
94
|
-
const accommodationName = computed(
|
|
94
|
+
const accommodationName = computed(
|
|
95
|
+
() => composerContext.organizationData?.value?.accommodationName ?? '',
|
|
96
|
+
)
|
|
95
97
|
|
|
96
98
|
const state = ref<Schema>({
|
|
97
99
|
to: '',
|
|
98
|
-
sender_name:
|
|
100
|
+
sender_name: '',
|
|
99
101
|
from: '',
|
|
100
102
|
})
|
|
101
103
|
|
|
@@ -109,6 +111,16 @@ watch(
|
|
|
109
111
|
{ immediate: true },
|
|
110
112
|
)
|
|
111
113
|
|
|
114
|
+
watch(
|
|
115
|
+
accommodationName,
|
|
116
|
+
(name) => {
|
|
117
|
+
if (!state.value.sender_name) {
|
|
118
|
+
state.value.sender_name = name
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{ immediate: true },
|
|
122
|
+
)
|
|
123
|
+
|
|
112
124
|
const schema = z.object({
|
|
113
125
|
to: z
|
|
114
126
|
.string()
|
|
@@ -3,6 +3,8 @@ import type { AppContextConfig } from '@dev.smartpricing/message-composer-utils/
|
|
|
3
3
|
|
|
4
4
|
export interface OrganizationData {
|
|
5
5
|
senderEmail: string
|
|
6
|
+
/** Tenant accommodation/property name — defaults the test-email sender name */
|
|
7
|
+
accommodationName?: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
export interface ComposerContext {
|
|
@@ -18,7 +20,6 @@ export interface ComposerContext {
|
|
|
18
20
|
default_tags?: Ref<string[]>
|
|
19
21
|
metaWabaId?: Ref<string>
|
|
20
22
|
metaAccessToken?: Ref<string>
|
|
21
|
-
accommodationName?: Ref<string>
|
|
22
23
|
isAdmin?: Ref<boolean>
|
|
23
24
|
organizationData?: Ref<OrganizationData>
|
|
24
25
|
}
|