@keycloakify/angular-email 1.4.0 → 1.6.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.
@@ -1,899 +1,2684 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, ChangeDetectionStrategy, Component, effect, CUSTOM_ELEMENTS_SCHEMA, inject, DOCUMENT, NO_ERRORS_SCHEMA, provideZonelessChangeDetection } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import { bootstrapApplication } from '@angular/platform-browser';
5
- import { renderApplication } from '@angular/platform-server';
6
- import { provideServerRendering } from '@angular/ssr';
7
- import * as cheerio from 'cheerio/slim';
8
- import { convert } from 'html-to-text';
9
- import juice from 'juice';
10
- import prettyPrint from 'pretty';
11
-
12
- class BackgroundComponent {
13
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
15
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
16
- $width = input(0, { ...(ngDevMode ? { debugName: "$width" } : /* istanbul ignore next */ {}), alias: 'width' });
17
- $height = input(0, { ...(ngDevMode ? { debugName: "$height" } : /* istanbul ignore next */ {}), alias: 'height' });
18
- $src = input(undefined, { ...(ngDevMode ? { debugName: "$src" } : /* istanbul ignore next */ {}), alias: 'src' });
19
- $bgRepeat = input('no-repeat', { ...(ngDevMode ? { debugName: "$bgRepeat" } : /* istanbul ignore next */ {}), alias: 'bgRepeat' });
20
- $bgColor = input(undefined, { ...(ngDevMode ? { debugName: "$bgColor" } : /* istanbul ignore next */ {}), alias: 'bgColor' });
21
- $bgStyle = computed(() => ({ backgroundRepeat: this.$bgRepeat(), ...(this.$style() ?? {}) }), /* @ts-ignore */
22
- ...(ngDevMode ? [{ debugName: "$bgStyle" }] : /* istanbul ignore next */ []));
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BackgroundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: BackgroundComponent, isStandalone: true, selector: "ng-email-background", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $width: { classPropertyName: "$width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, $height: { classPropertyName: "$height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, $src: { classPropertyName: "$src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, $bgRepeat: { classPropertyName: "$bgRepeat", publicName: "bgRepeat", isSignal: true, isRequired: false, transformFunction: null }, $bgColor: { classPropertyName: "$bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let width = $width();\n@let height = $height();\n\n<table\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n [border]=\"0\"\n width=\"100%\"\n [attr.height]=\"height\"\n role=\"presentation\"\n>\n <tr>\n <td\n [align]=\"'top'\"\n [width]=\"width\"\n [height]=\"height && width ? height : undefined\"\n [attr.bgcolor]=\"$bgColor()\"\n [attr.background]=\"$src()\"\n [style]=\"$bgStyle()\"\n [class]=\"$styleClass()\"\n >\n <ng-content />\n </td>\n </tr>\n</table>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
25
- }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BackgroundComponent, decorators: [{
27
- type: Component,
28
- args: [{ selector: 'ng-email-background', changeDetection: ChangeDetectionStrategy.OnPush, imports: [], template: "@let width = $width();\n@let height = $height();\n\n<table\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n [border]=\"0\"\n width=\"100%\"\n [attr.height]=\"height\"\n role=\"presentation\"\n>\n <tr>\n <td\n [align]=\"'top'\"\n [width]=\"width\"\n [height]=\"height && width ? height : undefined\"\n [attr.bgcolor]=\"$bgColor()\"\n [attr.background]=\"$src()\"\n [style]=\"$bgStyle()\"\n [class]=\"$styleClass()\"\n >\n <ng-content />\n </td>\n </tr>\n</table>\n" }]
29
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], $height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], $src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], $bgRepeat: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgRepeat", required: false }] }], $bgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgColor", required: false }] }] } });
30
-
31
- class BodyComponent {
32
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
34
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: BodyComponent, isStandalone: true, selector: "ng-email-body", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<body\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n>\n <ng-content />\n</body>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: BodyComponent, decorators: [{
39
- type: Component,
40
- args: [{ selector: 'ng-email-body', changeDetection: ChangeDetectionStrategy.OnPush, template: "<body\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n>\n <ng-content />\n</body>\n" }]
41
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }] } });
42
-
43
- class ButtonComponent {
44
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
45
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
46
- $styleClass = input(null, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
47
- $href = input(undefined, { ...(ngDevMode ? { debugName: "$href" } : /* istanbul ignore next */ {}), alias: 'href' });
48
- $textContent = input.required({ ...(ngDevMode ? { debugName: "$textContent" } : /* istanbul ignore next */ {}), alias: 'textContent' });
49
- $width = input(undefined, { ...(ngDevMode ? { debugName: "$width" } : /* istanbul ignore next */ {}), alias: 'width' });
50
- $height = input(undefined, { ...(ngDevMode ? { debugName: "$height" } : /* istanbul ignore next */ {}), alias: 'height' });
51
- $borderRadius = input(0, { ...(ngDevMode ? { debugName: "$borderRadius" } : /* istanbul ignore next */ {}), alias: 'borderRadius' });
52
- $textColor = input(undefined, { ...(ngDevMode ? { debugName: "$textColor" } : /* istanbul ignore next */ {}), alias: 'textColor' });
53
- $backgroundColor = input(undefined, { ...(ngDevMode ? { debugName: "$backgroundColor" } : /* istanbul ignore next */ {}), alias: 'backgroundColor' });
54
- $borderColor = input(undefined, { ...(ngDevMode ? { debugName: "$borderColor" } : /* istanbul ignore next */ {}), alias: 'borderColor' });
55
- $borderSize = input(1, { ...(ngDevMode ? { debugName: "$borderSize" } : /* istanbul ignore next */ {}), alias: 'borderSize' });
56
- $fontSize = input(16, { ...(ngDevMode ? { debugName: "$fontSize" } : /* istanbul ignore next */ {}), alias: 'fontSize' });
57
- $align = input('left', { ...(ngDevMode ? { debugName: "$align" } : /* istanbul ignore next */ {}), alias: 'align' });
58
- $withBackground = input(false, { ...(ngDevMode ? { debugName: "$withBackground" } : /* istanbul ignore next */ {}), alias: 'withBackground' });
59
- $arcsize = computed(() => Math.floor((this.$borderRadius() / (this.$height() ?? 1)) * 100), /* @ts-ignore */
60
- ...(ngDevMode ? [{ debugName: "$arcsize" }] : /* istanbul ignore next */ []));
61
- $lineHeight = computed(() => this.$borderSize() ? (this.$height() ?? 0) - 2 * this.$borderSize() : (this.$height() ?? 0), /* @ts-ignore */
62
- ...(ngDevMode ? [{ debugName: "$lineHeight" }] : /* istanbul ignore next */ []));
63
- $baseStyle = computed(() => ({
64
- '-webkit-text-size-adjust': 'none',
65
- borderRadius: `${this.$borderRadius()}px`,
66
- display: 'inline-block',
67
- fontSize: `${this.$fontSize()}px`,
68
- lineHeight: `${this.$lineHeight()}px`,
69
- maxWidth: this.$width() ? `${this.$width()}px` : undefined,
70
- textAlign: 'center',
71
- textDecoration: 'none',
72
- width: '100%',
73
- }), /* @ts-ignore */
74
- ...(ngDevMode ? [{ debugName: "$baseStyle" }] : /* istanbul ignore next */ []));
75
- $borderStyles = computed(() => ({
76
- border: `${this.$borderSize()}px solid ${this.$borderColor()}`,
77
- msoBorderAlt: 'none',
78
- }), /* @ts-ignore */
79
- ...(ngDevMode ? [{ debugName: "$borderStyles" }] : /* istanbul ignore next */ []));
80
- $propStyles = computed(() => ({
81
- // border styles
82
- ...(this.$borderColor() ? this.$borderStyles() : {}),
83
- // background styles
84
- ...(this.$backgroundColor() ? { backgroundColor: this.$backgroundColor() } : {}),
85
- // text styles
86
- ...(this.$textColor() ? { color: this.$textColor() } : {}),
87
- }), /* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "$propStyles" }] : /* istanbul ignore next */ []));
89
- $withBackgroundStyle = computed(() => ({
90
- ...this.$baseStyle(),
91
- // background styles
92
- ...(this.$backgroundColor() ? { backgroundColor: this.$backgroundColor() } : {}),
93
- // text styles
94
- ...(this.$textColor() ? { color: this.$textColor() } : {}),
95
- ...(this.$style() ?? {}),
96
- ...(this.$withBackground() ? {} : { msoHide: 'all' }),
97
- }), /* @ts-ignore */
98
- ...(ngDevMode ? [{ debugName: "$withBackgroundStyle" }] : /* istanbul ignore next */ []));
99
- $withoutBackgroundStyle = computed(() => ({
100
- ...this.$baseStyle(),
101
- // background styles
102
- ...this.$propStyles(),
103
- ...(this.$style() ?? {}),
104
- ...(this.$withBackground() ? {} : { msoHide: 'all' }),
105
- }), /* @ts-ignore */
106
- ...(ngDevMode ? [{ debugName: "$withoutBackgroundStyle" }] : /* istanbul ignore next */ []));
107
- $noBgInnerHtml = computed(() => {
108
- const href = this.$href();
109
- const borderColor = this.$borderColor();
110
- const borderSize = this.$borderSize();
111
- const height = this.$height();
112
- const width = this.$width();
113
- const arcsize = this.$arcsize();
114
- const backgroundColor = this.$backgroundColor();
115
- const fontSize = this.$fontSize();
116
- const textColor = this.$textColor();
117
- const textContent = this.$textContent();
118
- return `<!--[if mso]>
119
- <v:roundrect href="${href}" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" style="${height !== undefined ? `height:${height}px` : ''};v-text-anchor:middle;${width !== undefined ? `height:${width}px` : ''};" arcsize="${arcsize}%" ${borderColor ? `strokecolor=${borderColor}` : ''} ${borderSize ? `strokeweight="${borderSize}px"` : `stroke="false"`} ${backgroundColor ? `fillcolor=${backgroundColor}` : `fill="false"`}>
1
+ import * as i0 from "@angular/core";
2
+ import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, DOCUMENT, NO_ERRORS_SCHEMA, computed, effect, inject, input, provideZonelessChangeDetection } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { bootstrapApplication } from "@angular/platform-browser";
5
+ import { renderApplication } from "@angular/platform-server";
6
+ import { provideServerRendering } from "@angular/ssr";
7
+ import * as cheerio from "cheerio/slim";
8
+ import { convert } from "html-to-text";
9
+ import juice from "juice";
10
+ import prettyPrint from "pretty";
11
+ var BackgroundComponent = class BackgroundComponent {
12
+ $style = input(null, {
13
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
14
+ alias: "style"
15
+ });
16
+ $styleClass = input(void 0, {
17
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
18
+ alias: "styleClass"
19
+ });
20
+ $width = input(0, {
21
+ ...ngDevMode ? { debugName: "$width" } : /* istanbul ignore next */ {},
22
+ alias: "width"
23
+ });
24
+ $height = input(0, {
25
+ ...ngDevMode ? { debugName: "$height" } : /* istanbul ignore next */ {},
26
+ alias: "height"
27
+ });
28
+ $src = input(void 0, {
29
+ ...ngDevMode ? { debugName: "$src" } : /* istanbul ignore next */ {},
30
+ alias: "src"
31
+ });
32
+ $bgRepeat = input("no-repeat", {
33
+ ...ngDevMode ? { debugName: "$bgRepeat" } : /* istanbul ignore next */ {},
34
+ alias: "bgRepeat"
35
+ });
36
+ $bgColor = input(void 0, {
37
+ ...ngDevMode ? { debugName: "$bgColor" } : /* istanbul ignore next */ {},
38
+ alias: "bgColor"
39
+ });
40
+ $bgStyle = computed(() => ({
41
+ backgroundRepeat: this.$bgRepeat(),
42
+ ...this.$style() ?? {}
43
+ }), ...ngDevMode ? [{ debugName: "$bgStyle" }] : /* istanbul ignore next */ []);
44
+ static ɵfac = i0.ɵɵngDeclareFactory({
45
+ minVersion: "12.0.0",
46
+ version: "22.2.1",
47
+ ngImport: i0,
48
+ type: BackgroundComponent,
49
+ deps: [],
50
+ target: i0.ɵɵFactoryTarget.Component
51
+ });
52
+ static ɵcmp = i0.ɵɵngDeclareComponent({
53
+ minVersion: "17.1.0",
54
+ version: "22.2.1",
55
+ type: BackgroundComponent,
56
+ isStandalone: true,
57
+ selector: "ng-email-background",
58
+ inputs: {
59
+ $style: {
60
+ classPropertyName: "$style",
61
+ publicName: "style",
62
+ isSignal: true,
63
+ isRequired: false,
64
+ transformFunction: null
65
+ },
66
+ $styleClass: {
67
+ classPropertyName: "$styleClass",
68
+ publicName: "styleClass",
69
+ isSignal: true,
70
+ isRequired: false,
71
+ transformFunction: null
72
+ },
73
+ $width: {
74
+ classPropertyName: "$width",
75
+ publicName: "width",
76
+ isSignal: true,
77
+ isRequired: false,
78
+ transformFunction: null
79
+ },
80
+ $height: {
81
+ classPropertyName: "$height",
82
+ publicName: "height",
83
+ isSignal: true,
84
+ isRequired: false,
85
+ transformFunction: null
86
+ },
87
+ $src: {
88
+ classPropertyName: "$src",
89
+ publicName: "src",
90
+ isSignal: true,
91
+ isRequired: false,
92
+ transformFunction: null
93
+ },
94
+ $bgRepeat: {
95
+ classPropertyName: "$bgRepeat",
96
+ publicName: "bgRepeat",
97
+ isSignal: true,
98
+ isRequired: false,
99
+ transformFunction: null
100
+ },
101
+ $bgColor: {
102
+ classPropertyName: "$bgColor",
103
+ publicName: "bgColor",
104
+ isSignal: true,
105
+ isRequired: false,
106
+ transformFunction: null
107
+ }
108
+ },
109
+ ngImport: i0,
110
+ template: "@let width = $width();\n@let height = $height();\n\n<table\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n [border]=\"0\"\n width=\"100%\"\n [attr.height]=\"height\"\n role=\"presentation\"\n>\n <tr>\n <td\n [align]=\"'top'\"\n [width]=\"width\"\n [height]=\"height && width ? height : undefined\"\n [attr.bgcolor]=\"$bgColor()\"\n [attr.background]=\"$src()\"\n [style]=\"$bgStyle()\"\n [class]=\"$styleClass()\"\n >\n <ng-content />\n </td>\n </tr>\n</table>\n",
111
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
112
+ });
113
+ };
114
+ i0.ɵɵngDeclareClassMetadata({
115
+ minVersion: "12.0.0",
116
+ version: "22.2.1",
117
+ ngImport: i0,
118
+ type: BackgroundComponent,
119
+ decorators: [{
120
+ type: Component,
121
+ args: [{
122
+ selector: "ng-email-background",
123
+ changeDetection: ChangeDetectionStrategy.OnPush,
124
+ imports: [],
125
+ template: "@let width = $width();\n@let height = $height();\n\n<table\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n [border]=\"0\"\n width=\"100%\"\n [attr.height]=\"height\"\n role=\"presentation\"\n>\n <tr>\n <td\n [align]=\"'top'\"\n [width]=\"width\"\n [height]=\"height && width ? height : undefined\"\n [attr.bgcolor]=\"$bgColor()\"\n [attr.background]=\"$src()\"\n [style]=\"$bgStyle()\"\n [class]=\"$styleClass()\"\n >\n <ng-content />\n </td>\n </tr>\n</table>\n"
126
+ }]
127
+ }],
128
+ propDecorators: {
129
+ $style: [{
130
+ type: i0.Input,
131
+ args: [{
132
+ isSignal: true,
133
+ alias: "style",
134
+ required: false
135
+ }]
136
+ }],
137
+ $styleClass: [{
138
+ type: i0.Input,
139
+ args: [{
140
+ isSignal: true,
141
+ alias: "styleClass",
142
+ required: false
143
+ }]
144
+ }],
145
+ $width: [{
146
+ type: i0.Input,
147
+ args: [{
148
+ isSignal: true,
149
+ alias: "width",
150
+ required: false
151
+ }]
152
+ }],
153
+ $height: [{
154
+ type: i0.Input,
155
+ args: [{
156
+ isSignal: true,
157
+ alias: "height",
158
+ required: false
159
+ }]
160
+ }],
161
+ $src: [{
162
+ type: i0.Input,
163
+ args: [{
164
+ isSignal: true,
165
+ alias: "src",
166
+ required: false
167
+ }]
168
+ }],
169
+ $bgRepeat: [{
170
+ type: i0.Input,
171
+ args: [{
172
+ isSignal: true,
173
+ alias: "bgRepeat",
174
+ required: false
175
+ }]
176
+ }],
177
+ $bgColor: [{
178
+ type: i0.Input,
179
+ args: [{
180
+ isSignal: true,
181
+ alias: "bgColor",
182
+ required: false
183
+ }]
184
+ }]
185
+ }
186
+ });
187
+ var BodyComponent = class BodyComponent {
188
+ $style = input(null, {
189
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
190
+ alias: "style"
191
+ });
192
+ $styleClass = input(void 0, {
193
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
194
+ alias: "styleClass"
195
+ });
196
+ static ɵfac = i0.ɵɵngDeclareFactory({
197
+ minVersion: "12.0.0",
198
+ version: "22.2.1",
199
+ ngImport: i0,
200
+ type: BodyComponent,
201
+ deps: [],
202
+ target: i0.ɵɵFactoryTarget.Component
203
+ });
204
+ static ɵcmp = i0.ɵɵngDeclareComponent({
205
+ minVersion: "17.1.0",
206
+ version: "22.2.1",
207
+ type: BodyComponent,
208
+ isStandalone: true,
209
+ selector: "ng-email-body",
210
+ inputs: {
211
+ $style: {
212
+ classPropertyName: "$style",
213
+ publicName: "style",
214
+ isSignal: true,
215
+ isRequired: false,
216
+ transformFunction: null
217
+ },
218
+ $styleClass: {
219
+ classPropertyName: "$styleClass",
220
+ publicName: "styleClass",
221
+ isSignal: true,
222
+ isRequired: false,
223
+ transformFunction: null
224
+ }
225
+ },
226
+ ngImport: i0,
227
+ template: "<body\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n>\n <ng-content />\n</body>\n",
228
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
229
+ });
230
+ };
231
+ i0.ɵɵngDeclareClassMetadata({
232
+ minVersion: "12.0.0",
233
+ version: "22.2.1",
234
+ ngImport: i0,
235
+ type: BodyComponent,
236
+ decorators: [{
237
+ type: Component,
238
+ args: [{
239
+ selector: "ng-email-body",
240
+ changeDetection: ChangeDetectionStrategy.OnPush,
241
+ template: "<body\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n>\n <ng-content />\n</body>\n"
242
+ }]
243
+ }],
244
+ propDecorators: {
245
+ $style: [{
246
+ type: i0.Input,
247
+ args: [{
248
+ isSignal: true,
249
+ alias: "style",
250
+ required: false
251
+ }]
252
+ }],
253
+ $styleClass: [{
254
+ type: i0.Input,
255
+ args: [{
256
+ isSignal: true,
257
+ alias: "styleClass",
258
+ required: false
259
+ }]
260
+ }]
261
+ }
262
+ });
263
+ var ButtonComponent = class ButtonComponent {
264
+ $style = input(null, {
265
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
266
+ alias: "style"
267
+ });
268
+ $styleClass = input(null, {
269
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
270
+ alias: "styleClass"
271
+ });
272
+ $href = input(void 0, {
273
+ ...ngDevMode ? { debugName: "$href" } : /* istanbul ignore next */ {},
274
+ alias: "href"
275
+ });
276
+ $textContent = input.required({
277
+ ...ngDevMode ? { debugName: "$textContent" } : /* istanbul ignore next */ {},
278
+ alias: "textContent"
279
+ });
280
+ $width = input(void 0, {
281
+ ...ngDevMode ? { debugName: "$width" } : /* istanbul ignore next */ {},
282
+ alias: "width"
283
+ });
284
+ $height = input(void 0, {
285
+ ...ngDevMode ? { debugName: "$height" } : /* istanbul ignore next */ {},
286
+ alias: "height"
287
+ });
288
+ $borderRadius = input(0, {
289
+ ...ngDevMode ? { debugName: "$borderRadius" } : /* istanbul ignore next */ {},
290
+ alias: "borderRadius"
291
+ });
292
+ $textColor = input(void 0, {
293
+ ...ngDevMode ? { debugName: "$textColor" } : /* istanbul ignore next */ {},
294
+ alias: "textColor"
295
+ });
296
+ $backgroundColor = input(void 0, {
297
+ ...ngDevMode ? { debugName: "$backgroundColor" } : /* istanbul ignore next */ {},
298
+ alias: "backgroundColor"
299
+ });
300
+ $borderColor = input(void 0, {
301
+ ...ngDevMode ? { debugName: "$borderColor" } : /* istanbul ignore next */ {},
302
+ alias: "borderColor"
303
+ });
304
+ $borderSize = input(1, {
305
+ ...ngDevMode ? { debugName: "$borderSize" } : /* istanbul ignore next */ {},
306
+ alias: "borderSize"
307
+ });
308
+ $fontSize = input(16, {
309
+ ...ngDevMode ? { debugName: "$fontSize" } : /* istanbul ignore next */ {},
310
+ alias: "fontSize"
311
+ });
312
+ $align = input("left", {
313
+ ...ngDevMode ? { debugName: "$align" } : /* istanbul ignore next */ {},
314
+ alias: "align"
315
+ });
316
+ $withBackground = input(false, {
317
+ ...ngDevMode ? { debugName: "$withBackground" } : /* istanbul ignore next */ {},
318
+ alias: "withBackground"
319
+ });
320
+ $arcsize = computed(() => Math.floor(this.$borderRadius() / (this.$height() ?? 1) * 100), ...ngDevMode ? [{ debugName: "$arcsize" }] : /* istanbul ignore next */ []);
321
+ $lineHeight = computed(() => this.$borderSize() ? (this.$height() ?? 0) - 2 * this.$borderSize() : this.$height() ?? 0, ...ngDevMode ? [{ debugName: "$lineHeight" }] : /* istanbul ignore next */ []);
322
+ $baseStyle = computed(() => ({
323
+ "-webkit-text-size-adjust": "none",
324
+ borderRadius: `${this.$borderRadius()}px`,
325
+ display: "inline-block",
326
+ fontSize: `${this.$fontSize()}px`,
327
+ lineHeight: `${this.$lineHeight()}px`,
328
+ maxWidth: this.$width() ? `${this.$width()}px` : void 0,
329
+ textAlign: "center",
330
+ textDecoration: "none",
331
+ width: "100%"
332
+ }), ...ngDevMode ? [{ debugName: "$baseStyle" }] : /* istanbul ignore next */ []);
333
+ $borderStyles = computed(() => ({
334
+ border: `${this.$borderSize()}px solid ${this.$borderColor()}`,
335
+ msoBorderAlt: "none"
336
+ }), ...ngDevMode ? [{ debugName: "$borderStyles" }] : /* istanbul ignore next */ []);
337
+ $propStyles = computed(() => ({
338
+ ...this.$borderColor() ? this.$borderStyles() : {},
339
+ ...this.$backgroundColor() ? { backgroundColor: this.$backgroundColor() } : {},
340
+ ...this.$textColor() ? { color: this.$textColor() } : {}
341
+ }), ...ngDevMode ? [{ debugName: "$propStyles" }] : /* istanbul ignore next */ []);
342
+ $withBackgroundStyle = computed(() => ({
343
+ ...this.$baseStyle(),
344
+ ...this.$backgroundColor() ? { backgroundColor: this.$backgroundColor() } : {},
345
+ ...this.$textColor() ? { color: this.$textColor() } : {},
346
+ ...this.$style() ?? {},
347
+ ...this.$withBackground() ? {} : { msoHide: "all" }
348
+ }), ...ngDevMode ? [{ debugName: "$withBackgroundStyle" }] : /* istanbul ignore next */ []);
349
+ $withoutBackgroundStyle = computed(() => ({
350
+ ...this.$baseStyle(),
351
+ ...this.$propStyles(),
352
+ ...this.$style() ?? {},
353
+ ...this.$withBackground() ? {} : { msoHide: "all" }
354
+ }), ...ngDevMode ? [{ debugName: "$withoutBackgroundStyle" }] : /* istanbul ignore next */ []);
355
+ $noBgInnerHtml = computed(() => {
356
+ const href = this.$href();
357
+ const borderColor = this.$borderColor();
358
+ const borderSize = this.$borderSize();
359
+ const height = this.$height();
360
+ const width = this.$width();
361
+ const arcsize = this.$arcsize();
362
+ const backgroundColor = this.$backgroundColor();
363
+ const fontSize = this.$fontSize();
364
+ const textColor = this.$textColor();
365
+ const textContent = this.$textContent();
366
+ return `<!--[if mso]>
367
+ <v:roundrect href="${href}" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" style="${height !== void 0 ? `height:${height}px` : ""};v-text-anchor:middle;${width !== void 0 ? `width:${width}px` : ""};" arcsize="${arcsize}%" ${borderColor ? `strokecolor="${borderColor}"` : ""} ${borderSize ? `strokeweight="${borderSize}px"` : `stroke="false"`} ${backgroundColor ? `fillcolor="${backgroundColor}"` : `fill="false"`}>
120
368
  <w:anchorlock/>
121
- <center style="font-size:${fontSize}px;${textColor ? `color:${textColor};` : ''}">
369
+ <center style="font-size:${fontSize}px;${textColor ? `color:${textColor};` : ""}">
122
370
  ${textContent}
123
371
  </center></v:roundrect>
124
372
  <![endif]-->`;
125
- }, /* @ts-ignore */
126
- ...(ngDevMode ? [{ debugName: "$noBgInnerHtml" }] : /* istanbul ignore next */ []));
127
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
128
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: ButtonComponent, isStandalone: true, selector: "ng-email-button", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $href: { classPropertyName: "$href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, $textContent: { classPropertyName: "$textContent", publicName: "textContent", isSignal: true, isRequired: true, transformFunction: null }, $width: { classPropertyName: "$width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, $height: { classPropertyName: "$height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, $borderRadius: { classPropertyName: "$borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, $textColor: { classPropertyName: "$textColor", publicName: "textColor", isSignal: true, isRequired: false, transformFunction: null }, $backgroundColor: { classPropertyName: "$backgroundColor", publicName: "backgroundColor", isSignal: true, isRequired: false, transformFunction: null }, $borderColor: { classPropertyName: "$borderColor", publicName: "borderColor", isSignal: true, isRequired: false, transformFunction: null }, $borderSize: { classPropertyName: "$borderSize", publicName: "borderSize", isSignal: true, isRequired: false, transformFunction: null }, $fontSize: { classPropertyName: "$fontSize", publicName: "fontSize", isSignal: true, isRequired: false, transformFunction: null }, $align: { classPropertyName: "$align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, $withBackground: { classPropertyName: "$withBackground", publicName: "withBackground", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let withBackground = $withBackground();\n@let align = $align();\n@let href = $href();\n@let height = $height();\n@let width = $width();\n@let borderRadius = $borderRadius();\n\n<ng-template #child><ng-content></ng-content></ng-template>\n\n<table\n [width]=\"'100%'\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n style=\"border-collapse: collapse\"\n role=\"presentation\"\n>\n <tr>\n <td [align]=\"align\">\n @if (withBackground) {\n <table\n [align]=\"align\"\n [width]=\"width\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n role=\"presentation\"\n [style]=\"{\n border: $borderSize() + 'px solid ' + ($borderColor() ?? 'inherit'),\n borderRadius: borderRadius ? borderRadius + 'px' : undefined,\n }\"\n >\n <tr>\n <td\n [attr.bgcolor]=\"$backgroundColor()\"\n [width]=\"width\"\n [height]=\"height\"\n [style]=\"{\n borderRadius: borderRadius ? borderRadius + 'px' : undefined,\n height: height ? height + 'px' : undefined,\n width: width ? width + 'px' : undefined,\n maxWidth: width ? width + 'px' : undefined,\n textAlign: 'center',\n }\"\n >\n <a\n [href]=\"href\"\n [class]=\"$styleClass()\"\n [style]=\"$withBackgroundStyle()\"\n >\n <ng-container [ngTemplateOutlet]=\"child\"></ng-container>\n </a>\n </td>\n </tr>\n </table>\n } @else {\n <noscript [attr.data-html]=\"$noBgInnerHtml()\"></noscript>\n <a\n [href]=\"href\"\n [class]=\"$styleClass()\"\n [style]=\"$withoutBackgroundStyle()\"\n >\n <ng-container [ngTemplateOutlet]=\"child\"></ng-container>\n </a>\n }\n </td>\n </tr>\n</table>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
129
- }
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ButtonComponent, decorators: [{
131
- type: Component,
132
- args: [{ selector: 'ng-email-button', imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let withBackground = $withBackground();\n@let align = $align();\n@let href = $href();\n@let height = $height();\n@let width = $width();\n@let borderRadius = $borderRadius();\n\n<ng-template #child><ng-content></ng-content></ng-template>\n\n<table\n [width]=\"'100%'\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n style=\"border-collapse: collapse\"\n role=\"presentation\"\n>\n <tr>\n <td [align]=\"align\">\n @if (withBackground) {\n <table\n [align]=\"align\"\n [width]=\"width\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n role=\"presentation\"\n [style]=\"{\n border: $borderSize() + 'px solid ' + ($borderColor() ?? 'inherit'),\n borderRadius: borderRadius ? borderRadius + 'px' : undefined,\n }\"\n >\n <tr>\n <td\n [attr.bgcolor]=\"$backgroundColor()\"\n [width]=\"width\"\n [height]=\"height\"\n [style]=\"{\n borderRadius: borderRadius ? borderRadius + 'px' : undefined,\n height: height ? height + 'px' : undefined,\n width: width ? width + 'px' : undefined,\n maxWidth: width ? width + 'px' : undefined,\n textAlign: 'center',\n }\"\n >\n <a\n [href]=\"href\"\n [class]=\"$styleClass()\"\n [style]=\"$withBackgroundStyle()\"\n >\n <ng-container [ngTemplateOutlet]=\"child\"></ng-container>\n </a>\n </td>\n </tr>\n </table>\n } @else {\n <noscript [attr.data-html]=\"$noBgInnerHtml()\"></noscript>\n <a\n [href]=\"href\"\n [class]=\"$styleClass()\"\n [style]=\"$withoutBackgroundStyle()\"\n >\n <ng-container [ngTemplateOutlet]=\"child\"></ng-container>\n </a>\n }\n </td>\n </tr>\n</table>\n" }]
133
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], $textContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "textContent", required: true }] }], $width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], $height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], $borderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderRadius", required: false }] }], $textColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "textColor", required: false }] }], $backgroundColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "backgroundColor", required: false }] }], $borderColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderColor", required: false }] }], $borderSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "borderSize", required: false }] }], $fontSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "fontSize", required: false }] }], $align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], $withBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "withBackground", required: false }] }] } });
134
-
135
- class ColorSchemeComponent {
136
- $mode = input('normal', { ...(ngDevMode ? { debugName: "$mode" } : /* istanbul ignore next */ {}), alias: 'mode' });
137
- $style = computed(() => `<style>:root { color-scheme: ${this.$mode()}; supported-color-schemes: ${this.$mode()}; }</style>`, /* @ts-ignore */
138
- ...(ngDevMode ? [{ debugName: "$style" }] : /* istanbul ignore next */ []));
139
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ColorSchemeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
140
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: ColorSchemeComponent, isStandalone: true, selector: "ng-email-color-scheme", inputs: { $mode: { classPropertyName: "$mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let mode = $mode();\n\n<meta\n name=\"color-scheme\"\n [content]=\"mode\"\n/>\n<meta\n name=\"supported-color-schemes\"\n [content]=\"mode\"\n/>\n\n<noscript [attr.data-html]=\"$style()\"></noscript>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
141
- }
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ColorSchemeComponent, decorators: [{
143
- type: Component,
144
- args: [{ selector: 'ng-email-color-scheme', changeDetection: ChangeDetectionStrategy.OnPush, template: "@let mode = $mode();\n\n<meta\n name=\"color-scheme\"\n [content]=\"mode\"\n/>\n<meta\n name=\"supported-color-schemes\"\n [content]=\"mode\"\n/>\n\n<noscript [attr.data-html]=\"$style()\"></noscript>\n" }]
145
- }], propDecorators: { $mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }] } });
146
-
147
- class ColumnComponent {
148
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
149
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
150
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
151
- $bgImage = input(undefined, { ...(ngDevMode ? { debugName: "$bgImage" } : /* istanbul ignore next */ {}), alias: 'bgImage' });
152
- $bgColor = input(undefined, { ...(ngDevMode ? { debugName: "$bgColor" } : /* istanbul ignore next */ {}), alias: 'bgColor' });
153
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
154
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: ColumnComponent, isStandalone: true, selector: "ng-email-column", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $bgImage: { classPropertyName: "$bgImage", publicName: "bgImage", isSignal: true, isRequired: false, transformFunction: null }, $bgColor: { classPropertyName: "$bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<td\n [attr.background]=\"$bgImage()\"\n [attr.bgcolor]=\"$bgColor()\"\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n role=\"presentation\"\n>\n <ng-content />\n</td>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
155
- }
156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ColumnComponent, decorators: [{
157
- type: Component,
158
- args: [{ selector: 'ng-email-column', changeDetection: ChangeDetectionStrategy.OnPush, imports: [], template: "<td\n [attr.background]=\"$bgImage()\"\n [attr.bgcolor]=\"$bgColor()\"\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n role=\"presentation\"\n>\n <ng-content />\n</td>\n" }]
159
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $bgImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgImage", required: false }] }], $bgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgColor", required: false }] }] } });
160
-
161
- class ConditionalComponent {
162
- $expression = input(undefined, { ...(ngDevMode ? { debugName: "$expression" } : /* istanbul ignore next */ {}), alias: 'expression' });
163
- $mso = input(undefined, { ...(ngDevMode ? { debugName: "$mso" } : /* istanbul ignore next */ {}), alias: 'mso' });
164
- noMsoInnerHtmlPre = '&lt;!--[if !mso]&gt;&lt;!--&gt;';
165
- noMsoInnerHtmlPost = '&lt;!--&lt;![endif]--&gt;';
166
- $msoInnerHtmlPre = computed(() => `&lt;!--[if ${this.$expression() ?? 'mso'}]&gt;`, /* @ts-ignore */
167
- ...(ngDevMode ? [{ debugName: "$msoInnerHtmlPre" }] : /* istanbul ignore next */ []));
168
- msoInnerHtmlPost = '&lt;![endif]--&gt;';
169
- constructor() {
170
- effect(() => {
171
- if (typeof this.$expression() === 'undefined' && typeof this.$mso() === 'undefined')
172
- throw new RangeError('angular-email: Conditional expects the `expression` or `mso` prop to be defined');
173
- if (typeof this.$expression() !== 'undefined' && typeof this.$mso() !== 'undefined')
174
- throw new RangeError('angular-email: Conditional expects the `expression` or `mso` prop to be defined, not both');
175
- });
176
- }
177
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ConditionalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
178
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: ConditionalComponent, isStandalone: true, selector: "ng-email-conditional", inputs: { $expression: { classPropertyName: "$expression", publicName: "expression", isSignal: true, isRequired: false, transformFunction: null }, $mso: { classPropertyName: "$mso", publicName: "mso", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let mso = $mso();\n\n@if (!mso) {\n <noscript [attr.data-html]=\"noMsoInnerHtmlPre\"></noscript>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <noscript [attr.data-html]=\"noMsoInnerHtmlPost\"></noscript>\n} @else {\n <noscript [attr.data-html]=\"$msoInnerHtmlPre()\"></noscript>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <noscript [attr.data-html]=\"msoInnerHtmlPost\"></noscript>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
179
- }
180
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ConditionalComponent, decorators: [{
181
- type: Component,
182
- args: [{ selector: 'ng-email-conditional', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "@let mso = $mso();\n\n@if (!mso) {\n <noscript [attr.data-html]=\"noMsoInnerHtmlPre\"></noscript>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <noscript [attr.data-html]=\"noMsoInnerHtmlPost\"></noscript>\n} @else {\n <noscript [attr.data-html]=\"$msoInnerHtmlPre()\"></noscript>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <noscript [attr.data-html]=\"msoInnerHtmlPost\"></noscript>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n" }]
183
- }], ctorParameters: () => [], propDecorators: { $expression: [{ type: i0.Input, args: [{ isSignal: true, alias: "expression", required: false }] }], $mso: [{ type: i0.Input, args: [{ isSignal: true, alias: "mso", required: false }] }] } });
184
-
185
- class ContainerComponent {
186
- random = Math.random();
187
- document = inject(DOCUMENT);
188
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
189
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
190
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
191
- $alignment = input('center', { ...(ngDevMode ? { debugName: "$alignment" } : /* istanbul ignore next */ {}), alias: 'alignment' });
192
- $disableDefaultStyle = input(false, { ...(ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {}), alias: 'disableDefaultStyle' });
193
- $containerWidth = input(600, { ...(ngDevMode ? { debugName: "$containerWidth" } : /* istanbul ignore next */ {}), alias: 'containerWidth' });
194
- $containerStyle = computed(() => ({
195
- ...(this.$disableDefaultStyle() ? {} : { maxWidth: `${this.$containerWidth()}px` }),
196
- ...this.$style(),
197
- }), /* @ts-ignore */
198
- ...(ngDevMode ? [{ debugName: "$containerStyle" }] : /* istanbul ignore next */ []));
199
- $trStyle = computed(() => ({
200
- ...(this.$disableDefaultStyle() ? {} : { width: '100%' }),
201
- }), /* @ts-ignore */
202
- ...(ngDevMode ? [{ debugName: "$trStyle" }] : /* istanbul ignore next */ []));
203
- $innerHtmlPre = computed(() => `<!--[if mso]><table align="${this.$alignment()}" width="${this.$containerWidth()}" style="border-spacing: 0; width:${this.$containerWidth()}px;" role="presentation"><tr><td><![endif]-->`, /* @ts-ignore */
204
- ...(ngDevMode ? [{ debugName: "$innerHtmlPre" }] : /* istanbul ignore next */ []));
205
- $innerHtmlPost = computed(() => `<!--[if mso]></td></tr></table><![endif]-->`, /* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "$innerHtmlPost" }] : /* istanbul ignore next */ []));
207
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
208
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: ContainerComponent, isStandalone: true, selector: "ng-email-container", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $alignment: { classPropertyName: "$alignment", publicName: "alignment", isSignal: true, isRequired: false, transformFunction: null }, $disableDefaultStyle: { classPropertyName: "$disableDefaultStyle", publicName: "disableDefaultStyle", isSignal: true, isRequired: false, transformFunction: null }, $containerWidth: { classPropertyName: "$containerWidth", publicName: "containerWidth", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let containerWidth = $containerWidth();\n@let alignment = $alignment();\n\n<div [style]=\"{ tableLayout: 'fixed', width: '100%' }\">\n <div [style]=\"{ margin: '0 auto', maxWidth: containerWidth }\">\n <noscript [attr.data-html]=\"$innerHtmlPre()\"></noscript>\n <table\n [align]=\"alignment\"\n [width]=\"'100%'\"\n role=\"presentation\"\n [cellSpacing]=\"0\"\n [cellPadding]=\"0\"\n [border]=\"0\"\n [style]=\"$containerStyle()\"\n [class]=\"$styleClass()\"\n >\n <tbody>\n <tr [style]=\"$trStyle()\">\n <td [align]=\"alignment\">\n <ng-content></ng-content>\n </td>\n </tr>\n </tbody>\n </table>\n <noscript [attr.data-html]=\"$innerHtmlPost()\"></noscript>\n </div>\n</div>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
209
- }
210
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ContainerComponent, decorators: [{
211
- type: Component,
212
- args: [{ selector: 'ng-email-container', changeDetection: ChangeDetectionStrategy.OnPush, imports: [], template: "@let containerWidth = $containerWidth();\n@let alignment = $alignment();\n\n<div [style]=\"{ tableLayout: 'fixed', width: '100%' }\">\n <div [style]=\"{ margin: '0 auto', maxWidth: containerWidth }\">\n <noscript [attr.data-html]=\"$innerHtmlPre()\"></noscript>\n <table\n [align]=\"alignment\"\n [width]=\"'100%'\"\n role=\"presentation\"\n [cellSpacing]=\"0\"\n [cellPadding]=\"0\"\n [border]=\"0\"\n [style]=\"$containerStyle()\"\n [class]=\"$styleClass()\"\n >\n <tbody>\n <tr [style]=\"$trStyle()\">\n <td [align]=\"alignment\">\n <ng-content></ng-content>\n </td>\n </tr>\n </tbody>\n </table>\n <noscript [attr.data-html]=\"$innerHtmlPost()\"></noscript>\n </div>\n</div>\n" }]
213
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $alignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "alignment", required: false }] }], $disableDefaultStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDefaultStyle", required: false }] }], $containerWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "containerWidth", required: false }] }] } });
214
-
215
- class HeadComponent {
216
- $enableFormatDetection = input(false, { ...(ngDevMode ? { debugName: "$enableFormatDetection" } : /* istanbul ignore next */ {}), alias: 'enableFormatDetection' });
217
- xml = `\n<xml><o:OfficeDocumentSettings><o:AllowPNG /><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml>\n`;
218
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: HeadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
219
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: HeadComponent, isStandalone: true, selector: "ng-email-head", inputs: { $enableFormatDetection: { classPropertyName: "$enableFormatDetection", publicName: "enableFormatDetection", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let enableFormatDetection = $enableFormatDetection();\n\n<head>\n <meta\n http-equiv=\"content-type\"\n content=\"text/html; charset=UTF-8\"\n />\n <meta\n name=\"viewport\"\n content=\"width=device-width, initial-scale=1, user-scalable=yes\"\n />\n <meta name=\"x-apple-disable-message-reformatting\" />\n @if (!enableFormatDetection) {\n <meta\n name=\"format-detection\"\n content=\"telephone=no, date=no, address=no, email=no, url=no\"\n />\n }\n <ng-content></ng-content>\n <ng-email-conditional [mso]=\"true\">\n <noscript [attr.data-html]=\"xml\"></noscript>\n </ng-email-conditional>\n</head>\n", dependencies: [{ kind: "component", type: ConditionalComponent, selector: "ng-email-conditional", inputs: ["expression", "mso"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
220
- }
221
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: HeadComponent, decorators: [{
222
- type: Component,
223
- args: [{ selector: 'ng-email-head', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ConditionalComponent], schemas: [NO_ERRORS_SCHEMA], template: "@let enableFormatDetection = $enableFormatDetection();\n\n<head>\n <meta\n http-equiv=\"content-type\"\n content=\"text/html; charset=UTF-8\"\n />\n <meta\n name=\"viewport\"\n content=\"width=device-width, initial-scale=1, user-scalable=yes\"\n />\n <meta name=\"x-apple-disable-message-reformatting\" />\n @if (!enableFormatDetection) {\n <meta\n name=\"format-detection\"\n content=\"telephone=no, date=no, address=no, email=no, url=no\"\n />\n }\n <ng-content></ng-content>\n <ng-email-conditional [mso]=\"true\">\n <noscript [attr.data-html]=\"xml\"></noscript>\n </ng-email-conditional>\n</head>\n" }]
224
- }], propDecorators: { $enableFormatDetection: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableFormatDetection", required: false }] }] } });
225
-
373
+ }, ...ngDevMode ? [{ debugName: "$noBgInnerHtml" }] : /* istanbul ignore next */ []);
374
+ static ɵfac = i0.ɵɵngDeclareFactory({
375
+ minVersion: "12.0.0",
376
+ version: "22.2.1",
377
+ ngImport: i0,
378
+ type: ButtonComponent,
379
+ deps: [],
380
+ target: i0.ɵɵFactoryTarget.Component
381
+ });
382
+ static ɵcmp = i0.ɵɵngDeclareComponent({
383
+ minVersion: "17.0.0",
384
+ version: "22.2.1",
385
+ type: ButtonComponent,
386
+ isStandalone: true,
387
+ selector: "ng-email-button",
388
+ inputs: {
389
+ $style: {
390
+ classPropertyName: "$style",
391
+ publicName: "style",
392
+ isSignal: true,
393
+ isRequired: false,
394
+ transformFunction: null
395
+ },
396
+ $styleClass: {
397
+ classPropertyName: "$styleClass",
398
+ publicName: "styleClass",
399
+ isSignal: true,
400
+ isRequired: false,
401
+ transformFunction: null
402
+ },
403
+ $href: {
404
+ classPropertyName: "$href",
405
+ publicName: "href",
406
+ isSignal: true,
407
+ isRequired: false,
408
+ transformFunction: null
409
+ },
410
+ $textContent: {
411
+ classPropertyName: "$textContent",
412
+ publicName: "textContent",
413
+ isSignal: true,
414
+ isRequired: true,
415
+ transformFunction: null
416
+ },
417
+ $width: {
418
+ classPropertyName: "$width",
419
+ publicName: "width",
420
+ isSignal: true,
421
+ isRequired: false,
422
+ transformFunction: null
423
+ },
424
+ $height: {
425
+ classPropertyName: "$height",
426
+ publicName: "height",
427
+ isSignal: true,
428
+ isRequired: false,
429
+ transformFunction: null
430
+ },
431
+ $borderRadius: {
432
+ classPropertyName: "$borderRadius",
433
+ publicName: "borderRadius",
434
+ isSignal: true,
435
+ isRequired: false,
436
+ transformFunction: null
437
+ },
438
+ $textColor: {
439
+ classPropertyName: "$textColor",
440
+ publicName: "textColor",
441
+ isSignal: true,
442
+ isRequired: false,
443
+ transformFunction: null
444
+ },
445
+ $backgroundColor: {
446
+ classPropertyName: "$backgroundColor",
447
+ publicName: "backgroundColor",
448
+ isSignal: true,
449
+ isRequired: false,
450
+ transformFunction: null
451
+ },
452
+ $borderColor: {
453
+ classPropertyName: "$borderColor",
454
+ publicName: "borderColor",
455
+ isSignal: true,
456
+ isRequired: false,
457
+ transformFunction: null
458
+ },
459
+ $borderSize: {
460
+ classPropertyName: "$borderSize",
461
+ publicName: "borderSize",
462
+ isSignal: true,
463
+ isRequired: false,
464
+ transformFunction: null
465
+ },
466
+ $fontSize: {
467
+ classPropertyName: "$fontSize",
468
+ publicName: "fontSize",
469
+ isSignal: true,
470
+ isRequired: false,
471
+ transformFunction: null
472
+ },
473
+ $align: {
474
+ classPropertyName: "$align",
475
+ publicName: "align",
476
+ isSignal: true,
477
+ isRequired: false,
478
+ transformFunction: null
479
+ },
480
+ $withBackground: {
481
+ classPropertyName: "$withBackground",
482
+ publicName: "withBackground",
483
+ isSignal: true,
484
+ isRequired: false,
485
+ transformFunction: null
486
+ }
487
+ },
488
+ ngImport: i0,
489
+ template: "@let withBackground = $withBackground();\n@let align = $align();\n@let href = $href();\n@let height = $height();\n@let width = $width();\n@let borderRadius = $borderRadius();\n\n<ng-template #child><ng-content></ng-content></ng-template>\n\n<table\n [width]=\"'100%'\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n style=\"border-collapse: collapse\"\n role=\"presentation\"\n>\n <tr>\n <td [align]=\"align\">\n @if (withBackground) {\n <table\n [align]=\"align\"\n [width]=\"width\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n role=\"presentation\"\n [style]=\"{\n border: $borderSize() + 'px solid ' + ($borderColor() ?? 'inherit'),\n borderRadius: borderRadius ? borderRadius + 'px' : undefined,\n }\"\n >\n <tr>\n <td\n [attr.bgcolor]=\"$backgroundColor()\"\n [width]=\"width\"\n [height]=\"height\"\n [style]=\"{\n borderRadius: borderRadius ? borderRadius + 'px' : undefined,\n height: height ? height + 'px' : undefined,\n width: width ? width + 'px' : undefined,\n maxWidth: width ? width + 'px' : undefined,\n textAlign: 'center',\n }\"\n >\n <a\n [href]=\"href\"\n [class]=\"$styleClass()\"\n [style]=\"$withBackgroundStyle()\"\n >\n <ng-container [ngTemplateOutlet]=\"child\"></ng-container>\n </a>\n </td>\n </tr>\n </table>\n } @else {\n <noscript [attr.data-html]=\"$noBgInnerHtml()\"></noscript>\n <a\n [href]=\"href\"\n [class]=\"$styleClass()\"\n [style]=\"$withoutBackgroundStyle()\"\n >\n <ng-container [ngTemplateOutlet]=\"child\"></ng-container>\n </a>\n }\n </td>\n </tr>\n</table>\n",
490
+ dependencies: [{
491
+ kind: "directive",
492
+ type: NgTemplateOutlet,
493
+ selector: "[ngTemplateOutlet]",
494
+ inputs: [
495
+ "ngTemplateOutletContext",
496
+ "ngTemplateOutlet",
497
+ "ngTemplateOutletInjector"
498
+ ]
499
+ }],
500
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
501
+ });
502
+ };
503
+ i0.ɵɵngDeclareClassMetadata({
504
+ minVersion: "12.0.0",
505
+ version: "22.2.1",
506
+ ngImport: i0,
507
+ type: ButtonComponent,
508
+ decorators: [{
509
+ type: Component,
510
+ args: [{
511
+ selector: "ng-email-button",
512
+ imports: [NgTemplateOutlet],
513
+ changeDetection: ChangeDetectionStrategy.OnPush,
514
+ template: "@let withBackground = $withBackground();\n@let align = $align();\n@let href = $href();\n@let height = $height();\n@let width = $width();\n@let borderRadius = $borderRadius();\n\n<ng-template #child><ng-content></ng-content></ng-template>\n\n<table\n [width]=\"'100%'\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n style=\"border-collapse: collapse\"\n role=\"presentation\"\n>\n <tr>\n <td [align]=\"align\">\n @if (withBackground) {\n <table\n [align]=\"align\"\n [width]=\"width\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n role=\"presentation\"\n [style]=\"{\n border: $borderSize() + 'px solid ' + ($borderColor() ?? 'inherit'),\n borderRadius: borderRadius ? borderRadius + 'px' : undefined,\n }\"\n >\n <tr>\n <td\n [attr.bgcolor]=\"$backgroundColor()\"\n [width]=\"width\"\n [height]=\"height\"\n [style]=\"{\n borderRadius: borderRadius ? borderRadius + 'px' : undefined,\n height: height ? height + 'px' : undefined,\n width: width ? width + 'px' : undefined,\n maxWidth: width ? width + 'px' : undefined,\n textAlign: 'center',\n }\"\n >\n <a\n [href]=\"href\"\n [class]=\"$styleClass()\"\n [style]=\"$withBackgroundStyle()\"\n >\n <ng-container [ngTemplateOutlet]=\"child\"></ng-container>\n </a>\n </td>\n </tr>\n </table>\n } @else {\n <noscript [attr.data-html]=\"$noBgInnerHtml()\"></noscript>\n <a\n [href]=\"href\"\n [class]=\"$styleClass()\"\n [style]=\"$withoutBackgroundStyle()\"\n >\n <ng-container [ngTemplateOutlet]=\"child\"></ng-container>\n </a>\n }\n </td>\n </tr>\n</table>\n"
515
+ }]
516
+ }],
517
+ propDecorators: {
518
+ $style: [{
519
+ type: i0.Input,
520
+ args: [{
521
+ isSignal: true,
522
+ alias: "style",
523
+ required: false
524
+ }]
525
+ }],
526
+ $styleClass: [{
527
+ type: i0.Input,
528
+ args: [{
529
+ isSignal: true,
530
+ alias: "styleClass",
531
+ required: false
532
+ }]
533
+ }],
534
+ $href: [{
535
+ type: i0.Input,
536
+ args: [{
537
+ isSignal: true,
538
+ alias: "href",
539
+ required: false
540
+ }]
541
+ }],
542
+ $textContent: [{
543
+ type: i0.Input,
544
+ args: [{
545
+ isSignal: true,
546
+ alias: "textContent",
547
+ required: true
548
+ }]
549
+ }],
550
+ $width: [{
551
+ type: i0.Input,
552
+ args: [{
553
+ isSignal: true,
554
+ alias: "width",
555
+ required: false
556
+ }]
557
+ }],
558
+ $height: [{
559
+ type: i0.Input,
560
+ args: [{
561
+ isSignal: true,
562
+ alias: "height",
563
+ required: false
564
+ }]
565
+ }],
566
+ $borderRadius: [{
567
+ type: i0.Input,
568
+ args: [{
569
+ isSignal: true,
570
+ alias: "borderRadius",
571
+ required: false
572
+ }]
573
+ }],
574
+ $textColor: [{
575
+ type: i0.Input,
576
+ args: [{
577
+ isSignal: true,
578
+ alias: "textColor",
579
+ required: false
580
+ }]
581
+ }],
582
+ $backgroundColor: [{
583
+ type: i0.Input,
584
+ args: [{
585
+ isSignal: true,
586
+ alias: "backgroundColor",
587
+ required: false
588
+ }]
589
+ }],
590
+ $borderColor: [{
591
+ type: i0.Input,
592
+ args: [{
593
+ isSignal: true,
594
+ alias: "borderColor",
595
+ required: false
596
+ }]
597
+ }],
598
+ $borderSize: [{
599
+ type: i0.Input,
600
+ args: [{
601
+ isSignal: true,
602
+ alias: "borderSize",
603
+ required: false
604
+ }]
605
+ }],
606
+ $fontSize: [{
607
+ type: i0.Input,
608
+ args: [{
609
+ isSignal: true,
610
+ alias: "fontSize",
611
+ required: false
612
+ }]
613
+ }],
614
+ $align: [{
615
+ type: i0.Input,
616
+ args: [{
617
+ isSignal: true,
618
+ alias: "align",
619
+ required: false
620
+ }]
621
+ }],
622
+ $withBackground: [{
623
+ type: i0.Input,
624
+ args: [{
625
+ isSignal: true,
626
+ alias: "withBackground",
627
+ required: false
628
+ }]
629
+ }]
630
+ }
631
+ });
632
+ var ColorSchemeComponent = class ColorSchemeComponent {
633
+ $mode = input("normal", {
634
+ ...ngDevMode ? { debugName: "$mode" } : /* istanbul ignore next */ {},
635
+ alias: "mode"
636
+ });
637
+ $style = computed(() => `<style>:root { color-scheme: ${this.$mode()}; supported-color-schemes: ${this.$mode()}; }</style>`, ...ngDevMode ? [{ debugName: "$style" }] : /* istanbul ignore next */ []);
638
+ static ɵfac = i0.ɵɵngDeclareFactory({
639
+ minVersion: "12.0.0",
640
+ version: "22.2.1",
641
+ ngImport: i0,
642
+ type: ColorSchemeComponent,
643
+ deps: [],
644
+ target: i0.ɵɵFactoryTarget.Component
645
+ });
646
+ static ɵcmp = i0.ɵɵngDeclareComponent({
647
+ minVersion: "17.1.0",
648
+ version: "22.2.1",
649
+ type: ColorSchemeComponent,
650
+ isStandalone: true,
651
+ selector: "ng-email-color-scheme",
652
+ inputs: { $mode: {
653
+ classPropertyName: "$mode",
654
+ publicName: "mode",
655
+ isSignal: true,
656
+ isRequired: false,
657
+ transformFunction: null
658
+ } },
659
+ ngImport: i0,
660
+ template: "@let mode = $mode();\n\n<meta\n name=\"color-scheme\"\n [content]=\"mode\"\n/>\n<meta\n name=\"supported-color-schemes\"\n [content]=\"mode\"\n/>\n\n<noscript [attr.data-html]=\"$style()\"></noscript>\n",
661
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
662
+ });
663
+ };
664
+ i0.ɵɵngDeclareClassMetadata({
665
+ minVersion: "12.0.0",
666
+ version: "22.2.1",
667
+ ngImport: i0,
668
+ type: ColorSchemeComponent,
669
+ decorators: [{
670
+ type: Component,
671
+ args: [{
672
+ selector: "ng-email-color-scheme",
673
+ changeDetection: ChangeDetectionStrategy.OnPush,
674
+ template: "@let mode = $mode();\n\n<meta\n name=\"color-scheme\"\n [content]=\"mode\"\n/>\n<meta\n name=\"supported-color-schemes\"\n [content]=\"mode\"\n/>\n\n<noscript [attr.data-html]=\"$style()\"></noscript>\n"
675
+ }]
676
+ }],
677
+ propDecorators: { $mode: [{
678
+ type: i0.Input,
679
+ args: [{
680
+ isSignal: true,
681
+ alias: "mode",
682
+ required: false
683
+ }]
684
+ }] }
685
+ });
686
+ var ColumnComponent = class ColumnComponent {
687
+ $style = input(null, {
688
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
689
+ alias: "style"
690
+ });
691
+ $styleClass = input(void 0, {
692
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
693
+ alias: "styleClass"
694
+ });
695
+ $bgImage = input(void 0, {
696
+ ...ngDevMode ? { debugName: "$bgImage" } : /* istanbul ignore next */ {},
697
+ alias: "bgImage"
698
+ });
699
+ $bgColor = input(void 0, {
700
+ ...ngDevMode ? { debugName: "$bgColor" } : /* istanbul ignore next */ {},
701
+ alias: "bgColor"
702
+ });
703
+ static ɵfac = i0.ɵɵngDeclareFactory({
704
+ minVersion: "12.0.0",
705
+ version: "22.2.1",
706
+ ngImport: i0,
707
+ type: ColumnComponent,
708
+ deps: [],
709
+ target: i0.ɵɵFactoryTarget.Component
710
+ });
711
+ static ɵcmp = i0.ɵɵngDeclareComponent({
712
+ minVersion: "17.1.0",
713
+ version: "22.2.1",
714
+ type: ColumnComponent,
715
+ isStandalone: true,
716
+ selector: "ng-email-column",
717
+ inputs: {
718
+ $style: {
719
+ classPropertyName: "$style",
720
+ publicName: "style",
721
+ isSignal: true,
722
+ isRequired: false,
723
+ transformFunction: null
724
+ },
725
+ $styleClass: {
726
+ classPropertyName: "$styleClass",
727
+ publicName: "styleClass",
728
+ isSignal: true,
729
+ isRequired: false,
730
+ transformFunction: null
731
+ },
732
+ $bgImage: {
733
+ classPropertyName: "$bgImage",
734
+ publicName: "bgImage",
735
+ isSignal: true,
736
+ isRequired: false,
737
+ transformFunction: null
738
+ },
739
+ $bgColor: {
740
+ classPropertyName: "$bgColor",
741
+ publicName: "bgColor",
742
+ isSignal: true,
743
+ isRequired: false,
744
+ transformFunction: null
745
+ }
746
+ },
747
+ ngImport: i0,
748
+ template: "<td\n [attr.background]=\"$bgImage()\"\n [attr.bgcolor]=\"$bgColor()\"\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n role=\"presentation\"\n>\n <ng-content />\n</td>\n",
749
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
750
+ });
751
+ };
752
+ i0.ɵɵngDeclareClassMetadata({
753
+ minVersion: "12.0.0",
754
+ version: "22.2.1",
755
+ ngImport: i0,
756
+ type: ColumnComponent,
757
+ decorators: [{
758
+ type: Component,
759
+ args: [{
760
+ selector: "ng-email-column",
761
+ changeDetection: ChangeDetectionStrategy.OnPush,
762
+ imports: [],
763
+ template: "<td\n [attr.background]=\"$bgImage()\"\n [attr.bgcolor]=\"$bgColor()\"\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n role=\"presentation\"\n>\n <ng-content />\n</td>\n"
764
+ }]
765
+ }],
766
+ propDecorators: {
767
+ $style: [{
768
+ type: i0.Input,
769
+ args: [{
770
+ isSignal: true,
771
+ alias: "style",
772
+ required: false
773
+ }]
774
+ }],
775
+ $styleClass: [{
776
+ type: i0.Input,
777
+ args: [{
778
+ isSignal: true,
779
+ alias: "styleClass",
780
+ required: false
781
+ }]
782
+ }],
783
+ $bgImage: [{
784
+ type: i0.Input,
785
+ args: [{
786
+ isSignal: true,
787
+ alias: "bgImage",
788
+ required: false
789
+ }]
790
+ }],
791
+ $bgColor: [{
792
+ type: i0.Input,
793
+ args: [{
794
+ isSignal: true,
795
+ alias: "bgColor",
796
+ required: false
797
+ }]
798
+ }]
799
+ }
800
+ });
801
+ var ConditionalComponent = class ConditionalComponent {
802
+ $expression = input(void 0, {
803
+ ...ngDevMode ? { debugName: "$expression" } : /* istanbul ignore next */ {},
804
+ alias: "expression"
805
+ });
806
+ $mso = input(void 0, {
807
+ ...ngDevMode ? { debugName: "$mso" } : /* istanbul ignore next */ {},
808
+ alias: "mso"
809
+ });
810
+ noMsoInnerHtmlPre = "&lt;!--[if !mso]&gt;&lt;!--&gt;";
811
+ noMsoInnerHtmlPost = "&lt;!--&lt;![endif]--&gt;";
812
+ $msoInnerHtmlPre = computed(() => `&lt;!--[if ${this.$expression() ?? "mso"}]&gt;`, ...ngDevMode ? [{ debugName: "$msoInnerHtmlPre" }] : /* istanbul ignore next */ []);
813
+ msoInnerHtmlPost = "&lt;![endif]--&gt;";
814
+ constructor() {
815
+ effect(() => {
816
+ if (typeof this.$expression() === "undefined" && typeof this.$mso() === "undefined") throw new RangeError("angular-email: Conditional expects the `expression` or `mso` prop to be defined");
817
+ if (typeof this.$expression() !== "undefined" && typeof this.$mso() !== "undefined") throw new RangeError("angular-email: Conditional expects the `expression` or `mso` prop to be defined, not both");
818
+ });
819
+ }
820
+ static ɵfac = i0.ɵɵngDeclareFactory({
821
+ minVersion: "12.0.0",
822
+ version: "22.2.1",
823
+ ngImport: i0,
824
+ type: ConditionalComponent,
825
+ deps: [],
826
+ target: i0.ɵɵFactoryTarget.Component
827
+ });
828
+ static ɵcmp = i0.ɵɵngDeclareComponent({
829
+ minVersion: "17.0.0",
830
+ version: "22.2.1",
831
+ type: ConditionalComponent,
832
+ isStandalone: true,
833
+ selector: "ng-email-conditional",
834
+ inputs: {
835
+ $expression: {
836
+ classPropertyName: "$expression",
837
+ publicName: "expression",
838
+ isSignal: true,
839
+ isRequired: false,
840
+ transformFunction: null
841
+ },
842
+ $mso: {
843
+ classPropertyName: "$mso",
844
+ publicName: "mso",
845
+ isSignal: true,
846
+ isRequired: false,
847
+ transformFunction: null
848
+ }
849
+ },
850
+ ngImport: i0,
851
+ template: "@let mso = $mso();\n\n@if (!mso) {\n <noscript [attr.data-html]=\"noMsoInnerHtmlPre\"></noscript>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <noscript [attr.data-html]=\"noMsoInnerHtmlPost\"></noscript>\n} @else {\n <noscript [attr.data-html]=\"$msoInnerHtmlPre()\"></noscript>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <noscript [attr.data-html]=\"msoInnerHtmlPost\"></noscript>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n",
852
+ dependencies: [{
853
+ kind: "directive",
854
+ type: NgTemplateOutlet,
855
+ selector: "[ngTemplateOutlet]",
856
+ inputs: [
857
+ "ngTemplateOutletContext",
858
+ "ngTemplateOutlet",
859
+ "ngTemplateOutletInjector"
860
+ ]
861
+ }],
862
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
863
+ });
864
+ };
865
+ i0.ɵɵngDeclareClassMetadata({
866
+ minVersion: "12.0.0",
867
+ version: "22.2.1",
868
+ ngImport: i0,
869
+ type: ConditionalComponent,
870
+ decorators: [{
871
+ type: Component,
872
+ args: [{
873
+ selector: "ng-email-conditional",
874
+ changeDetection: ChangeDetectionStrategy.OnPush,
875
+ imports: [NgTemplateOutlet],
876
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
877
+ template: "@let mso = $mso();\n\n@if (!mso) {\n <noscript [attr.data-html]=\"noMsoInnerHtmlPre\"></noscript>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <noscript [attr.data-html]=\"noMsoInnerHtmlPost\"></noscript>\n} @else {\n <noscript [attr.data-html]=\"$msoInnerHtmlPre()\"></noscript>\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n <noscript [attr.data-html]=\"msoInnerHtmlPost\"></noscript>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n"
878
+ }]
879
+ }],
880
+ ctorParameters: () => [],
881
+ propDecorators: {
882
+ $expression: [{
883
+ type: i0.Input,
884
+ args: [{
885
+ isSignal: true,
886
+ alias: "expression",
887
+ required: false
888
+ }]
889
+ }],
890
+ $mso: [{
891
+ type: i0.Input,
892
+ args: [{
893
+ isSignal: true,
894
+ alias: "mso",
895
+ required: false
896
+ }]
897
+ }]
898
+ }
899
+ });
900
+ var ContainerComponent = class ContainerComponent {
901
+ random = Math.random();
902
+ document = inject(DOCUMENT);
903
+ $style = input(null, {
904
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
905
+ alias: "style"
906
+ });
907
+ $styleClass = input(void 0, {
908
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
909
+ alias: "styleClass"
910
+ });
911
+ $alignment = input("center", {
912
+ ...ngDevMode ? { debugName: "$alignment" } : /* istanbul ignore next */ {},
913
+ alias: "alignment"
914
+ });
915
+ $disableDefaultStyle = input(false, {
916
+ ...ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {},
917
+ alias: "disableDefaultStyle"
918
+ });
919
+ $containerWidth = input(600, {
920
+ ...ngDevMode ? { debugName: "$containerWidth" } : /* istanbul ignore next */ {},
921
+ alias: "containerWidth"
922
+ });
923
+ $containerStyle = computed(() => ({
924
+ ...this.$disableDefaultStyle() ? {} : { maxWidth: `${this.$containerWidth()}px` },
925
+ ...this.$style()
926
+ }), ...ngDevMode ? [{ debugName: "$containerStyle" }] : /* istanbul ignore next */ []);
927
+ $trStyle = computed(() => ({ ...this.$disableDefaultStyle() ? {} : { width: "100%" } }), ...ngDevMode ? [{ debugName: "$trStyle" }] : /* istanbul ignore next */ []);
928
+ $innerHtmlPre = computed(() => `<!--[if mso]><table align="${this.$alignment()}" width="${this.$containerWidth()}" style="border-spacing: 0; width:${this.$containerWidth()}px;" role="presentation"><tr><td><![endif]-->`, ...ngDevMode ? [{ debugName: "$innerHtmlPre" }] : /* istanbul ignore next */ []);
929
+ $innerHtmlPost = computed(() => `<!--[if mso]></td></tr></table><![endif]-->`, ...ngDevMode ? [{ debugName: "$innerHtmlPost" }] : /* istanbul ignore next */ []);
930
+ static ɵfac = i0.ɵɵngDeclareFactory({
931
+ minVersion: "12.0.0",
932
+ version: "22.2.1",
933
+ ngImport: i0,
934
+ type: ContainerComponent,
935
+ deps: [],
936
+ target: i0.ɵɵFactoryTarget.Component
937
+ });
938
+ static ɵcmp = i0.ɵɵngDeclareComponent({
939
+ minVersion: "17.1.0",
940
+ version: "22.2.1",
941
+ type: ContainerComponent,
942
+ isStandalone: true,
943
+ selector: "ng-email-container",
944
+ inputs: {
945
+ $style: {
946
+ classPropertyName: "$style",
947
+ publicName: "style",
948
+ isSignal: true,
949
+ isRequired: false,
950
+ transformFunction: null
951
+ },
952
+ $styleClass: {
953
+ classPropertyName: "$styleClass",
954
+ publicName: "styleClass",
955
+ isSignal: true,
956
+ isRequired: false,
957
+ transformFunction: null
958
+ },
959
+ $alignment: {
960
+ classPropertyName: "$alignment",
961
+ publicName: "alignment",
962
+ isSignal: true,
963
+ isRequired: false,
964
+ transformFunction: null
965
+ },
966
+ $disableDefaultStyle: {
967
+ classPropertyName: "$disableDefaultStyle",
968
+ publicName: "disableDefaultStyle",
969
+ isSignal: true,
970
+ isRequired: false,
971
+ transformFunction: null
972
+ },
973
+ $containerWidth: {
974
+ classPropertyName: "$containerWidth",
975
+ publicName: "containerWidth",
976
+ isSignal: true,
977
+ isRequired: false,
978
+ transformFunction: null
979
+ }
980
+ },
981
+ ngImport: i0,
982
+ template: "@let containerWidth = $containerWidth();\n@let alignment = $alignment();\n@let disableDefaultStyle = $disableDefaultStyle();\n\n<div [style]=\"{ tableLayout: 'fixed', width: '100%' }\">\n <div [style]=\"{ margin: '0 auto', maxWidth: disableDefaultStyle ? undefined : containerWidth + 'px' }\">\n <noscript [attr.data-html]=\"$innerHtmlPre()\"></noscript>\n <table\n [align]=\"alignment\"\n [width]=\"'100%'\"\n role=\"presentation\"\n [cellSpacing]=\"0\"\n [cellPadding]=\"0\"\n [border]=\"0\"\n [style]=\"$containerStyle()\"\n [class]=\"$styleClass()\"\n >\n <tbody>\n <tr [style]=\"$trStyle()\">\n <td [align]=\"alignment\">\n <ng-content></ng-content>\n </td>\n </tr>\n </tbody>\n </table>\n <noscript [attr.data-html]=\"$innerHtmlPost()\"></noscript>\n </div>\n</div>\n",
983
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
984
+ });
985
+ };
986
+ i0.ɵɵngDeclareClassMetadata({
987
+ minVersion: "12.0.0",
988
+ version: "22.2.1",
989
+ ngImport: i0,
990
+ type: ContainerComponent,
991
+ decorators: [{
992
+ type: Component,
993
+ args: [{
994
+ selector: "ng-email-container",
995
+ changeDetection: ChangeDetectionStrategy.OnPush,
996
+ imports: [],
997
+ template: "@let containerWidth = $containerWidth();\n@let alignment = $alignment();\n@let disableDefaultStyle = $disableDefaultStyle();\n\n<div [style]=\"{ tableLayout: 'fixed', width: '100%' }\">\n <div [style]=\"{ margin: '0 auto', maxWidth: disableDefaultStyle ? undefined : containerWidth + 'px' }\">\n <noscript [attr.data-html]=\"$innerHtmlPre()\"></noscript>\n <table\n [align]=\"alignment\"\n [width]=\"'100%'\"\n role=\"presentation\"\n [cellSpacing]=\"0\"\n [cellPadding]=\"0\"\n [border]=\"0\"\n [style]=\"$containerStyle()\"\n [class]=\"$styleClass()\"\n >\n <tbody>\n <tr [style]=\"$trStyle()\">\n <td [align]=\"alignment\">\n <ng-content></ng-content>\n </td>\n </tr>\n </tbody>\n </table>\n <noscript [attr.data-html]=\"$innerHtmlPost()\"></noscript>\n </div>\n</div>\n"
998
+ }]
999
+ }],
1000
+ propDecorators: {
1001
+ $style: [{
1002
+ type: i0.Input,
1003
+ args: [{
1004
+ isSignal: true,
1005
+ alias: "style",
1006
+ required: false
1007
+ }]
1008
+ }],
1009
+ $styleClass: [{
1010
+ type: i0.Input,
1011
+ args: [{
1012
+ isSignal: true,
1013
+ alias: "styleClass",
1014
+ required: false
1015
+ }]
1016
+ }],
1017
+ $alignment: [{
1018
+ type: i0.Input,
1019
+ args: [{
1020
+ isSignal: true,
1021
+ alias: "alignment",
1022
+ required: false
1023
+ }]
1024
+ }],
1025
+ $disableDefaultStyle: [{
1026
+ type: i0.Input,
1027
+ args: [{
1028
+ isSignal: true,
1029
+ alias: "disableDefaultStyle",
1030
+ required: false
1031
+ }]
1032
+ }],
1033
+ $containerWidth: [{
1034
+ type: i0.Input,
1035
+ args: [{
1036
+ isSignal: true,
1037
+ alias: "containerWidth",
1038
+ required: false
1039
+ }]
1040
+ }]
1041
+ }
1042
+ });
1043
+ var HeadComponent = class HeadComponent {
1044
+ $enableFormatDetection = input(false, {
1045
+ ...ngDevMode ? { debugName: "$enableFormatDetection" } : /* istanbul ignore next */ {},
1046
+ alias: "enableFormatDetection"
1047
+ });
1048
+ xml = `\n<xml><o:OfficeDocumentSettings><o:AllowPNG /><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml>\n`;
1049
+ static ɵfac = i0.ɵɵngDeclareFactory({
1050
+ minVersion: "12.0.0",
1051
+ version: "22.2.1",
1052
+ ngImport: i0,
1053
+ type: HeadComponent,
1054
+ deps: [],
1055
+ target: i0.ɵɵFactoryTarget.Component
1056
+ });
1057
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1058
+ minVersion: "17.0.0",
1059
+ version: "22.2.1",
1060
+ type: HeadComponent,
1061
+ isStandalone: true,
1062
+ selector: "ng-email-head",
1063
+ inputs: { $enableFormatDetection: {
1064
+ classPropertyName: "$enableFormatDetection",
1065
+ publicName: "enableFormatDetection",
1066
+ isSignal: true,
1067
+ isRequired: false,
1068
+ transformFunction: null
1069
+ } },
1070
+ ngImport: i0,
1071
+ template: "@let enableFormatDetection = $enableFormatDetection();\n\n<head>\n <meta\n http-equiv=\"content-type\"\n content=\"text/html; charset=UTF-8\"\n />\n <meta\n name=\"viewport\"\n content=\"width=device-width, initial-scale=1, user-scalable=yes\"\n />\n <meta name=\"x-apple-disable-message-reformatting\" />\n @if (!enableFormatDetection) {\n <meta\n name=\"format-detection\"\n content=\"telephone=no, date=no, address=no, email=no, url=no\"\n />\n }\n <ng-content></ng-content>\n <ng-email-conditional [mso]=\"true\">\n <noscript [attr.data-html]=\"xml\"></noscript>\n </ng-email-conditional>\n</head>\n",
1072
+ dependencies: [{
1073
+ kind: "component",
1074
+ type: ConditionalComponent,
1075
+ selector: "ng-email-conditional",
1076
+ inputs: ["expression", "mso"]
1077
+ }],
1078
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1079
+ });
1080
+ };
1081
+ i0.ɵɵngDeclareClassMetadata({
1082
+ minVersion: "12.0.0",
1083
+ version: "22.2.1",
1084
+ ngImport: i0,
1085
+ type: HeadComponent,
1086
+ decorators: [{
1087
+ type: Component,
1088
+ args: [{
1089
+ selector: "ng-email-head",
1090
+ changeDetection: ChangeDetectionStrategy.OnPush,
1091
+ imports: [ConditionalComponent],
1092
+ schemas: [NO_ERRORS_SCHEMA],
1093
+ template: "@let enableFormatDetection = $enableFormatDetection();\n\n<head>\n <meta\n http-equiv=\"content-type\"\n content=\"text/html; charset=UTF-8\"\n />\n <meta\n name=\"viewport\"\n content=\"width=device-width, initial-scale=1, user-scalable=yes\"\n />\n <meta name=\"x-apple-disable-message-reformatting\" />\n @if (!enableFormatDetection) {\n <meta\n name=\"format-detection\"\n content=\"telephone=no, date=no, address=no, email=no, url=no\"\n />\n }\n <ng-content></ng-content>\n <ng-email-conditional [mso]=\"true\">\n <noscript [attr.data-html]=\"xml\"></noscript>\n </ng-email-conditional>\n</head>\n"
1094
+ }]
1095
+ }],
1096
+ propDecorators: { $enableFormatDetection: [{
1097
+ type: i0.Input,
1098
+ args: [{
1099
+ isSignal: true,
1100
+ alias: "enableFormatDetection",
1101
+ required: false
1102
+ }]
1103
+ }] }
1104
+ });
226
1105
  const copyTextToClipboard = async (text) => {
227
- try {
228
- await navigator.clipboard.writeText(text);
229
- }
230
- catch {
231
- throw new Error('Not able to copy');
232
- }
233
- };
234
- const pxToPt = (px) => (isNaN(Number(px)) ? null : (parseInt(px, 10) * 3) / 4);
1106
+ try {
1107
+ await navigator.clipboard.writeText(text);
1108
+ } catch {
1109
+ throw new Error("Not able to copy");
1110
+ }
1111
+ };
1112
+ const pxToPt = (px) => isNaN(Number(px)) ? null : parseInt(px, 10) * 3 / 4;
235
1113
  const withMargin = (props) => [
236
- withSpace(props.m, ['margin']),
237
- withSpace(props.mx, ['marginLeft', 'marginRight']),
238
- withSpace(props.my, ['marginTop', 'marginBottom']),
239
- withSpace(props.mt, ['marginTop']),
240
- withSpace(props.mr, ['marginRight']),
241
- withSpace(props.mb, ['marginBottom']),
242
- withSpace(props.ml, ['marginLeft']),
1114
+ withSpace(props.m, ["margin"]),
1115
+ withSpace(props.mx, ["marginLeft", "marginRight"]),
1116
+ withSpace(props.my, ["marginTop", "marginBottom"]),
1117
+ withSpace(props.mt, ["marginTop"]),
1118
+ withSpace(props.mr, ["marginRight"]),
1119
+ withSpace(props.mb, ["marginBottom"]),
1120
+ withSpace(props.ml, ["marginLeft"])
243
1121
  ].filter((s) => Object.keys(s).length)[0];
244
1122
  const withSpace = (value, properties) => {
245
- return properties.reduce((styles, property) => {
246
- if (value) {
247
- return { ...styles, [property]: `${value}px` };
248
- }
249
- return styles;
250
- }, {});
251
- };
252
- // https://stackoverflow.com/a/61410824
1123
+ return properties.reduce((styles, property) => {
1124
+ if (value) return {
1125
+ ...styles,
1126
+ [property]: `${value}px`
1127
+ };
1128
+ return styles;
1129
+ }, {});
1130
+ };
253
1131
  const styleToString = (style) => {
254
- if (!style)
255
- return '';
256
- return Object.keys(style).reduce((acc, key) => acc +
257
- key
258
- .split(/(?=[A-Z])/)
259
- .join('-')
260
- .toLowerCase() +
261
- ':' +
262
- style[key] +
263
- ';', '');
264
- };
265
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1132
+ if (!style) return "";
1133
+ return Object.keys(style).reduce((acc, key) => acc + key.split(/(?=[A-Z])/).join("-").toLowerCase() + ":" + style[key] + ";", "");
1134
+ };
266
1135
  const classToString = (style) => {
267
- if (!style)
268
- return '';
269
- if (typeof style === 'string')
270
- return style;
271
- if (Array.isArray(style))
272
- return style.join(' ');
273
- return Object.keys(style).reduce((acc, key) => acc +
274
- key
275
- .split(/(?=[A-Z])/)
276
- .join('-')
277
- .toLowerCase() +
278
- ':' +
279
- style[key] +
280
- ';', '');
1136
+ if (!style) return "";
1137
+ if (typeof style === "string") return style;
1138
+ if (Array.isArray(style)) return style.join(" ");
1139
+ return Object.keys(style).reduce((acc, key) => acc + key.split(/(?=[A-Z])/).join("-").toLowerCase() + ":" + style[key] + ";", "");
281
1140
  };
282
1141
  const unreachable = (condition, message = `Entered unreachable code. Received '${condition}'.`) => {
283
- throw new TypeError(message);
1142
+ throw new TypeError(message);
284
1143
  };
285
1144
  const HTMLElements = [
286
- '!DOCTYPE',
287
- 'a',
288
- 'abbr',
289
- 'abbr',
290
- //"acronym", // NOT HTML5
291
- 'address',
292
- //"applet", // NOT HTML5 (NOT MAJORLY SUPPORTED)
293
- 'area',
294
- 'article',
295
- 'aside',
296
- 'audio',
297
- 'b',
298
- 'base',
299
- //"basefont", // NOT HTML5
300
- 'bdi',
301
- 'bdo',
302
- //"big", // NOT HTML5
303
- 'blockquote',
304
- 'body',
305
- 'br',
306
- 'button',
307
- 'canvas',
308
- 'caption',
309
- //"center", // NOT HTML5
310
- 'cite',
311
- 'code',
312
- 'col',
313
- 'colgroup',
314
- 'data',
315
- 'datalist',
316
- 'dd',
317
- 'del',
318
- 'details',
319
- 'dfn',
320
- 'dialog',
321
- //"dir", NOT HTML5 (use "ul" instead)
322
- 'div',
323
- 'dl',
324
- 'dt',
325
- 'em',
326
- 'embed',
327
- 'fieldset',
328
- 'figcaption',
329
- 'figure',
330
- //"font", // NOT HTML5 (use CSS)
331
- 'footer',
332
- 'form',
333
- //"frame", // NOT HTML5
334
- //"frameset", // NOT HTML5
335
- 'h1',
336
- 'h2',
337
- 'h3',
338
- 'h4',
339
- 'h5',
340
- 'h6',
341
- 'head',
342
- 'header',
343
- 'hr',
344
- 'html',
345
- 'i',
346
- 'iframe',
347
- 'img',
348
- 'input',
349
- 'ins',
350
- 'kbd',
351
- 'label',
352
- 'legend',
353
- 'li',
354
- 'link',
355
- 'main',
356
- 'map',
357
- 'mark',
358
- 'meta',
359
- 'meter',
360
- 'nav',
361
- //"noframes", // NOT HTML5
362
- 'noscript',
363
- 'object',
364
- 'ol',
365
- 'optgroup',
366
- 'option',
367
- 'output',
368
- 'p',
369
- 'param',
370
- 'picture',
371
- 'pre',
372
- 'progress',
373
- 'q',
374
- 'rp',
375
- 'rt',
376
- 'ruby',
377
- 's',
378
- 'samp',
379
- 'script',
380
- 'section',
381
- 'select',
382
- 'small',
383
- 'source',
384
- 'span',
385
- //"strike", NOT HTML5 (Use <del> or <s> instead)
386
- 'strong',
387
- 'style',
388
- 'sub',
389
- 'summary',
390
- 'sup',
391
- 'svg',
392
- 'table',
393
- 'tbody',
394
- 'td',
395
- 'template',
396
- 'textarea',
397
- 'tfoot',
398
- 'th',
399
- 'thead',
400
- 'time',
401
- 'title',
402
- 'tr',
403
- 'track',
404
- //"tt", // NOT HTML5 (Use CSS)
405
- 'u',
406
- 'ul',
407
- 'var',
408
- 'video',
409
- 'wbr',
410
- // xml
411
- 'xml',
412
- 'o:OfficeDocumentSettings',
413
- 'o:AllowPNG',
414
- 'o:PixelsPerInch',
415
- 'angular-email-raw',
1145
+ "!DOCTYPE",
1146
+ "a",
1147
+ "abbr",
1148
+ "abbr",
1149
+ "address",
1150
+ "area",
1151
+ "article",
1152
+ "aside",
1153
+ "audio",
1154
+ "b",
1155
+ "base",
1156
+ "bdi",
1157
+ "bdo",
1158
+ "blockquote",
1159
+ "body",
1160
+ "br",
1161
+ "button",
1162
+ "canvas",
1163
+ "caption",
1164
+ "cite",
1165
+ "code",
1166
+ "col",
1167
+ "colgroup",
1168
+ "data",
1169
+ "datalist",
1170
+ "dd",
1171
+ "del",
1172
+ "details",
1173
+ "dfn",
1174
+ "dialog",
1175
+ "div",
1176
+ "dl",
1177
+ "dt",
1178
+ "em",
1179
+ "embed",
1180
+ "fieldset",
1181
+ "figcaption",
1182
+ "figure",
1183
+ "footer",
1184
+ "form",
1185
+ "h1",
1186
+ "h2",
1187
+ "h3",
1188
+ "h4",
1189
+ "h5",
1190
+ "h6",
1191
+ "head",
1192
+ "header",
1193
+ "hr",
1194
+ "html",
1195
+ "i",
1196
+ "iframe",
1197
+ "img",
1198
+ "input",
1199
+ "ins",
1200
+ "kbd",
1201
+ "label",
1202
+ "legend",
1203
+ "li",
1204
+ "link",
1205
+ "main",
1206
+ "map",
1207
+ "mark",
1208
+ "meta",
1209
+ "meter",
1210
+ "nav",
1211
+ "noscript",
1212
+ "object",
1213
+ "ol",
1214
+ "optgroup",
1215
+ "option",
1216
+ "output",
1217
+ "p",
1218
+ "param",
1219
+ "picture",
1220
+ "pre",
1221
+ "progress",
1222
+ "q",
1223
+ "rp",
1224
+ "rt",
1225
+ "ruby",
1226
+ "s",
1227
+ "samp",
1228
+ "script",
1229
+ "section",
1230
+ "select",
1231
+ "small",
1232
+ "source",
1233
+ "span",
1234
+ "strong",
1235
+ "style",
1236
+ "sub",
1237
+ "summary",
1238
+ "sup",
1239
+ "svg",
1240
+ "table",
1241
+ "tbody",
1242
+ "td",
1243
+ "template",
1244
+ "textarea",
1245
+ "tfoot",
1246
+ "th",
1247
+ "thead",
1248
+ "time",
1249
+ "title",
1250
+ "tr",
1251
+ "track",
1252
+ "u",
1253
+ "ul",
1254
+ "var",
1255
+ "video",
1256
+ "wbr",
1257
+ "xml",
1258
+ "o:OfficeDocumentSettings",
1259
+ "o:AllowPNG",
1260
+ "o:PixelsPerInch",
1261
+ "angular-email-raw"
416
1262
  ];
417
- const START_TAG = '__COMMENT_START';
418
- const END_TAG = '__COMMENT_END';
1263
+ const START_TAG = "__COMMENT_START";
1264
+ const END_TAG = "__COMMENT_END";
419
1265
  function escapeForRawComponent(input) {
420
- // escape comment sequences
421
- return input.replace(/<!--/g, START_TAG).replace(/-->/g, END_TAG);
1266
+ return input.replace(/<!--/g, START_TAG).replace(/-->/g, END_TAG);
422
1267
  }
423
1268
  function unescapeForRawComponent(input) {
424
- return input.replace(new RegExp(START_TAG, 'g'), '<!--').replace(new RegExp(END_TAG, 'g'), '-->');
425
- }
426
-
427
- class HeadingComponent {
428
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
429
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
430
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
431
- $as = input('h1', { ...(ngDevMode ? { debugName: "$as" } : /* istanbul ignore next */ {}), alias: 'as' });
432
- $m = input(undefined, { ...(ngDevMode ? { debugName: "$m" } : /* istanbul ignore next */ {}), alias: 'm' });
433
- $mx = input(undefined, { ...(ngDevMode ? { debugName: "$mx" } : /* istanbul ignore next */ {}), alias: 'mx' });
434
- $my = input(undefined, { ...(ngDevMode ? { debugName: "$my" } : /* istanbul ignore next */ {}), alias: 'my' });
435
- $mt = input(undefined, { ...(ngDevMode ? { debugName: "$mt" } : /* istanbul ignore next */ {}), alias: 'mt' });
436
- $mr = input(undefined, { ...(ngDevMode ? { debugName: "$mr" } : /* istanbul ignore next */ {}), alias: 'mr' });
437
- $mb = input(undefined, { ...(ngDevMode ? { debugName: "$mb" } : /* istanbul ignore next */ {}), alias: 'mb' });
438
- $ml = input(undefined, { ...(ngDevMode ? { debugName: "$ml" } : /* istanbul ignore next */ {}), alias: 'ml' });
439
- $headingStyle = computed(() => {
440
- return styleToString({
441
- ...withMargin({
442
- m: this.$m(),
443
- mx: this.$mx(),
444
- my: this.$my(),
445
- mt: this.$mt(),
446
- mr: this.$mr(),
447
- mb: this.$mb(),
448
- ml: this.$ml(),
449
- }),
450
- ...(this.$style() ?? {}),
451
- });
452
- }, /* @ts-ignore */
453
- ...(ngDevMode ? [{ debugName: "$headingStyle" }] : /* istanbul ignore next */ []));
454
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: HeadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
455
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: HeadingComponent, isStandalone: true, selector: "ng-email-heading", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $as: { classPropertyName: "$as", publicName: "as", isSignal: true, isRequired: false, transformFunction: null }, $m: { classPropertyName: "$m", publicName: "m", isSignal: true, isRequired: false, transformFunction: null }, $mx: { classPropertyName: "$mx", publicName: "mx", isSignal: true, isRequired: false, transformFunction: null }, $my: { classPropertyName: "$my", publicName: "my", isSignal: true, isRequired: false, transformFunction: null }, $mt: { classPropertyName: "$mt", publicName: "mt", isSignal: true, isRequired: false, transformFunction: null }, $mr: { classPropertyName: "$mr", publicName: "mr", isSignal: true, isRequired: false, transformFunction: null }, $mb: { classPropertyName: "$mb", publicName: "mb", isSignal: true, isRequired: false, transformFunction: null }, $ml: { classPropertyName: "$ml", publicName: "ml", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let heading = $as();\n@let style = $headingStyle();\n@let styleClass = $styleClass();\n@if (heading === 'h1') {\n <h1\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h1>\n} @else if (heading === 'h2') {\n <h2\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h2>\n} @else if (heading === 'h3') {\n <h3\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h3>\n} @else if (heading === 'h4') {\n <h4\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h4>\n} @else if (heading === 'h5') {\n <h5\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h5>\n} @else if (heading === 'h6') {\n <h6\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h6>\n} @else {\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
456
- }
457
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: HeadingComponent, decorators: [{
458
- type: Component,
459
- args: [{ selector: 'ng-email-heading', imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let heading = $as();\n@let style = $headingStyle();\n@let styleClass = $styleClass();\n@if (heading === 'h1') {\n <h1\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h1>\n} @else if (heading === 'h2') {\n <h2\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h2>\n} @else if (heading === 'h3') {\n <h3\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h3>\n} @else if (heading === 'h4') {\n <h4\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h4>\n} @else if (heading === 'h5') {\n <h5\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h5>\n} @else if (heading === 'h6') {\n <h6\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h6>\n} @else {\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n" }]
460
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $as: [{ type: i0.Input, args: [{ isSignal: true, alias: "as", required: false }] }], $m: [{ type: i0.Input, args: [{ isSignal: true, alias: "m", required: false }] }], $mx: [{ type: i0.Input, args: [{ isSignal: true, alias: "mx", required: false }] }], $my: [{ type: i0.Input, args: [{ isSignal: true, alias: "my", required: false }] }], $mt: [{ type: i0.Input, args: [{ isSignal: true, alias: "mt", required: false }] }], $mr: [{ type: i0.Input, args: [{ isSignal: true, alias: "mr", required: false }] }], $mb: [{ type: i0.Input, args: [{ isSignal: true, alias: "mb", required: false }] }], $ml: [{ type: i0.Input, args: [{ isSignal: true, alias: "ml", required: false }] }] } });
461
-
462
- class HrComponent {
463
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
464
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
465
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
466
- $disableDefaultStyle = input(false, { ...(ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {}), alias: 'disableDefaultStyle' });
467
- $hrStyle = computed(() => {
468
- return {
469
- ...(this.$disableDefaultStyle()
470
- ? {}
471
- : {
472
- width: '100%',
473
- border: 'none',
474
- borderTop: '1px solid #eaeaea',
475
- }),
476
- ...(this.$style() ?? {}),
477
- };
478
- }, /* @ts-ignore */
479
- ...(ngDevMode ? [{ debugName: "$hrStyle" }] : /* istanbul ignore next */ []));
480
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: HrComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
481
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: HrComponent, isStandalone: true, selector: "ng-email-hr", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $disableDefaultStyle: { classPropertyName: "$disableDefaultStyle", publicName: "disableDefaultStyle", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<hr\n [style]=\"$hrStyle()\"\n [class]=\"$styleClass()\"\n/>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
482
- }
483
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: HrComponent, decorators: [{
484
- type: Component,
485
- args: [{ selector: 'ng-email-hr', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<hr\n [style]=\"$hrStyle()\"\n [class]=\"$styleClass()\"\n/>\n" }]
486
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $disableDefaultStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDefaultStyle", required: false }] }] } });
487
-
488
- class HtmlComponent {
489
- $lang = input('en', { ...(ngDevMode ? { debugName: "$lang" } : /* istanbul ignore next */ {}), alias: 'lang' });
490
- $dir = input('ltr', { ...(ngDevMode ? { debugName: "$dir" } : /* istanbul ignore next */ {}), alias: 'dir' });
491
- $enableVML = input(true, { ...(ngDevMode ? { debugName: "$enableVML" } : /* istanbul ignore next */ {}), alias: 'enableVML' });
492
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
493
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
494
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
495
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: HtmlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
496
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: HtmlComponent, isStandalone: true, selector: "ng-email-html", inputs: { $lang: { classPropertyName: "$lang", publicName: "lang", isSignal: true, isRequired: false, transformFunction: null }, $dir: { classPropertyName: "$dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, $enableVML: { classPropertyName: "$enableVML", publicName: "enableVML", isSignal: true, isRequired: false, transformFunction: null }, $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let enableVML = $enableVML();\n@let lang = $lang();\n@let dir = $dir();\n\n<html\n id=\"__angular-email\"\n [lang]=\"lang\"\n [dir]=\"dir\"\n [attr.xmlns:o]=\"enableVML ? 'urn:schemas-microsoft-com:office:office' : undefined\"\n [attr.xmlns:v]=\"enableVML ? 'urn:schemas-microsoft-com:vml' : undefined\"\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n>\n <ng-content />\n</html>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
497
- }
498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: HtmlComponent, decorators: [{
499
- type: Component,
500
- args: [{ selector: 'ng-email-html', changeDetection: ChangeDetectionStrategy.OnPush, template: "@let enableVML = $enableVML();\n@let lang = $lang();\n@let dir = $dir();\n\n<html\n id=\"__angular-email\"\n [lang]=\"lang\"\n [dir]=\"dir\"\n [attr.xmlns:o]=\"enableVML ? 'urn:schemas-microsoft-com:office:office' : undefined\"\n [attr.xmlns:v]=\"enableVML ? 'urn:schemas-microsoft-com:vml' : undefined\"\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n>\n <ng-content />\n</html>\n" }]
501
- }], propDecorators: { $lang: [{ type: i0.Input, args: [{ isSignal: true, alias: "lang", required: false }] }], $dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], $enableVML: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableVML", required: false }] }], $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }] } });
502
-
503
- class ImgComponent {
504
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
505
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
506
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
507
- $disableDefaultStyle = input(false, { ...(ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {}), alias: 'disableDefaultStyle' });
508
- $alt = input('', { ...(ngDevMode ? { debugName: "$alt" } : /* istanbul ignore next */ {}), alias: 'alt' });
509
- $src = input('', { ...(ngDevMode ? { debugName: "$src" } : /* istanbul ignore next */ {}), alias: 'src' });
510
- $width = input('0', { ...(ngDevMode ? { debugName: "$width" } : /* istanbul ignore next */ {}), alias: 'width' });
511
- $height = input('0', { ...(ngDevMode ? { debugName: "$height" } : /* istanbul ignore next */ {}), alias: 'height' });
512
- $imageStyle = computed(() => {
513
- return {
514
- ...(this.$disableDefaultStyle()
515
- ? {}
516
- : {
517
- display: 'block',
518
- outline: 'none',
519
- border: 'none',
520
- textDecoration: 'none',
521
- }),
522
- ...(this.$style() ?? {}),
523
- };
524
- }, /* @ts-ignore */
525
- ...(ngDevMode ? [{ debugName: "$imageStyle" }] : /* istanbul ignore next */ []));
526
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ImgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
527
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: ImgComponent, isStandalone: true, selector: "ng-email-img", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $disableDefaultStyle: { classPropertyName: "$disableDefaultStyle", publicName: "disableDefaultStyle", isSignal: true, isRequired: false, transformFunction: null }, $alt: { classPropertyName: "$alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, $src: { classPropertyName: "$src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, $width: { classPropertyName: "$width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, $height: { classPropertyName: "$height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<img\n [style]=\"$imageStyle()\"\n [class]=\"$styleClass()\"\n [alt]=\"$alt()\"\n [src]=\"$src()\"\n [width]=\"$width()\"\n [height]=\"$height()\"\n/>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
1269
+ return input.replace(new RegExp(START_TAG, "g"), "<!--").replace(new RegExp(END_TAG, "g"), "-->");
528
1270
  }
529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ImgComponent, decorators: [{
530
- type: Component,
531
- args: [{ selector: 'ng-email-img', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<img\n [style]=\"$imageStyle()\"\n [class]=\"$styleClass()\"\n [alt]=\"$alt()\"\n [src]=\"$src()\"\n [width]=\"$width()\"\n [height]=\"$height()\"\n/>\n" }]
532
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $disableDefaultStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDefaultStyle", required: false }] }], $alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], $src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], $width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], $height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }] } });
533
-
534
- class LinkComponent {
535
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
536
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
537
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
538
- $disableDefaultStyle = input(false, { ...(ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {}), alias: 'disableDefaultStyle' });
539
- $href = input('', { ...(ngDevMode ? { debugName: "$href" } : /* istanbul ignore next */ {}), alias: 'href' });
540
- $target = input('_blank', { ...(ngDevMode ? { debugName: "$target" } : /* istanbul ignore next */ {}), alias: 'target' });
541
- $linkStyle = computed(() => {
542
- return {
543
- ...(this.$disableDefaultStyle()
544
- ? {}
545
- : {
546
- color: '#067df7',
547
- textDecoration: 'none',
548
- }),
549
- ...(this.$style() ?? {}),
550
- };
551
- }, /* @ts-ignore */
552
- ...(ngDevMode ? [{ debugName: "$linkStyle" }] : /* istanbul ignore next */ []));
553
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
554
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: LinkComponent, isStandalone: true, selector: "ng-email-link", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $disableDefaultStyle: { classPropertyName: "$disableDefaultStyle", publicName: "disableDefaultStyle", isSignal: true, isRequired: false, transformFunction: null }, $href: { classPropertyName: "$href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, $target: { classPropertyName: "$target", publicName: "target", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<a\n [style]=\"$linkStyle()\"\n [class]=\"$styleClass()\"\n [href]=\"$href()\"\n [target]=\"$target()\"\n ><ng-content></ng-content\n></a>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
555
- }
556
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LinkComponent, decorators: [{
557
- type: Component,
558
- args: [{ selector: 'ng-email-link', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<a\n [style]=\"$linkStyle()\"\n [class]=\"$styleClass()\"\n [href]=\"$href()\"\n [target]=\"$target()\"\n ><ng-content></ng-content\n></a>\n" }]
559
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $disableDefaultStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDefaultStyle", required: false }] }], $href: [{ type: i0.Input, args: [{ isSignal: true, alias: "href", required: false }] }], $target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: false }] }] } });
560
-
561
- class RawComponent {
562
- $disablePlainTextOutput = input(false, { ...(ngDevMode ? { debugName: "$disablePlainTextOutput" } : /* istanbul ignore next */ {}), alias: 'disablePlainTextOutput' });
563
- $content = input('', { ...(ngDevMode ? { debugName: "$content" } : /* istanbul ignore next */ {}), alias: 'content' });
564
- $escapingContent = computed(() => `<!--${escapeForRawComponent(this.$content())}-->`, /* @ts-ignore */
565
- ...(ngDevMode ? [{ debugName: "$escapingContent" }] : /* istanbul ignore next */ []));
566
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: RawComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
567
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: RawComponent, isStandalone: true, selector: "ng-email-raw", inputs: { $disablePlainTextOutput: { classPropertyName: "$disablePlainTextOutput", publicName: "disablePlainTextOutput", isSignal: true, isRequired: false, transformFunction: null }, $content: { classPropertyName: "$content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<angular-email-raw [attr.data-skip]=\"$disablePlainTextOutput()\">\n <noscript [attr.data-html]=\"$escapingContent()\"></noscript>\n</angular-email-raw>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
568
- }
569
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: RawComponent, decorators: [{
570
- type: Component,
571
- args: [{ selector: 'ng-email-raw', changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<angular-email-raw [attr.data-skip]=\"$disablePlainTextOutput()\">\n <noscript [attr.data-html]=\"$escapingContent()\"></noscript>\n</angular-email-raw>\n" }]
572
- }], propDecorators: { $disablePlainTextOutput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disablePlainTextOutput", required: false }] }], $content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }] } });
573
-
574
- class PreviewComponent {
575
- $preview = input('', { ...(ngDevMode ? { debugName: "$preview" } : /* istanbul ignore next */ {}), alias: 'preview' });
576
- maxLength = 150;
577
- $text = computed(() => {
578
- const preview = this.$preview();
579
- if (preview.length >= this.maxLength)
580
- return null;
581
- const whiteSpaceCodes = '&nbsp;&#x200c;&#x200b;&#x200d;&#x200e;&#x200f;&#xfeff;';
582
- return whiteSpaceCodes.repeat(this.maxLength - preview.length);
583
- }, /* @ts-ignore */
584
- ...(ngDevMode ? [{ debugName: "$text" }] : /* istanbul ignore next */ []));
585
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: PreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
586
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: PreviewComponent, isStandalone: true, selector: "ng-email-preview", inputs: { $preview: { classPropertyName: "$preview", publicName: "preview", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let text = $text();\n\n<div\n id=\"__angular-email-preview\"\n style=\"display: none; overflow: hidden; line-height: 1px; opacity: 0; max-height: 0; max-width: 0\"\n>\n {{ $preview() }}\n @if (text) {\n <ng-email-raw\n [content]=\"text\"\n [disablePlainTextOutput]=\"false\"\n ></ng-email-raw>\n }\n</div>\n", dependencies: [{ kind: "component", type: RawComponent, selector: "ng-email-raw", inputs: ["disablePlainTextOutput", "content"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
587
- }
588
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: PreviewComponent, decorators: [{
589
- type: Component,
590
- args: [{ selector: 'ng-email-preview', changeDetection: ChangeDetectionStrategy.OnPush, imports: [RawComponent], template: "@let text = $text();\n\n<div\n id=\"__angular-email-preview\"\n style=\"display: none; overflow: hidden; line-height: 1px; opacity: 0; max-height: 0; max-width: 0\"\n>\n {{ $preview() }}\n @if (text) {\n <ng-email-raw\n [content]=\"text\"\n [disablePlainTextOutput]=\"false\"\n ></ng-email-raw>\n }\n</div>\n" }]
591
- }], propDecorators: { $preview: [{ type: i0.Input, args: [{ isSignal: true, alias: "preview", required: false }] }] } });
592
-
593
- class RowComponent {
594
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
595
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
596
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
597
- $disableDefaultStyle = input(false, { ...(ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {}), alias: 'disableDefaultStyle' });
598
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: RowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
599
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: RowComponent, isStandalone: true, selector: "ng-email-row", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $disableDefaultStyle: { classPropertyName: "$disableDefaultStyle", publicName: "disableDefaultStyle", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<table\n align=\"center\"\n width=\"100%\"\n [class]=\"$styleClass()\"\n [style]=\"$style()\"\n role=\"presentation\"\n cellSpacing=\"0\"\n cellPadding=\"0\"\n border=\"0\"\n>\n <tbody [style]=\"$disableDefaultStyle() ? {} : { width: '100%' }\">\n <tr [style]=\"$disableDefaultStyle() ? {} : { width: '100%' }\">\n <ng-content />\n </tr>\n </tbody>\n</table>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
600
- }
601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: RowComponent, decorators: [{
602
- type: Component,
603
- args: [{ selector: 'ng-email-row', changeDetection: ChangeDetectionStrategy.OnPush, imports: [], template: "<table\n align=\"center\"\n width=\"100%\"\n [class]=\"$styleClass()\"\n [style]=\"$style()\"\n role=\"presentation\"\n cellSpacing=\"0\"\n cellPadding=\"0\"\n border=\"0\"\n>\n <tbody [style]=\"$disableDefaultStyle() ? {} : { width: '100%' }\">\n <tr [style]=\"$disableDefaultStyle() ? {} : { width: '100%' }\">\n <ng-content />\n </tr>\n </tbody>\n</table>\n" }]
604
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $disableDefaultStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDefaultStyle", required: false }] }] } });
605
-
606
- class SectionComponent {
607
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
608
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
609
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
610
- $sectionStyle = computed(() => {
611
- return styleToString({
612
- width: '100%',
613
- ...(this.$style() ?? {}),
614
- });
615
- }, /* @ts-ignore */
616
- ...(ngDevMode ? [{ debugName: "$sectionStyle" }] : /* istanbul ignore next */ []));
617
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
618
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: SectionComponent, isStandalone: true, selector: "ng-email-section", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<table\n [align]=\"'center'\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n width=\"100%\"\n role=\"presentation\"\n [style]=\"$sectionStyle()\"\n [class]=\"$styleClass()\"\n>\n <tbody>\n <tr>\n <td>\n <ng-content />\n </td>\n </tr>\n </tbody>\n</table>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
619
- }
620
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SectionComponent, decorators: [{
621
- type: Component,
622
- args: [{ selector: 'ng-email-section', changeDetection: ChangeDetectionStrategy.OnPush, imports: [], template: "<table\n [align]=\"'center'\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n width=\"100%\"\n role=\"presentation\"\n [style]=\"$sectionStyle()\"\n [class]=\"$styleClass()\"\n>\n <tbody>\n <tr>\n <td>\n <ng-content />\n </td>\n </tr>\n </tbody>\n</table>\n" }]
623
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }] } });
624
-
625
- class TextComponent {
626
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
627
- $style = input(null, { ...(ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {}), alias: 'style' });
628
- $styleClass = input(undefined, { ...(ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {}), alias: 'styleClass' });
629
- $disableDefaultStyle = input(false, { ...(ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {}), alias: 'disableDefaultStyle' });
630
- $textStyle = computed(() => {
631
- return {
632
- ...(this.$disableDefaultStyle()
633
- ? {}
634
- : {
635
- fontSize: '14px',
636
- lineHeight: '24px',
637
- margin: '16px 0',
638
- }),
639
- ...(this.$style() ?? {}),
640
- };
641
- }, /* @ts-ignore */
642
- ...(ngDevMode ? [{ debugName: "$textStyle" }] : /* istanbul ignore next */ []));
643
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: TextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
644
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: TextComponent, isStandalone: true, selector: "ng-email-text", inputs: { $style: { classPropertyName: "$style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, $styleClass: { classPropertyName: "$styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, $disableDefaultStyle: { classPropertyName: "$disableDefaultStyle", publicName: "disableDefaultStyle", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<p\n [style]=\"$textStyle()\"\n [class]=\"$styleClass()\"\n>\n <ng-content></ng-content>\n</p>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
645
- }
646
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: TextComponent, decorators: [{
647
- type: Component,
648
- args: [{ selector: 'ng-email-text', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p\n [style]=\"$textStyle()\"\n [class]=\"$styleClass()\"\n>\n <ng-content></ng-content>\n</p>\n" }]
649
- }], propDecorators: { $style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], $styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], $disableDefaultStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDefaultStyle", required: false }] }] } });
650
-
651
- /* eslint-disable @typescript-eslint/no-explicit-any */
652
- /**
653
- * Renders an Angular component to HTML and applies transformations.
654
- *
655
- * @param component - The Angular component to render.
656
- * @param selector - The Component selector.
657
- * @param options - Optional rendering options.
658
- *
659
- * @returns {Promise<string>} The rendered HTML or plain text.
660
- */
661
- const render = async ({ component, selector, props, options, }) => {
662
- const __originalConsoleLog = console.log;
663
- console.log = ((log) => (...args) => {
664
- if (args[0] !== 'Angular is running in development mode.')
665
- log(...args);
666
- })(console.log);
667
- try {
668
- const { style, html: normalizedHtml } = await renderNgComponent(component, selector, props, options?.signalInputsPrefix);
669
- const html = applyHtmlTransformations(normalizedHtml);
670
- if (options?.plainText) {
671
- return renderAsPlainText(html);
672
- }
673
- const cssProcessor = options?.cssProcessor;
674
- const css = await parseStyles(style, html, cssProcessor);
675
- const doctype = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
676
- const markup = await inlineCss(html, css, !!options?.pretty);
677
- const document = `${doctype}${markup}`;
678
- return document;
679
- }
680
- finally {
681
- console.log = __originalConsoleLog;
682
- }
683
- };
684
- /**
685
- * Converts the given markup string to plain text while skipping certain elements.
686
- *
687
- * @param markup - The HTML markup string to be converted to plain text.
688
- * @returns The plain text representation of the given markup.
689
- *
690
- * The conversion skips the following elements:
691
- * - `<img>` tags
692
- * - Elements with the ID `__angular-email-preview`
693
- */
1271
+ var HeadingComponent = class HeadingComponent {
1272
+ $style = input(null, {
1273
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
1274
+ alias: "style"
1275
+ });
1276
+ $styleClass = input(void 0, {
1277
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
1278
+ alias: "styleClass"
1279
+ });
1280
+ $as = input("h1", {
1281
+ ...ngDevMode ? { debugName: "$as" } : /* istanbul ignore next */ {},
1282
+ alias: "as"
1283
+ });
1284
+ $m = input(void 0, {
1285
+ ...ngDevMode ? { debugName: "$m" } : /* istanbul ignore next */ {},
1286
+ alias: "m"
1287
+ });
1288
+ $mx = input(void 0, {
1289
+ ...ngDevMode ? { debugName: "$mx" } : /* istanbul ignore next */ {},
1290
+ alias: "mx"
1291
+ });
1292
+ $my = input(void 0, {
1293
+ ...ngDevMode ? { debugName: "$my" } : /* istanbul ignore next */ {},
1294
+ alias: "my"
1295
+ });
1296
+ $mt = input(void 0, {
1297
+ ...ngDevMode ? { debugName: "$mt" } : /* istanbul ignore next */ {},
1298
+ alias: "mt"
1299
+ });
1300
+ $mr = input(void 0, {
1301
+ ...ngDevMode ? { debugName: "$mr" } : /* istanbul ignore next */ {},
1302
+ alias: "mr"
1303
+ });
1304
+ $mb = input(void 0, {
1305
+ ...ngDevMode ? { debugName: "$mb" } : /* istanbul ignore next */ {},
1306
+ alias: "mb"
1307
+ });
1308
+ $ml = input(void 0, {
1309
+ ...ngDevMode ? { debugName: "$ml" } : /* istanbul ignore next */ {},
1310
+ alias: "ml"
1311
+ });
1312
+ $headingStyle = computed(() => {
1313
+ return styleToString({
1314
+ ...withMargin({
1315
+ m: this.$m(),
1316
+ mx: this.$mx(),
1317
+ my: this.$my(),
1318
+ mt: this.$mt(),
1319
+ mr: this.$mr(),
1320
+ mb: this.$mb(),
1321
+ ml: this.$ml()
1322
+ }),
1323
+ ...this.$style() ?? {}
1324
+ });
1325
+ }, ...ngDevMode ? [{ debugName: "$headingStyle" }] : /* istanbul ignore next */ []);
1326
+ static ɵfac = i0.ɵɵngDeclareFactory({
1327
+ minVersion: "12.0.0",
1328
+ version: "22.2.1",
1329
+ ngImport: i0,
1330
+ type: HeadingComponent,
1331
+ deps: [],
1332
+ target: i0.ɵɵFactoryTarget.Component
1333
+ });
1334
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1335
+ minVersion: "17.0.0",
1336
+ version: "22.2.1",
1337
+ type: HeadingComponent,
1338
+ isStandalone: true,
1339
+ selector: "ng-email-heading",
1340
+ inputs: {
1341
+ $style: {
1342
+ classPropertyName: "$style",
1343
+ publicName: "style",
1344
+ isSignal: true,
1345
+ isRequired: false,
1346
+ transformFunction: null
1347
+ },
1348
+ $styleClass: {
1349
+ classPropertyName: "$styleClass",
1350
+ publicName: "styleClass",
1351
+ isSignal: true,
1352
+ isRequired: false,
1353
+ transformFunction: null
1354
+ },
1355
+ $as: {
1356
+ classPropertyName: "$as",
1357
+ publicName: "as",
1358
+ isSignal: true,
1359
+ isRequired: false,
1360
+ transformFunction: null
1361
+ },
1362
+ $m: {
1363
+ classPropertyName: "$m",
1364
+ publicName: "m",
1365
+ isSignal: true,
1366
+ isRequired: false,
1367
+ transformFunction: null
1368
+ },
1369
+ $mx: {
1370
+ classPropertyName: "$mx",
1371
+ publicName: "mx",
1372
+ isSignal: true,
1373
+ isRequired: false,
1374
+ transformFunction: null
1375
+ },
1376
+ $my: {
1377
+ classPropertyName: "$my",
1378
+ publicName: "my",
1379
+ isSignal: true,
1380
+ isRequired: false,
1381
+ transformFunction: null
1382
+ },
1383
+ $mt: {
1384
+ classPropertyName: "$mt",
1385
+ publicName: "mt",
1386
+ isSignal: true,
1387
+ isRequired: false,
1388
+ transformFunction: null
1389
+ },
1390
+ $mr: {
1391
+ classPropertyName: "$mr",
1392
+ publicName: "mr",
1393
+ isSignal: true,
1394
+ isRequired: false,
1395
+ transformFunction: null
1396
+ },
1397
+ $mb: {
1398
+ classPropertyName: "$mb",
1399
+ publicName: "mb",
1400
+ isSignal: true,
1401
+ isRequired: false,
1402
+ transformFunction: null
1403
+ },
1404
+ $ml: {
1405
+ classPropertyName: "$ml",
1406
+ publicName: "ml",
1407
+ isSignal: true,
1408
+ isRequired: false,
1409
+ transformFunction: null
1410
+ }
1411
+ },
1412
+ ngImport: i0,
1413
+ template: "@let heading = $as();\n@let style = $headingStyle();\n@let styleClass = $styleClass();\n@if (heading === 'h1') {\n <h1\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h1>\n} @else if (heading === 'h2') {\n <h2\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h2>\n} @else if (heading === 'h3') {\n <h3\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h3>\n} @else if (heading === 'h4') {\n <h4\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h4>\n} @else if (heading === 'h5') {\n <h5\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h5>\n} @else if (heading === 'h6') {\n <h6\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h6>\n} @else {\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n",
1414
+ dependencies: [{
1415
+ kind: "directive",
1416
+ type: NgTemplateOutlet,
1417
+ selector: "[ngTemplateOutlet]",
1418
+ inputs: [
1419
+ "ngTemplateOutletContext",
1420
+ "ngTemplateOutlet",
1421
+ "ngTemplateOutletInjector"
1422
+ ]
1423
+ }],
1424
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1425
+ });
1426
+ };
1427
+ i0.ɵɵngDeclareClassMetadata({
1428
+ minVersion: "12.0.0",
1429
+ version: "22.2.1",
1430
+ ngImport: i0,
1431
+ type: HeadingComponent,
1432
+ decorators: [{
1433
+ type: Component,
1434
+ args: [{
1435
+ selector: "ng-email-heading",
1436
+ imports: [NgTemplateOutlet],
1437
+ changeDetection: ChangeDetectionStrategy.OnPush,
1438
+ template: "@let heading = $as();\n@let style = $headingStyle();\n@let styleClass = $styleClass();\n@if (heading === 'h1') {\n <h1\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h1>\n} @else if (heading === 'h2') {\n <h2\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h2>\n} @else if (heading === 'h3') {\n <h3\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h3>\n} @else if (heading === 'h4') {\n <h4\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h4>\n} @else if (heading === 'h5') {\n <h5\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h5>\n} @else if (heading === 'h6') {\n <h6\n [style]=\"style\"\n [class]=\"styleClass\"\n >\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n </h6>\n} @else {\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n"
1439
+ }]
1440
+ }],
1441
+ propDecorators: {
1442
+ $style: [{
1443
+ type: i0.Input,
1444
+ args: [{
1445
+ isSignal: true,
1446
+ alias: "style",
1447
+ required: false
1448
+ }]
1449
+ }],
1450
+ $styleClass: [{
1451
+ type: i0.Input,
1452
+ args: [{
1453
+ isSignal: true,
1454
+ alias: "styleClass",
1455
+ required: false
1456
+ }]
1457
+ }],
1458
+ $as: [{
1459
+ type: i0.Input,
1460
+ args: [{
1461
+ isSignal: true,
1462
+ alias: "as",
1463
+ required: false
1464
+ }]
1465
+ }],
1466
+ $m: [{
1467
+ type: i0.Input,
1468
+ args: [{
1469
+ isSignal: true,
1470
+ alias: "m",
1471
+ required: false
1472
+ }]
1473
+ }],
1474
+ $mx: [{
1475
+ type: i0.Input,
1476
+ args: [{
1477
+ isSignal: true,
1478
+ alias: "mx",
1479
+ required: false
1480
+ }]
1481
+ }],
1482
+ $my: [{
1483
+ type: i0.Input,
1484
+ args: [{
1485
+ isSignal: true,
1486
+ alias: "my",
1487
+ required: false
1488
+ }]
1489
+ }],
1490
+ $mt: [{
1491
+ type: i0.Input,
1492
+ args: [{
1493
+ isSignal: true,
1494
+ alias: "mt",
1495
+ required: false
1496
+ }]
1497
+ }],
1498
+ $mr: [{
1499
+ type: i0.Input,
1500
+ args: [{
1501
+ isSignal: true,
1502
+ alias: "mr",
1503
+ required: false
1504
+ }]
1505
+ }],
1506
+ $mb: [{
1507
+ type: i0.Input,
1508
+ args: [{
1509
+ isSignal: true,
1510
+ alias: "mb",
1511
+ required: false
1512
+ }]
1513
+ }],
1514
+ $ml: [{
1515
+ type: i0.Input,
1516
+ args: [{
1517
+ isSignal: true,
1518
+ alias: "ml",
1519
+ required: false
1520
+ }]
1521
+ }]
1522
+ }
1523
+ });
1524
+ var HrComponent = class HrComponent {
1525
+ $style = input(null, {
1526
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
1527
+ alias: "style"
1528
+ });
1529
+ $styleClass = input(void 0, {
1530
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
1531
+ alias: "styleClass"
1532
+ });
1533
+ $disableDefaultStyle = input(false, {
1534
+ ...ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {},
1535
+ alias: "disableDefaultStyle"
1536
+ });
1537
+ $hrStyle = computed(() => {
1538
+ return {
1539
+ ...this.$disableDefaultStyle() ? {} : {
1540
+ width: "100%",
1541
+ border: "none",
1542
+ borderTop: "1px solid #eaeaea"
1543
+ },
1544
+ ...this.$style() ?? {}
1545
+ };
1546
+ }, ...ngDevMode ? [{ debugName: "$hrStyle" }] : /* istanbul ignore next */ []);
1547
+ static ɵfac = i0.ɵɵngDeclareFactory({
1548
+ minVersion: "12.0.0",
1549
+ version: "22.2.1",
1550
+ ngImport: i0,
1551
+ type: HrComponent,
1552
+ deps: [],
1553
+ target: i0.ɵɵFactoryTarget.Component
1554
+ });
1555
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1556
+ minVersion: "17.1.0",
1557
+ version: "22.2.1",
1558
+ type: HrComponent,
1559
+ isStandalone: true,
1560
+ selector: "ng-email-hr",
1561
+ inputs: {
1562
+ $style: {
1563
+ classPropertyName: "$style",
1564
+ publicName: "style",
1565
+ isSignal: true,
1566
+ isRequired: false,
1567
+ transformFunction: null
1568
+ },
1569
+ $styleClass: {
1570
+ classPropertyName: "$styleClass",
1571
+ publicName: "styleClass",
1572
+ isSignal: true,
1573
+ isRequired: false,
1574
+ transformFunction: null
1575
+ },
1576
+ $disableDefaultStyle: {
1577
+ classPropertyName: "$disableDefaultStyle",
1578
+ publicName: "disableDefaultStyle",
1579
+ isSignal: true,
1580
+ isRequired: false,
1581
+ transformFunction: null
1582
+ }
1583
+ },
1584
+ ngImport: i0,
1585
+ template: "<hr\n [style]=\"$hrStyle()\"\n [class]=\"$styleClass()\"\n/>\n",
1586
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1587
+ });
1588
+ };
1589
+ i0.ɵɵngDeclareClassMetadata({
1590
+ minVersion: "12.0.0",
1591
+ version: "22.2.1",
1592
+ ngImport: i0,
1593
+ type: HrComponent,
1594
+ decorators: [{
1595
+ type: Component,
1596
+ args: [{
1597
+ selector: "ng-email-hr",
1598
+ imports: [],
1599
+ changeDetection: ChangeDetectionStrategy.OnPush,
1600
+ template: "<hr\n [style]=\"$hrStyle()\"\n [class]=\"$styleClass()\"\n/>\n"
1601
+ }]
1602
+ }],
1603
+ propDecorators: {
1604
+ $style: [{
1605
+ type: i0.Input,
1606
+ args: [{
1607
+ isSignal: true,
1608
+ alias: "style",
1609
+ required: false
1610
+ }]
1611
+ }],
1612
+ $styleClass: [{
1613
+ type: i0.Input,
1614
+ args: [{
1615
+ isSignal: true,
1616
+ alias: "styleClass",
1617
+ required: false
1618
+ }]
1619
+ }],
1620
+ $disableDefaultStyle: [{
1621
+ type: i0.Input,
1622
+ args: [{
1623
+ isSignal: true,
1624
+ alias: "disableDefaultStyle",
1625
+ required: false
1626
+ }]
1627
+ }]
1628
+ }
1629
+ });
1630
+ var HtmlComponent = class HtmlComponent {
1631
+ $lang = input("en", {
1632
+ ...ngDevMode ? { debugName: "$lang" } : /* istanbul ignore next */ {},
1633
+ alias: "lang"
1634
+ });
1635
+ $dir = input("ltr", {
1636
+ ...ngDevMode ? { debugName: "$dir" } : /* istanbul ignore next */ {},
1637
+ alias: "dir"
1638
+ });
1639
+ $enableVML = input(true, {
1640
+ ...ngDevMode ? { debugName: "$enableVML" } : /* istanbul ignore next */ {},
1641
+ alias: "enableVML"
1642
+ });
1643
+ $style = input(null, {
1644
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
1645
+ alias: "style"
1646
+ });
1647
+ $styleClass = input(void 0, {
1648
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
1649
+ alias: "styleClass"
1650
+ });
1651
+ static ɵfac = i0.ɵɵngDeclareFactory({
1652
+ minVersion: "12.0.0",
1653
+ version: "22.2.1",
1654
+ ngImport: i0,
1655
+ type: HtmlComponent,
1656
+ deps: [],
1657
+ target: i0.ɵɵFactoryTarget.Component
1658
+ });
1659
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1660
+ minVersion: "17.1.0",
1661
+ version: "22.2.1",
1662
+ type: HtmlComponent,
1663
+ isStandalone: true,
1664
+ selector: "ng-email-html",
1665
+ inputs: {
1666
+ $lang: {
1667
+ classPropertyName: "$lang",
1668
+ publicName: "lang",
1669
+ isSignal: true,
1670
+ isRequired: false,
1671
+ transformFunction: null
1672
+ },
1673
+ $dir: {
1674
+ classPropertyName: "$dir",
1675
+ publicName: "dir",
1676
+ isSignal: true,
1677
+ isRequired: false,
1678
+ transformFunction: null
1679
+ },
1680
+ $enableVML: {
1681
+ classPropertyName: "$enableVML",
1682
+ publicName: "enableVML",
1683
+ isSignal: true,
1684
+ isRequired: false,
1685
+ transformFunction: null
1686
+ },
1687
+ $style: {
1688
+ classPropertyName: "$style",
1689
+ publicName: "style",
1690
+ isSignal: true,
1691
+ isRequired: false,
1692
+ transformFunction: null
1693
+ },
1694
+ $styleClass: {
1695
+ classPropertyName: "$styleClass",
1696
+ publicName: "styleClass",
1697
+ isSignal: true,
1698
+ isRequired: false,
1699
+ transformFunction: null
1700
+ }
1701
+ },
1702
+ ngImport: i0,
1703
+ template: "@let enableVML = $enableVML();\n@let lang = $lang();\n@let dir = $dir();\n\n<html\n id=\"__angular-email\"\n [lang]=\"lang\"\n [dir]=\"dir\"\n [attr.xmlns:o]=\"enableVML ? 'urn:schemas-microsoft-com:office:office' : undefined\"\n [attr.xmlns:v]=\"enableVML ? 'urn:schemas-microsoft-com:vml' : undefined\"\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n>\n <ng-content />\n</html>\n",
1704
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1705
+ });
1706
+ };
1707
+ i0.ɵɵngDeclareClassMetadata({
1708
+ minVersion: "12.0.0",
1709
+ version: "22.2.1",
1710
+ ngImport: i0,
1711
+ type: HtmlComponent,
1712
+ decorators: [{
1713
+ type: Component,
1714
+ args: [{
1715
+ selector: "ng-email-html",
1716
+ changeDetection: ChangeDetectionStrategy.OnPush,
1717
+ template: "@let enableVML = $enableVML();\n@let lang = $lang();\n@let dir = $dir();\n\n<html\n id=\"__angular-email\"\n [lang]=\"lang\"\n [dir]=\"dir\"\n [attr.xmlns:o]=\"enableVML ? 'urn:schemas-microsoft-com:office:office' : undefined\"\n [attr.xmlns:v]=\"enableVML ? 'urn:schemas-microsoft-com:vml' : undefined\"\n [style]=\"$style()\"\n [class]=\"$styleClass()\"\n>\n <ng-content />\n</html>\n"
1718
+ }]
1719
+ }],
1720
+ propDecorators: {
1721
+ $lang: [{
1722
+ type: i0.Input,
1723
+ args: [{
1724
+ isSignal: true,
1725
+ alias: "lang",
1726
+ required: false
1727
+ }]
1728
+ }],
1729
+ $dir: [{
1730
+ type: i0.Input,
1731
+ args: [{
1732
+ isSignal: true,
1733
+ alias: "dir",
1734
+ required: false
1735
+ }]
1736
+ }],
1737
+ $enableVML: [{
1738
+ type: i0.Input,
1739
+ args: [{
1740
+ isSignal: true,
1741
+ alias: "enableVML",
1742
+ required: false
1743
+ }]
1744
+ }],
1745
+ $style: [{
1746
+ type: i0.Input,
1747
+ args: [{
1748
+ isSignal: true,
1749
+ alias: "style",
1750
+ required: false
1751
+ }]
1752
+ }],
1753
+ $styleClass: [{
1754
+ type: i0.Input,
1755
+ args: [{
1756
+ isSignal: true,
1757
+ alias: "styleClass",
1758
+ required: false
1759
+ }]
1760
+ }]
1761
+ }
1762
+ });
1763
+ var ImgComponent = class ImgComponent {
1764
+ $style = input(null, {
1765
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
1766
+ alias: "style"
1767
+ });
1768
+ $styleClass = input(void 0, {
1769
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
1770
+ alias: "styleClass"
1771
+ });
1772
+ $disableDefaultStyle = input(false, {
1773
+ ...ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {},
1774
+ alias: "disableDefaultStyle"
1775
+ });
1776
+ $alt = input("", {
1777
+ ...ngDevMode ? { debugName: "$alt" } : /* istanbul ignore next */ {},
1778
+ alias: "alt"
1779
+ });
1780
+ $src = input("", {
1781
+ ...ngDevMode ? { debugName: "$src" } : /* istanbul ignore next */ {},
1782
+ alias: "src"
1783
+ });
1784
+ $width = input(void 0, {
1785
+ ...ngDevMode ? { debugName: "$width" } : /* istanbul ignore next */ {},
1786
+ alias: "width"
1787
+ });
1788
+ $height = input(void 0, {
1789
+ ...ngDevMode ? { debugName: "$height" } : /* istanbul ignore next */ {},
1790
+ alias: "height"
1791
+ });
1792
+ $imageStyle = computed(() => {
1793
+ return {
1794
+ ...this.$disableDefaultStyle() ? {} : {
1795
+ display: "block",
1796
+ outline: "none",
1797
+ border: "none",
1798
+ textDecoration: "none"
1799
+ },
1800
+ ...this.$style() ?? {}
1801
+ };
1802
+ }, ...ngDevMode ? [{ debugName: "$imageStyle" }] : /* istanbul ignore next */ []);
1803
+ static ɵfac = i0.ɵɵngDeclareFactory({
1804
+ minVersion: "12.0.0",
1805
+ version: "22.2.1",
1806
+ ngImport: i0,
1807
+ type: ImgComponent,
1808
+ deps: [],
1809
+ target: i0.ɵɵFactoryTarget.Component
1810
+ });
1811
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1812
+ minVersion: "17.1.0",
1813
+ version: "22.2.1",
1814
+ type: ImgComponent,
1815
+ isStandalone: true,
1816
+ selector: "ng-email-img",
1817
+ inputs: {
1818
+ $style: {
1819
+ classPropertyName: "$style",
1820
+ publicName: "style",
1821
+ isSignal: true,
1822
+ isRequired: false,
1823
+ transformFunction: null
1824
+ },
1825
+ $styleClass: {
1826
+ classPropertyName: "$styleClass",
1827
+ publicName: "styleClass",
1828
+ isSignal: true,
1829
+ isRequired: false,
1830
+ transformFunction: null
1831
+ },
1832
+ $disableDefaultStyle: {
1833
+ classPropertyName: "$disableDefaultStyle",
1834
+ publicName: "disableDefaultStyle",
1835
+ isSignal: true,
1836
+ isRequired: false,
1837
+ transformFunction: null
1838
+ },
1839
+ $alt: {
1840
+ classPropertyName: "$alt",
1841
+ publicName: "alt",
1842
+ isSignal: true,
1843
+ isRequired: false,
1844
+ transformFunction: null
1845
+ },
1846
+ $src: {
1847
+ classPropertyName: "$src",
1848
+ publicName: "src",
1849
+ isSignal: true,
1850
+ isRequired: false,
1851
+ transformFunction: null
1852
+ },
1853
+ $width: {
1854
+ classPropertyName: "$width",
1855
+ publicName: "width",
1856
+ isSignal: true,
1857
+ isRequired: false,
1858
+ transformFunction: null
1859
+ },
1860
+ $height: {
1861
+ classPropertyName: "$height",
1862
+ publicName: "height",
1863
+ isSignal: true,
1864
+ isRequired: false,
1865
+ transformFunction: null
1866
+ }
1867
+ },
1868
+ ngImport: i0,
1869
+ template: "<img\n [style]=\"$imageStyle()\"\n [class]=\"$styleClass()\"\n [alt]=\"$alt()\"\n [src]=\"$src()\"\n [attr.width]=\"$width()\"\n [attr.height]=\"$height()\"\n/>\n",
1870
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1871
+ });
1872
+ };
1873
+ i0.ɵɵngDeclareClassMetadata({
1874
+ minVersion: "12.0.0",
1875
+ version: "22.2.1",
1876
+ ngImport: i0,
1877
+ type: ImgComponent,
1878
+ decorators: [{
1879
+ type: Component,
1880
+ args: [{
1881
+ selector: "ng-email-img",
1882
+ imports: [],
1883
+ changeDetection: ChangeDetectionStrategy.OnPush,
1884
+ template: "<img\n [style]=\"$imageStyle()\"\n [class]=\"$styleClass()\"\n [alt]=\"$alt()\"\n [src]=\"$src()\"\n [attr.width]=\"$width()\"\n [attr.height]=\"$height()\"\n/>\n"
1885
+ }]
1886
+ }],
1887
+ propDecorators: {
1888
+ $style: [{
1889
+ type: i0.Input,
1890
+ args: [{
1891
+ isSignal: true,
1892
+ alias: "style",
1893
+ required: false
1894
+ }]
1895
+ }],
1896
+ $styleClass: [{
1897
+ type: i0.Input,
1898
+ args: [{
1899
+ isSignal: true,
1900
+ alias: "styleClass",
1901
+ required: false
1902
+ }]
1903
+ }],
1904
+ $disableDefaultStyle: [{
1905
+ type: i0.Input,
1906
+ args: [{
1907
+ isSignal: true,
1908
+ alias: "disableDefaultStyle",
1909
+ required: false
1910
+ }]
1911
+ }],
1912
+ $alt: [{
1913
+ type: i0.Input,
1914
+ args: [{
1915
+ isSignal: true,
1916
+ alias: "alt",
1917
+ required: false
1918
+ }]
1919
+ }],
1920
+ $src: [{
1921
+ type: i0.Input,
1922
+ args: [{
1923
+ isSignal: true,
1924
+ alias: "src",
1925
+ required: false
1926
+ }]
1927
+ }],
1928
+ $width: [{
1929
+ type: i0.Input,
1930
+ args: [{
1931
+ isSignal: true,
1932
+ alias: "width",
1933
+ required: false
1934
+ }]
1935
+ }],
1936
+ $height: [{
1937
+ type: i0.Input,
1938
+ args: [{
1939
+ isSignal: true,
1940
+ alias: "height",
1941
+ required: false
1942
+ }]
1943
+ }]
1944
+ }
1945
+ });
1946
+ var LinkComponent = class LinkComponent {
1947
+ $style = input(null, {
1948
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
1949
+ alias: "style"
1950
+ });
1951
+ $styleClass = input(void 0, {
1952
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
1953
+ alias: "styleClass"
1954
+ });
1955
+ $disableDefaultStyle = input(false, {
1956
+ ...ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {},
1957
+ alias: "disableDefaultStyle"
1958
+ });
1959
+ $href = input("", {
1960
+ ...ngDevMode ? { debugName: "$href" } : /* istanbul ignore next */ {},
1961
+ alias: "href"
1962
+ });
1963
+ $target = input("_blank", {
1964
+ ...ngDevMode ? { debugName: "$target" } : /* istanbul ignore next */ {},
1965
+ alias: "target"
1966
+ });
1967
+ $linkStyle = computed(() => {
1968
+ return {
1969
+ ...this.$disableDefaultStyle() ? {} : {
1970
+ color: "#067df7",
1971
+ textDecoration: "none"
1972
+ },
1973
+ ...this.$style() ?? {}
1974
+ };
1975
+ }, ...ngDevMode ? [{ debugName: "$linkStyle" }] : /* istanbul ignore next */ []);
1976
+ static ɵfac = i0.ɵɵngDeclareFactory({
1977
+ minVersion: "12.0.0",
1978
+ version: "22.2.1",
1979
+ ngImport: i0,
1980
+ type: LinkComponent,
1981
+ deps: [],
1982
+ target: i0.ɵɵFactoryTarget.Component
1983
+ });
1984
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1985
+ minVersion: "17.1.0",
1986
+ version: "22.2.1",
1987
+ type: LinkComponent,
1988
+ isStandalone: true,
1989
+ selector: "ng-email-link",
1990
+ inputs: {
1991
+ $style: {
1992
+ classPropertyName: "$style",
1993
+ publicName: "style",
1994
+ isSignal: true,
1995
+ isRequired: false,
1996
+ transformFunction: null
1997
+ },
1998
+ $styleClass: {
1999
+ classPropertyName: "$styleClass",
2000
+ publicName: "styleClass",
2001
+ isSignal: true,
2002
+ isRequired: false,
2003
+ transformFunction: null
2004
+ },
2005
+ $disableDefaultStyle: {
2006
+ classPropertyName: "$disableDefaultStyle",
2007
+ publicName: "disableDefaultStyle",
2008
+ isSignal: true,
2009
+ isRequired: false,
2010
+ transformFunction: null
2011
+ },
2012
+ $href: {
2013
+ classPropertyName: "$href",
2014
+ publicName: "href",
2015
+ isSignal: true,
2016
+ isRequired: false,
2017
+ transformFunction: null
2018
+ },
2019
+ $target: {
2020
+ classPropertyName: "$target",
2021
+ publicName: "target",
2022
+ isSignal: true,
2023
+ isRequired: false,
2024
+ transformFunction: null
2025
+ }
2026
+ },
2027
+ ngImport: i0,
2028
+ template: "<a\n [style]=\"$linkStyle()\"\n [class]=\"$styleClass()\"\n [href]=\"$href()\"\n [target]=\"$target()\"\n ><ng-content></ng-content\n></a>\n",
2029
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2030
+ });
2031
+ };
2032
+ i0.ɵɵngDeclareClassMetadata({
2033
+ minVersion: "12.0.0",
2034
+ version: "22.2.1",
2035
+ ngImport: i0,
2036
+ type: LinkComponent,
2037
+ decorators: [{
2038
+ type: Component,
2039
+ args: [{
2040
+ selector: "ng-email-link",
2041
+ imports: [],
2042
+ changeDetection: ChangeDetectionStrategy.OnPush,
2043
+ template: "<a\n [style]=\"$linkStyle()\"\n [class]=\"$styleClass()\"\n [href]=\"$href()\"\n [target]=\"$target()\"\n ><ng-content></ng-content\n></a>\n"
2044
+ }]
2045
+ }],
2046
+ propDecorators: {
2047
+ $style: [{
2048
+ type: i0.Input,
2049
+ args: [{
2050
+ isSignal: true,
2051
+ alias: "style",
2052
+ required: false
2053
+ }]
2054
+ }],
2055
+ $styleClass: [{
2056
+ type: i0.Input,
2057
+ args: [{
2058
+ isSignal: true,
2059
+ alias: "styleClass",
2060
+ required: false
2061
+ }]
2062
+ }],
2063
+ $disableDefaultStyle: [{
2064
+ type: i0.Input,
2065
+ args: [{
2066
+ isSignal: true,
2067
+ alias: "disableDefaultStyle",
2068
+ required: false
2069
+ }]
2070
+ }],
2071
+ $href: [{
2072
+ type: i0.Input,
2073
+ args: [{
2074
+ isSignal: true,
2075
+ alias: "href",
2076
+ required: false
2077
+ }]
2078
+ }],
2079
+ $target: [{
2080
+ type: i0.Input,
2081
+ args: [{
2082
+ isSignal: true,
2083
+ alias: "target",
2084
+ required: false
2085
+ }]
2086
+ }]
2087
+ }
2088
+ });
2089
+ var RawComponent = class RawComponent {
2090
+ $disablePlainTextOutput = input(false, {
2091
+ ...ngDevMode ? { debugName: "$disablePlainTextOutput" } : /* istanbul ignore next */ {},
2092
+ alias: "disablePlainTextOutput"
2093
+ });
2094
+ $content = input("", {
2095
+ ...ngDevMode ? { debugName: "$content" } : /* istanbul ignore next */ {},
2096
+ alias: "content"
2097
+ });
2098
+ $escapingContent = computed(() => `<!--${escapeForRawComponent(this.$content())}-->`, ...ngDevMode ? [{ debugName: "$escapingContent" }] : /* istanbul ignore next */ []);
2099
+ static ɵfac = i0.ɵɵngDeclareFactory({
2100
+ minVersion: "12.0.0",
2101
+ version: "22.2.1",
2102
+ ngImport: i0,
2103
+ type: RawComponent,
2104
+ deps: [],
2105
+ target: i0.ɵɵFactoryTarget.Component
2106
+ });
2107
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2108
+ minVersion: "17.1.0",
2109
+ version: "22.2.1",
2110
+ type: RawComponent,
2111
+ isStandalone: true,
2112
+ selector: "ng-email-raw",
2113
+ inputs: {
2114
+ $disablePlainTextOutput: {
2115
+ classPropertyName: "$disablePlainTextOutput",
2116
+ publicName: "disablePlainTextOutput",
2117
+ isSignal: true,
2118
+ isRequired: false,
2119
+ transformFunction: null
2120
+ },
2121
+ $content: {
2122
+ classPropertyName: "$content",
2123
+ publicName: "content",
2124
+ isSignal: true,
2125
+ isRequired: false,
2126
+ transformFunction: null
2127
+ }
2128
+ },
2129
+ ngImport: i0,
2130
+ template: "<angular-email-raw [attr.data-skip]=\"$disablePlainTextOutput()\">\n <noscript [attr.data-html]=\"$escapingContent()\"></noscript>\n</angular-email-raw>\n",
2131
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2132
+ });
2133
+ };
2134
+ i0.ɵɵngDeclareClassMetadata({
2135
+ minVersion: "12.0.0",
2136
+ version: "22.2.1",
2137
+ ngImport: i0,
2138
+ type: RawComponent,
2139
+ decorators: [{
2140
+ type: Component,
2141
+ args: [{
2142
+ selector: "ng-email-raw",
2143
+ changeDetection: ChangeDetectionStrategy.OnPush,
2144
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
2145
+ template: "<angular-email-raw [attr.data-skip]=\"$disablePlainTextOutput()\">\n <noscript [attr.data-html]=\"$escapingContent()\"></noscript>\n</angular-email-raw>\n"
2146
+ }]
2147
+ }],
2148
+ propDecorators: {
2149
+ $disablePlainTextOutput: [{
2150
+ type: i0.Input,
2151
+ args: [{
2152
+ isSignal: true,
2153
+ alias: "disablePlainTextOutput",
2154
+ required: false
2155
+ }]
2156
+ }],
2157
+ $content: [{
2158
+ type: i0.Input,
2159
+ args: [{
2160
+ isSignal: true,
2161
+ alias: "content",
2162
+ required: false
2163
+ }]
2164
+ }]
2165
+ }
2166
+ });
2167
+ var PreviewComponent = class PreviewComponent {
2168
+ $preview = input("", {
2169
+ ...ngDevMode ? { debugName: "$preview" } : /* istanbul ignore next */ {},
2170
+ alias: "preview"
2171
+ });
2172
+ maxLength = 150;
2173
+ $text = computed(() => {
2174
+ const preview = this.$preview();
2175
+ if (preview.length >= this.maxLength) return null;
2176
+ return "&nbsp;&#x200c;&#x200b;&#x200d;&#x200e;&#x200f;&#xfeff;".repeat(this.maxLength - preview.length);
2177
+ }, ...ngDevMode ? [{ debugName: "$text" }] : /* istanbul ignore next */ []);
2178
+ static ɵfac = i0.ɵɵngDeclareFactory({
2179
+ minVersion: "12.0.0",
2180
+ version: "22.2.1",
2181
+ ngImport: i0,
2182
+ type: PreviewComponent,
2183
+ deps: [],
2184
+ target: i0.ɵɵFactoryTarget.Component
2185
+ });
2186
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2187
+ minVersion: "17.0.0",
2188
+ version: "22.2.1",
2189
+ type: PreviewComponent,
2190
+ isStandalone: true,
2191
+ selector: "ng-email-preview",
2192
+ inputs: { $preview: {
2193
+ classPropertyName: "$preview",
2194
+ publicName: "preview",
2195
+ isSignal: true,
2196
+ isRequired: false,
2197
+ transformFunction: null
2198
+ } },
2199
+ ngImport: i0,
2200
+ template: "@let text = $text();\n\n<div\n id=\"__angular-email-preview\"\n style=\"display: none; overflow: hidden; line-height: 1px; opacity: 0; max-height: 0; max-width: 0\"\n>\n {{ $preview() }}\n @if (text) {\n <ng-email-raw\n [content]=\"text\"\n [disablePlainTextOutput]=\"false\"\n ></ng-email-raw>\n }\n</div>\n",
2201
+ dependencies: [{
2202
+ kind: "component",
2203
+ type: RawComponent,
2204
+ selector: "ng-email-raw",
2205
+ inputs: ["disablePlainTextOutput", "content"]
2206
+ }],
2207
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2208
+ });
2209
+ };
2210
+ i0.ɵɵngDeclareClassMetadata({
2211
+ minVersion: "12.0.0",
2212
+ version: "22.2.1",
2213
+ ngImport: i0,
2214
+ type: PreviewComponent,
2215
+ decorators: [{
2216
+ type: Component,
2217
+ args: [{
2218
+ selector: "ng-email-preview",
2219
+ changeDetection: ChangeDetectionStrategy.OnPush,
2220
+ imports: [RawComponent],
2221
+ template: "@let text = $text();\n\n<div\n id=\"__angular-email-preview\"\n style=\"display: none; overflow: hidden; line-height: 1px; opacity: 0; max-height: 0; max-width: 0\"\n>\n {{ $preview() }}\n @if (text) {\n <ng-email-raw\n [content]=\"text\"\n [disablePlainTextOutput]=\"false\"\n ></ng-email-raw>\n }\n</div>\n"
2222
+ }]
2223
+ }],
2224
+ propDecorators: { $preview: [{
2225
+ type: i0.Input,
2226
+ args: [{
2227
+ isSignal: true,
2228
+ alias: "preview",
2229
+ required: false
2230
+ }]
2231
+ }] }
2232
+ });
2233
+ var RowComponent = class RowComponent {
2234
+ $style = input(null, {
2235
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
2236
+ alias: "style"
2237
+ });
2238
+ $styleClass = input(void 0, {
2239
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
2240
+ alias: "styleClass"
2241
+ });
2242
+ $disableDefaultStyle = input(false, {
2243
+ ...ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {},
2244
+ alias: "disableDefaultStyle"
2245
+ });
2246
+ static ɵfac = i0.ɵɵngDeclareFactory({
2247
+ minVersion: "12.0.0",
2248
+ version: "22.2.1",
2249
+ ngImport: i0,
2250
+ type: RowComponent,
2251
+ deps: [],
2252
+ target: i0.ɵɵFactoryTarget.Component
2253
+ });
2254
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2255
+ minVersion: "17.1.0",
2256
+ version: "22.2.1",
2257
+ type: RowComponent,
2258
+ isStandalone: true,
2259
+ selector: "ng-email-row",
2260
+ inputs: {
2261
+ $style: {
2262
+ classPropertyName: "$style",
2263
+ publicName: "style",
2264
+ isSignal: true,
2265
+ isRequired: false,
2266
+ transformFunction: null
2267
+ },
2268
+ $styleClass: {
2269
+ classPropertyName: "$styleClass",
2270
+ publicName: "styleClass",
2271
+ isSignal: true,
2272
+ isRequired: false,
2273
+ transformFunction: null
2274
+ },
2275
+ $disableDefaultStyle: {
2276
+ classPropertyName: "$disableDefaultStyle",
2277
+ publicName: "disableDefaultStyle",
2278
+ isSignal: true,
2279
+ isRequired: false,
2280
+ transformFunction: null
2281
+ }
2282
+ },
2283
+ ngImport: i0,
2284
+ template: "<table\n align=\"center\"\n width=\"100%\"\n [class]=\"$styleClass()\"\n [style]=\"$style()\"\n role=\"presentation\"\n cellSpacing=\"0\"\n cellPadding=\"0\"\n border=\"0\"\n>\n <tbody [style]=\"$disableDefaultStyle() ? {} : { width: '100%' }\">\n <tr [style]=\"$disableDefaultStyle() ? {} : { width: '100%' }\">\n <ng-content />\n </tr>\n </tbody>\n</table>\n",
2285
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2286
+ });
2287
+ };
2288
+ i0.ɵɵngDeclareClassMetadata({
2289
+ minVersion: "12.0.0",
2290
+ version: "22.2.1",
2291
+ ngImport: i0,
2292
+ type: RowComponent,
2293
+ decorators: [{
2294
+ type: Component,
2295
+ args: [{
2296
+ selector: "ng-email-row",
2297
+ changeDetection: ChangeDetectionStrategy.OnPush,
2298
+ imports: [],
2299
+ template: "<table\n align=\"center\"\n width=\"100%\"\n [class]=\"$styleClass()\"\n [style]=\"$style()\"\n role=\"presentation\"\n cellSpacing=\"0\"\n cellPadding=\"0\"\n border=\"0\"\n>\n <tbody [style]=\"$disableDefaultStyle() ? {} : { width: '100%' }\">\n <tr [style]=\"$disableDefaultStyle() ? {} : { width: '100%' }\">\n <ng-content />\n </tr>\n </tbody>\n</table>\n"
2300
+ }]
2301
+ }],
2302
+ propDecorators: {
2303
+ $style: [{
2304
+ type: i0.Input,
2305
+ args: [{
2306
+ isSignal: true,
2307
+ alias: "style",
2308
+ required: false
2309
+ }]
2310
+ }],
2311
+ $styleClass: [{
2312
+ type: i0.Input,
2313
+ args: [{
2314
+ isSignal: true,
2315
+ alias: "styleClass",
2316
+ required: false
2317
+ }]
2318
+ }],
2319
+ $disableDefaultStyle: [{
2320
+ type: i0.Input,
2321
+ args: [{
2322
+ isSignal: true,
2323
+ alias: "disableDefaultStyle",
2324
+ required: false
2325
+ }]
2326
+ }]
2327
+ }
2328
+ });
2329
+ var SectionComponent = class SectionComponent {
2330
+ $style = input(null, {
2331
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
2332
+ alias: "style"
2333
+ });
2334
+ $styleClass = input(void 0, {
2335
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
2336
+ alias: "styleClass"
2337
+ });
2338
+ $sectionStyle = computed(() => {
2339
+ return styleToString({
2340
+ width: "100%",
2341
+ ...this.$style() ?? {}
2342
+ });
2343
+ }, ...ngDevMode ? [{ debugName: "$sectionStyle" }] : /* istanbul ignore next */ []);
2344
+ static ɵfac = i0.ɵɵngDeclareFactory({
2345
+ minVersion: "12.0.0",
2346
+ version: "22.2.1",
2347
+ ngImport: i0,
2348
+ type: SectionComponent,
2349
+ deps: [],
2350
+ target: i0.ɵɵFactoryTarget.Component
2351
+ });
2352
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2353
+ minVersion: "17.1.0",
2354
+ version: "22.2.1",
2355
+ type: SectionComponent,
2356
+ isStandalone: true,
2357
+ selector: "ng-email-section",
2358
+ inputs: {
2359
+ $style: {
2360
+ classPropertyName: "$style",
2361
+ publicName: "style",
2362
+ isSignal: true,
2363
+ isRequired: false,
2364
+ transformFunction: null
2365
+ },
2366
+ $styleClass: {
2367
+ classPropertyName: "$styleClass",
2368
+ publicName: "styleClass",
2369
+ isSignal: true,
2370
+ isRequired: false,
2371
+ transformFunction: null
2372
+ }
2373
+ },
2374
+ ngImport: i0,
2375
+ template: "<table\n [align]=\"'center'\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n width=\"100%\"\n role=\"presentation\"\n [style]=\"$sectionStyle()\"\n [class]=\"$styleClass()\"\n>\n <tbody>\n <tr>\n <td>\n <ng-content />\n </td>\n </tr>\n </tbody>\n</table>\n",
2376
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2377
+ });
2378
+ };
2379
+ i0.ɵɵngDeclareClassMetadata({
2380
+ minVersion: "12.0.0",
2381
+ version: "22.2.1",
2382
+ ngImport: i0,
2383
+ type: SectionComponent,
2384
+ decorators: [{
2385
+ type: Component,
2386
+ args: [{
2387
+ selector: "ng-email-section",
2388
+ changeDetection: ChangeDetectionStrategy.OnPush,
2389
+ imports: [],
2390
+ template: "<table\n [align]=\"'center'\"\n [border]=\"0\"\n [cellPadding]=\"0\"\n [cellSpacing]=\"0\"\n width=\"100%\"\n role=\"presentation\"\n [style]=\"$sectionStyle()\"\n [class]=\"$styleClass()\"\n>\n <tbody>\n <tr>\n <td>\n <ng-content />\n </td>\n </tr>\n </tbody>\n</table>\n"
2391
+ }]
2392
+ }],
2393
+ propDecorators: {
2394
+ $style: [{
2395
+ type: i0.Input,
2396
+ args: [{
2397
+ isSignal: true,
2398
+ alias: "style",
2399
+ required: false
2400
+ }]
2401
+ }],
2402
+ $styleClass: [{
2403
+ type: i0.Input,
2404
+ args: [{
2405
+ isSignal: true,
2406
+ alias: "styleClass",
2407
+ required: false
2408
+ }]
2409
+ }]
2410
+ }
2411
+ });
2412
+ var TextComponent = class TextComponent {
2413
+ $style = input(null, {
2414
+ ...ngDevMode ? { debugName: "$style" } : /* istanbul ignore next */ {},
2415
+ alias: "style"
2416
+ });
2417
+ $styleClass = input(void 0, {
2418
+ ...ngDevMode ? { debugName: "$styleClass" } : /* istanbul ignore next */ {},
2419
+ alias: "styleClass"
2420
+ });
2421
+ $disableDefaultStyle = input(false, {
2422
+ ...ngDevMode ? { debugName: "$disableDefaultStyle" } : /* istanbul ignore next */ {},
2423
+ alias: "disableDefaultStyle"
2424
+ });
2425
+ $textStyle = computed(() => {
2426
+ return {
2427
+ ...this.$disableDefaultStyle() ? {} : {
2428
+ fontSize: "14px",
2429
+ lineHeight: "24px",
2430
+ margin: "16px 0"
2431
+ },
2432
+ ...this.$style() ?? {}
2433
+ };
2434
+ }, ...ngDevMode ? [{ debugName: "$textStyle" }] : /* istanbul ignore next */ []);
2435
+ static ɵfac = i0.ɵɵngDeclareFactory({
2436
+ minVersion: "12.0.0",
2437
+ version: "22.2.1",
2438
+ ngImport: i0,
2439
+ type: TextComponent,
2440
+ deps: [],
2441
+ target: i0.ɵɵFactoryTarget.Component
2442
+ });
2443
+ static ɵcmp = i0.ɵɵngDeclareComponent({
2444
+ minVersion: "17.1.0",
2445
+ version: "22.2.1",
2446
+ type: TextComponent,
2447
+ isStandalone: true,
2448
+ selector: "ng-email-text",
2449
+ inputs: {
2450
+ $style: {
2451
+ classPropertyName: "$style",
2452
+ publicName: "style",
2453
+ isSignal: true,
2454
+ isRequired: false,
2455
+ transformFunction: null
2456
+ },
2457
+ $styleClass: {
2458
+ classPropertyName: "$styleClass",
2459
+ publicName: "styleClass",
2460
+ isSignal: true,
2461
+ isRequired: false,
2462
+ transformFunction: null
2463
+ },
2464
+ $disableDefaultStyle: {
2465
+ classPropertyName: "$disableDefaultStyle",
2466
+ publicName: "disableDefaultStyle",
2467
+ isSignal: true,
2468
+ isRequired: false,
2469
+ transformFunction: null
2470
+ }
2471
+ },
2472
+ ngImport: i0,
2473
+ template: "<p\n [style]=\"$textStyle()\"\n [class]=\"$styleClass()\"\n>\n <ng-content></ng-content>\n</p>\n",
2474
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2475
+ });
2476
+ };
2477
+ i0.ɵɵngDeclareClassMetadata({
2478
+ minVersion: "12.0.0",
2479
+ version: "22.2.1",
2480
+ ngImport: i0,
2481
+ type: TextComponent,
2482
+ decorators: [{
2483
+ type: Component,
2484
+ args: [{
2485
+ selector: "ng-email-text",
2486
+ imports: [],
2487
+ changeDetection: ChangeDetectionStrategy.OnPush,
2488
+ template: "<p\n [style]=\"$textStyle()\"\n [class]=\"$styleClass()\"\n>\n <ng-content></ng-content>\n</p>\n"
2489
+ }]
2490
+ }],
2491
+ propDecorators: {
2492
+ $style: [{
2493
+ type: i0.Input,
2494
+ args: [{
2495
+ isSignal: true,
2496
+ alias: "style",
2497
+ required: false
2498
+ }]
2499
+ }],
2500
+ $styleClass: [{
2501
+ type: i0.Input,
2502
+ args: [{
2503
+ isSignal: true,
2504
+ alias: "styleClass",
2505
+ required: false
2506
+ }]
2507
+ }],
2508
+ $disableDefaultStyle: [{
2509
+ type: i0.Input,
2510
+ args: [{
2511
+ isSignal: true,
2512
+ alias: "disableDefaultStyle",
2513
+ required: false
2514
+ }]
2515
+ }]
2516
+ }
2517
+ });
2518
+ const render = async ({ component, selector, props, options }) => {
2519
+ const __originalConsoleLog = console.log;
2520
+ console.log = ((log) => (...args) => {
2521
+ if (args[0] !== "Angular is running in development mode.") log(...args);
2522
+ })(console.log);
2523
+ try {
2524
+ const { style, html: normalizedHtml } = await renderNgComponent(component, selector, props, options?.signalInputsPrefix);
2525
+ const html = applyHtmlTransformations(normalizedHtml);
2526
+ if (options?.plainText) return renderAsPlainText(html);
2527
+ const cssProcessor = options?.cssProcessor;
2528
+ const css = await parseStyles(style, html, cssProcessor);
2529
+ return `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">${await inlineCss(html, css, !!options?.pretty)}`;
2530
+ } finally {
2531
+ console.log = __originalConsoleLog;
2532
+ }
2533
+ };
694
2534
  const renderAsPlainText = (markup) => {
695
- return convert(markup, {
696
- decodeEntities: true,
697
- formatters: {
698
- raw: (elem, _walk, builder) => {
699
- if (elem.children.length && elem.children[0].type === 'comment') {
700
- builder.addInline(unescapeForRawComponent(elem.children[0].data.trim()));
701
- }
702
- },
703
- },
704
- selectors: [
705
- { selector: '[data-skip="true"]', format: 'skip' },
706
- { selector: 'img', format: 'skip' },
707
- { selector: '#__angular-email-preview', format: 'skip' },
708
- {
709
- format: 'raw',
710
- options: {},
711
- selector: 'angular-email-raw',
712
- },
713
- { selector: 'h1', format: 'heading', options: { leadingLineBreaks: 3, trailingLineBreaks: 2, uppercase: false } },
714
- { selector: 'h2', format: 'heading', options: { leadingLineBreaks: 3, trailingLineBreaks: 2, uppercase: false } },
715
- { selector: 'h3', format: 'heading', options: { leadingLineBreaks: 3, trailingLineBreaks: 2, uppercase: false } },
716
- { selector: 'h4', format: 'heading', options: { leadingLineBreaks: 2, trailingLineBreaks: 2, uppercase: false } },
717
- { selector: 'h5', format: 'heading', options: { leadingLineBreaks: 2, trailingLineBreaks: 2, uppercase: false } },
718
- { selector: 'h6', format: 'heading', options: { leadingLineBreaks: 2, trailingLineBreaks: 2, uppercase: false } },
719
- ],
720
- });
721
- };
722
- /**
723
- * Renders an Angular component to html.
724
- *
725
- * @param component - The Angular component to render.
726
- * @param selector - The CSS selector for the component.
727
- * @returns A promise that resolves to the rendered HTML string.
728
- */
2535
+ return convert(markup, {
2536
+ decodeEntities: true,
2537
+ formatters: { raw: (elem, _walk, builder) => {
2538
+ if (elem.children.length && elem.children[0].type === "comment") builder.addInline(unescapeForRawComponent(elem.children[0].data.trim()));
2539
+ } },
2540
+ selectors: [
2541
+ {
2542
+ selector: "[data-skip=\"true\"]",
2543
+ format: "skip"
2544
+ },
2545
+ {
2546
+ selector: "img",
2547
+ format: "skip"
2548
+ },
2549
+ {
2550
+ selector: "#__angular-email-preview",
2551
+ format: "skip"
2552
+ },
2553
+ {
2554
+ format: "raw",
2555
+ options: {},
2556
+ selector: "angular-email-raw"
2557
+ },
2558
+ {
2559
+ selector: "h1",
2560
+ format: "heading",
2561
+ options: {
2562
+ leadingLineBreaks: 3,
2563
+ trailingLineBreaks: 2,
2564
+ uppercase: false
2565
+ }
2566
+ },
2567
+ {
2568
+ selector: "h2",
2569
+ format: "heading",
2570
+ options: {
2571
+ leadingLineBreaks: 3,
2572
+ trailingLineBreaks: 2,
2573
+ uppercase: false
2574
+ }
2575
+ },
2576
+ {
2577
+ selector: "h3",
2578
+ format: "heading",
2579
+ options: {
2580
+ leadingLineBreaks: 3,
2581
+ trailingLineBreaks: 2,
2582
+ uppercase: false
2583
+ }
2584
+ },
2585
+ {
2586
+ selector: "h4",
2587
+ format: "heading",
2588
+ options: {
2589
+ leadingLineBreaks: 2,
2590
+ trailingLineBreaks: 2,
2591
+ uppercase: false
2592
+ }
2593
+ },
2594
+ {
2595
+ selector: "h5",
2596
+ format: "heading",
2597
+ options: {
2598
+ leadingLineBreaks: 2,
2599
+ trailingLineBreaks: 2,
2600
+ uppercase: false
2601
+ }
2602
+ },
2603
+ {
2604
+ selector: "h6",
2605
+ format: "heading",
2606
+ options: {
2607
+ leadingLineBreaks: 2,
2608
+ trailingLineBreaks: 2,
2609
+ uppercase: false
2610
+ }
2611
+ }
2612
+ ]
2613
+ });
2614
+ };
729
2615
  const renderNgComponent = async (component, selector, props, signalInputsPrefix) => {
730
- const bootstrap = async (context) => {
731
- const appRef = await bootstrapApplication(component, {
732
- providers: [provideZonelessChangeDetection(), provideServerRendering()],
733
- }, context);
734
- appRef.components.forEach((componentRef) => {
735
- Object.entries(props ?? {}).forEach(([key, value]) => {
736
- if (key in componentRef.instance || `${signalInputsPrefix ?? ''}${key}` in componentRef.instance) {
737
- componentRef.setInput(key, value);
738
- }
739
- });
740
- componentRef.changeDetectorRef.detectChanges();
741
- });
742
- return appRef;
743
- };
744
- const ngHtml = await renderApplication(bootstrap, {
745
- document: `<${selector}></${selector}>`,
746
- });
747
- const $ = cheerio.load(ngHtml, {
748
- xml: { lowerCaseAttributeNames: false, lowerCaseTags: false },
749
- });
750
- let style = '';
751
- $('style').each(function () {
752
- const content = $(this).html();
753
- if (content) {
754
- style += `\n${content}`;
755
- }
756
- });
757
- const html = normalizeNgHtml(ngHtml, selector);
758
- return { style, html };
759
- };
760
- /**
761
- * Normalizes the provided HTML string by extracting the content within the specified selector
762
- * and removing any non-standard HTML elements.
763
- *
764
- * @param html - The HTML string to be normalized.
765
- * @param selector - The CSS selector used to identify the content to be extracted.
766
- * @returns The normalized HTML string with the content of the specified selector and without non-standard HTML elements.
767
- */
2616
+ const bootstrap = async (context) => {
2617
+ const appRef = await bootstrapApplication(component, { providers: [provideZonelessChangeDetection(), provideServerRendering()] }, context);
2618
+ appRef.components.forEach((componentRef) => {
2619
+ Object.entries(props ?? {}).forEach(([key, value]) => {
2620
+ if (key in componentRef.instance || `${signalInputsPrefix ?? ""}${key}` in componentRef.instance) componentRef.setInput(key, value);
2621
+ });
2622
+ componentRef.changeDetectorRef.detectChanges();
2623
+ });
2624
+ return appRef;
2625
+ };
2626
+ const ngHtml = await renderApplication(bootstrap, { document: `<${selector}></${selector}>` });
2627
+ const $ = cheerio.load(ngHtml, { xml: {
2628
+ lowerCaseAttributeNames: false,
2629
+ lowerCaseTags: false
2630
+ } });
2631
+ let style = "";
2632
+ $("style").each(function() {
2633
+ const content = $(this).html();
2634
+ if (content) style += `\n${content}`;
2635
+ });
2636
+ const html = normalizeNgHtml(ngHtml, selector);
2637
+ return {
2638
+ style,
2639
+ html
2640
+ };
2641
+ };
768
2642
  const normalizeNgHtml = (html, selector) => {
769
- const nsHtmlRegex = new RegExp(`<(?!(\\/?(${HTMLElements.join('|')})(?![-\\w])))[^>]+>`, 'gm');
770
- return html
771
- .replace(new RegExp(`[\\s\\S]*?<${selector}[\\s\\S]*?>([\\s\\S]*?)<\\/${selector}>[\\s\\S]*?.+`, 'gm'), '$1')
772
- .replace(nsHtmlRegex, '');
773
- };
774
- /**
775
- * Applies HTML transformations to the provided HTML string.
776
- *
777
- * This function uses Cheerio to load the HTML and perform transformations such as
778
- * replacing placeholders and applying styles from the provided CSS file paths.
779
- * It also ensures that certain HTML entities are replaced with their corresponding
780
- * characters.
781
- *
782
- * @param html - The HTML string to transform.
783
- * @param cssFilePaths - An optional array of CSS file paths to apply styles from.
784
- * @returns The transformed HTML string.
785
- */
2643
+ const nsHtmlRegex = new RegExp(`<(?!(\\/?(${HTMLElements.join("|")})(?![-\\w])))[^>]+>`, "gm");
2644
+ return html.replace(new RegExp(`[\\s\\S]*?<${selector}[\\s\\S]*?>([\\s\\S]*?)<\\/${selector}>[\\s\\S]*?.+`, "gm"), "$1").replace(nsHtmlRegex, "");
2645
+ };
786
2646
  const applyHtmlTransformations = (html) => {
787
- const $ = cheerio.load(html);
788
- replacePlaceholders($);
789
- return resolveCssVarNamespace($.html()
790
- .replace(/\s+/g, ' ')
791
- .replace(/>\s+</g, '><')
792
- .replaceAll('&lt;', '<')
793
- .replaceAll('&gt;', '>')
794
- .replaceAll('&#x24;', '$'));
795
- };
796
- /**
797
- * Resolves the CSS variable namespace placeholder emitted by the Angular compiler.
798
- *
799
- * Since Angular 22.1 every custom property declared in a component stylesheet
800
- * (or bound in a template) is compiled to `--%NS%name`. The placeholder is meant
801
- * to be resolved by the DOM renderer, which replaces it with the namespace opted
802
- * in through `provideCssVarNamespacing()` or with an empty string when unused.
803
- * That only happens with `@angular/platform-browser` >= 22.1: with an older
804
- * renderer the placeholder leaks into the rendered markup and produces invalid
805
- * custom properties, breaking every `var()` and theme lookup downstream.
806
- *
807
- * @param input the rendered css or html
808
- * @returns the input with any leftover placeholder removed
809
- */
2647
+ const $ = cheerio.load(html);
2648
+ replacePlaceholders($);
2649
+ return resolveCssVarNamespace($.html().replace(/\s+/g, " ").replace(/>\s+</g, "><").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&#x24;", "$"));
2650
+ };
810
2651
  const resolveCssVarNamespace = (input) => {
811
- return input.replaceAll('--%NS%', '--');
812
- };
813
- /**
814
- * Replaces elements with the `data-html` attribute with their corresponding HTML content.
815
- *
816
- * This function iterates over all elements that have the `data-html` attribute,
817
- * retrieves the value of the attribute, and replaces the element with the HTML content
818
- * specified in the attribute.
819
- *
820
- * @param $ - The Cheerio API instance used to manipulate the HTML.
821
- */
2652
+ return input.replaceAll("--%NS%", "--");
2653
+ };
822
2654
  const replacePlaceholders = ($) => {
823
- $('[data-html]').each(function () {
824
- const content = $(this).attr('data-html');
825
- if (content) {
826
- $(this).replaceWith(`${content}`);
827
- }
828
- });
829
- };
830
- /**
831
- * Applies the styles from the specified CSS file paths to the HTML document.
832
- *
833
- * @param style - The raw content of <style> tags
834
- * @param cssProcessor - Optional hook for manipulate the css extracted.
835
- * Useful for postcss processing
836
- *
837
- */
2655
+ $("[data-html]").each(function() {
2656
+ const content = $(this).attr("data-html");
2657
+ if (content) $(this).replaceWith(`${content}`);
2658
+ });
2659
+ };
838
2660
  const parseStyles = async (style, html, cssProcessor) => {
839
- const normalized = normalizeCssInput(style);
840
- if (!cssProcessor)
841
- return normalized;
842
- const processed = await cssProcessor(normalized, html);
843
- return processed;
844
- };
845
- /**
846
- * Normalize css
847
- *
848
- * @param input css to normalize
849
- * @returns normalized css
850
- */
2661
+ const normalized = normalizeCssInput(style);
2662
+ if (!cssProcessor) return normalized;
2663
+ return await cssProcessor(normalized, html);
2664
+ };
851
2665
  const normalizeCssInput = (input) => {
852
- return resolveCssVarNamespace(input
853
- .replace(/\s+/g, ' ')
854
- .replace(/>\s+</g, '><')
855
- .replaceAll('&lt;', '<')
856
- .replaceAll('&gt;', '>')
857
- .replaceAll('&#x24;', '$')
858
- .replaceAll('&quot;', '"')
859
- .replaceAll('&amp;', '&'));
860
- };
861
- /**
862
- * Inlines CSS into the provided HTML string using Maizzle and Tailwind CSS.
863
- *
864
- * @param html - The HTML string to process.
865
- * @param css - The CSS to inline.
866
- * @param pretty - Whether to prettify the output HTML. Defaults to `false`.
867
- * @returns A promise that resolves to the processed HTML string with inlined CSS.
868
- */
2666
+ return resolveCssVarNamespace(input.replace(/\s+/g, " ").replace(/>\s+</g, "><").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&#x24;", "$").replaceAll("&quot;", "\"").replaceAll("&amp;", "&"));
2667
+ };
869
2668
  const inlineCss = async (html, css, pretty = false) => {
870
- juice.styleToAttribute = {};
871
- juice.excludedProperties.push(...[]);
872
- juice.widthElements = ['img', 'video'].map((i) => i.toUpperCase());
873
- juice.heightElements = ['img', 'video'].map((i) => i.toUpperCase());
874
- const inlined = unescapeForRawComponent(juice
875
- .inlineContent(html, css, {
876
- applyWidthAttributes: true,
877
- applyHeightAttributes: true,
878
- removeStyleTags: false,
879
- resolveCSSVariables: true,
880
- })
881
- .replace(/\s+/g, ' ')
882
- .replace(/>\s+</g, '><')
883
- .replaceAll('&#x24;', '$')
884
- .replace(/<angular-email-raw[\s\S]*?><!--(.*?)--><\/angular-email-raw>/gm, `$1`));
885
- if (pretty)
886
- return prettyPrint(inlined);
887
- return inlined;
2669
+ juice.styleToAttribute = {};
2670
+ juice.excludedProperties.push(...[]);
2671
+ juice.widthElements = ["img", "video"].map((i) => i.toUpperCase());
2672
+ juice.heightElements = ["img", "video"].map((i) => i.toUpperCase());
2673
+ const inlined = unescapeForRawComponent(juice.inlineContent(html, css, {
2674
+ applyWidthAttributes: true,
2675
+ applyHeightAttributes: true,
2676
+ removeStyleTags: false,
2677
+ resolveCSSVariables: true
2678
+ }).replace(/\s+/g, " ").replace(/>\s+</g, "><").replaceAll("&#x24;", "$").replace(/<angular-email-raw[\s\S]*?><!--(.*?)--><\/angular-email-raw>/gm, `$1`));
2679
+ if (pretty) return prettyPrint(inlined);
2680
+ return inlined;
888
2681
  };
889
-
890
- /*
891
- * Public API Surface of angular-email
892
- */
893
-
894
- /**
895
- * Generated bundle index. Do not edit.
896
- */
897
-
898
2682
  export { BackgroundComponent, BodyComponent, ButtonComponent, ColorSchemeComponent, ColumnComponent, ConditionalComponent, ContainerComponent, HTMLElements, HeadComponent, HeadingComponent, HrComponent, HtmlComponent, ImgComponent, LinkComponent, PreviewComponent, RawComponent, RowComponent, SectionComponent, TextComponent, classToString, copyTextToClipboard, escapeForRawComponent, pxToPt, render, styleToString, unescapeForRawComponent, unreachable, withMargin };
899
- //# sourceMappingURL=keycloakify-angular-email.mjs.map
2683
+
2684
+ //# sourceMappingURL=keycloakify-angular-email.mjs.map