@pobuca/email-builder 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bundles/pobuca-email-builder.umd.js +4952 -4494
- package/bundles/pobuca-email-builder.umd.js.map +1 -1
- package/bundles/pobuca-email-builder.umd.min.js +1 -1
- package/bundles/pobuca-email-builder.umd.min.js.map +1 -1
- package/esm2015/lib/classes/DefaultEmail.js +54 -54
- package/esm2015/lib/classes/Elements.js +278 -229
- package/esm2015/lib/classes/Structure.js +89 -89
- package/esm2015/lib/components/block/block.component.js +89 -89
- package/esm2015/lib/components/block-settings/block-settings.component.js +53 -53
- package/esm2015/lib/components/builder-container/builder-container.component.js +114 -114
- package/esm2015/lib/components/dialog.component.js +30 -30
- package/esm2015/lib/components/general-settings/general-settings.component.js +25 -25
- package/esm2015/lib/components/import-dialog/import-dialog.component.js +62 -62
- package/esm2015/lib/components/preview.component.js +89 -89
- package/esm2015/lib/components/structure/structure.component.js +163 -163
- package/esm2015/lib/components/structure-settings/structure-settings.component.js +31 -31
- package/esm2015/lib/components/template-list-dialog/template-list-dialog.component.js +45 -45
- package/esm2015/lib/directives/dynamic-component.directive.js +48 -46
- package/esm2015/lib/elements/abstract-block.js +23 -23
- package/esm2015/lib/elements/button/button.component.js +29 -29
- package/esm2015/lib/elements/divider/divider.component.js +30 -30
- package/esm2015/lib/elements/image/image.component.js +64 -54
- package/esm2015/lib/elements/social/social.component.js +42 -42
- package/esm2015/lib/elements/spacer/spacer.component.js +30 -30
- package/esm2015/lib/elements/text-element/text-element.component.js +80 -80
- package/esm2015/lib/elements/video/video.component.js +147 -0
- package/esm2015/lib/groups/align.js +79 -79
- package/esm2015/lib/groups/back-repeat.js +55 -55
- package/esm2015/lib/groups/border.js +102 -102
- package/esm2015/lib/groups/color.js +139 -139
- package/esm2015/lib/groups/direction.js +63 -63
- package/esm2015/lib/groups/font-styles.js +127 -127
- package/esm2015/lib/groups/gaps.js +45 -45
- package/esm2015/lib/groups/line-height.js +68 -68
- package/esm2015/lib/groups/link.js +67 -67
- package/esm2015/lib/groups/margin.js +45 -45
- package/esm2015/lib/groups/padding.js +53 -53
- package/esm2015/lib/groups/upload-image.js +112 -112
- package/esm2015/lib/groups/width-height.js +94 -94
- package/esm2015/lib/interceptors/pb-interceptor.interceptor.js +51 -51
- package/esm2015/lib/interfaces/interfaces.js +13 -13
- package/esm2015/lib/pb-email-builder.component.js +258 -258
- package/esm2015/lib/pb-email-builder.module.js +296 -291
- package/esm2015/lib/pb-email-builder.service.js +134 -134
- package/esm2015/lib/pipes/slugify.pipe.js +39 -39
- package/esm2015/lib/services/internals/pb-email-object-store/pb-email-object-store.service.js +180 -175
- package/esm2015/lib/services/internals/user-interfaces/user-interface.service.js +122 -122
- package/esm2015/lib/services/pb-storage/FreeUsersStorage.class.js +11 -11
- package/esm2015/lib/services/pb-storage/index.js +7 -7
- package/esm2015/lib/services/pb-storage/pb-storage.service.js +79 -79
- package/esm2015/lib/services/user-image-uploader-service/free-users-image-uploader.service.js +26 -26
- package/esm2015/lib/services/user-image-uploader-service/index.js +8 -8
- package/esm2015/lib/services/user-image-uploader-service/paid-users-image-uploader.service.js +30 -30
- package/esm2015/lib/services/user-image-uploader-service/upload-bottom-sheet-dialog/upload-bottom-sheet-dialog.component.js +112 -112
- package/esm2015/lib/services/user-image-uploader-service/upload-image-gallery/upload-image-gallery.component.js +91 -91
- package/esm2015/lib/services/user-image-uploader-service/user-image-uploader.service.js +26 -26
- package/esm2015/lib/services/user-middleware-service/FreeUsersMiddleware.js +31 -31
- package/esm2015/lib/services/user-middleware-service/PaidUsersMiddleware.js +12 -12
- package/esm2015/lib/services/user-middleware-service/index.js +8 -8
- package/esm2015/lib/services/user-middleware-service/pb-middlewares.service.js +195 -195
- package/esm2015/lib/services/user-rest-api-service/free-users-rest-api.service.js +16 -16
- package/esm2015/lib/services/user-rest-api-service/index.js +7 -7
- package/esm2015/lib/services/user-rest-api-service/user-rest-api.service.js +130 -116
- package/esm2015/lib/services/video-thumbnail.service.js +142 -0
- package/esm2015/lib/tokens/private-tokens.js +17 -17
- package/esm2015/lib/tokens/tokens.js +160 -159
- package/esm2015/lib/utils.js +147 -147
- package/esm2015/pobuca-email-builder.js +45 -43
- package/esm2015/public_api.js +26 -26
- package/fesm2015/pobuca-email-builder.js +4560 -4207
- package/fesm2015/pobuca-email-builder.js.map +1 -1
- package/lib/classes/DefaultEmail.d.ts +10 -10
- package/lib/classes/Elements.d.ts +72 -62
- package/lib/classes/Structure.d.ts +11 -11
- package/lib/components/block/block.component.d.ts +25 -25
- package/lib/components/block-settings/block-settings.component.d.ts +18 -18
- package/lib/components/builder-container/builder-container.component.d.ts +36 -36
- package/lib/components/dialog.component.d.ts +10 -10
- package/lib/components/general-settings/general-settings.component.d.ts +6 -6
- package/lib/components/import-dialog/import-dialog.component.d.ts +16 -16
- package/lib/components/preview.component.d.ts +18 -18
- package/lib/components/structure/structure.component.d.ts +43 -43
- package/lib/components/structure-settings/structure-settings.component.d.ts +9 -9
- package/lib/components/template-list-dialog/template-list-dialog.component.d.ts +15 -15
- package/lib/directives/dynamic-component.directive.d.ts +13 -13
- package/lib/elements/abstract-block.d.ts +8 -8
- package/lib/elements/button/button.component.d.ts +18 -18
- package/lib/elements/divider/divider.component.d.ts +10 -10
- package/lib/elements/image/image.component.d.ts +21 -19
- package/lib/elements/social/social.component.d.ts +21 -21
- package/lib/elements/spacer/spacer.component.d.ts +5 -5
- package/lib/elements/text-element/text-element.component.d.ts +52 -52
- package/lib/elements/video/video.component.d.ts +36 -0
- package/lib/groups/align.d.ts +17 -17
- package/lib/groups/back-repeat.d.ts +8 -8
- package/lib/groups/border.d.ts +13 -13
- package/lib/groups/color.d.ts +26 -26
- package/lib/groups/direction.d.ts +13 -13
- package/lib/groups/font-styles.d.ts +21 -21
- package/lib/groups/gaps.d.ts +7 -7
- package/lib/groups/line-height.d.ts +12 -12
- package/lib/groups/link.d.ts +11 -11
- package/lib/groups/margin.d.ts +8 -8
- package/lib/groups/padding.d.ts +8 -8
- package/lib/groups/upload-image.d.ts +19 -19
- package/lib/groups/width-height.d.ts +19 -19
- package/lib/interceptors/pb-interceptor.interceptor.d.ts +10 -10
- package/lib/interfaces/interfaces.d.ts +442 -430
- package/lib/pb-email-builder.component.d.ts +67 -67
- package/lib/pb-email-builder.module.d.ts +51 -51
- package/lib/pb-email-builder.service.d.ts +83 -83
- package/lib/pipes/slugify.pipe.d.ts +9 -9
- package/lib/services/internals/pb-email-object-store/pb-email-object-store.service.d.ts +51 -50
- package/lib/services/internals/user-interfaces/user-interface.service.d.ts +46 -46
- package/lib/services/pb-storage/FreeUsersStorage.class.d.ts +6 -6
- package/lib/services/pb-storage/index.d.ts +2 -2
- package/lib/services/pb-storage/pb-storage.service.d.ts +54 -54
- package/lib/services/user-image-uploader-service/free-users-image-uploader.service.d.ts +12 -12
- package/lib/services/user-image-uploader-service/index.d.ts +3 -3
- package/lib/services/user-image-uploader-service/paid-users-image-uploader.service.d.ts +14 -14
- package/lib/services/user-image-uploader-service/upload-bottom-sheet-dialog/upload-bottom-sheet-dialog.component.d.ts +28 -28
- package/lib/services/user-image-uploader-service/upload-image-gallery/upload-image-gallery.component.d.ts +27 -27
- package/lib/services/user-image-uploader-service/user-image-uploader.service.d.ts +26 -26
- package/lib/services/user-middleware-service/FreeUsersMiddleware.d.ts +15 -15
- package/lib/services/user-middleware-service/PaidUsersMiddleware.d.ts +7 -7
- package/lib/services/user-middleware-service/index.d.ts +3 -3
- package/lib/services/user-middleware-service/pb-middlewares.service.d.ts +190 -190
- package/lib/services/user-rest-api-service/free-users-rest-api.service.d.ts +10 -10
- package/lib/services/user-rest-api-service/index.d.ts +2 -2
- package/lib/services/user-rest-api-service/user-rest-api.service.d.ts +95 -82
- package/lib/services/video-thumbnail.service.d.ts +23 -0
- package/lib/tokens/private-tokens.d.ts +5 -5
- package/lib/tokens/tokens.d.ts +70 -70
- package/lib/utils.d.ts +88 -88
- package/package.json +1 -1
- package/pobuca-email-builder.d.ts +44 -42
- package/pobuca-email-builder.metadata.json +1 -1
- package/public_api.d.ts +16 -16
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2024 Pobuca.
|
|
3
|
-
* All rights reserved.
|
|
4
|
-
*/
|
|
5
|
-
import { Component, ViewEncapsulation } from '@angular/core';
|
|
6
|
-
import { debounceTime, map, mapTo, take, takeUntil } from 'rxjs/operators';
|
|
7
|
-
import { Subject } from 'rxjs';
|
|
8
|
-
import { createFont, createLineHeight, createPadding } from '../../utils';
|
|
9
|
-
import { PbUserInterfaceService } from '../../services/internals/user-interfaces/user-interface.service';
|
|
10
|
-
import { PbEmailObjectStoreService } from '../../services/internals/pb-email-object-store/pb-email-object-store.service';
|
|
11
|
-
import { PbUserRestApiService } from '../../services/user-rest-api-service/user-rest-api.service';
|
|
12
|
-
import { AbstractBlock } from '../abstract-block';
|
|
13
|
-
export class TextElementComponent extends AbstractBlock {
|
|
14
|
-
constructor(userRestApi, emailObject, internalService) {
|
|
15
|
-
super();
|
|
16
|
-
this.userRestApi = userRestApi;
|
|
17
|
-
this.emailObject = emailObject;
|
|
18
|
-
this.internalService = internalService;
|
|
19
|
-
// @Input() block: TextBlock;
|
|
20
|
-
this.setAsReadOnly$ = this.internalService.currentEditingBlock$.pipe(map(editingBlock => editingBlock !== this.block));
|
|
21
|
-
this.staticQuillConfig = {
|
|
22
|
-
toolbar: {
|
|
23
|
-
container: [
|
|
24
|
-
['bold', 'italic', 'underline', 'strike'],
|
|
25
|
-
[{ header: [1, 2, 3, 4, 5, 6, false] }, { size: ['small', false, 'large', 'huge'] }],
|
|
26
|
-
[{ align: [] }, 'link'],
|
|
27
|
-
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
28
|
-
[{ color: [] }, { background: [] }],
|
|
29
|
-
['clean']
|
|
30
|
-
],
|
|
31
|
-
handlers: {
|
|
32
|
-
placeholder(selector) {
|
|
33
|
-
const range = this.quill.getSelection();
|
|
34
|
-
const format = this.quill.getFormat();
|
|
35
|
-
const text = this.quill.getText(range.index, range.length);
|
|
36
|
-
this.quill.deleteText(range.index, text.length);
|
|
37
|
-
this.quill.insertText(range.index, selector, format);
|
|
38
|
-
this.quill.setSelection(range.index, selector.length);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
this.quillInit$ = this.userRestApi.getAllUserMergeFields$.pipe(map(placeholder => {
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
this.staticQuillConfig.toolbar.container.splice(-1, 0, [{ placeholder }]);
|
|
46
|
-
}), mapTo(true), take(1));
|
|
47
|
-
this.textChanged$ = new Subject();
|
|
48
|
-
this.componentDestroyed$ = new Subject();
|
|
49
|
-
}
|
|
50
|
-
getTextStyles() {
|
|
51
|
-
const { color, font, lineHeight, padding } = this.block.options;
|
|
52
|
-
return Object.assign(Object.assign(Object.assign({ color, 'word-break': 'break-all' }, createLineHeight(lineHeight)), createFont(font)), createPadding(padding));
|
|
53
|
-
}
|
|
54
|
-
contentChanged() {
|
|
55
|
-
this.textChanged$.next();
|
|
56
|
-
}
|
|
57
|
-
ngOnInit() {
|
|
58
|
-
this.textChanged$.pipe(debounceTime(600), takeUntil(this.componentDestroyed$)).subscribe(() => {
|
|
59
|
-
this.emailObject.markForCheck();
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
ngOnDestroy() {
|
|
63
|
-
this.componentDestroyed$.next();
|
|
64
|
-
this.componentDestroyed$.complete();
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
TextElementComponent.decorators = [
|
|
68
|
-
{ type: Component, args: [{
|
|
69
|
-
selector: 'pb-text-element',
|
|
70
|
-
template: "<!--\
|
|
71
|
-
encapsulation: ViewEncapsulation.None,
|
|
72
|
-
styles: ["@charset \"UTF-8\";\n/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */\n/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:\"\u2022\"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:\"\u2611\"}.ql-editor ul[data-checked=false]>li:before{content:\"\u2610\"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) \". \"}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) \". \"}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) \". \"}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) \". \"}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) \". \"}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) \". \"}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) \". \"}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) \". \"}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) \". \"}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-bubble.ql-toolbar:after,.ql-bubble .ql-toolbar:after{clear:both;content:\"\";display:table}.ql-bubble.ql-toolbar button,.ql-bubble .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-bubble.ql-toolbar button svg,.ql-bubble .ql-toolbar button svg{float:left;height:100%}.ql-bubble.ql-toolbar button:active:hover,.ql-bubble .ql-toolbar button:active:hover{outline:none}.ql-bubble.ql-toolbar input.ql-image[type=file],.ql-bubble .ql-toolbar input.ql-image[type=file]{display:none}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected,.ql-bubble.ql-toolbar .ql-picker-item:hover,.ql-bubble .ql-toolbar .ql-picker-item:hover,.ql-bubble.ql-toolbar .ql-picker-label.ql-active,.ql-bubble .ql-toolbar .ql-picker-label.ql-active,.ql-bubble.ql-toolbar .ql-picker-label:hover,.ql-bubble .ql-toolbar .ql-picker-label:hover,.ql-bubble.ql-toolbar button.ql-active,.ql-bubble .ql-toolbar button.ql-active,.ql-bubble.ql-toolbar button:focus,.ql-bubble .ql-toolbar button:focus,.ql-bubble.ql-toolbar button:hover,.ql-bubble .ql-toolbar button:hover{color:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:focus .ql-fill,.ql-bubble .ql-toolbar button:focus .ql-fill,.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:hover .ql-fill,.ql-bubble .ql-toolbar button:hover .ql-fill,.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill{fill:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble.ql-toolbar button.ql-active .ql-stroke,.ql-bubble .ql-toolbar button.ql-active .ql-stroke,.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar button:focus .ql-stroke,.ql-bubble .ql-toolbar button:focus .ql-stroke,.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,.ql-bubble.ql-toolbar button:hover .ql-stroke,.ql-bubble .ql-toolbar button:hover .ql-stroke,.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover .ql-stroke-miter{stroke:#fff}@media (pointer:coarse){.ql-bubble.ql-toolbar button:hover:not(.ql-active),.ql-bubble .ql-toolbar button:hover:not(.ql-active){color:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#ccc}}.ql-bubble,.ql-bubble *{box-sizing:border-box}.ql-bubble .ql-hidden{display:none}.ql-bubble .ql-out-bottom,.ql-bubble .ql-out-top{visibility:hidden}.ql-bubble .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-bubble .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-bubble .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-bubble .ql-formats{display:inline-block;vertical-align:middle}.ql-bubble .ql-formats:after{clear:both;content:\"\";display:table}.ql-bubble .ql-stroke{fill:none;stroke:#ccc;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-bubble .ql-stroke-miter{fill:none;stroke:#ccc;stroke-miterlimit:10;stroke-width:2}.ql-bubble .ql-fill,.ql-bubble .ql-stroke.ql-fill{fill:#ccc}.ql-bubble .ql-empty{fill:none}.ql-bubble .ql-even{fill-rule:evenodd}.ql-bubble .ql-stroke.ql-thin,.ql-bubble .ql-thin{stroke-width:1}.ql-bubble .ql-transparent{opacity:.4}.ql-bubble .ql-direction svg:last-child{display:none}.ql-bubble .ql-direction.ql-active svg:last-child{display:inline}.ql-bubble .ql-direction.ql-active svg:first-child{display:none}.ql-bubble .ql-editor h1{font-size:2em}.ql-bubble .ql-editor h2{font-size:1.5em}.ql-bubble .ql-editor h3{font-size:1.17em}.ql-bubble .ql-editor h4{font-size:1em}.ql-bubble .ql-editor h5{font-size:.83em}.ql-bubble .ql-editor h6{font-size:.67em}.ql-bubble .ql-editor a{text-decoration:underline}.ql-bubble .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-bubble .ql-editor code,.ql-bubble .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-bubble .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-bubble .ql-editor code{font-size:85%;padding:2px 4px}.ql-bubble .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-bubble .ql-editor img{max-width:100%}.ql-bubble .ql-picker{color:#ccc;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-bubble .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-bubble .ql-picker-label:before{display:inline-block;line-height:22px}.ql-bubble .ql-picker-options{background-color:#444;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-bubble .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-bubble .ql-picker.ql-expanded .ql-picker-label{color:#777;z-index:2}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-bubble .ql-color-picker,.ql-bubble .ql-icon-picker{width:28px}.ql-bubble .ql-color-picker .ql-picker-label,.ql-bubble .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-label svg,.ql-bubble .ql-icon-picker .ql-picker-label svg{right:4px}.ql-bubble .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-bubble .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-bubble .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=\"\"]):before{content:attr(data-label)}.ql-bubble .ql-picker.ql-header{width:98px}.ql-bubble .ql-picker.ql-header .ql-picker-item:before,.ql-bubble .ql-picker.ql-header .ql-picker-label:before{content:\"Normal\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]:before{content:\"Heading 1\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]:before{content:\"Heading 2\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]:before{content:\"Heading 3\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]:before{content:\"Heading 4\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]:before{content:\"Heading 5\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]:before{content:\"Heading 6\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before{font-size:2em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before{font-size:1.5em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before{font-size:1.17em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before{font-size:1em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before{font-size:.83em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before{font-size:.67em}.ql-bubble .ql-picker.ql-font{width:108px}.ql-bubble .ql-picker.ql-font .ql-picker-item:before,.ql-bubble .ql-picker.ql-font .ql-picker-label:before{content:\"Sans Serif\"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]:before{content:\"Serif\"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before{content:\"Monospace\"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-bubble .ql-picker.ql-size{width:98px}.ql-bubble .ql-picker.ql-size .ql-picker-item:before,.ql-bubble .ql-picker.ql-size .ql-picker-label:before{content:\"Normal\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]:before{content:\"Small\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]:before{content:\"Large\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]:before{content:\"Huge\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-bubble .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-bubble .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-bubble .ql-toolbar .ql-formats{margin:8px 12px 8px 0}.ql-bubble .ql-toolbar .ql-formats:first-child{margin-left:12px}.ql-bubble .ql-color-picker svg{margin:1px}.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,.ql-bubble .ql-color-picker .ql-picker-item:hover{border-color:#fff}.ql-bubble .ql-tooltip{background-color:#444;border-radius:25px;color:#fff}.ql-bubble .ql-tooltip-arrow{border-left:6px solid transparent;border-right:6px solid transparent;content:\" \";display:block;left:50%;margin-left:-6px;position:absolute}.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow{border-bottom:6px solid #444;top:-6px}.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow{border-top:6px solid #444;bottom:-6px}.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor{display:block}.ql-bubble .ql-tooltip.ql-editing .ql-formats{visibility:hidden}.ql-bubble .ql-tooltip-editor{display:none}.ql-bubble .ql-tooltip-editor input[type=text]{background:transparent;border:none;color:#fff;font-size:13px;height:100%;outline:none;padding:10px 20px;position:absolute;width:100%}.ql-bubble .ql-tooltip-editor a{top:10px;position:absolute;right:20px}.ql-bubble .ql-tooltip-editor a:before{color:#ccc;content:\"\u00D7\";font-size:16px;font-weight:700}.ql-container.ql-bubble:not(.ql-disabled) a{position:relative;white-space:nowrap}.ql-container.ql-bubble:not(.ql-disabled) a:before{background-color:#444;border-radius:15px;top:-5px;font-size:12px;color:#fff;content:attr(href);font-weight:400;overflow:hidden;padding:5px 15px;text-decoration:none;z-index:1}.ql-container.ql-bubble:not(.ql-disabled) a:after{border-top:6px solid #444;border-left:6px solid transparent;border-right:6px solid transparent;top:0;content:\" \";height:0;width:0}.ql-container.ql-bubble:not(.ql-disabled) a:after,.ql-container.ql-bubble:not(.ql-disabled) a:before{left:0;margin-left:50%;position:absolute;transform:translate(-50%,-100%);transition:visibility 0s ease .2s;visibility:hidden}.ql-container.ql-bubble:not(.ql-disabled) a:hover:after,.ql-container.ql-bubble:not(.ql-disabled) a:hover:before{visibility:visible}quill-editor{display:block;word-break:break-word}quill-editor .ql-container{font-family:inherit;font-size:inherit}quill-editor .ql-container .ql-editor{padding:0!important;line-height:inherit;font:inherit;overflow:visible}quill-editor .ql-placeholder .ql-picker-label:before{display:block;content:\"Tags\";min-width:50px}quill-editor .ql-placeholder.ql-expanded .ql-picker-item:before{content:attr(data-value);width:-moz-min-content;width:min-content}quill-editor .ql-tooltip{z-index:10;line-height:normal}quill-editor .ql-tooltip .ql-picker-options{max-height:300px;overflow:auto}quill-editor .ql-toolbar{width:600px;width:-moz-max-content;width:max-content}quill-editor h1,quill-editor h2,quill-editor h3,quill-editor h4,quill-editor h5,quill-editor h6{font-weight:inherit;line-height:inherit}"]
|
|
73
|
-
},] }
|
|
74
|
-
];
|
|
75
|
-
TextElementComponent.ctorParameters = () => [
|
|
76
|
-
{ type: PbUserRestApiService },
|
|
77
|
-
{ type: PbEmailObjectStoreService },
|
|
78
|
-
{ type: PbUserInterfaceService }
|
|
79
|
-
];
|
|
80
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Pobuca.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
import { Component, ViewEncapsulation } from '@angular/core';
|
|
6
|
+
import { debounceTime, map, mapTo, take, takeUntil } from 'rxjs/operators';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
|
+
import { createFont, createLineHeight, createPadding } from '../../utils';
|
|
9
|
+
import { PbUserInterfaceService } from '../../services/internals/user-interfaces/user-interface.service';
|
|
10
|
+
import { PbEmailObjectStoreService } from '../../services/internals/pb-email-object-store/pb-email-object-store.service';
|
|
11
|
+
import { PbUserRestApiService } from '../../services/user-rest-api-service/user-rest-api.service';
|
|
12
|
+
import { AbstractBlock } from '../abstract-block';
|
|
13
|
+
export class TextElementComponent extends AbstractBlock {
|
|
14
|
+
constructor(userRestApi, emailObject, internalService) {
|
|
15
|
+
super();
|
|
16
|
+
this.userRestApi = userRestApi;
|
|
17
|
+
this.emailObject = emailObject;
|
|
18
|
+
this.internalService = internalService;
|
|
19
|
+
// @Input() block: TextBlock;
|
|
20
|
+
this.setAsReadOnly$ = this.internalService.currentEditingBlock$.pipe(map(editingBlock => editingBlock !== this.block));
|
|
21
|
+
this.staticQuillConfig = {
|
|
22
|
+
toolbar: {
|
|
23
|
+
container: [
|
|
24
|
+
['bold', 'italic', 'underline', 'strike'],
|
|
25
|
+
[{ header: [1, 2, 3, 4, 5, 6, false] }, { size: ['small', false, 'large', 'huge'] }],
|
|
26
|
+
[{ align: [] }, 'link'],
|
|
27
|
+
[{ list: 'ordered' }, { list: 'bullet' }],
|
|
28
|
+
[{ color: [] }, { background: [] }],
|
|
29
|
+
['clean']
|
|
30
|
+
],
|
|
31
|
+
handlers: {
|
|
32
|
+
placeholder(selector) {
|
|
33
|
+
const range = this.quill.getSelection();
|
|
34
|
+
const format = this.quill.getFormat();
|
|
35
|
+
const text = this.quill.getText(range.index, range.length);
|
|
36
|
+
this.quill.deleteText(range.index, text.length);
|
|
37
|
+
this.quill.insertText(range.index, selector, format);
|
|
38
|
+
this.quill.setSelection(range.index, selector.length);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
this.quillInit$ = this.userRestApi.getAllUserMergeFields$.pipe(map(placeholder => {
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
this.staticQuillConfig.toolbar.container.splice(-1, 0, [{ placeholder }]);
|
|
46
|
+
}), mapTo(true), take(1));
|
|
47
|
+
this.textChanged$ = new Subject();
|
|
48
|
+
this.componentDestroyed$ = new Subject();
|
|
49
|
+
}
|
|
50
|
+
getTextStyles() {
|
|
51
|
+
const { color, font, lineHeight, padding } = this.block.options;
|
|
52
|
+
return Object.assign(Object.assign(Object.assign({ color, 'word-break': 'break-all' }, createLineHeight(lineHeight)), createFont(font)), createPadding(padding));
|
|
53
|
+
}
|
|
54
|
+
contentChanged() {
|
|
55
|
+
this.textChanged$.next();
|
|
56
|
+
}
|
|
57
|
+
ngOnInit() {
|
|
58
|
+
this.textChanged$.pipe(debounceTime(600), takeUntil(this.componentDestroyed$)).subscribe(() => {
|
|
59
|
+
this.emailObject.markForCheck();
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
ngOnDestroy() {
|
|
63
|
+
this.componentDestroyed$.next();
|
|
64
|
+
this.componentDestroyed$.complete();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
TextElementComponent.decorators = [
|
|
68
|
+
{ type: Component, args: [{
|
|
69
|
+
selector: 'pb-text-element',
|
|
70
|
+
template: "<!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n -->\n\n<div [ngStyle]=\"getTextStyles()\">\n <quill-editor *ngIf=\"quillInit$ | async; else loadingModules\" i18n-placeholder=\"text-element|placeholder\"\n placeholder=\"Insert text here ...\" [modules]=\"staticQuillConfig\" [readOnly]=\"setAsReadOnly$ |async\"\n [(ngModel)]=\"block.innerText\" (onContentChanged)=\"contentChanged()\">\n </quill-editor>\n</div>\n\n<ng-template #loadingModules>\n <span i18n=\"text-element|loading message\">Please wait ...</span>\n</ng-template>\n",
|
|
71
|
+
encapsulation: ViewEncapsulation.None,
|
|
72
|
+
styles: ["@charset \"UTF-8\";\n/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */\n/*!\n * Quill Editor v1.3.7\n * https://quilljs.com/\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n */.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:\"\u2022\"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:\"\u2611\"}.ql-editor ul[data-checked=false]>li:before{content:\"\u2610\"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) \". \"}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) \". \"}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) \". \"}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) \". \"}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) \". \"}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) \". \"}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) \". \"}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) \". \"}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) \". \"}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-bubble.ql-toolbar:after,.ql-bubble .ql-toolbar:after{clear:both;content:\"\";display:table}.ql-bubble.ql-toolbar button,.ql-bubble .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-bubble.ql-toolbar button svg,.ql-bubble .ql-toolbar button svg{float:left;height:100%}.ql-bubble.ql-toolbar button:active:hover,.ql-bubble .ql-toolbar button:active:hover{outline:none}.ql-bubble.ql-toolbar input.ql-image[type=file],.ql-bubble .ql-toolbar input.ql-image[type=file]{display:none}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected,.ql-bubble.ql-toolbar .ql-picker-item:hover,.ql-bubble .ql-toolbar .ql-picker-item:hover,.ql-bubble.ql-toolbar .ql-picker-label.ql-active,.ql-bubble .ql-toolbar .ql-picker-label.ql-active,.ql-bubble.ql-toolbar .ql-picker-label:hover,.ql-bubble .ql-toolbar .ql-picker-label:hover,.ql-bubble.ql-toolbar button.ql-active,.ql-bubble .ql-toolbar button.ql-active,.ql-bubble.ql-toolbar button:focus,.ql-bubble .ql-toolbar button:focus,.ql-bubble.ql-toolbar button:hover,.ql-bubble .ql-toolbar button:hover{color:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-fill,.ql-bubble.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:focus .ql-fill,.ql-bubble .ql-toolbar button:focus .ql-fill,.ql-bubble.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-bubble.ql-toolbar button:hover .ql-fill,.ql-bubble .ql-toolbar button:hover .ql-fill,.ql-bubble.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover .ql-stroke.ql-fill{fill:#fff}.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-bubble.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-bubble.ql-toolbar button.ql-active .ql-stroke,.ql-bubble .ql-toolbar button.ql-active .ql-stroke,.ql-bubble.ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble .ql-toolbar button.ql-active .ql-stroke-miter,.ql-bubble.ql-toolbar button:focus .ql-stroke,.ql-bubble .ql-toolbar button:focus .ql-stroke,.ql-bubble.ql-toolbar button:focus .ql-stroke-miter,.ql-bubble .ql-toolbar button:focus .ql-stroke-miter,.ql-bubble.ql-toolbar button:hover .ql-stroke,.ql-bubble .ql-toolbar button:hover .ql-stroke,.ql-bubble.ql-toolbar button:hover .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover .ql-stroke-miter{stroke:#fff}@media (pointer:coarse){.ql-bubble.ql-toolbar button:hover:not(.ql-active),.ql-bubble .ql-toolbar button:hover:not(.ql-active){color:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#ccc}.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-bubble.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-bubble .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#ccc}}.ql-bubble,.ql-bubble *{box-sizing:border-box}.ql-bubble .ql-hidden{display:none}.ql-bubble .ql-out-bottom,.ql-bubble .ql-out-top{visibility:hidden}.ql-bubble .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-bubble .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-bubble .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-bubble .ql-formats{display:inline-block;vertical-align:middle}.ql-bubble .ql-formats:after{clear:both;content:\"\";display:table}.ql-bubble .ql-stroke{fill:none;stroke:#ccc;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-bubble .ql-stroke-miter{fill:none;stroke:#ccc;stroke-miterlimit:10;stroke-width:2}.ql-bubble .ql-fill,.ql-bubble .ql-stroke.ql-fill{fill:#ccc}.ql-bubble .ql-empty{fill:none}.ql-bubble .ql-even{fill-rule:evenodd}.ql-bubble .ql-stroke.ql-thin,.ql-bubble .ql-thin{stroke-width:1}.ql-bubble .ql-transparent{opacity:.4}.ql-bubble .ql-direction svg:last-child{display:none}.ql-bubble .ql-direction.ql-active svg:last-child{display:inline}.ql-bubble .ql-direction.ql-active svg:first-child{display:none}.ql-bubble .ql-editor h1{font-size:2em}.ql-bubble .ql-editor h2{font-size:1.5em}.ql-bubble .ql-editor h3{font-size:1.17em}.ql-bubble .ql-editor h4{font-size:1em}.ql-bubble .ql-editor h5{font-size:.83em}.ql-bubble .ql-editor h6{font-size:.67em}.ql-bubble .ql-editor a{text-decoration:underline}.ql-bubble .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-bubble .ql-editor code,.ql-bubble .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-bubble .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-bubble .ql-editor code{font-size:85%;padding:2px 4px}.ql-bubble .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-bubble .ql-editor img{max-width:100%}.ql-bubble .ql-picker{color:#ccc;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-bubble .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-bubble .ql-picker-label:before{display:inline-block;line-height:22px}.ql-bubble .ql-picker-options{background-color:#444;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-bubble .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-bubble .ql-picker.ql-expanded .ql-picker-label{color:#777;z-index:2}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#777}.ql-bubble .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-bubble .ql-color-picker,.ql-bubble .ql-icon-picker{width:28px}.ql-bubble .ql-color-picker .ql-picker-label,.ql-bubble .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-label svg,.ql-bubble .ql-icon-picker .ql-picker-label svg{right:4px}.ql-bubble .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-bubble .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-bubble .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-bubble .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-bubble .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=\"\"]):before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=\"\"]):before{content:attr(data-label)}.ql-bubble .ql-picker.ql-header{width:98px}.ql-bubble .ql-picker.ql-header .ql-picker-item:before,.ql-bubble .ql-picker.ql-header .ql-picker-label:before{content:\"Normal\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"1\"]:before{content:\"Heading 1\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"2\"]:before{content:\"Heading 2\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"3\"]:before{content:\"Heading 3\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"4\"]:before{content:\"Heading 4\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"5\"]:before{content:\"Heading 5\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before,.ql-bubble .ql-picker.ql-header .ql-picker-label[data-value=\"6\"]:before{content:\"Heading 6\"}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"1\"]:before{font-size:2em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"2\"]:before{font-size:1.5em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"3\"]:before{font-size:1.17em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"4\"]:before{font-size:1em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"5\"]:before{font-size:.83em}.ql-bubble .ql-picker.ql-header .ql-picker-item[data-value=\"6\"]:before{font-size:.67em}.ql-bubble .ql-picker.ql-font{width:108px}.ql-bubble .ql-picker.ql-font .ql-picker-item:before,.ql-bubble .ql-picker.ql-font .ql-picker-label:before{content:\"Sans Serif\"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=serif]:before{content:\"Serif\"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before,.ql-bubble .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before{content:\"Monospace\"}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-bubble .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-bubble .ql-picker.ql-size{width:98px}.ql-bubble .ql-picker.ql-size .ql-picker-item:before,.ql-bubble .ql-picker.ql-size .ql-picker-label:before{content:\"Normal\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=small]:before{content:\"Small\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=large]:before{content:\"Large\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before,.ql-bubble .ql-picker.ql-size .ql-picker-label[data-value=huge]:before{content:\"Huge\"}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-bubble .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-bubble .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-bubble .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-bubble .ql-toolbar .ql-formats{margin:8px 12px 8px 0}.ql-bubble .ql-toolbar .ql-formats:first-child{margin-left:12px}.ql-bubble .ql-color-picker svg{margin:1px}.ql-bubble .ql-color-picker .ql-picker-item.ql-selected,.ql-bubble .ql-color-picker .ql-picker-item:hover{border-color:#fff}.ql-bubble .ql-tooltip{background-color:#444;border-radius:25px;color:#fff}.ql-bubble .ql-tooltip-arrow{border-left:6px solid transparent;border-right:6px solid transparent;content:\" \";display:block;left:50%;margin-left:-6px;position:absolute}.ql-bubble .ql-tooltip:not(.ql-flip) .ql-tooltip-arrow{border-bottom:6px solid #444;top:-6px}.ql-bubble .ql-tooltip.ql-flip .ql-tooltip-arrow{border-top:6px solid #444;bottom:-6px}.ql-bubble .ql-tooltip.ql-editing .ql-tooltip-editor{display:block}.ql-bubble .ql-tooltip.ql-editing .ql-formats{visibility:hidden}.ql-bubble .ql-tooltip-editor{display:none}.ql-bubble .ql-tooltip-editor input[type=text]{background:transparent;border:none;color:#fff;font-size:13px;height:100%;outline:none;padding:10px 20px;position:absolute;width:100%}.ql-bubble .ql-tooltip-editor a{top:10px;position:absolute;right:20px}.ql-bubble .ql-tooltip-editor a:before{color:#ccc;content:\"\u00D7\";font-size:16px;font-weight:700}.ql-container.ql-bubble:not(.ql-disabled) a{position:relative;white-space:nowrap}.ql-container.ql-bubble:not(.ql-disabled) a:before{background-color:#444;border-radius:15px;top:-5px;font-size:12px;color:#fff;content:attr(href);font-weight:400;overflow:hidden;padding:5px 15px;text-decoration:none;z-index:1}.ql-container.ql-bubble:not(.ql-disabled) a:after{border-top:6px solid #444;border-left:6px solid transparent;border-right:6px solid transparent;top:0;content:\" \";height:0;width:0}.ql-container.ql-bubble:not(.ql-disabled) a:after,.ql-container.ql-bubble:not(.ql-disabled) a:before{left:0;margin-left:50%;position:absolute;transform:translate(-50%,-100%);transition:visibility 0s ease .2s;visibility:hidden}.ql-container.ql-bubble:not(.ql-disabled) a:hover:after,.ql-container.ql-bubble:not(.ql-disabled) a:hover:before{visibility:visible}quill-editor{display:block;word-break:break-word}quill-editor .ql-container{font-family:inherit;font-size:inherit}quill-editor .ql-container .ql-editor{padding:0!important;line-height:inherit;font:inherit;overflow:visible}quill-editor .ql-placeholder .ql-picker-label:before{display:block;content:\"Tags\";min-width:50px}quill-editor .ql-placeholder.ql-expanded .ql-picker-item:before{content:attr(data-value);width:-moz-min-content;width:min-content}quill-editor .ql-tooltip{z-index:10;line-height:normal}quill-editor .ql-tooltip .ql-picker-options{max-height:300px;overflow:auto}quill-editor .ql-toolbar{width:600px;width:-moz-max-content;width:max-content}quill-editor h1,quill-editor h2,quill-editor h3,quill-editor h4,quill-editor h5,quill-editor h6{font-weight:inherit;line-height:inherit}"]
|
|
73
|
+
},] }
|
|
74
|
+
];
|
|
75
|
+
TextElementComponent.ctorParameters = () => [
|
|
76
|
+
{ type: PbUserRestApiService },
|
|
77
|
+
{ type: PbEmailObjectStoreService },
|
|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Q==
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024 Pobuca.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*/
|
|
5
|
+
import { __awaiter } from "tslib";
|
|
6
|
+
import { Component, HostBinding, ChangeDetectorRef } from '@angular/core';
|
|
7
|
+
import { createBorder, createPadding, createWidthHeight } from '../../utils';
|
|
8
|
+
import { PbUserImageUploaderService } from '../../services/user-image-uploader-service/user-image-uploader.service';
|
|
9
|
+
import { PbEmailBuilderService } from '../../pb-email-builder.service';
|
|
10
|
+
import { AbstractBlock } from '../abstract-block';
|
|
11
|
+
import { VideoThumbnailService } from '../../services/video-thumbnail.service';
|
|
12
|
+
import { Subject } from 'rxjs';
|
|
13
|
+
import { debounceTime, takeUntil } from 'rxjs/operators';
|
|
14
|
+
export class VideoComponent extends AbstractBlock {
|
|
15
|
+
constructor(imageUploader, chRef, ngb, videoThumbnailService) {
|
|
16
|
+
super();
|
|
17
|
+
this.imageUploader = imageUploader;
|
|
18
|
+
this.chRef = chRef;
|
|
19
|
+
this.ngb = ngb;
|
|
20
|
+
this.videoThumbnailService = videoThumbnailService;
|
|
21
|
+
this.defaultPosterWidth = {
|
|
22
|
+
value: 160,
|
|
23
|
+
unit: 'px',
|
|
24
|
+
auto: false
|
|
25
|
+
};
|
|
26
|
+
this.destroy$ = new Subject();
|
|
27
|
+
this.srcChange$ = new Subject();
|
|
28
|
+
this.previousSrc = '';
|
|
29
|
+
this.isGeneratingThumbnail = false;
|
|
30
|
+
}
|
|
31
|
+
get align() {
|
|
32
|
+
return this.block.options.align;
|
|
33
|
+
}
|
|
34
|
+
get src() {
|
|
35
|
+
return this.block.src || '';
|
|
36
|
+
}
|
|
37
|
+
get posterSrc() {
|
|
38
|
+
return (this.block.posterSrc || '').trim() || this.defaultPosterSrc;
|
|
39
|
+
}
|
|
40
|
+
get defaultPosterSrc() {
|
|
41
|
+
return `${this.ngb.config.apiPath}/images/placeholders/video-placeholder.png`;
|
|
42
|
+
}
|
|
43
|
+
get errorPosterSrc() {
|
|
44
|
+
return `${this.ngb.config.apiPath}/images/placeholders/error-placeholder.png`;
|
|
45
|
+
}
|
|
46
|
+
get videoUrl() {
|
|
47
|
+
return this.block.src || '';
|
|
48
|
+
}
|
|
49
|
+
ngOnInit() {
|
|
50
|
+
this.srcChange$
|
|
51
|
+
.pipe(debounceTime(500), takeUntil(this.destroy$))
|
|
52
|
+
.subscribe((url) => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
yield this.generateThumbnail(url);
|
|
54
|
+
}));
|
|
55
|
+
if (this.block.src) {
|
|
56
|
+
this.previousSrc = this.block.src;
|
|
57
|
+
this.srcChange$.next(this.block.src);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
ngDoCheck() {
|
|
61
|
+
// Detect changes to block.src from external sources (like settings panel)
|
|
62
|
+
if (this.block && this.block.src !== this.previousSrc) {
|
|
63
|
+
this.previousSrc = this.block.src || '';
|
|
64
|
+
this.srcChange$.next(this.previousSrc);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
ngOnDestroy() {
|
|
68
|
+
this.destroy$.next();
|
|
69
|
+
this.destroy$.complete();
|
|
70
|
+
}
|
|
71
|
+
onVideoUrlChange(url) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
this.block.src = url;
|
|
74
|
+
this.previousSrc = url;
|
|
75
|
+
this.srcChange$.next(url);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
generateThumbnail(url) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
if (!url) {
|
|
81
|
+
this.block.posterSrc = this.defaultPosterSrc;
|
|
82
|
+
this.chRef.markForCheck();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this.isGeneratingThumbnail = true;
|
|
86
|
+
this.chRef.markForCheck();
|
|
87
|
+
try {
|
|
88
|
+
const thumbnail = yield this.videoThumbnailService.generateThumbnail(url);
|
|
89
|
+
if (thumbnail) {
|
|
90
|
+
this.block.posterSrc = thumbnail;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
throw new Error('Failed to generate thumbnail');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
console.error('Error generating thumbnail:', error);
|
|
98
|
+
this.block.posterSrc = this.errorPosterSrc;
|
|
99
|
+
}
|
|
100
|
+
finally {
|
|
101
|
+
this.isGeneratingThumbnail = false;
|
|
102
|
+
this.chRef.markForCheck();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
uploadVideo() {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const src = yield this.imageUploader.browse$().toPromise();
|
|
109
|
+
if (src) {
|
|
110
|
+
this.block.src = src;
|
|
111
|
+
this.chRef.markForCheck();
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
uploadPoster() {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const src = yield this.imageUploader.browse$().toPromise();
|
|
118
|
+
if (src) {
|
|
119
|
+
this.block.posterSrc = src;
|
|
120
|
+
this.chRef.markForCheck();
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
getVideoStyles() {
|
|
125
|
+
const { border, width, height, padding } = this.block.options;
|
|
126
|
+
const hasPlaceholderPoster = !!(this.block.posterSrc || '').trim();
|
|
127
|
+
const posterWidth = hasPlaceholderPoster ? width : this.defaultPosterWidth;
|
|
128
|
+
return Object.assign(Object.assign({ width: createWidthHeight(posterWidth), height: createWidthHeight(height) }, createPadding(padding)), createBorder(border));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
VideoComponent.decorators = [
|
|
132
|
+
{ type: Component, args: [{
|
|
133
|
+
selector: 'pb-video',
|
|
134
|
+
template: "<!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n -->\n\n<a [href]=\"videoUrl || '#'\" [attr.target]=\"block.options.link?.target || '_blank'\"\n style=\"display: inline-block; text-decoration: none;\" [style.pointer-events]=\"ngb.Email ? 'none' : 'auto'\">\n <img [src]=\"posterSrc\" [title]=\"block.options.title\" [ngStyle]=\"getVideoStyles()\" alt=\"Video thumbnail\" />\n</a>",
|
|
135
|
+
styles: [":host{display:block;line-height:0}:host:hover .overflow{opacity:1}.overflow{position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.3);opacity:0;will-change:opacity;transition:opacity .3s cubic-bezier(.075,.82,.165,1);cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;font-size:3em}.overflow mat-icon{opacity:.8}img,video{max-width:100%;box-sizing:border-box}"]
|
|
136
|
+
},] }
|
|
137
|
+
];
|
|
138
|
+
VideoComponent.ctorParameters = () => [
|
|
139
|
+
{ type: PbUserImageUploaderService },
|
|
140
|
+
{ type: ChangeDetectorRef },
|
|
141
|
+
{ type: PbEmailBuilderService },
|
|
142
|
+
{ type: VideoThumbnailService }
|
|
143
|
+
];
|
|
144
|
+
VideoComponent.propDecorators = {
|
|
145
|
+
align: [{ type: HostBinding, args: ['style.textAlign',] }]
|
|
146
|
+
};
|
|
147
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmlkZW8uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvcGItZW1haWwtYnVpbGRlci9zcmMvbGliL2VsZW1lbnRzL3ZpZGVvL3ZpZGVvLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7O0FBRUgsT0FBTyxFQUFFLFNBQVMsRUFBUyxXQUFXLEVBQUUsaUJBQWlCLEVBQThCLE1BQU0sZUFBZSxDQUFDO0FBRTdHLE9BQU8sRUFBRSxZQ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