@pobuca/email-builder 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/placeholders/error.svg +1 -0
- package/assets/placeholders/image.svg +1 -0
- package/assets/placeholders/small-image.svg +1 -0
- package/assets/placeholders/video.svg +1 -0
- package/bundles/pobuca-email-builder.umd.js +517 -53
- 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 +5 -4
- package/esm2015/lib/classes/Elements.js +50 -2
- package/esm2015/lib/components/block-settings/block-settings.component.js +2 -2
- package/esm2015/lib/directives/dynamic-component.directive.js +3 -1
- package/esm2015/lib/elements/image/image.component.js +2 -2
- package/esm2015/lib/elements/video/video.component.js +135 -0
- package/esm2015/lib/groups/font-styles.js +20 -5
- package/esm2015/lib/interfaces/interfaces.js +1 -1
- package/esm2015/lib/pb-email-builder.component.js +13 -1
- package/esm2015/lib/pb-email-builder.module.js +7 -2
- package/esm2015/lib/services/internals/pb-email-object-store/pb-email-object-store.service.js +12 -2
- package/esm2015/lib/services/user-rest-api-service/user-rest-api.service.js +15 -1
- package/esm2015/lib/services/video-thumbnail.service.js +142 -0
- package/esm2015/lib/tokens/tokens.js +3 -2
- package/esm2015/pobuca-email-builder.js +31 -29
- package/fesm2015/pobuca-email-builder.js +376 -13
- package/fesm2015/pobuca-email-builder.js.map +1 -1
- package/lib/classes/DefaultEmail.d.ts +4 -3
- package/lib/classes/Elements.d.ts +13 -3
- package/lib/elements/video/video.component.d.ts +34 -0
- package/lib/groups/font-styles.d.ts +4 -0
- package/lib/interfaces/interfaces.d.ts +20 -0
- package/lib/pb-email-builder.component.d.ts +1 -1
- package/lib/services/user-rest-api-service/user-rest-api.service.d.ts +13 -0
- package/lib/services/video-thumbnail.service.d.ts +23 -0
- package/package.json +8 -3
- package/pobuca-email-builder.d.ts +30 -28
- package/pobuca-email-builder.metadata.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/drag-drop'), require('@angular/common/http'), require('@angular/material/snack-bar'), require('@angular/material/dialog'), require('@angular/material/bottom-sheet'), require('@angular/platform-browser'), require('@angular/flex-layout'), require('@angular/material/button'), require('@angular/material/button-toggle'), require('@angular/material/divider'), require('@angular/material/expansion'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/material/input'), require('@angular/material/list'), require('@angular/material/menu'), require('@angular/material/progress-bar'), require('@angular/material/select'), require('@angular/material/sidenav'), require('@angular/material/slide-toggle'), require('@angular/material/slider'), require('@angular/material/tabs'), require('@angular/material/toolbar'), require('@angular/material/tooltip'), require('angular-resizable-element'), require('@angular/forms'), require('@angular/common'), require('@angular/cdk/scrolling'), require('quill'), require('ngx-quill'), require('ngx-color/chrome'), require('@angular/cdk/portal'), require('@angular/localize/init')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@pobuca/email-builder', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/cdk/drag-drop', '@angular/common/http', '@angular/material/snack-bar', '@angular/material/dialog', '@angular/material/bottom-sheet', '@angular/platform-browser', '@angular/flex-layout', '@angular/material/button', '@angular/material/button-toggle', '@angular/material/divider', '@angular/material/expansion', '@angular/material/form-field', '@angular/material/icon', '@angular/material/input', '@angular/material/list', '@angular/material/menu', '@angular/material/progress-bar', '@angular/material/select', '@angular/material/sidenav', '@angular/material/slide-toggle', '@angular/material/slider', '@angular/material/tabs', '@angular/material/toolbar', '@angular/material/tooltip', 'angular-resizable-element', '@angular/forms', '@angular/common', '@angular/cdk/scrolling', 'quill', 'ngx-quill', 'ngx-color/chrome', '@angular/cdk/portal', '@angular/localize/init'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.pobuca = global.pobuca || {}, global.pobuca["email-builder"] = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.ng.cdk.dragDrop, global.ng.common.http, global.ng.material.snackBar, global.ng.material.dialog, global.ng.material.bottomSheet, global.ng.platformBrowser, global.ng.flexLayout, global.ng.material.button, global.ng.material.buttonToggle, global.ng.material.divider, global.ng.material.expansion, global.ng.material.formField, global.ng.material.icon, global.ng.material.input, global.ng.material.list, global.ng.material.menu, global.ng.material.progressBar, global.ng.material.select, global.ng.material.sidenav, global.ng.material.slideToggle, global.ng.material.slider, global.ng.material.tabs, global.ng.material.toolbar, global.ng.material.tooltip, global.angularResizableElement, global.ng.forms, global.ng.common, global.ng.cdk.scrolling, null, global.ng.quill, global.ng.color.chrome, global.ng.cdk.portal));
|
|
5
|
-
})(this, (function (exports, i0, rxjs, operators, dragDrop,
|
|
5
|
+
})(this, (function (exports, i0, rxjs, operators, dragDrop, i1, snackBar, dialog, bottomSheet, platformBrowser, flexLayout, button, buttonToggle, divider, expansion, formField, icon, input, list, menu, progressBar, select, sidenav, slideToggle, slider, tabs, toolbar, tooltip, angularResizableElement, forms, common, scrolling, quill, ngxQuill, chrome, portal) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
26
27
|
|
|
27
28
|
/*
|
|
28
29
|
* Copyright (c) 2024 Pobuca.
|
|
@@ -815,7 +816,7 @@
|
|
|
815
816
|
}());
|
|
816
817
|
var ImageBlock = /** @class */ (function () {
|
|
817
818
|
function ImageBlock(src, options, state) {
|
|
818
|
-
if (src === void 0) { src = '
|
|
819
|
+
if (src === void 0) { src = 'assets/placeholders/small-image.svg'; }
|
|
819
820
|
if (state === void 0) { state = {
|
|
820
821
|
disabled: false,
|
|
821
822
|
message: ''
|
|
@@ -861,6 +862,59 @@
|
|
|
861
862
|
}
|
|
862
863
|
return ImageBlock;
|
|
863
864
|
}());
|
|
865
|
+
var VideoBlock = /** @class */ (function () {
|
|
866
|
+
function VideoBlock(src, posterSrc, options, state) {
|
|
867
|
+
if (src === void 0) { src = ''; }
|
|
868
|
+
if (posterSrc === void 0) { posterSrc = ''; }
|
|
869
|
+
if (options === void 0) { options = {
|
|
870
|
+
border: {
|
|
871
|
+
color: '#000000',
|
|
872
|
+
style: 'solid',
|
|
873
|
+
width: 0,
|
|
874
|
+
radius: 0
|
|
875
|
+
}
|
|
876
|
+
}; }
|
|
877
|
+
if (state === void 0) { state = {
|
|
878
|
+
disabled: false,
|
|
879
|
+
message: ''
|
|
880
|
+
}; }
|
|
881
|
+
this.src = src;
|
|
882
|
+
this.posterSrc = posterSrc;
|
|
883
|
+
this.state = state;
|
|
884
|
+
this.type = 'video';
|
|
885
|
+
this.icon = 'videocam';
|
|
886
|
+
this.options = {
|
|
887
|
+
border: {
|
|
888
|
+
color: '#000000',
|
|
889
|
+
style: 'solid',
|
|
890
|
+
width: 0,
|
|
891
|
+
radius: 0
|
|
892
|
+
},
|
|
893
|
+
width: {
|
|
894
|
+
value: 100,
|
|
895
|
+
unit: 'px',
|
|
896
|
+
auto: true,
|
|
897
|
+
units: ['px']
|
|
898
|
+
},
|
|
899
|
+
height: {
|
|
900
|
+
value: 100,
|
|
901
|
+
unit: 'px',
|
|
902
|
+
auto: true,
|
|
903
|
+
units: ['px']
|
|
904
|
+
},
|
|
905
|
+
align: 'center',
|
|
906
|
+
padding: {
|
|
907
|
+
top: 10,
|
|
908
|
+
right: 25,
|
|
909
|
+
bottom: 10,
|
|
910
|
+
left: 25
|
|
911
|
+
}
|
|
912
|
+
};
|
|
913
|
+
this.title = $localize(templateObject_3$7 || (templateObject_3$7 = __makeTemplateObject([":@@video_block:Video"], [":@@video_block:Video"])));
|
|
914
|
+
this.options = defaultsDeep(options, this.options);
|
|
915
|
+
}
|
|
916
|
+
return VideoBlock;
|
|
917
|
+
}());
|
|
864
918
|
var ButtonBlock = /** @class */ (function () {
|
|
865
919
|
function ButtonBlock(innerText, options, state) {
|
|
866
920
|
if (innerText === void 0) { innerText = 'Click on me'; }
|
|
@@ -912,7 +966,7 @@
|
|
|
912
966
|
left: 25
|
|
913
967
|
}
|
|
914
968
|
};
|
|
915
|
-
this.title = $localize(
|
|
969
|
+
this.title = $localize(templateObject_4$6 || (templateObject_4$6 = __makeTemplateObject([":@@button_block:Button"], [":@@button_block:Button"])));
|
|
916
970
|
this.options = defaultsDeep(options, this.options);
|
|
917
971
|
}
|
|
918
972
|
return ButtonBlock;
|
|
@@ -939,7 +993,7 @@
|
|
|
939
993
|
left: 25
|
|
940
994
|
}
|
|
941
995
|
};
|
|
942
|
-
this.title = $localize(
|
|
996
|
+
this.title = $localize(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject([":@@divider_block:Divider"], [":@@divider_block:Divider"])));
|
|
943
997
|
this.options = defaultsDeep(options, this.options);
|
|
944
998
|
}
|
|
945
999
|
return DividerBlock;
|
|
@@ -953,7 +1007,7 @@
|
|
|
953
1007
|
this.state = state;
|
|
954
1008
|
this.type = 'spacer';
|
|
955
1009
|
this.icon = 'vertical_align_center';
|
|
956
|
-
this.title = $localize(
|
|
1010
|
+
this.title = $localize(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject([":@@spacer_block:Spacer"], [":@@spacer_block:Spacer"])));
|
|
957
1011
|
this.options = {
|
|
958
1012
|
height: {
|
|
959
1013
|
value: 20,
|
|
@@ -977,7 +1031,7 @@
|
|
|
977
1031
|
this.state = state;
|
|
978
1032
|
this.type = 'social';
|
|
979
1033
|
this.icon = 'share';
|
|
980
|
-
this.title = $localize(
|
|
1034
|
+
this.title = $localize(templateObject_7 || (templateObject_7 = __makeTemplateObject([":@@share_block:Social"], [":@@share_block:Social"])));
|
|
981
1035
|
this.options = {
|
|
982
1036
|
align: 'center',
|
|
983
1037
|
mode: 'horizontal',
|
|
@@ -1014,7 +1068,7 @@
|
|
|
1014
1068
|
}
|
|
1015
1069
|
return SocialBlock;
|
|
1016
1070
|
}());
|
|
1017
|
-
var templateObject_1$8, templateObject_2$8, templateObject_3$7, templateObject_4$6, templateObject_5$3, templateObject_6$2;
|
|
1071
|
+
var templateObject_1$8, templateObject_2$8, templateObject_3$7, templateObject_4$6, templateObject_5$3, templateObject_6$2, templateObject_7;
|
|
1018
1072
|
|
|
1019
1073
|
/*
|
|
1020
1074
|
* Copyright (c) 2024 Pobuca.
|
|
@@ -1126,6 +1180,7 @@
|
|
|
1126
1180
|
var PB_DEFAULT_BLOCKS = [
|
|
1127
1181
|
new TextBlock(),
|
|
1128
1182
|
new ImageBlock(),
|
|
1183
|
+
new VideoBlock(),
|
|
1129
1184
|
new ButtonBlock(),
|
|
1130
1185
|
new DividerBlock(),
|
|
1131
1186
|
new SpacerBlock(),
|
|
@@ -1178,7 +1233,7 @@
|
|
|
1178
1233
|
*/
|
|
1179
1234
|
// import { Structure } from './Structure';
|
|
1180
1235
|
var Defaults = /** @class */ (function () {
|
|
1181
|
-
function Defaults(structures, general) {
|
|
1236
|
+
function Defaults(structures, general, customFonts) {
|
|
1182
1237
|
if (structures === void 0) { structures = []; }
|
|
1183
1238
|
if (general === void 0) { general = {
|
|
1184
1239
|
name: '',
|
|
@@ -1217,16 +1272,18 @@
|
|
|
1217
1272
|
}
|
|
1218
1273
|
}
|
|
1219
1274
|
}; }
|
|
1275
|
+
if (customFonts === void 0) { customFonts = []; }
|
|
1220
1276
|
this.structures = structures;
|
|
1221
1277
|
this.general = general;
|
|
1278
|
+
this.customFonts = customFonts;
|
|
1222
1279
|
}
|
|
1223
1280
|
return Defaults;
|
|
1224
1281
|
}());
|
|
1225
1282
|
var PBEmail = /** @class */ (function (_super) {
|
|
1226
1283
|
__extends(PBEmail, _super);
|
|
1227
1284
|
function PBEmail(_a) {
|
|
1228
|
-
var _b = _a === void 0 ? {} : _a, structures = _b.structures, general = _b.general;
|
|
1229
|
-
return _super.call(this, structures, general) || this;
|
|
1285
|
+
var _b = _a === void 0 ? {} : _a, structures = _b.structures, general = _b.general, customFonts = _b.customFonts;
|
|
1286
|
+
return _super.call(this, structures, general, customFonts) || this;
|
|
1230
1287
|
}
|
|
1231
1288
|
return PBEmail;
|
|
1232
1289
|
}(Defaults));
|
|
@@ -1522,6 +1579,20 @@
|
|
|
1522
1579
|
PbUserRestApiService.prototype.getUserImages$ = function () {
|
|
1523
1580
|
return deferOf([]);
|
|
1524
1581
|
};
|
|
1582
|
+
/**
|
|
1583
|
+
* Upload a base64 encoded image to the server.
|
|
1584
|
+
*
|
|
1585
|
+
* @param base64Image The base64 encoded image data (including the data URI prefix).
|
|
1586
|
+
* @param folderPath The folder path where the image should be stored.
|
|
1587
|
+
* @param uploadImageAPI The API endpoint for uploading base64 images.
|
|
1588
|
+
*/
|
|
1589
|
+
PbUserRestApiService.prototype.userImageUploadBase64$ = function (base64Image, folderPath) {
|
|
1590
|
+
var uploadImageAPI = '';
|
|
1591
|
+
return this.http.post(uploadImageAPI, {
|
|
1592
|
+
folderPath: folderPath,
|
|
1593
|
+
imageBase64: base64Image
|
|
1594
|
+
});
|
|
1595
|
+
};
|
|
1525
1596
|
/**
|
|
1526
1597
|
* Rewrite the default request which converts PBEmail to HTML, if you have a paid License,
|
|
1527
1598
|
* this method allows you to rewrite the default Convertor API Path to yours.
|
|
@@ -1541,7 +1612,7 @@
|
|
|
1541
1612
|
{ type: i0.Injectable }
|
|
1542
1613
|
];
|
|
1543
1614
|
PbUserRestApiService.ctorParameters = function () { return [
|
|
1544
|
-
{ type:
|
|
1615
|
+
{ type: i1.HttpClient }
|
|
1545
1616
|
]; };
|
|
1546
1617
|
|
|
1547
1618
|
/*
|
|
@@ -1679,6 +1750,16 @@
|
|
|
1679
1750
|
}).join('\n');
|
|
1680
1751
|
throw new Error(error);
|
|
1681
1752
|
}
|
|
1753
|
+
// Post-process HTML to include custom fonts
|
|
1754
|
+
if (email.customFonts && email.customFonts.length) {
|
|
1755
|
+
var customFontLinks = email.customFonts
|
|
1756
|
+
.filter(function (font) { return font.url; })
|
|
1757
|
+
.map(function (font) { return "<link href=\"" + font.url + "\" rel=\"stylesheet\" type=\"text/css\">"; })
|
|
1758
|
+
.join('\n');
|
|
1759
|
+
if (customFontLinks && res.html.includes('</head>')) {
|
|
1760
|
+
res.html = res.html.replace('</head>', customFontLinks + "\n</head>");
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1682
1763
|
_this._Mjml$.next(res.mjml);
|
|
1683
1764
|
_this._Template$.next(res.html);
|
|
1684
1765
|
_this.clonedEmail = cloneDeep(_this.Email);
|
|
@@ -1698,7 +1779,7 @@
|
|
|
1698
1779
|
this.pbStorage.addTemplateToLatestUsed(cloneDeep({
|
|
1699
1780
|
templateData: this.Email,
|
|
1700
1781
|
title: 'last-edited',
|
|
1701
|
-
thumbPath: '
|
|
1782
|
+
thumbPath: 'assets/placeholders/image.svg'
|
|
1702
1783
|
}));
|
|
1703
1784
|
}
|
|
1704
1785
|
// console.log(getDiff(this.clonedEmail, this.Email));
|
|
@@ -2240,11 +2321,11 @@
|
|
|
2240
2321
|
return rxjs.EMPTY;
|
|
2241
2322
|
})); }), operators.finalize(function () { return _this.progress.complete(); }))
|
|
2242
2323
|
.subscribe(function (event) {
|
|
2243
|
-
if (event.type ===
|
|
2324
|
+
if (event.type === i1.HttpEventType.UploadProgress) {
|
|
2244
2325
|
var percentDone = Math.round((100 * event.loaded) / event.total);
|
|
2245
2326
|
_this.progress.next(percentDone);
|
|
2246
2327
|
}
|
|
2247
|
-
else if (event instanceof
|
|
2328
|
+
else if (event instanceof i1.HttpResponse) {
|
|
2248
2329
|
if (!event.body.success) {
|
|
2249
2330
|
_this.userInterface.notify(event.body.message, 'Dismiss', null);
|
|
2250
2331
|
}
|
|
@@ -2378,11 +2459,11 @@
|
|
|
2378
2459
|
return rxjs.EMPTY;
|
|
2379
2460
|
})); }))
|
|
2380
2461
|
.subscribe(function (event) {
|
|
2381
|
-
if (event.type ===
|
|
2462
|
+
if (event.type === i1.HttpEventType.UploadProgress) {
|
|
2382
2463
|
// const percentDone = Math.round((100 * event.loaded) / event.total);
|
|
2383
2464
|
// this.progress.next(percentDone);
|
|
2384
2465
|
}
|
|
2385
|
-
else if (event instanceof
|
|
2466
|
+
else if (event instanceof i1.HttpResponse) {
|
|
2386
2467
|
if (!event.body.success) {
|
|
2387
2468
|
_this.userInterface.notify(event.body.message, 'Dismiss', null);
|
|
2388
2469
|
}
|
|
@@ -2854,6 +2935,18 @@
|
|
|
2854
2935
|
(_a = _this.onTouched) === null || _a === void 0 ? void 0 : _a.call(_this);
|
|
2855
2936
|
(_b = _this.onChange) === null || _b === void 0 ? void 0 : _b.call(_this, email);
|
|
2856
2937
|
_this.emailChange.next(email);
|
|
2938
|
+
if (_this.doc && (email === null || email === void 0 ? void 0 : email.customFonts)) {
|
|
2939
|
+
email.customFonts.forEach(function (font) {
|
|
2940
|
+
var existing = Array.from(_this.includedFonts).find(function (link) { return link.href === font.url; });
|
|
2941
|
+
if (!existing) {
|
|
2942
|
+
var link = _this.doc.createElement('link');
|
|
2943
|
+
link.href = font.url;
|
|
2944
|
+
link.rel = 'stylesheet';
|
|
2945
|
+
_this.includedFonts.add(link);
|
|
2946
|
+
_this.doc.head.appendChild(link);
|
|
2947
|
+
}
|
|
2948
|
+
});
|
|
2949
|
+
}
|
|
2857
2950
|
});
|
|
2858
2951
|
};
|
|
2859
2952
|
PbEmailBuilderComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -3036,7 +3129,7 @@
|
|
|
3036
3129
|
});
|
|
3037
3130
|
Object.defineProperty(ImageComponent.prototype, "src", {
|
|
3038
3131
|
get: function () {
|
|
3039
|
-
return this.block.src || '
|
|
3132
|
+
return this.block.src || 'assets/placeholders/image.svg';
|
|
3040
3133
|
},
|
|
3041
3134
|
enumerable: false,
|
|
3042
3135
|
configurable: true
|
|
@@ -3080,6 +3173,344 @@
|
|
|
3080
3173
|
align: [{ type: i0.HostBinding, args: ['style.textAlign',] }]
|
|
3081
3174
|
};
|
|
3082
3175
|
|
|
3176
|
+
var VideoThumbnailService = /** @class */ (function () {
|
|
3177
|
+
function VideoThumbnailService(http, pbUserRestApiService) {
|
|
3178
|
+
this.http = http;
|
|
3179
|
+
this.pbUserRestApiService = pbUserRestApiService;
|
|
3180
|
+
// SVG play button overlays
|
|
3181
|
+
this.YOUTUBE_OVERLAY = "data:image/svg+xml;base64," + btoa("\n <svg width=\"200\" height=\"140\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect x=\"0\" y=\"0\" width=\"200\" height=\"140\" rx=\"20\" fill=\"red\" fill-opacity=\"0.9\"/>\n <polygon points=\"75,45 75,95 130,70\" fill=\"white\"/>\n </svg>");
|
|
3182
|
+
this.VIMEO_OVERLAY = "data:image/svg+xml;base64," + btoa("\n <svg width=\"200\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"100\" cy=\"100\" r=\"90\" fill=\"#00ADEF\" fill-opacity=\"0.9\"/>\n <polygon points=\"80,65 80,135 140,100\" fill=\"white\"/>\n </svg>");
|
|
3183
|
+
}
|
|
3184
|
+
/**
|
|
3185
|
+
* Parse video URL to extract platform and video ID
|
|
3186
|
+
*/
|
|
3187
|
+
VideoThumbnailService.prototype.parseVideoUrl = function (url) {
|
|
3188
|
+
if (!url)
|
|
3189
|
+
return null;
|
|
3190
|
+
// YouTube patterns
|
|
3191
|
+
var ytRegex = /(?:youtu\.be\/|youtube\.com\/(?:watch\?v=|embed\/|v\/|shorts\/))([^\?&"'>]+)/;
|
|
3192
|
+
var ytMatch = url.match(ytRegex);
|
|
3193
|
+
if (ytMatch) {
|
|
3194
|
+
return { type: 'youtube', id: ytMatch[1] };
|
|
3195
|
+
}
|
|
3196
|
+
// Vimeo patterns
|
|
3197
|
+
var vimeoRegex = /(?:vimeo\.com\/|player\.vimeo\.com\/video\/)([0-9]+)/;
|
|
3198
|
+
var vimeoMatch = url.match(vimeoRegex);
|
|
3199
|
+
if (vimeoMatch) {
|
|
3200
|
+
return { type: 'vimeo', id: vimeoMatch[1] };
|
|
3201
|
+
}
|
|
3202
|
+
return null;
|
|
3203
|
+
};
|
|
3204
|
+
VideoThumbnailService.prototype.getYouTubeThumbnail = function (videoId) {
|
|
3205
|
+
return "https://img.youtube.com/vi/" + videoId + "/mqdefault.jpg";
|
|
3206
|
+
};
|
|
3207
|
+
VideoThumbnailService.prototype.getVimeoThumbnail = function (url) {
|
|
3208
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3209
|
+
var response, error_1;
|
|
3210
|
+
return __generator(this, function (_b) {
|
|
3211
|
+
switch (_b.label) {
|
|
3212
|
+
case 0:
|
|
3213
|
+
_b.trys.push([0, 2, , 3]);
|
|
3214
|
+
return [4 /*yield*/, this.http.get("https://vimeo.com/api/oembed.json?url=" + encodeURIComponent(url) + "&width=1280").toPromise()];
|
|
3215
|
+
case 1:
|
|
3216
|
+
response = _b.sent();
|
|
3217
|
+
return [2 /*return*/, (response === null || response === void 0 ? void 0 : response.thumbnail_url) || null];
|
|
3218
|
+
case 2:
|
|
3219
|
+
error_1 = _b.sent();
|
|
3220
|
+
console.error('Error fetching Vimeo thumbnail:', error_1);
|
|
3221
|
+
return [2 /*return*/, null];
|
|
3222
|
+
case 3: return [2 /*return*/];
|
|
3223
|
+
}
|
|
3224
|
+
});
|
|
3225
|
+
});
|
|
3226
|
+
};
|
|
3227
|
+
VideoThumbnailService.prototype.loadImage = function (src) {
|
|
3228
|
+
return new Promise(function (resolve, reject) {
|
|
3229
|
+
var img = new Image();
|
|
3230
|
+
img.crossOrigin = 'anonymous';
|
|
3231
|
+
img.onload = function () { return resolve(img); };
|
|
3232
|
+
img.onerror = reject;
|
|
3233
|
+
img.src = src;
|
|
3234
|
+
});
|
|
3235
|
+
};
|
|
3236
|
+
VideoThumbnailService.prototype.compositeImages = function (thumbnailUrl, platform) {
|
|
3237
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3238
|
+
var baseImg, overlaySource, overlayImg, canvas, ctx, scale, overlayWidth, overlayHeight, x, y, error_2;
|
|
3239
|
+
return __generator(this, function (_b) {
|
|
3240
|
+
switch (_b.label) {
|
|
3241
|
+
case 0:
|
|
3242
|
+
_b.trys.push([0, 3, , 4]);
|
|
3243
|
+
return [4 /*yield*/, this.loadImage(thumbnailUrl)];
|
|
3244
|
+
case 1:
|
|
3245
|
+
baseImg = _b.sent();
|
|
3246
|
+
overlaySource = platform === 'youtube' ? this.YOUTUBE_OVERLAY : this.VIMEO_OVERLAY;
|
|
3247
|
+
return [4 /*yield*/, this.loadImage(overlaySource)];
|
|
3248
|
+
case 2:
|
|
3249
|
+
overlayImg = _b.sent();
|
|
3250
|
+
canvas = document.createElement('canvas');
|
|
3251
|
+
ctx = canvas.getContext('2d');
|
|
3252
|
+
if (!ctx) {
|
|
3253
|
+
throw new Error('Could not get canvas context');
|
|
3254
|
+
}
|
|
3255
|
+
canvas.width = baseImg.width;
|
|
3256
|
+
canvas.height = baseImg.height;
|
|
3257
|
+
ctx.drawImage(baseImg, 0, 0);
|
|
3258
|
+
scale = Math.min(canvas.width / overlayImg.width, canvas.height / overlayImg.height) * 0.25;
|
|
3259
|
+
overlayWidth = overlayImg.width * scale;
|
|
3260
|
+
overlayHeight = overlayImg.height * scale;
|
|
3261
|
+
x = (canvas.width - overlayWidth) / 2;
|
|
3262
|
+
y = (canvas.height - overlayHeight) / 2;
|
|
3263
|
+
ctx.drawImage(overlayImg, x, y, overlayWidth, overlayHeight);
|
|
3264
|
+
return [2 /*return*/, canvas.toDataURL('image/png')];
|
|
3265
|
+
case 3:
|
|
3266
|
+
error_2 = _b.sent();
|
|
3267
|
+
console.error('Error compositing images:', error_2);
|
|
3268
|
+
return [2 /*return*/, thumbnailUrl];
|
|
3269
|
+
case 4: return [2 /*return*/];
|
|
3270
|
+
}
|
|
3271
|
+
});
|
|
3272
|
+
});
|
|
3273
|
+
};
|
|
3274
|
+
VideoThumbnailService.prototype.generateThumbnail = function (videoUrl) {
|
|
3275
|
+
var _a;
|
|
3276
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3277
|
+
var videoInfo, thumbnailUrl, compositeBase64, uploadResponse, error_3;
|
|
3278
|
+
return __generator(this, function (_b) {
|
|
3279
|
+
switch (_b.label) {
|
|
3280
|
+
case 0:
|
|
3281
|
+
videoInfo = this.parseVideoUrl(videoUrl);
|
|
3282
|
+
if (!videoInfo) {
|
|
3283
|
+
return [2 /*return*/, null];
|
|
3284
|
+
}
|
|
3285
|
+
thumbnailUrl = null;
|
|
3286
|
+
if (!(videoInfo.type === 'youtube')) return [3 /*break*/, 1];
|
|
3287
|
+
thumbnailUrl = this.getYouTubeThumbnail(videoInfo.id);
|
|
3288
|
+
return [3 /*break*/, 3];
|
|
3289
|
+
case 1:
|
|
3290
|
+
if (!(videoInfo.type === 'vimeo')) return [3 /*break*/, 3];
|
|
3291
|
+
return [4 /*yield*/, this.getVimeoThumbnail(videoUrl)];
|
|
3292
|
+
case 2:
|
|
3293
|
+
thumbnailUrl = _b.sent();
|
|
3294
|
+
_b.label = 3;
|
|
3295
|
+
case 3:
|
|
3296
|
+
if (!thumbnailUrl) {
|
|
3297
|
+
return [2 /*return*/, null];
|
|
3298
|
+
}
|
|
3299
|
+
return [4 /*yield*/, this.compositeImages(thumbnailUrl, videoInfo.type)];
|
|
3300
|
+
case 4:
|
|
3301
|
+
compositeBase64 = _b.sent();
|
|
3302
|
+
_b.label = 5;
|
|
3303
|
+
case 5:
|
|
3304
|
+
_b.trys.push([5, 7, , 8]);
|
|
3305
|
+
return [4 /*yield*/, this.pbUserRestApiService.userImageUploadBase64$(compositeBase64, 'thumbnails').toPromise()];
|
|
3306
|
+
case 6:
|
|
3307
|
+
uploadResponse = _b.sent();
|
|
3308
|
+
if ((uploadResponse === null || uploadResponse === void 0 ? void 0 : uploadResponse.succeeded) && ((_a = uploadResponse.result) === null || _a === void 0 ? void 0 : _a.url)) {
|
|
3309
|
+
return [2 /*return*/, uploadResponse.result.url];
|
|
3310
|
+
}
|
|
3311
|
+
return [2 /*return*/, null];
|
|
3312
|
+
case 7:
|
|
3313
|
+
error_3 = _b.sent();
|
|
3314
|
+
console.error('Error uploading video thumbnail:', error_3);
|
|
3315
|
+
return [2 /*return*/, null];
|
|
3316
|
+
case 8: return [2 /*return*/];
|
|
3317
|
+
}
|
|
3318
|
+
});
|
|
3319
|
+
});
|
|
3320
|
+
};
|
|
3321
|
+
return VideoThumbnailService;
|
|
3322
|
+
}());
|
|
3323
|
+
VideoThumbnailService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function VideoThumbnailService_Factory() { return new VideoThumbnailService(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(PbUserRestApiService)); }, token: VideoThumbnailService, providedIn: "root" });
|
|
3324
|
+
VideoThumbnailService.decorators = [
|
|
3325
|
+
{ type: i0.Injectable, args: [{
|
|
3326
|
+
providedIn: 'root'
|
|
3327
|
+
},] }
|
|
3328
|
+
];
|
|
3329
|
+
VideoThumbnailService.ctorParameters = function () { return [
|
|
3330
|
+
{ type: i1.HttpClient },
|
|
3331
|
+
{ type: PbUserRestApiService }
|
|
3332
|
+
]; };
|
|
3333
|
+
|
|
3334
|
+
var VideoComponent = /** @class */ (function (_super) {
|
|
3335
|
+
__extends(VideoComponent, _super);
|
|
3336
|
+
function VideoComponent(imageUploader, chRef, ngb, videoThumbnailService) {
|
|
3337
|
+
var _this = _super.call(this) || this;
|
|
3338
|
+
_this.imageUploader = imageUploader;
|
|
3339
|
+
_this.chRef = chRef;
|
|
3340
|
+
_this.ngb = ngb;
|
|
3341
|
+
_this.videoThumbnailService = videoThumbnailService;
|
|
3342
|
+
_this.destroy$ = new rxjs.Subject();
|
|
3343
|
+
_this.srcChange$ = new rxjs.Subject();
|
|
3344
|
+
_this.previousSrc = '';
|
|
3345
|
+
_this.defaultPosterSrc = 'assets/placeholders/video.svg';
|
|
3346
|
+
_this.isGeneratingThumbnail = false;
|
|
3347
|
+
return _this;
|
|
3348
|
+
}
|
|
3349
|
+
Object.defineProperty(VideoComponent.prototype, "align", {
|
|
3350
|
+
get: function () {
|
|
3351
|
+
return this.block.options.align;
|
|
3352
|
+
},
|
|
3353
|
+
enumerable: false,
|
|
3354
|
+
configurable: true
|
|
3355
|
+
});
|
|
3356
|
+
Object.defineProperty(VideoComponent.prototype, "src", {
|
|
3357
|
+
get: function () {
|
|
3358
|
+
return this.block.src || '';
|
|
3359
|
+
},
|
|
3360
|
+
enumerable: false,
|
|
3361
|
+
configurable: true
|
|
3362
|
+
});
|
|
3363
|
+
Object.defineProperty(VideoComponent.prototype, "posterSrc", {
|
|
3364
|
+
get: function () {
|
|
3365
|
+
return (this.block.posterSrc || '').trim() || this.defaultPosterSrc;
|
|
3366
|
+
},
|
|
3367
|
+
enumerable: false,
|
|
3368
|
+
configurable: true
|
|
3369
|
+
});
|
|
3370
|
+
Object.defineProperty(VideoComponent.prototype, "videoUrl", {
|
|
3371
|
+
get: function () {
|
|
3372
|
+
return this.block.src || '';
|
|
3373
|
+
},
|
|
3374
|
+
enumerable: false,
|
|
3375
|
+
configurable: true
|
|
3376
|
+
});
|
|
3377
|
+
VideoComponent.prototype.ngOnInit = function () {
|
|
3378
|
+
var _this = this;
|
|
3379
|
+
this.srcChange$
|
|
3380
|
+
.pipe(operators.debounceTime(500), operators.takeUntil(this.destroy$))
|
|
3381
|
+
.subscribe(function (url) { return __awaiter(_this, void 0, void 0, function () {
|
|
3382
|
+
return __generator(this, function (_a) {
|
|
3383
|
+
switch (_a.label) {
|
|
3384
|
+
case 0: return [4 /*yield*/, this.generateThumbnail(url)];
|
|
3385
|
+
case 1:
|
|
3386
|
+
_a.sent();
|
|
3387
|
+
return [2 /*return*/];
|
|
3388
|
+
}
|
|
3389
|
+
});
|
|
3390
|
+
}); });
|
|
3391
|
+
if (this.block.src) {
|
|
3392
|
+
this.previousSrc = this.block.src;
|
|
3393
|
+
this.srcChange$.next(this.block.src);
|
|
3394
|
+
}
|
|
3395
|
+
};
|
|
3396
|
+
VideoComponent.prototype.ngDoCheck = function () {
|
|
3397
|
+
// Detect changes to block.src from external sources (like settings panel)
|
|
3398
|
+
if (this.block && this.block.src !== this.previousSrc) {
|
|
3399
|
+
this.previousSrc = this.block.src || '';
|
|
3400
|
+
this.srcChange$.next(this.previousSrc);
|
|
3401
|
+
}
|
|
3402
|
+
};
|
|
3403
|
+
VideoComponent.prototype.ngOnDestroy = function () {
|
|
3404
|
+
this.destroy$.next();
|
|
3405
|
+
this.destroy$.complete();
|
|
3406
|
+
};
|
|
3407
|
+
VideoComponent.prototype.onVideoUrlChange = function (url) {
|
|
3408
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3409
|
+
return __generator(this, function (_a) {
|
|
3410
|
+
this.block.src = url;
|
|
3411
|
+
this.previousSrc = url;
|
|
3412
|
+
this.srcChange$.next(url);
|
|
3413
|
+
return [2 /*return*/];
|
|
3414
|
+
});
|
|
3415
|
+
});
|
|
3416
|
+
};
|
|
3417
|
+
VideoComponent.prototype.generateThumbnail = function (url) {
|
|
3418
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3419
|
+
var thumbnail, error_1;
|
|
3420
|
+
return __generator(this, function (_a) {
|
|
3421
|
+
switch (_a.label) {
|
|
3422
|
+
case 0:
|
|
3423
|
+
if (!url) {
|
|
3424
|
+
this.block.posterSrc = this.defaultPosterSrc;
|
|
3425
|
+
this.chRef.markForCheck();
|
|
3426
|
+
return [2 /*return*/];
|
|
3427
|
+
}
|
|
3428
|
+
this.isGeneratingThumbnail = true;
|
|
3429
|
+
this.chRef.markForCheck();
|
|
3430
|
+
_a.label = 1;
|
|
3431
|
+
case 1:
|
|
3432
|
+
_a.trys.push([1, 3, 4, 5]);
|
|
3433
|
+
return [4 /*yield*/, this.videoThumbnailService.generateThumbnail(url)];
|
|
3434
|
+
case 2:
|
|
3435
|
+
thumbnail = _a.sent();
|
|
3436
|
+
if (thumbnail) {
|
|
3437
|
+
this.block.posterSrc = thumbnail;
|
|
3438
|
+
}
|
|
3439
|
+
else {
|
|
3440
|
+
throw new Error('Failed to generate thumbnail');
|
|
3441
|
+
}
|
|
3442
|
+
return [3 /*break*/, 5];
|
|
3443
|
+
case 3:
|
|
3444
|
+
error_1 = _a.sent();
|
|
3445
|
+
console.error('Error generating thumbnail:', error_1);
|
|
3446
|
+
this.block.posterSrc = 'assets/placeholders/error.svg';
|
|
3447
|
+
return [3 /*break*/, 5];
|
|
3448
|
+
case 4:
|
|
3449
|
+
this.isGeneratingThumbnail = false;
|
|
3450
|
+
this.chRef.markForCheck();
|
|
3451
|
+
return [7 /*endfinally*/];
|
|
3452
|
+
case 5: return [2 /*return*/];
|
|
3453
|
+
}
|
|
3454
|
+
});
|
|
3455
|
+
});
|
|
3456
|
+
};
|
|
3457
|
+
VideoComponent.prototype.uploadVideo = function () {
|
|
3458
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3459
|
+
var src;
|
|
3460
|
+
return __generator(this, function (_a) {
|
|
3461
|
+
switch (_a.label) {
|
|
3462
|
+
case 0: return [4 /*yield*/, this.imageUploader.browse$().toPromise()];
|
|
3463
|
+
case 1:
|
|
3464
|
+
src = _a.sent();
|
|
3465
|
+
if (src) {
|
|
3466
|
+
this.block.src = src;
|
|
3467
|
+
this.chRef.markForCheck();
|
|
3468
|
+
}
|
|
3469
|
+
return [2 /*return*/];
|
|
3470
|
+
}
|
|
3471
|
+
});
|
|
3472
|
+
});
|
|
3473
|
+
};
|
|
3474
|
+
VideoComponent.prototype.uploadPoster = function () {
|
|
3475
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3476
|
+
var src;
|
|
3477
|
+
return __generator(this, function (_a) {
|
|
3478
|
+
switch (_a.label) {
|
|
3479
|
+
case 0: return [4 /*yield*/, this.imageUploader.browse$().toPromise()];
|
|
3480
|
+
case 1:
|
|
3481
|
+
src = _a.sent();
|
|
3482
|
+
if (src) {
|
|
3483
|
+
this.block.posterSrc = src;
|
|
3484
|
+
this.chRef.markForCheck();
|
|
3485
|
+
}
|
|
3486
|
+
return [2 /*return*/];
|
|
3487
|
+
}
|
|
3488
|
+
});
|
|
3489
|
+
});
|
|
3490
|
+
};
|
|
3491
|
+
VideoComponent.prototype.getVideoStyles = function () {
|
|
3492
|
+
var _a = this.block.options, border = _a.border, width = _a.width, height = _a.height, padding = _a.padding;
|
|
3493
|
+
return Object.assign(Object.assign({ width: createWidthHeight(width), height: createWidthHeight(height) }, createPadding(padding)), createBorder(border));
|
|
3494
|
+
};
|
|
3495
|
+
return VideoComponent;
|
|
3496
|
+
}(AbstractBlock));
|
|
3497
|
+
VideoComponent.decorators = [
|
|
3498
|
+
{ type: i0.Component, args: [{
|
|
3499
|
+
selector: 'pb-video',
|
|
3500
|
+
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>",
|
|
3501
|
+
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}"]
|
|
3502
|
+
},] }
|
|
3503
|
+
];
|
|
3504
|
+
VideoComponent.ctorParameters = function () { return [
|
|
3505
|
+
{ type: PbUserImageUploaderService },
|
|
3506
|
+
{ type: i0.ChangeDetectorRef },
|
|
3507
|
+
{ type: PbEmailBuilderService },
|
|
3508
|
+
{ type: VideoThumbnailService }
|
|
3509
|
+
]; };
|
|
3510
|
+
VideoComponent.propDecorators = {
|
|
3511
|
+
align: [{ type: i0.HostBinding, args: ['style.textAlign',] }]
|
|
3512
|
+
};
|
|
3513
|
+
|
|
3083
3514
|
var ButtonComponent = /** @class */ (function (_super) {
|
|
3084
3515
|
__extends(ButtonComponent, _super);
|
|
3085
3516
|
function ButtonComponent() {
|
|
@@ -3212,6 +3643,7 @@
|
|
|
3212
3643
|
this.viewContainerRef = viewContainerRef;
|
|
3213
3644
|
cStore.set('text', TextElementComponent);
|
|
3214
3645
|
cStore.set('image', ImageComponent);
|
|
3646
|
+
cStore.set('video', VideoComponent);
|
|
3215
3647
|
cStore.set('button', ButtonComponent);
|
|
3216
3648
|
cStore.set('divider', DividerComponent);
|
|
3217
3649
|
cStore.set('spacer', SpacerComponent);
|
|
@@ -3373,9 +3805,32 @@
|
|
|
3373
3805
|
enumerable: false,
|
|
3374
3806
|
configurable: true
|
|
3375
3807
|
});
|
|
3808
|
+
Object.defineProperty(FontStylesComponent.prototype, "customFonts", {
|
|
3809
|
+
get: function () {
|
|
3810
|
+
return (this.pbEmailObject.Email.customFonts || []).map(function (f) { return f.family; });
|
|
3811
|
+
},
|
|
3812
|
+
enumerable: false,
|
|
3813
|
+
configurable: true
|
|
3814
|
+
});
|
|
3815
|
+
Object.defineProperty(FontStylesComponent.prototype, "customStack", {
|
|
3816
|
+
get: function () {
|
|
3817
|
+
return this.customFonts.join(', ');
|
|
3818
|
+
},
|
|
3819
|
+
enumerable: false,
|
|
3820
|
+
configurable: true
|
|
3821
|
+
});
|
|
3376
3822
|
Object.defineProperty(FontStylesComponent.prototype, "fontFamilyList", {
|
|
3377
3823
|
get: function () {
|
|
3378
|
-
|
|
3824
|
+
var stack = this.customStack;
|
|
3825
|
+
return __spread((stack ? [stack] : []), this.fontsMap.keys(), this.fallbackFonts);
|
|
3826
|
+
},
|
|
3827
|
+
enumerable: false,
|
|
3828
|
+
configurable: true
|
|
3829
|
+
});
|
|
3830
|
+
Object.defineProperty(FontStylesComponent.prototype, "fallbackFontChoices", {
|
|
3831
|
+
get: function () {
|
|
3832
|
+
var stack = this.customStack;
|
|
3833
|
+
return __spread((stack ? [stack] : []), this.fallbackFonts);
|
|
3379
3834
|
},
|
|
3380
3835
|
enumerable: false,
|
|
3381
3836
|
configurable: true
|
|
@@ -3390,6 +3845,9 @@
|
|
|
3390
3845
|
FontStylesComponent.prototype.markForCheck = function () {
|
|
3391
3846
|
this.pbEmailObject.markForCheck();
|
|
3392
3847
|
};
|
|
3848
|
+
FontStylesComponent.prototype.isCustomFont = function () {
|
|
3849
|
+
return this.customFonts.includes(this.font.family);
|
|
3850
|
+
};
|
|
3393
3851
|
FontStylesComponent.prototype.isGoogleFont = function () {
|
|
3394
3852
|
return this.fontsMap.has(this.font.family);
|
|
3395
3853
|
};
|
|
@@ -3405,7 +3863,7 @@
|
|
|
3405
3863
|
FontStylesComponent.decorators = [
|
|
3406
3864
|
{ type: i0.Component, args: [{
|
|
3407
3865
|
selector: 'pb-font-styles',
|
|
3408
|
-
template: "\n <div class=\"group two\">\n <mat-form-field appearance=\"outline\" *ngIf=\"hasProperty('family')\">\n <mat-label i18n=\"settings|Font Family\">Family</mat-label>\n <mat-select [(value)]=\"font.family\" disableRipple (selectionChange)=\"markForCheck()\">\n <mat-option *ngFor=\"let name of fontFamilyList\" [ngStyle]=\"{ fontFamily: name }\" [value]=\"name\">\n {{ name }}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"isGoogleFont()\" i18n=\"settings|Partial support\">Partial support.</mat-hint>\n <mat-hint *ngIf=\"!isGoogleFont()\" i18n=\"settings|Full support\">Full support.</mat-hint>\n </mat-form-field>\n <mat-form-field appearance=\"outline\" *ngIf=\"hasProperty('fallback')\">\n <mat-label i18n=\"settings|Font Fallback\">Fallback</mat-label>\n <mat-select [(value)]=\"font.fallback\" [disabled]=\"!isGoogleFont()\" disableRipple (selectionChange)=\"markForCheck()\">\n <mat-option *ngFor=\"let name of
|
|
3866
|
+
template: "\n <div class=\"group two\">\n <mat-form-field appearance=\"outline\" *ngIf=\"hasProperty('family')\">\n <mat-label i18n=\"settings|Font Family\">Family</mat-label>\n <mat-select [(value)]=\"font.family\" disableRipple (selectionChange)=\"markForCheck()\">\n <mat-option *ngFor=\"let name of fontFamilyList\" [ngStyle]=\"{ fontFamily: name }\" [value]=\"name\">\n {{ name }}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"isGoogleFont()\" i18n=\"settings|Partial support\">Partial support.</mat-hint>\n <mat-hint *ngIf=\"isCustomFont()\" i18n=\"settings|Custom font\">Custom font.</mat-hint>\n <mat-hint *ngIf=\"!isGoogleFont() && !isCustomFont()\" i18n=\"settings|Full support\">Full support.</mat-hint>\n </mat-form-field>\n <mat-form-field appearance=\"outline\" *ngIf=\"hasProperty('fallback')\">\n <mat-label i18n=\"settings|Font Fallback\">Fallback</mat-label>\n <mat-select [(value)]=\"font.fallback\" [disabled]=\"!isGoogleFont() && !isCustomFont()\" disableRipple (selectionChange)=\"markForCheck()\">\n <mat-option *ngFor=\"let name of fallbackFontChoices\" [ngStyle]=\"{ fontFamily: name }\" [value]=\"name\">\n {{ name }}\n </mat-option>\n </mat-select>\n <mat-hint i18n=\"settings|Full support\">Full support.</mat-hint>\n </mat-form-field>\n </div>\n\n <div class=\"group three\">\n <mat-form-field appearance=\"outline\" *ngIf=\"hasProperty('size')\">\n <mat-label i18n=\"settings|Font Size\">Size</mat-label>\n <input matInput type=\"number\" max=\"30\" min=\"10\" step=\"1\" (input)=\"markForCheck()\" [(ngModel)]=\"font.size\" />\n </mat-form-field>\n <mat-form-field appearance=\"outline\" *ngIf=\"hasProperty('weight')\">\n <mat-label i18n=\"settings|Font Weight\">Weight</mat-label>\n <mat-select placeholder=\"Weight\" [(value)]=\"font.weight\" disableRipple (selectionChange)=\"markForCheck()\">\n <mat-option *ngFor=\"let weight of fontWeightList\" [value]=\"weight\">\n {{ weight }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field appearance=\"outline\" style=\"min-width: 90px;\">\n <mat-label i18n=\"settings|Font Style\">Style</mat-label>\n <mat-select placeholder=\"Style\" [(value)]=\"font.style\" disableRipple (selectionChange)=\"markForCheck()\">\n <mat-option *ngFor=\"let style of styles\" [value]=\"style\" i18n>\n {{ getStyleLabel(style) }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n ",
|
|
3409
3867
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3410
3868
|
styles: ["\n :host {\n display: block;\n width: 100%;\n }\n "]
|
|
3411
3869
|
},] }
|
|
@@ -4087,7 +4545,7 @@
|
|
|
4087
4545
|
BlockSettingsComponent.decorators = [
|
|
4088
4546
|
{ type: i0.Component, args: [{
|
|
4089
4547
|
selector: 'pb-block-settings',
|
|
4090
|
-
template: "<!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n -->\n\n<ng-container *ngIf=\"block$ | async as currentBlock\">\n <mat-accordion>\n <mat-expansion-panel expanded *ngIf=\"hasProperty(currentBlock.options, 'font')\">\n <mat-expansion-panel-header i18n=\"settings|Font\">\n Font\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]=\"currentBlock.options\" key=\"color\"></pb-color>\n <pb-font-styles [font]=\"currentBlock.options.font\"></pb-font-styles>\n <pb-line-height *ngIf=\"currentBlock.type !== 'social'\" [lineHeight]=\"currentBlock.options.lineHeight\">\n </pb-line-height>\n </ng-template>\n </mat-expansion-panel>\n\n <ng-container *ngIf=\"currentBlock.type === 'image'\">\n <mat-expansion-panel expanded>\n <mat-expansion-panel-header i18n=\"settings|Image\">\n Image\n </mat-expansion-panel-header>\n <pb-image-upload [block]=\"currentBlock\"></pb-image-upload>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Image Attributes\">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"group f-large\">\n <mat-form-field appearance=\"outline\">\n <mat-label i18n=\"settings|Image Alt\">Alt</mat-label>\n <input matInput [(ngModel)]=\"currentBlock.options.title\" type=\"text\" i18n-placeholder\n placeholder=\"settings|Image Alt\" (input)=\"markForCheck()\" />\n </mat-form-field>\n <pb-align [model]=\"currentBlock.options\"></pb-align>\n </div>\n <pb-link [link]=\"currentBlock.options.link\"></pb-link>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <ng-container *ngIf=\"currentBlock.type === 'button'\">\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Button Text\">\n Button Text\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <mat-form-field appearance=\"outline\" style=\"width: 100%\">\n <mat-label i18n=\"settings|Button Text\">Button Text</mat-label>\n <input matInput [(ngModel)]=\"currentBlock.innerText\" type=\"text\" i18n-placeholder\n placeholder=\"settings|Button Text\" (input)=\"markForCheck()\" />\n </mat-form-field>\n </ng-template>\n </mat-expansion-panel>\n\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Background\">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]=\"currentBlock.options\"></pb-color>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Button Attributes\">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"group two\" style=\"padding-bottom: 0\">\n <pb-align [model]=\"currentBlock.options\" [disabled]=\"currentBlock.options.fullWidth\"></pb-align>\n <mat-slide-toggle style=\"margin-top: -24px\" [(ngModel)]=\"currentBlock.options.fullWidth\"\n (change)=\"markForCheck()\">\n <ng-container i18n=\"settings|Button Full Width\">Full Width</ng-container>\n </mat-slide-toggle>\n </div>\n <pb-link [link]=\"currentBlock.options.link\"></pb-link>\n <pb-padding [padding]=\"currentBlock.options.innerPadding\"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <mat-expansion-panel [expanded]=\"currentBlock.type === 'spacer'\"\n *ngIf=\"hasProperty(currentBlock.options, 'width') || hasProperty(currentBlock.options, 'height')\">\n <mat-expansion-panel-header i18n=\"settings|Sizes\">\n Sizes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-width-height *ngIf=\"hasProperty(currentBlock.options, 'width')\" [model]=\"currentBlock.options.width\"\n label=\"width\"></pb-width-height>\n <pb-width-height *ngIf=\"hasProperty(currentBlock.options, 'height')\" [model]=\"currentBlock.options.height\"\n label=\"height\"></pb-width-height>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngIf=\"hasProperty(currentBlock.options, 'background')\">\n <mat-expansion-panel-header i18n=\"settings|Background\">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]=\"currentBlock.options.background\"></pb-color>\n </ng-template>\n backgroundColor\n </mat-expansion-panel>\n\n <mat-expansion-panel [expanded]=\"currentBlock.type === 'divider'\"\n *ngIf=\"hasProperty(currentBlock.options, 'border')\">\n <mat-expansion-panel-header>\n <ng-container i18n=\"settings|Divider Styles\" *ngIf=\"currentBlock.type === 'divider'\">Styles</ng-container>\n <ng-container i18n=\"settings|Border\" *ngIf=\"currentBlock.type !== 'divider'\">Border</ng-container>\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-border [border]=\"currentBlock.options.border\"></pb-border>\n </ng-template>\n </mat-expansion-panel>\n\n <ng-container *ngIf=\"currentBlock.type === 'social'\">\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Icons\">\n Icons\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <mat-form-field appearance=\"outline\" style=\"width: 100%\">\n <mat-label i18n=\"settings|Add new Network\">Add new Network</mat-label>\n <mat-select (selectionChange)=\"addSocialNetwork($event, currentBlock)\" [disabled]=\"!socialNetworks.length\">\n <mat-option style=\"text-transform: capitalize\" *ngFor=\"let link of socialNetworks(currentBlock)\"\n [value]=\"link\">\n {{ link }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel class=\"networks-list\" *ngFor=\"let network of currentBlock.networks\">\n <mat-expansion-panel-header style=\"text-transform: capitalize\">\n <img [class]=\"network.name\" [src]=\"getSocialIcon(network.name)\" [alt]=\"network.name\" />\n {{ network.name }}\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"networks-list-item\">\n <div class=\"item-info\">\n <mat-form-field matLine appearance=\"outline\">\n <mat-label i18n=\"settings|Social Network Label\">Label</mat-label>\n <input matInput autocomplete=\"off\" [(ngModel)]=\"network.label\"\n i18n-placeholder=\"settings|Social Network Label\" placeholder=\"Label\" type=\"text\"\n (input)=\"markForCheck()\" />\n </mat-form-field>\n <button mat-stroked-button color=\"warn\" (click)=\"removeSocialNetwork(network, currentBlock)\">\n <mat-icon>delete_forever</mat-icon>\n </button>\n </div>\n <mat-form-field matLine appearance=\"outline\">\n <mat-label style=\"text-transform: capitalize\">\n {{ network.name }} <ng-container i18n=\"settings|Social Network Link\">Link</ng-container>\n </mat-label>\n <input autocomplete=\"off\" matInput [(ngModel)]=\"network.href\" type=\"url\" (input)=\"markForCheck()\" />\n </mat-form-field>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Social Styles\">\n Styles\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"group two\" style=\"padding-bottom: 0\">\n <mat-form-field appearance=\"outline\">\n <mat-label i18n=\"settings|Social Model\">Mode</mat-label>\n <mat-select (selectionChange)=\"markForCheck()\" i18n-placeholder=\"settings|Social Model\" placeholder=\"Mode\"\n [(value)]=\"currentBlock.options.mode\" disableRipple>\n <mat-option *ngFor=\"let mode of ['horizontal', 'vertical']\" [value]=\"mode\">\n {{ mode }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <pb-align [model]=\"currentBlock.options\"></pb-align>\n </div>\n <pb-line-height [units]=\"['px']\" [lineHeight]=\"currentBlock.options.iconSize\" label=\"Icon Size\">\n </pb-line-height>\n <pb-padding [padding]=\"currentBlock.options.innerPadding\"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <mat-expansion-panel *ngIf=\"hasProperty(currentBlock.options, 'padding')\">\n <mat-expansion-panel-header i18n=\"settings|Padding\">\n Padding\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-padding [padding]=\"currentBlock.options.padding\"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </mat-accordion>\n</ng-container>\n",
|
|
4548
|
+
template: "<!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n -->\n\n<ng-container *ngIf=\"block$ | async as currentBlock\">\n <mat-accordion>\n <mat-expansion-panel expanded *ngIf=\"hasProperty(currentBlock.options, 'font')\">\n <mat-expansion-panel-header i18n=\"settings|Font\">\n Font\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]=\"currentBlock.options\" key=\"color\"></pb-color>\n <pb-font-styles [font]=\"currentBlock.options.font\"></pb-font-styles>\n <pb-line-height *ngIf=\"currentBlock.type !== 'social'\" [lineHeight]=\"currentBlock.options.lineHeight\">\n </pb-line-height>\n </ng-template>\n </mat-expansion-panel>\n\n <ng-container *ngIf=\"currentBlock.type === 'image'\">\n <mat-expansion-panel expanded>\n <mat-expansion-panel-header i18n=\"settings|Image\">\n Image\n </mat-expansion-panel-header>\n <pb-image-upload [block]=\"currentBlock\"></pb-image-upload>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Image Attributes\">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"group f-large\">\n <mat-form-field appearance=\"outline\">\n <mat-label i18n=\"settings|Image Alt\">Alt</mat-label>\n <input matInput [(ngModel)]=\"currentBlock.options.title\" type=\"text\" i18n-placeholder\n placeholder=\"settings|Image Alt\" (input)=\"markForCheck()\" />\n </mat-form-field>\n <pb-align [model]=\"currentBlock.options\"></pb-align>\n </div>\n <pb-link [link]=\"currentBlock.options.link\"></pb-link>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <ng-container *ngIf=\"currentBlock.type === 'video'\">\n <mat-expansion-panel expanded>\n <mat-expansion-panel-header i18n=\"settings|Video\">\n Video URL\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"group\" style=\"grid-template-columns: 1fr;\">\n <mat-form-field appearance=\"outline\" style=\"width: 100%\">\n <mat-label i18n=\"settings|Video URL\">Video URL (YouTube or Vimeo)</mat-label>\n <input matInput [(ngModel)]=\"currentBlock.src\" type=\"url\" i18n-placeholder\n placeholder=\"settings|Video URL\" (input)=\"markForCheck()\" />\n <mat-hint i18n=\"settings|Video URL Hint\">Thumbnail with play button will be auto-generated</mat-hint>\n </mat-form-field>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Video Attributes\">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"group f-large\">\n <mat-form-field appearance=\"outline\">\n <mat-label i18n=\"settings|Video Alt\">Alt Text</mat-label>\n <input matInput [(ngModel)]=\"currentBlock.options.title\" type=\"text\" i18n-placeholder\n placeholder=\"settings|Video Alt\" (input)=\"markForCheck()\" />\n </mat-form-field>\n <pb-align [model]=\"currentBlock.options\"></pb-align>\n </div>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <ng-container *ngIf=\"currentBlock.type === 'button'\">\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Button Text\">\n Button Text\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <mat-form-field appearance=\"outline\" style=\"width: 100%\">\n <mat-label i18n=\"settings|Button Text\">Button Text</mat-label>\n <input matInput [(ngModel)]=\"currentBlock.innerText\" type=\"text\" i18n-placeholder\n placeholder=\"settings|Button Text\" (input)=\"markForCheck()\" />\n </mat-form-field>\n </ng-template>\n </mat-expansion-panel>\n\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Background\">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]=\"currentBlock.options\"></pb-color>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Button Attributes\">\n Attributes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"group two\" style=\"padding-bottom: 0\">\n <pb-align [model]=\"currentBlock.options\" [disabled]=\"currentBlock.options.fullWidth\"></pb-align>\n <mat-slide-toggle style=\"margin-top: -24px\" [(ngModel)]=\"currentBlock.options.fullWidth\"\n (change)=\"markForCheck()\">\n <ng-container i18n=\"settings|Button Full Width\">Full Width</ng-container>\n </mat-slide-toggle>\n </div>\n <pb-link [link]=\"currentBlock.options.link\"></pb-link>\n <pb-padding [padding]=\"currentBlock.options.innerPadding\"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <mat-expansion-panel [expanded]=\"currentBlock.type === 'spacer'\"\n *ngIf=\"hasProperty(currentBlock.options, 'width') || hasProperty(currentBlock.options, 'height')\">\n <mat-expansion-panel-header i18n=\"settings|Sizes\">\n Sizes\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-width-height *ngIf=\"hasProperty(currentBlock.options, 'width')\" [model]=\"currentBlock.options.width\"\n label=\"width\"></pb-width-height>\n <pb-width-height *ngIf=\"hasProperty(currentBlock.options, 'height')\" [model]=\"currentBlock.options.height\"\n label=\"height\"></pb-width-height>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel *ngIf=\"hasProperty(currentBlock.options, 'background')\">\n <mat-expansion-panel-header i18n=\"settings|Background\">\n Background\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-color [options]=\"currentBlock.options.background\"></pb-color>\n </ng-template>\n backgroundColor\n </mat-expansion-panel>\n\n <mat-expansion-panel [expanded]=\"currentBlock.type === 'divider'\"\n *ngIf=\"hasProperty(currentBlock.options, 'border')\">\n <mat-expansion-panel-header>\n <ng-container i18n=\"settings|Divider Styles\" *ngIf=\"currentBlock.type === 'divider'\">Styles</ng-container>\n <ng-container i18n=\"settings|Border\" *ngIf=\"currentBlock.type !== 'divider'\">Border</ng-container>\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-border [border]=\"currentBlock.options.border\"></pb-border>\n </ng-template>\n </mat-expansion-panel>\n\n <ng-container *ngIf=\"currentBlock.type === 'social'\">\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Icons\">\n Icons\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <mat-form-field appearance=\"outline\" style=\"width: 100%\">\n <mat-label i18n=\"settings|Add new Network\">Add new Network</mat-label>\n <mat-select (selectionChange)=\"addSocialNetwork($event, currentBlock)\" [disabled]=\"!socialNetworks.length\">\n <mat-option style=\"text-transform: capitalize\" *ngFor=\"let link of socialNetworks(currentBlock)\"\n [value]=\"link\">\n {{ link }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel class=\"networks-list\" *ngFor=\"let network of currentBlock.networks\">\n <mat-expansion-panel-header style=\"text-transform: capitalize\">\n <img [class]=\"network.name\" [src]=\"getSocialIcon(network.name)\" [alt]=\"network.name\" />\n {{ network.name }}\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"networks-list-item\">\n <div class=\"item-info\">\n <mat-form-field matLine appearance=\"outline\">\n <mat-label i18n=\"settings|Social Network Label\">Label</mat-label>\n <input matInput autocomplete=\"off\" [(ngModel)]=\"network.label\"\n i18n-placeholder=\"settings|Social Network Label\" placeholder=\"Label\" type=\"text\"\n (input)=\"markForCheck()\" />\n </mat-form-field>\n <button mat-stroked-button color=\"warn\" (click)=\"removeSocialNetwork(network, currentBlock)\">\n <mat-icon>delete_forever</mat-icon>\n </button>\n </div>\n <mat-form-field matLine appearance=\"outline\">\n <mat-label style=\"text-transform: capitalize\">\n {{ network.name }} <ng-container i18n=\"settings|Social Network Link\">Link</ng-container>\n </mat-label>\n <input autocomplete=\"off\" matInput [(ngModel)]=\"network.href\" type=\"url\" (input)=\"markForCheck()\" />\n </mat-form-field>\n </div>\n </ng-template>\n </mat-expansion-panel>\n\n <mat-expansion-panel>\n <mat-expansion-panel-header i18n=\"settings|Social Styles\">\n Styles\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <div class=\"group two\" style=\"padding-bottom: 0\">\n <mat-form-field appearance=\"outline\">\n <mat-label i18n=\"settings|Social Model\">Mode</mat-label>\n <mat-select (selectionChange)=\"markForCheck()\" i18n-placeholder=\"settings|Social Model\" placeholder=\"Mode\"\n [(value)]=\"currentBlock.options.mode\" disableRipple>\n <mat-option *ngFor=\"let mode of ['horizontal', 'vertical']\" [value]=\"mode\">\n {{ mode }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <pb-align [model]=\"currentBlock.options\"></pb-align>\n </div>\n <pb-line-height [units]=\"['px']\" [lineHeight]=\"currentBlock.options.iconSize\" label=\"Icon Size\">\n </pb-line-height>\n <pb-padding [padding]=\"currentBlock.options.innerPadding\"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </ng-container>\n\n <mat-expansion-panel *ngIf=\"hasProperty(currentBlock.options, 'padding')\">\n <mat-expansion-panel-header i18n=\"settings|Padding\">\n Padding\n </mat-expansion-panel-header>\n <ng-template matExpansionPanelContent>\n <pb-padding [padding]=\"currentBlock.options.padding\"></pb-padding>\n </ng-template>\n </mat-expansion-panel>\n </mat-accordion>\n</ng-container>",
|
|
4091
4549
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
4092
4550
|
encapsulation: i0.ViewEncapsulation.None,
|
|
4093
4551
|
styles: ["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */.networks-list mat-expansion-panel-header .mat-content{place-items:center}.networks-list mat-expansion-panel-header img{width:20px;margin:0 .5rem 0 0;border-radius:3px;background-color:#000}.networks-list-item{width:100%;display:grid;row-gap:.5rem}.networks-list-item .item-info{display:grid;grid-template-columns:2fr 1fr;-moz-column-gap:.5rem;column-gap:.5rem}.networks-list-item .item-info button{align-self:baseline;margin:.25rem 0;height:50px}.networks-list-item .item-info ::ng-deep .mat-form-field-wrapper{padding-bottom:0;margin-bottom:0}"]
|
|
@@ -4274,7 +4732,7 @@
|
|
|
4274
4732
|
responseType: 'json'
|
|
4275
4733
|
}))
|
|
4276
4734
|
.pipe(operators.tap(function (res) {
|
|
4277
|
-
if (res.type ===
|
|
4735
|
+
if (res.type === i1.HttpEventType.Response) {
|
|
4278
4736
|
notify_1.dismiss();
|
|
4279
4737
|
}
|
|
4280
4738
|
}));
|
|
@@ -4446,7 +4904,7 @@
|
|
|
4446
4904
|
{
|
|
4447
4905
|
provide: PbUserRestApiService,
|
|
4448
4906
|
useFactory: createCustomRestApiService,
|
|
4449
|
-
deps: [
|
|
4907
|
+
deps: [i1.HttpClient]
|
|
4450
4908
|
}
|
|
4451
4909
|
]
|
|
4452
4910
|
};
|
|
@@ -4457,7 +4915,7 @@
|
|
|
4457
4915
|
{ type: i0.NgModule, args: [{
|
|
4458
4916
|
imports: [
|
|
4459
4917
|
common.CommonModule,
|
|
4460
|
-
|
|
4918
|
+
i1.HttpClientModule,
|
|
4461
4919
|
ngxQuill.QuillModule,
|
|
4462
4920
|
flexLayout.FlexLayoutModule,
|
|
4463
4921
|
dragDrop.DragDropModule,
|
|
@@ -4496,6 +4954,7 @@
|
|
|
4496
4954
|
PreviewTemplateComponent,
|
|
4497
4955
|
TextElementComponent,
|
|
4498
4956
|
ImageComponent,
|
|
4957
|
+
VideoComponent,
|
|
4499
4958
|
ButtonComponent,
|
|
4500
4959
|
DividerComponent,
|
|
4501
4960
|
SpacerComponent,
|
|
@@ -4528,6 +4987,7 @@
|
|
|
4528
4987
|
entryComponents: [
|
|
4529
4988
|
TextElementComponent,
|
|
4530
4989
|
ImageComponent,
|
|
4990
|
+
VideoComponent,
|
|
4531
4991
|
ButtonComponent,
|
|
4532
4992
|
DividerComponent,
|
|
4533
4993
|
SpacerComponent,
|
|
@@ -4543,11 +5003,12 @@
|
|
|
4543
5003
|
provide: ngxQuill.QUILL_CONFIG_TOKEN,
|
|
4544
5004
|
useValue: ɵ0
|
|
4545
5005
|
},
|
|
4546
|
-
{ provide:
|
|
5006
|
+
{ provide: i1.HTTP_INTERCEPTORS, useClass: IpInterceptorInterceptor, multi: true },
|
|
4547
5007
|
// { provide: PB_BLOCK_ELEMENT, useClass: TextBlock, multi: true },
|
|
4548
5008
|
PbEmailBuilderService,
|
|
4549
5009
|
PbEmailObjectStoreService,
|
|
4550
|
-
PbUserInterfaceService
|
|
5010
|
+
PbUserInterfaceService,
|
|
5011
|
+
VideoThumbnailService
|
|
4551
5012
|
]
|
|
4552
5013
|
},] }
|
|
4553
5014
|
];
|
|
@@ -4600,6 +5061,7 @@
|
|
|
4600
5061
|
exports.SpacerBlock = SpacerBlock;
|
|
4601
5062
|
exports.Structure = Structure;
|
|
4602
5063
|
exports.TextBlock = TextBlock;
|
|
5064
|
+
exports.VideoBlock = VideoBlock;
|
|
4603
5065
|
exports.bytesToSize = bytesToSize;
|
|
4604
5066
|
exports.cloneDeep = cloneDeep;
|
|
4605
5067
|
exports.createBackground = createBackground;
|
|
@@ -4621,18 +5083,20 @@
|
|
|
4621
5083
|
exports["ɵ0"] = ɵ0;
|
|
4622
5084
|
exports["ɵa"] = PbEmailObjectStoreService;
|
|
4623
5085
|
exports["ɵb"] = PbUserInterfaceService;
|
|
4624
|
-
exports["ɵba"] =
|
|
4625
|
-
exports["ɵbb"] =
|
|
4626
|
-
exports["ɵbc"] =
|
|
4627
|
-
exports["ɵbd"] =
|
|
4628
|
-
exports["ɵbe"] =
|
|
4629
|
-
exports["ɵbf"] =
|
|
4630
|
-
exports["ɵbg"] =
|
|
4631
|
-
exports["ɵbh"] =
|
|
4632
|
-
exports["ɵbi"] =
|
|
4633
|
-
exports["ɵbj"] =
|
|
4634
|
-
exports["ɵbk"] =
|
|
4635
|
-
exports["ɵbl"] =
|
|
5086
|
+
exports["ɵba"] = AlignComponent;
|
|
5087
|
+
exports["ɵbb"] = DirectionComponent;
|
|
5088
|
+
exports["ɵbc"] = BackRepatComponent;
|
|
5089
|
+
exports["ɵbd"] = ConfirmDialogComponent;
|
|
5090
|
+
exports["ɵbe"] = ImageUploadComponent;
|
|
5091
|
+
exports["ɵbf"] = BlockSettingsComponent;
|
|
5092
|
+
exports["ɵbg"] = StructureSettingsComponent;
|
|
5093
|
+
exports["ɵbh"] = GeneralSettingsComponent;
|
|
5094
|
+
exports["ɵbi"] = UploadBottomSheetDialogComponent;
|
|
5095
|
+
exports["ɵbj"] = UploadImageGalleryComponent;
|
|
5096
|
+
exports["ɵbk"] = TemplateListDialogComponent;
|
|
5097
|
+
exports["ɵbl"] = ImportDialogComponent;
|
|
5098
|
+
exports["ɵbm"] = IpInterceptorInterceptor;
|
|
5099
|
+
exports["ɵbn"] = LIBRARY_IS_PRO;
|
|
4636
5100
|
exports["ɵc"] = FreeUsersRestApi;
|
|
4637
5101
|
exports["ɵd"] = FreeUsersPbStorage;
|
|
4638
5102
|
exports["ɵe"] = StructureComponent;
|
|
@@ -4641,22 +5105,22 @@
|
|
|
4641
5105
|
exports["ɵh"] = TextElementComponent;
|
|
4642
5106
|
exports["ɵi"] = AbstractBlock;
|
|
4643
5107
|
exports["ɵj"] = ImageComponent;
|
|
4644
|
-
exports["ɵk"] =
|
|
4645
|
-
exports["ɵl"] =
|
|
4646
|
-
exports["ɵm"] =
|
|
4647
|
-
exports["ɵn"] =
|
|
4648
|
-
exports["ɵo"] =
|
|
4649
|
-
exports["ɵp"] =
|
|
4650
|
-
exports["ɵq"] =
|
|
4651
|
-
exports["ɵr"] =
|
|
4652
|
-
exports["ɵs"] =
|
|
4653
|
-
exports["ɵt"] =
|
|
4654
|
-
exports["ɵu"] =
|
|
4655
|
-
exports["ɵv"] =
|
|
4656
|
-
exports["ɵw"] =
|
|
4657
|
-
exports["ɵx"] =
|
|
4658
|
-
exports["ɵy"] =
|
|
4659
|
-
exports["ɵz"] =
|
|
5108
|
+
exports["ɵk"] = VideoComponent;
|
|
5109
|
+
exports["ɵl"] = VideoThumbnailService;
|
|
5110
|
+
exports["ɵm"] = ButtonComponent;
|
|
5111
|
+
exports["ɵn"] = DividerComponent;
|
|
5112
|
+
exports["ɵo"] = SpacerComponent;
|
|
5113
|
+
exports["ɵp"] = SocialComponent;
|
|
5114
|
+
exports["ɵq"] = BuilderContainerComponent;
|
|
5115
|
+
exports["ɵr"] = FontStylesComponent;
|
|
5116
|
+
exports["ɵs"] = PaddingComponent;
|
|
5117
|
+
exports["ɵt"] = MarginComponent;
|
|
5118
|
+
exports["ɵu"] = GapsComponent;
|
|
5119
|
+
exports["ɵv"] = LineHeightComponent;
|
|
5120
|
+
exports["ɵw"] = WidthHeightComponent;
|
|
5121
|
+
exports["ɵx"] = BorderComponent;
|
|
5122
|
+
exports["ɵy"] = ColorComponent;
|
|
5123
|
+
exports["ɵz"] = LinkComponent;
|
|
4660
5124
|
|
|
4661
5125
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4662
5126
|
|