@pobuca/email-builder 1.4.0 → 1.5.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.
@@ -774,6 +774,11 @@
774
774
  return Structure;
775
775
  }());
776
776
 
777
+ var nextBlockId = 0;
778
+ function createBlockId() {
779
+ nextBlockId += 1;
780
+ return "pb-block-" + Date.now().toString(36) + "-" + nextBlockId.toString(36);
781
+ }
777
782
  var AIPBlock = /** @class */ (function () {
778
783
  function AIPBlock() {
779
784
  }
@@ -787,6 +792,7 @@
787
792
  }; }
788
793
  this.innerText = innerText;
789
794
  this.state = state;
795
+ this.id = createBlockId();
790
796
  this.type = 'text';
791
797
  this.icon = 'text_format';
792
798
  this.options = {
@@ -823,6 +829,7 @@
823
829
  }; }
824
830
  this.src = src;
825
831
  this.state = state;
832
+ this.id = createBlockId();
826
833
  this.type = 'image';
827
834
  this.icon = 'image';
828
835
  this.options = {
@@ -881,6 +888,7 @@
881
888
  this.src = src;
882
889
  this.posterSrc = posterSrc;
883
890
  this.state = state;
891
+ this.id = createBlockId();
884
892
  this.type = 'video';
885
893
  this.icon = 'videocam';
886
894
  this.options = {
@@ -925,6 +933,7 @@
925
933
  }; }
926
934
  this.innerText = innerText;
927
935
  this.state = state;
936
+ this.id = createBlockId();
928
937
  this.type = 'button';
929
938
  this.icon = 'radio_button_checked';
930
939
  this.options = {
@@ -979,6 +988,7 @@
979
988
  message: ''
980
989
  }; }
981
990
  this.state = state;
991
+ this.id = createBlockId();
982
992
  this.type = 'divider';
983
993
  this.icon = 'remove';
984
994
  this.options = {
@@ -1006,6 +1016,7 @@
1006
1016
  message: ''
1007
1017
  }; }
1008
1018
  this.state = state;
1019
+ this.id = createBlockId();
1009
1020
  this.type = 'spacer';
1010
1021
  this.icon = 'vertical_align_center';
1011
1022
  this.title = $localize(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject([":@@spacer_block:Spacer"], [":@@spacer_block:Spacer"])));
@@ -1030,6 +1041,7 @@
1030
1041
  }; }
1031
1042
  this.networks = networks;
1032
1043
  this.state = state;
1044
+ this.id = createBlockId();
1033
1045
  this.type = 'social';
1034
1046
  this.icon = 'share';
1035
1047
  this.title = $localize(templateObject_7 || (templateObject_7 = __makeTemplateObject([":@@share_block:Social"], [":@@share_block:Social"])));
@@ -1069,6 +1081,18 @@
1069
1081
  }
1070
1082
  return SocialBlock;
1071
1083
  }());
1084
+ function assignBlockId(block, replace) {
1085
+ if (replace === void 0) { replace = false; }
1086
+ if (!block.id || replace) {
1087
+ Object.defineProperty(block, 'id', {
1088
+ configurable: true,
1089
+ enumerable: true,
1090
+ value: createBlockId(),
1091
+ writable: true
1092
+ });
1093
+ }
1094
+ return block.id;
1095
+ }
1072
1096
  var templateObject_1$8, templateObject_2$8, templateObject_3$7, templateObject_4$6, templateObject_5$3, templateObject_6$2, templateObject_7;
1073
1097
 
1074
1098
  /*
@@ -1861,6 +1885,9 @@
1861
1885
  "TextBlock": {
1862
1886
  "type": "object",
1863
1887
  "properties": {
1888
+ "id": {
1889
+ "type": "string"
1890
+ },
1864
1891
  "type": {
1865
1892
  "type": "string",
1866
1893
  "enum": [
@@ -1888,6 +1915,7 @@
1888
1915
  },
1889
1916
  "additionalProperties": false,
1890
1917
  "required": [
1918
+ "id",
1891
1919
  "type",
1892
1920
  "icon",
1893
1921
  "options",
@@ -2022,6 +2050,9 @@
2022
2050
  "ImageBlock": {
2023
2051
  "type": "object",
2024
2052
  "properties": {
2053
+ "id": {
2054
+ "type": "string"
2055
+ },
2025
2056
  "type": {
2026
2057
  "type": "string",
2027
2058
  "enum": [
@@ -2049,6 +2080,7 @@
2049
2080
  },
2050
2081
  "additionalProperties": false,
2051
2082
  "required": [
2083
+ "id",
2052
2084
  "type",
2053
2085
  "icon",
2054
2086
  "options",
@@ -2133,6 +2165,9 @@
2133
2165
  "VideoBlock": {
2134
2166
  "type": "object",
2135
2167
  "properties": {
2168
+ "id": {
2169
+ "type": "string"
2170
+ },
2136
2171
  "type": {
2137
2172
  "type": "string",
2138
2173
  "enum": [
@@ -2163,6 +2198,7 @@
2163
2198
  },
2164
2199
  "additionalProperties": false,
2165
2200
  "required": [
2201
+ "id",
2166
2202
  "type",
2167
2203
  "icon",
2168
2204
  "options",
@@ -2212,6 +2248,9 @@
2212
2248
  "ButtonBlock": {
2213
2249
  "type": "object",
2214
2250
  "properties": {
2251
+ "id": {
2252
+ "type": "string"
2253
+ },
2215
2254
  "type": {
2216
2255
  "type": "string",
2217
2256
  "enum": [
@@ -2239,6 +2278,7 @@
2239
2278
  },
2240
2279
  "additionalProperties": false,
2241
2280
  "required": [
2281
+ "id",
2242
2282
  "type",
2243
2283
  "icon",
2244
2284
  "options",
@@ -2299,6 +2339,9 @@
2299
2339
  "DividerBlock": {
2300
2340
  "type": "object",
2301
2341
  "properties": {
2342
+ "id": {
2343
+ "type": "string"
2344
+ },
2302
2345
  "type": {
2303
2346
  "type": "string",
2304
2347
  "enum": [
@@ -2323,6 +2366,7 @@
2323
2366
  },
2324
2367
  "additionalProperties": false,
2325
2368
  "required": [
2369
+ "id",
2326
2370
  "type",
2327
2371
  "icon",
2328
2372
  "options",
@@ -2350,6 +2394,9 @@
2350
2394
  "SpacerBlock": {
2351
2395
  "type": "object",
2352
2396
  "properties": {
2397
+ "id": {
2398
+ "type": "string"
2399
+ },
2353
2400
  "type": {
2354
2401
  "type": "string",
2355
2402
  "enum": [
@@ -2374,6 +2421,7 @@
2374
2421
  },
2375
2422
  "additionalProperties": false,
2376
2423
  "required": [
2424
+ "id",
2377
2425
  "type",
2378
2426
  "icon",
2379
2427
  "title",
@@ -2401,6 +2449,9 @@
2401
2449
  "SocialBlock": {
2402
2450
  "type": "object",
2403
2451
  "properties": {
2452
+ "id": {
2453
+ "type": "string"
2454
+ },
2404
2455
  "type": {
2405
2456
  "type": "string",
2406
2457
  "enum": [
@@ -2431,6 +2482,7 @@
2431
2482
  },
2432
2483
  "additionalProperties": false,
2433
2484
  "required": [
2485
+ "id",
2434
2486
  "type",
2435
2487
  "icon",
2436
2488
  "title",
@@ -3131,6 +3183,10 @@
3131
3183
  enumerable: false,
3132
3184
  configurable: true
3133
3185
  });
3186
+ PbEmailObjectStoreService.prototype.assignBlockIds = function (structures, replace) {
3187
+ if (replace === void 0) { replace = false; }
3188
+ structures.forEach(function (structure) { return structure.elements.forEach(function (column) { return column.forEach(function (block) { return assignBlockId(block, replace); }); }); });
3189
+ };
3134
3190
  PbEmailObjectStoreService.prototype.createHTMLTemplate$ = function () {
3135
3191
  var _this = this;
3136
3192
  return this.emailAsObservable$.pipe(operators.switchMap(function (email) {
@@ -3189,6 +3245,7 @@
3189
3245
  if (!newEmail.structures || !newEmail.general) {
3190
3246
  throw new Error('Injected object is not a valid PBEmail');
3191
3247
  }
3248
+ this.assignBlockIds(newEmail.structures);
3192
3249
  this.Email = newEmail;
3193
3250
  this.reset();
3194
3251
  };
@@ -3201,6 +3258,7 @@
3201
3258
  item.data.elements = Array.from({ length: item.data.columns }, function () { return []; });
3202
3259
  }
3203
3260
  var newStructure = Object.assign(Object.assign({ id: Date.now() }, cloneDeep(item.data)), { isModule: isModule });
3261
+ this.assignBlockIds([newStructure], true);
3204
3262
  structures.splice(currentIndex, 0, newStructure);
3205
3263
  this.markForCheck();
3206
3264
  return newStructure;
@@ -3213,6 +3271,7 @@
3213
3271
  PbEmailObjectStoreService.prototype.duplicateStructure = function (index) {
3214
3272
  var _c = this.Email.structures, structures = _c === void 0 ? [] : _c;
3215
3273
  var newStructure = cloneDeep(Object.assign(Object.assign({}, structures[index]), { id: Date.now() }));
3274
+ this.assignBlockIds([newStructure], true);
3216
3275
  structures.splice(index, 0, newStructure);
3217
3276
  this.markForCheck();
3218
3277
  return newStructure;
@@ -3227,7 +3286,9 @@
3227
3286
  // console.log(id);
3228
3287
  // console.log(item);
3229
3288
  if (id === 'block-elements') {
3230
- column.splice(currentIndex, 0, cloneDeep(item.data));
3289
+ var newBlock = cloneDeep(item.data);
3290
+ assignBlockId(newBlock, true);
3291
+ column.splice(currentIndex, 0, newBlock);
3231
3292
  }
3232
3293
  else {
3233
3294
  dragDrop.transferArrayItem(data, column, previousIndex, currentIndex);
@@ -3241,6 +3302,7 @@
3241
3302
  };
3242
3303
  PbEmailObjectStoreService.prototype.duplicateBlock = function (key, column, block) {
3243
3304
  var newBlock = cloneDeep(block);
3305
+ assignBlockId(newBlock, true);
3244
3306
  column.splice(key, 0, newBlock);
3245
3307
  this.markForCheck();
3246
3308
  return newBlock;
@@ -3460,6 +3522,8 @@
3460
3522
  operators.shareReplay());
3461
3523
  this._currentEditingBlock$ = new rxjs.BehaviorSubject(null);
3462
3524
  this.currentEditingBlock$ = this._currentEditingBlock$.pipe(operators.subscribeOn(rxjs.animationFrameScheduler), operators.distinctUntilChanged(), operators.catchError(function () { return rxjs.of(null); }), operators.shareReplay());
3525
+ this._blockHighlight$ = new rxjs.BehaviorSubject(null);
3526
+ this.blockHighlight$ = this._blockHighlight$.asObservable();
3463
3527
  this._editGeneralSettings$ = new rxjs.Subject();
3464
3528
  this.editGeneralSettings$ = this._editGeneralSettings$.pipe(operators.subscribeOn(rxjs.animationFrameScheduler), operators.tap(function () { return _this.changeTabIndex(2); }), operators.distinctUntilChanged(), operators.shareReplay());
3465
3529
  this._currentTabIndex$ = new rxjs.BehaviorSubject(0);
@@ -3482,6 +3546,13 @@
3482
3546
  PbUserInterfaceService.prototype.changeTabIndex = function (index) {
3483
3547
  this._currentTabIndex$.next(index);
3484
3548
  };
3549
+ PbUserInterfaceService.prototype.highlightBlock = function (blockId, options) {
3550
+ if (options === void 0) { options = {}; }
3551
+ this._blockHighlight$.next({ blockId: blockId, options: options });
3552
+ };
3553
+ PbUserInterfaceService.prototype.clearBlockHighlight = function () {
3554
+ this._blockHighlight$.next(null);
3555
+ };
3485
3556
  PbUserInterfaceService.prototype.confirmDialog$ = function () {
3486
3557
  return this.matDialog
3487
3558
  .open(ConfirmDialogComponent)
@@ -3534,6 +3605,7 @@
3534
3605
  };
3535
3606
  PbUserInterfaceService.prototype.reset = function () {
3536
3607
  this.resetElements();
3608
+ this.clearBlockHighlight();
3537
3609
  this.changeTabIndex(0);
3538
3610
  };
3539
3611
  return PbUserInterfaceService;
@@ -3552,6 +3624,7 @@
3552
3624
  * Copyright (c) 2024 Pobuca.
3553
3625
  * All rights reserved.
3554
3626
  */
3627
+ var CUSTOM_SIDEBAR_TAB_INDEX = 3;
3555
3628
  /**
3556
3629
  * @deprecated Soon it will be removed
3557
3630
  * @internal
@@ -3592,6 +3665,26 @@
3592
3665
  this.isLoading$ = this.pbUserInterface.activeMatProgress$.asObservable();
3593
3666
  this.config = Object.assign(Object.assign({}, PB_DEFAULT_CONFIG), this.config);
3594
3667
  }
3668
+ PbEmailBuilderService.prototype.openCustomSidebarTab = function () {
3669
+ this.pbUserInterface.changeTabIndex(CUSTOM_SIDEBAR_TAB_INDEX);
3670
+ };
3671
+ /**
3672
+ * Highlights a canvas block by its persistent design JSON identifier.
3673
+ * Returns false when the identifier is not present in the current email.
3674
+ */
3675
+ PbEmailBuilderService.prototype.highlightBlock = function (blockId, options) {
3676
+ if (options === void 0) { options = {}; }
3677
+ var blockExists = this.Email.structures.some(function (structure) { return structure.elements.some(function (column) { return column.some(function (block) { return block.id === blockId; }); }); });
3678
+ if (!blockExists) {
3679
+ return false;
3680
+ }
3681
+ this.pbUserInterface.highlightBlock(blockId, options);
3682
+ return true;
3683
+ };
3684
+ /** Clears the current canvas block highlight. */
3685
+ PbEmailBuilderService.prototype.clearBlockHighlight = function () {
3686
+ this.pbUserInterface.clearBlockHighlight();
3687
+ };
3595
3688
  /**
3596
3689
  * Save current Email Template
3597
3690
  */
@@ -4190,6 +4283,7 @@
4190
4283
  this.structures = structures;
4191
4284
  this.blocks = blocks;
4192
4285
  this.doc = doc;
4286
+ this.customSidebarTabLabel = '';
4193
4287
  this.emailChange = new i0.EventEmitter();
4194
4288
  this.previewTemplate = false;
4195
4289
  this.showGeneralSettings$ = this.userInterfaceService.editGeneralSettings$;
@@ -4226,6 +4320,7 @@
4226
4320
  }
4227
4321
  PbEmailBuilderComponent.prototype.writeValue = function (email) {
4228
4322
  try {
4323
+ this.userInterfaceService.clearBlockHighlight();
4229
4324
  this.emailObjectStore.setEmail(email);
4230
4325
  this.previewTemplate = false;
4231
4326
  this.changeDetectorRef.markForCheck();
@@ -4459,7 +4554,7 @@
4459
4554
  PbEmailBuilderComponent.decorators = [
4460
4555
  { type: i0.Component, args: [{
4461
4556
  selector: 'pb-email-builder',
4462
- template: "<!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n -->\n\n<mat-sidenav-container>\n <div class=\"pb-builder-container\" fxLayout=\"column\" fxFlex>\n <mat-progress-bar *ngIf=\"activeMatProgress$ | async\" mode=\"buffer\"></mat-progress-bar>\n <mat-toolbar fxLayoutGap=\"1rem\" fxLayoutAlign=\"space-between center\">\n <ng-content fxLayout fxLayoutGap=\"0.5rem\" select=\".top-actions\"></ng-content>\n\n <div fxFlexlayout fxLayoutGap=\"0.5rem\">\n <button *ngIf=\"ngb.config.useSaveButton\" type=\"button\" (click)=\"saveEmail()\" mat-stroked-button color=\"primary\"\n i18n=\"actions|Save Email\">\n Save Email\n </button>\n <button *ngIf=\"ngb.config.usePreviewButton\" type=\"button\" (click)=\"togglePreview()\" mat-stroked-button>\n <ng-container [ngSwitch]=\"previewTemplate\">\n <span *ngSwitchDefault i18n=\"actions|Preview\">Preview</span>\n <span *ngSwitchCase=\"true\" i18n=\"actions|Close Preview\">Close Preview</span>\n </ng-container>\n </button>\n\n <button mat-button mat-stroked-button i18n=\"actions|Import\" (click)=\"importFile()\">\n Import\n </button>\n\n <ng-container *ngIf=\"ngb.config.useDownloadButton\">\n <button mat-button [matMenuTriggerFor]=\"downloadMenu\" mat-stroked-button i18n=\"actions|Export\">\n Export\n </button>\n <mat-menu #downloadMenu=\"matMenu\">\n <button mat-menu-item (click)=\"download('html')\" i18n=\"actions|Export HTML\">\n Export HTML\n </button>\n <button mat-menu-item (click)=\"download('mjml')\" i18n=\"actions|Export MJML\">\n Export MJML\n </button>\n <button mat-menu-item (click)=\"download('json')\" i18n=\"actions|Export JSON\">\n Export JSON\n </button>\n </mat-menu>\n </ng-container>\n\n </div>\n <div class=\"history-actions\">\n <button type=\"button\" mat-icon-button (click)=\"undo()\" [disabled]=\"!(canUndo$ | async) || previewTemplate\"\n matTooltip=\"Undo (Ctrl+Z)\" i18n-matTooltip=\"actions|undo shortcut tooltip\"\n class=\"history-btn\">\n <mat-icon>undo</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button (click)=\"redo()\" [disabled]=\"!(canRedo$ | async) || previewTemplate\"\n matTooltip=\"Redo (Ctrl+Shift+Z)\" i18n-matTooltip=\"actions|redo shortcut tooltip\"\n class=\"history-btn\">\n <mat-icon>redo</mat-icon>\n </button>\n </div>\n </mat-toolbar>\n <ng-container [ngSwitch]=\"previewTemplate\">\n <pb-builder-container *ngSwitchDefault [ngStyle]=\"getBuilderContainerStyles$ | async\">\n <ng-content select=\".rewrited-empty-email\"></ng-content>\n </pb-builder-container>\n\n <pb-preview-template fxLayout fxFlex=\"auto\" fxLayoutAlign=\"center\" [template]=\"currentHTMLTemplate$ | async\"\n *ngSwitchCase=\"true\">\n </pb-preview-template>\n </ng-container>\n </div>\n <mat-sidenav mode=\"side\" fxFlex=\"0 0 310px\" [opened]=\"!previewTemplate\" position=\"end\" class=\"pb-builder-content\">\n <mat-tab-group [selectedIndex]=\"currentTabIndex$ | async\" (selectedIndexChange)=\"changeTabIndex($event)\">\n <mat-tab i18n-label=\"Content\" label=\"Content\">\n <div class=\"main-padding\">\n <cdk-drop-list class=\"elements\" [cdkDropListConnectedTo]=\"cdkDropListConnectedTo$ | async\"\n [cdkDropListData]=\"blocks\" [cdkDropListSortingDisabled]=\"true\" id=\"block-elements\">\n <div cdkDrag *ngFor=\"let block of blocks; trackBy: trackByFn\" [cdkDragData]=\"block\"\n [cdkDragDisabled]=\"disableBlocksList$(block) | async\" class=\"drag-element\"\n [matTooltip]=\"block.state.message\">\n <mat-icon>{{ block.icon }}</mat-icon>\n <div class=\"drag-element-title\">{{ block.title }}</div>\n </div>\n </cdk-drop-list>\n\n <mat-divider style=\"margin: 1em 0;\"></mat-divider>\n <!-- <h3 class=\"divider\"><span>Structures</span></h3> -->\n <cdk-drop-list class=\"elements structure-elements\" cdkDropListConnectedTo=\"structures-drop-list\"\n [cdkDropListSortingDisabled]=\"true\" [cdkDropListData]=\"structures\">\n <div cdkDrag *ngFor=\"let structure of structures; trackBy: trackByFn\" [cdkDragData]=\"structure\"\n [cdkDragDisabled]=\"disableStructureList$(structure) | async\" class=\"drag-element structure-element\"\n [ngClass]=\"structure.type\">\n <div *ngFor=\"let column of createArrayFromStructureColumns(structure)\"></div>\n </div>\n </cdk-drop-list>\n <ng-content fxLayout fxLayoutGap=\"0.5rem\" select=\".after-structure-blocks\"></ng-content>\n </div>\n </mat-tab>\n <mat-tab i18n-label=\"Modules\" label=\"Modules\" class=\"modules-tab\">\n <cdk-virtual-scroll-viewport itemSize=\"54\" [minBufferPx]=\"54 * 10\" [maxBufferPx]=\"54 * 20\"\n style=\"height: inherit;\"\n *ngIf=\"customModuleList$ | async as modules; else emptyModuleList\">\n <div class=\"main-padding\">\n <div class=\"custom-modules\" cdkDropList cdkDropListConnectedTo=\"structures-drop-list\"\n [cdkDropListData]=\"modules\" [cdkDropListSortingDisabled]=\"true\">\n <div fxLayout=\"column\" fxLayoutGap=\"1rem\">\n <ng-container *cdkVirtualFor=\"let module of modules\">\n <div cdkDrag [cdkDragData]=\"module.module\"\n [cdkDragDisabled]=\"disableStructureList$(module.module) | async\" class=\"drag-element\"\n style=\"padding: 1em;text-transform: uppercase;height: 54px;\">\n <span *ngIf=\"module.name\">{{module.name}}</span>\n <!-- <img *ngIf=\"module.thumb\" [src]=\"module.thumb\" /> -->\n </div>\n </ng-container>\n </div>\n </div>\n <ng-content fxLayout fxLayoutGap=\"0.5rem\" select=\".after-content-blocks\"></ng-content>\n </div>\n </cdk-virtual-scroll-viewport>\n <ng-template #emptyModuleList>\n <h4 class=\"main-padding\" style=\"text-align: center;\" i18n=\"modules|empty list message\">\n Module list is empty\n </h4>\n </ng-template>\n </mat-tab>\n <mat-tab i18n-label=\"Settings\" label=\"Settings\">\n <div class=\"pb-builder-options\" [ngSwitch]=\"showGeneralSettings$ | async\">\n <pb-general-settings *ngSwitchDefault></pb-general-settings>\n <pb-block-settings *ngSwitchCase=\"'block'\"></pb-block-settings>\n <pb-structure-settings *ngSwitchCase=\"'structure'\" fxLayout=\"column\"></pb-structure-settings>\n </div>\n </mat-tab>\n </mat-tab-group>\n </mat-sidenav>\n</mat-sidenav-container>\n",
4557
+ template: "<!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n -->\n\n<mat-sidenav-container>\n <div class=\"pb-builder-container\" fxLayout=\"column\" fxFlex>\n <mat-progress-bar *ngIf=\"activeMatProgress$ | async\" mode=\"buffer\"></mat-progress-bar>\n <mat-toolbar fxLayoutGap=\"1rem\" fxLayoutAlign=\"space-between center\">\n <ng-content fxLayout fxLayoutGap=\"0.5rem\" select=\".top-actions\"></ng-content>\n\n <div fxFlexlayout fxLayoutGap=\"0.5rem\">\n <button *ngIf=\"ngb.config.useSaveButton\" type=\"button\" (click)=\"saveEmail()\" mat-stroked-button color=\"primary\"\n i18n=\"actions|Save Email\">\n Save Email\n </button>\n <button *ngIf=\"ngb.config.usePreviewButton\" type=\"button\" (click)=\"togglePreview()\" mat-stroked-button>\n <ng-container [ngSwitch]=\"previewTemplate\">\n <span *ngSwitchDefault i18n=\"actions|Preview\">Preview</span>\n <span *ngSwitchCase=\"true\" i18n=\"actions|Close Preview\">Close Preview</span>\n </ng-container>\n </button>\n\n <button mat-button mat-stroked-button i18n=\"actions|Import\" (click)=\"importFile()\">\n Import\n </button>\n\n <ng-container *ngIf=\"ngb.config.useDownloadButton\">\n <button mat-button [matMenuTriggerFor]=\"downloadMenu\" mat-stroked-button i18n=\"actions|Export\">\n Export\n </button>\n <mat-menu #downloadMenu=\"matMenu\">\n <button mat-menu-item (click)=\"download('html')\" i18n=\"actions|Export HTML\">\n Export HTML\n </button>\n <button mat-menu-item (click)=\"download('mjml')\" i18n=\"actions|Export MJML\">\n Export MJML\n </button>\n <button mat-menu-item (click)=\"download('json')\" i18n=\"actions|Export JSON\">\n Export JSON\n </button>\n </mat-menu>\n </ng-container>\n\n </div>\n <div class=\"history-actions\">\n <button type=\"button\" mat-icon-button (click)=\"undo()\" [disabled]=\"!(canUndo$ | async) || previewTemplate\"\n matTooltip=\"Undo (Ctrl+Z)\" i18n-matTooltip=\"actions|undo shortcut tooltip\"\n class=\"history-btn\">\n <mat-icon>undo</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button (click)=\"redo()\" [disabled]=\"!(canRedo$ | async) || previewTemplate\"\n matTooltip=\"Redo (Ctrl+Shift+Z)\" i18n-matTooltip=\"actions|redo shortcut tooltip\"\n class=\"history-btn\">\n <mat-icon>redo</mat-icon>\n </button>\n </div>\n </mat-toolbar>\n <ng-container [ngSwitch]=\"previewTemplate\">\n <pb-builder-container *ngSwitchDefault [ngStyle]=\"getBuilderContainerStyles$ | async\">\n <ng-content select=\".rewrited-empty-email\"></ng-content>\n </pb-builder-container>\n\n <pb-preview-template fxLayout fxFlex=\"auto\" fxLayoutAlign=\"center\" [template]=\"currentHTMLTemplate$ | async\"\n *ngSwitchCase=\"true\">\n </pb-preview-template>\n </ng-container>\n </div>\n <mat-sidenav mode=\"side\" fxFlex=\"0 0 400px\" [opened]=\"!previewTemplate\" position=\"end\" class=\"pb-builder-content\">\n <mat-tab-group [selectedIndex]=\"currentTabIndex$ | async\" (selectedIndexChange)=\"changeTabIndex($event)\">\n <mat-tab i18n-label=\"Content\" label=\"Content\">\n <div class=\"main-padding\">\n <cdk-drop-list class=\"elements\" [cdkDropListConnectedTo]=\"cdkDropListConnectedTo$ | async\"\n [cdkDropListData]=\"blocks\" [cdkDropListSortingDisabled]=\"true\" id=\"block-elements\">\n <div cdkDrag *ngFor=\"let block of blocks; trackBy: trackByFn\" [cdkDragData]=\"block\"\n [cdkDragDisabled]=\"disableBlocksList$(block) | async\" class=\"drag-element\"\n [matTooltip]=\"block.state.message\">\n <mat-icon>{{ block.icon }}</mat-icon>\n <div class=\"drag-element-title\">{{ block.title }}</div>\n </div>\n </cdk-drop-list>\n\n <mat-divider style=\"margin: 1em 0;\"></mat-divider>\n <!-- <h3 class=\"divider\"><span>Structures</span></h3> -->\n <cdk-drop-list class=\"elements structure-elements\" cdkDropListConnectedTo=\"structures-drop-list\"\n [cdkDropListSortingDisabled]=\"true\" [cdkDropListData]=\"structures\">\n <div cdkDrag *ngFor=\"let structure of structures; trackBy: trackByFn\" [cdkDragData]=\"structure\"\n [cdkDragDisabled]=\"disableStructureList$(structure) | async\" class=\"drag-element structure-element\"\n [ngClass]=\"structure.type\">\n <div *ngFor=\"let column of createArrayFromStructureColumns(structure)\"></div>\n </div>\n </cdk-drop-list>\n <ng-content fxLayout fxLayoutGap=\"0.5rem\" select=\".after-structure-blocks\"></ng-content>\n </div>\n </mat-tab>\n <mat-tab i18n-label=\"Modules\" label=\"Modules\" class=\"modules-tab\">\n <cdk-virtual-scroll-viewport itemSize=\"54\" [minBufferPx]=\"54 * 10\" [maxBufferPx]=\"54 * 20\"\n style=\"height: inherit;\"\n *ngIf=\"customModuleList$ | async as modules; else emptyModuleList\">\n <div class=\"main-padding\">\n <div class=\"custom-modules\" cdkDropList cdkDropListConnectedTo=\"structures-drop-list\"\n [cdkDropListData]=\"modules\" [cdkDropListSortingDisabled]=\"true\">\n <div fxLayout=\"column\" fxLayoutGap=\"1rem\">\n <ng-container *cdkVirtualFor=\"let module of modules\">\n <div cdkDrag [cdkDragData]=\"module.module\"\n [cdkDragDisabled]=\"disableStructureList$(module.module) | async\" class=\"drag-element\"\n style=\"padding: 1em;text-transform: uppercase;height: 54px;\">\n <span *ngIf=\"module.name\">{{module.name}}</span>\n <!-- <img *ngIf=\"module.thumb\" [src]=\"module.thumb\" /> -->\n </div>\n </ng-container>\n </div>\n </div>\n <ng-content fxLayout fxLayoutGap=\"0.5rem\" select=\".after-content-blocks\"></ng-content>\n </div>\n </cdk-virtual-scroll-viewport>\n <ng-template #emptyModuleList>\n <h4 class=\"main-padding\" style=\"text-align: center;\" i18n=\"modules|empty list message\">\n Module list is empty\n </h4>\n </ng-template>\n </mat-tab>\n <mat-tab i18n-label=\"Settings\" label=\"Settings\">\n <div class=\"pb-builder-options\" [ngSwitch]=\"showGeneralSettings$ | async\">\n <pb-general-settings *ngSwitchDefault></pb-general-settings>\n <pb-block-settings *ngSwitchCase=\"'block'\"></pb-block-settings>\n <pb-structure-settings *ngSwitchCase=\"'structure'\" fxLayout=\"column\"></pb-structure-settings>\n </div>\n </mat-tab>\n <mat-tab *ngIf=\"customSidebarTabLabel\" [label]=\"customSidebarTabLabel\">\n <ng-content select=\".custom-sidebar-tab\"></ng-content>\n </mat-tab>\n </mat-tab-group>\n </mat-sidenav>\n</mat-sidenav-container>\n",
4463
4558
  exportAs: 'pbEmailBuilder',
4464
4559
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
4465
4560
  providers: [
@@ -4470,7 +4565,7 @@
4470
4565
  },
4471
4566
  SlugifyPipe
4472
4567
  ],
4473
- styles: ["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;height:100vh}.hide{display:none}::ng-deep mat-sidenav-container{height:100%}::ng-deep mat-sidenav-container mat-sidenav-content{width:100%;z-index:unset!important;overflow:unset!important}::ng-deep h3.divider{text-align:center;display:block;overflow:hidden;margin:0 0 1rem}::ng-deep h3.divider span{font-weight:100;position:relative;display:inline-block}::ng-deep h3.divider span:after,::ng-deep h3.divider span:before{content:\"\";position:absolute;top:50%;height:1px;background:#ccc;width:99999px}::ng-deep h3.divider span:before{left:100%;margin-left:10px}::ng-deep h3.divider span:after{right:100%;margin-right:10px}::ng-deep .pb-builder-content{border-right:1px solid rgba(0,0,0,.12)}::ng-deep .pb-builder-content .overflow{position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;opacity:.5;display:none;z-index:3}::ng-deep .pb-builder-content.disabled .overflow{display:block}::ng-deep .pb-builder-content .mat-tab-label{width:50%;min-width:auto;height:64px;font-size:medium;text-transform:uppercase;padding:0 12px}::ng-deep .pb-builder-content .mat-tab-body-wrapper,::ng-deep .pb-builder-content .mat-tab-group{height:100%}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body{padding:0}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements{display:grid;grid-gap:.5rem;margin-bottom:1rem;grid-template:repeat(2,1fr)/repeat(3,1fr)}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements.structure-elements{grid-template:repeat(4,1fr)/1fr}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements.cdk-drop-list-dragging .cdk-drag{transform:none!important}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body input{height:auto;border:none}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .custom-modules .drag-element img{max-width:100%}::ng-deep .pb-builder-container{position:relative;height:100%}::ng-deep .pb-builder-container mat-progress-bar{position:absolute}::ng-deep .pb-builder-container mat-toolbar{background-color:#fff}::ng-deep .pb-builder-options .mat-expansion-panel{box-shadow:none!important}::ng-deep .pb-builder-options .mat-expansion-panel.mat-expanded{overflow:visible}::ng-deep .pb-builder-options mat-expansion-panel-header:not(.mat-expanded){background:rgba(0,0,0,.04)}::ng-deep .pb-builder-options ::ng-deep .group{display:grid;grid-template:auto/repeat(2,1fr);grid-gap:1rem}::ng-deep .pb-builder-options ::ng-deep .group>*{align-self:center}::ng-deep .pb-builder-options ::ng-deep .group+.group{margin-top:1em}::ng-deep .pb-builder-options ::ng-deep .group.four{grid-template-columns:repeat(4,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.f-large{grid-template-columns:2fr 1fr}::ng-deep .pb-builder-options ::ng-deep .group.l-large{grid-template-columns:1fr 2fr}::ng-deep .pb-builder-options ::ng-deep .group.three{grid-template-columns:repeat(3,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.f-small{grid-template-columns:1fr repeat(2,2fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.f-large{grid-template-columns:2fr repeat(2,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.l-large{grid-template-columns:repeat(2,1fr) 2fr}::ng-deep .pb-builder-options ::ng-deep .group .mat-form-field-infix{width:auto!important}::ng-deep .drag-element{text-align:center;border:1px solid #ccc;box-sizing:border-box;background:#fff;color:#7b7b7b;cursor:move;transition:box-shadow .3s ease-in-out;will-change:box-shadow;border-radius:3px}::ng-deep .drag-element.cdk-drag-disabled,::ng-deep .drag-element.cdk-drag-placeholder{cursor:not-allowed;opacity:.6}::ng-deep .drag-element:hover{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}::ng-deep .drag-element .mat-icon{font-size:40px!important;padding:.5rem;width:auto;height:auto}::ng-deep .drag-element img{max-width:100%}::ng-deep .drag-element-title{font-size:.9em;text-transform:uppercase;margin-bottom:.5rem}::ng-deep .drag-element.structure-element{height:60px;position:relative;padding:4px;display:grid;grid-template:1fr/1fr}::ng-deep .drag-element.structure-element>div{background:#ccc;border:4px solid #bbb}::ng-deep .drag-element.structure-element.cols_2{grid-template-columns:repeat(2,5fr)}::ng-deep .drag-element.structure-element.cols_3{grid-template-columns:repeat(3,3.33fr)}::ng-deep .drag-element.structure-element.cols_4{grid-template-columns:repeat(4,2.5fr)}::ng-deep .drag-element.structure-element.cols_12{grid-template-columns:6fr 4fr}::ng-deep .drag-element.structure-element.cols_21{grid-template-columns:4fr 6fr}::ng-deep .main-padding{padding:1rem}::ng-deep .history-actions{margin-inline-start:auto;display:flex;gap:.5rem;align-items:center}::ng-deep .history-actions .history-btn{transition:all .2s ease-in-out;color:rgba(0,0,0,.54)}::ng-deep .history-actions .history-btn:hover:not([disabled]){background-color:rgba(0,0,0,.08);border-radius:4px;color:rgba(0,0,0,.87)}::ng-deep .history-actions .history-btn[disabled]{opacity:.38}::ng-deep .cdk-drop-list-receiving>:not(.cdk-drag){opacity:.6}::ng-deep .cdk-drop-list-dragging>*{pointer-events:none}@keyframes drag-animation{0%{opacity:0;height:0}to{opacity:1}}::ng-deep .cdk-drag-animating{animation:drag-animation 1s cubic-bezier(0,0,.2,1) infinite}::ng-deep .cdk-drag-preview{border-radius:4px;box-shadow:0 0 0 2px rgba(63,81,181,.5);min-height:60px;min-width:100px;background-color:#fff}::ng-deep .cdk-drag.structure-element.cdk-drag-placeholder{box-shadow:0 0 1px 2px #ff4081;width:100%;pointer-events:none}"]
4568
+ styles: ["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;height:100vh}.hide{display:none}::ng-deep mat-sidenav-container{height:100%}::ng-deep mat-sidenav-container mat-sidenav-content{width:100%;z-index:unset!important;overflow:unset!important}::ng-deep h3.divider{text-align:center;display:block;overflow:hidden;margin:0 0 1rem}::ng-deep h3.divider span{font-weight:100;position:relative;display:inline-block}::ng-deep h3.divider span:after,::ng-deep h3.divider span:before{content:\"\";position:absolute;top:50%;height:1px;background:#ccc;width:99999px}::ng-deep h3.divider span:before{left:100%;margin-left:10px}::ng-deep h3.divider span:after{right:100%;margin-right:10px}::ng-deep .pb-builder-content{border-right:1px solid rgba(0,0,0,.12)}::ng-deep .pb-builder-content .overflow{position:absolute;top:0;bottom:0;left:0;right:0;background-color:#fff;opacity:.5;display:none;z-index:3}::ng-deep .pb-builder-content.disabled .overflow{display:block}::ng-deep .pb-builder-content .mat-tab-label{flex:1 1 0;min-width:0;height:64px;font-size:medium;text-transform:uppercase;padding:0 12px}::ng-deep .pb-builder-content .mat-tab-body-wrapper,::ng-deep .pb-builder-content .mat-tab-group{height:100%}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body{padding:0}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements{display:grid;grid-gap:.5rem;margin-bottom:1rem;grid-template:repeat(2,1fr)/repeat(3,1fr)}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements.structure-elements{grid-template:repeat(4,1fr)/1fr}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .elements.cdk-drop-list-dragging .cdk-drag{transform:none!important}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body input{height:auto;border:none}::ng-deep .pb-builder-content .mat-tab-body-wrapper .mat-tab-body .custom-modules .drag-element img{max-width:100%}::ng-deep .pb-builder-container{position:relative;height:100%}::ng-deep .pb-builder-container mat-progress-bar{position:absolute}::ng-deep .pb-builder-container mat-toolbar{background-color:#fff}::ng-deep .pb-builder-options .mat-expansion-panel{box-shadow:none!important}::ng-deep .pb-builder-options .mat-expansion-panel.mat-expanded{overflow:visible}::ng-deep .pb-builder-options mat-expansion-panel-header:not(.mat-expanded){background:rgba(0,0,0,.04)}::ng-deep .pb-builder-options ::ng-deep .group{display:grid;grid-template:auto/repeat(2,1fr);grid-gap:1rem}::ng-deep .pb-builder-options ::ng-deep .group>*{align-self:center}::ng-deep .pb-builder-options ::ng-deep .group+.group{margin-top:1em}::ng-deep .pb-builder-options ::ng-deep .group.four{grid-template-columns:repeat(4,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.f-large{grid-template-columns:2fr 1fr}::ng-deep .pb-builder-options ::ng-deep .group.l-large{grid-template-columns:1fr 2fr}::ng-deep .pb-builder-options ::ng-deep .group.three{grid-template-columns:repeat(3,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.f-small{grid-template-columns:1fr repeat(2,2fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.f-large{grid-template-columns:2fr repeat(2,1fr)}::ng-deep .pb-builder-options ::ng-deep .group.three.l-large{grid-template-columns:repeat(2,1fr) 2fr}::ng-deep .pb-builder-options ::ng-deep .group .mat-form-field-infix{width:auto!important}::ng-deep .drag-element{text-align:center;border:1px solid #ccc;box-sizing:border-box;background:#fff;color:#7b7b7b;cursor:move;transition:box-shadow .3s ease-in-out;will-change:box-shadow;border-radius:3px}::ng-deep .drag-element.cdk-drag-disabled,::ng-deep .drag-element.cdk-drag-placeholder{cursor:not-allowed;opacity:.6}::ng-deep .drag-element:hover{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}::ng-deep .drag-element .mat-icon{font-size:40px!important;padding:.5rem;width:auto;height:auto}::ng-deep .drag-element img{max-width:100%}::ng-deep .drag-element-title{font-size:.9em;text-transform:uppercase;margin-bottom:.5rem}::ng-deep .drag-element.structure-element{height:60px;position:relative;padding:4px;display:grid;grid-template:1fr/1fr}::ng-deep .drag-element.structure-element>div{background:#ccc;border:4px solid #bbb}::ng-deep .drag-element.structure-element.cols_2{grid-template-columns:repeat(2,5fr)}::ng-deep .drag-element.structure-element.cols_3{grid-template-columns:repeat(3,3.33fr)}::ng-deep .drag-element.structure-element.cols_4{grid-template-columns:repeat(4,2.5fr)}::ng-deep .drag-element.structure-element.cols_12{grid-template-columns:6fr 4fr}::ng-deep .drag-element.structure-element.cols_21{grid-template-columns:4fr 6fr}::ng-deep .main-padding{padding:1rem}::ng-deep .history-actions{margin-inline-start:auto;display:flex;gap:.5rem;align-items:center}::ng-deep .history-actions .history-btn{transition:all .2s ease-in-out;color:rgba(0,0,0,.54)}::ng-deep .history-actions .history-btn:hover:not([disabled]){background-color:rgba(0,0,0,.08);border-radius:4px;color:rgba(0,0,0,.87)}::ng-deep .history-actions .history-btn[disabled]{opacity:.38}::ng-deep .cdk-drop-list-receiving>:not(.cdk-drag){opacity:.6}::ng-deep .cdk-drop-list-dragging>*{pointer-events:none}@keyframes drag-animation{0%{opacity:0;height:0}to{opacity:1}}::ng-deep .cdk-drag-animating{animation:drag-animation 1s cubic-bezier(0,0,.2,1) infinite}::ng-deep .cdk-drag-preview{border-radius:4px;box-shadow:0 0 0 2px rgba(63,81,181,.5);min-height:60px;min-width:100px;background-color:#fff}::ng-deep .cdk-drag.structure-element.cdk-drag-placeholder{box-shadow:0 0 1px 2px #ff4081;width:100%;pointer-events:none}"]
4474
4569
  },] }
4475
4570
  ];
4476
4571
  PbEmailBuilderComponent.ctorParameters = function () { return [
@@ -4489,6 +4584,7 @@
4489
4584
  ]; };
4490
4585
  PbEmailBuilderComponent.propDecorators = {
4491
4586
  email: [{ type: i0.Input }],
4587
+ customSidebarTabLabel: [{ type: i0.Input }],
4492
4588
  emailChange: [{ type: i0.Output }]
4493
4589
  };
4494
4590
 
@@ -5864,12 +5960,15 @@
5864
5960
  * All rights reserved.
5865
5961
  */
5866
5962
  var BlockComponent = /** @class */ (function () {
5867
- function BlockComponent(pbMiddlewaresService, userInterfaceService, emailObjectStore, chRef) {
5963
+ function BlockComponent(pbMiddlewaresService, userInterfaceService, emailObjectStore, chRef, elementRef) {
5868
5964
  this.pbMiddlewaresService = pbMiddlewaresService;
5869
5965
  this.userInterfaceService = userInterfaceService;
5870
5966
  this.emailObjectStore = emailObjectStore;
5871
5967
  this.chRef = chRef;
5968
+ this.elementRef = elementRef;
5872
5969
  this.isActive = false;
5970
+ this.isHighlighted = false;
5971
+ this.isDimmed = false;
5873
5972
  this.componentIsDestroyed$ = new rxjs.Subject();
5874
5973
  }
5875
5974
  BlockComponent.prototype.onHostClick = function (event) {
@@ -5883,6 +5982,28 @@
5883
5982
  enumerable: false,
5884
5983
  configurable: true
5885
5984
  });
5985
+ Object.defineProperty(BlockComponent.prototype, "isBlockHighlighted", {
5986
+ get: function () {
5987
+ return this.isHighlighted;
5988
+ },
5989
+ enumerable: false,
5990
+ configurable: true
5991
+ });
5992
+ Object.defineProperty(BlockComponent.prototype, "isBlockDimmed", {
5993
+ get: function () {
5994
+ return this.isDimmed;
5995
+ },
5996
+ enumerable: false,
5997
+ configurable: true
5998
+ });
5999
+ Object.defineProperty(BlockComponent.prototype, "blockId", {
6000
+ get: function () {
6001
+ var _a;
6002
+ return (_a = this.block) === null || _a === void 0 ? void 0 : _a.id;
6003
+ },
6004
+ enumerable: false,
6005
+ configurable: true
6006
+ });
5886
6007
  BlockComponent.prototype.removeBlock = function () {
5887
6008
  var _this = this;
5888
6009
  this.pbMiddlewaresService
@@ -5917,6 +6038,23 @@
5917
6038
  .subscribe(function (isActive) {
5918
6039
  _this.isActive = isActive;
5919
6040
  });
6041
+ this.userInterfaceService.blockHighlight$
6042
+ .pipe(operators.takeUntil(this.componentIsDestroyed$))
6043
+ .subscribe(function (request) {
6044
+ _this.isHighlighted = (request === null || request === void 0 ? void 0 : request.blockId) === _this.block.id;
6045
+ _this.isDimmed = Boolean(request) && !_this.isHighlighted;
6046
+ if (request && _this.isHighlighted && request.options.scrollIntoView !== false) {
6047
+ var scrollIntoView = _this.elementRef.nativeElement.scrollIntoView;
6048
+ if (typeof scrollIntoView === 'function') {
6049
+ scrollIntoView.call(_this.elementRef.nativeElement, {
6050
+ behavior: request.options.behavior || 'smooth',
6051
+ block: request.options.block || 'center',
6052
+ inline: 'nearest'
6053
+ });
6054
+ }
6055
+ }
6056
+ _this.chRef.markForCheck();
6057
+ });
5920
6058
  };
5921
6059
  BlockComponent.prototype.ngDoCheck = function () {
5922
6060
  if (this.isActive) {
@@ -5934,21 +6072,25 @@
5934
6072
  selector: 'pb-block',
5935
6073
  template: "<!--\n ~ Copyright (c) 2024 Pobuca.\n ~ All rights reserved.\n -->\n\n<ng-content select=\".move\"></ng-content>\n<div class=\"tools\" fxLayout fxLayoutGap=\"0.25rem\">\n <button mat-icon-button (click)=\"duplicateBlock()\" i18n-matTooltip=\"block|Duplicate Block\"\n matTooltip=\"Duplicate Block\">\n <mat-icon i18n-aria-label=\"block|Duplicate Block\" aria-label=\"Duplicate block\" inline>file_copy</mat-icon>\n </button>\n <button mat-icon-button (click)=\"removeBlock()\" i18n-matTooltip=\"block|Remove Block\" class=\"delete\"\n matTooltip=\"Remove Block\">\n <mat-icon i18n-aria-label=\"block|Remove Block\" aria-label=\"Delete block\" inline>delete_forever</mat-icon>\n </button>\n</div>\n<ng-content *pbDynamicComponent=\"block\"></ng-content>\n",
5936
6074
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
5937
- styles: ["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;position:relative}:host.active:not(.cdk-drag-preview)>.tools{opacity:1;display:flex!important}:host.active,:host.cdk-drag-placeholder,:host.cdk-drag-preview{z-index:3;box-shadow:0 0 0 2px #3f51b5}:host:hover:not(.active){box-shadow:0 0 0 2px rgba(63,81,181,.5)}:host>.tools{direction:ltr;opacity:0;z-index:4;position:absolute;max-width:100%;bottom:-25px;right:0;display:none!important;transition:all .5s ease-in-out}:host>.tools>button{background:#3f51b5;border-radius:3px;color:#fff;line-height:0;width:25px;height:25px}:host>.tools>button mat-icon{font-size:14px;margin-top:-3px}:host>.tools ::ng-deep+*>*{transition:all .5s cubic-bezier(.445,.05,.55,.95)}"]
6075
+ styles: ["/*!\n * Copyright (c) 2024 Pobuca.\n * All rights reserved.\n */:host{display:block;position:relative;transition:box-shadow .2s ease-in-out,opacity .2s ease-in-out}:host.active:not(.cdk-drag-preview)>.tools{opacity:1;display:flex!important}:host.active,:host.cdk-drag-placeholder,:host.cdk-drag-preview{z-index:3;box-shadow:0 0 0 2px #3f51b5}:host:hover:not(.active){box-shadow:0 0 0 2px rgba(63,81,181,.5)}:host.pb-block-dimmed:not(.cdk-drag-preview){opacity:.3}:host.pb-block-highlighted:not(.cdk-drag-preview){opacity:1;z-index:4;box-shadow:0 0 0 3px #ff9800}:host>.tools{direction:ltr;opacity:0;z-index:4;position:absolute;max-width:100%;bottom:-25px;right:0;display:none!important;transition:all .5s ease-in-out}:host>.tools>button{background:#3f51b5;border-radius:3px;color:#fff;line-height:0;width:25px;height:25px}:host>.tools>button mat-icon{font-size:14px;margin-top:-3px}:host>.tools ::ng-deep+*>*{transition:all .5s cubic-bezier(.445,.05,.55,.95)}"]
5938
6076
  },] }
5939
6077
  ];
5940
6078
  BlockComponent.ctorParameters = function () { return [
5941
6079
  { type: PbUserMiddlewaresService },
5942
6080
  { type: PbUserInterfaceService },
5943
6081
  { type: PbEmailObjectStoreService },
5944
- { type: i0.ChangeDetectorRef }
6082
+ { type: i0.ChangeDetectorRef },
6083
+ { type: i0.ElementRef }
5945
6084
  ]; };
5946
6085
  BlockComponent.propDecorators = {
5947
6086
  block: [{ type: i0.Input }],
5948
6087
  column: [{ type: i0.Input }],
5949
6088
  index: [{ type: i0.Input }],
5950
6089
  onHostClick: [{ type: i0.HostListener, args: ['click', ['$event'],] }],
5951
- isBlockActive: [{ type: i0.HostBinding, args: ['class.active',] }]
6090
+ isBlockActive: [{ type: i0.HostBinding, args: ['class.active',] }],
6091
+ isBlockHighlighted: [{ type: i0.HostBinding, args: ['class.pb-block-highlighted',] }],
6092
+ isBlockDimmed: [{ type: i0.HostBinding, args: ['class.pb-block-dimmed',] }],
6093
+ blockId: [{ type: i0.HostBinding, args: ['attr.data-pb-block-id',] }]
5952
6094
  };
5953
6095
 
5954
6096
  var ImageUploadComponent = /** @class */ (function () {
@@ -6578,9 +6720,11 @@
6578
6720
  exports.Structure = Structure;
6579
6721
  exports.TextBlock = TextBlock;
6580
6722
  exports.VideoBlock = VideoBlock;
6723
+ exports.assignBlockId = assignBlockId;
6581
6724
  exports.bytesToSize = bytesToSize;
6582
6725
  exports.cloneDeep = cloneDeep;
6583
6726
  exports.createBackground = createBackground;
6727
+ exports.createBlockId = createBlockId;
6584
6728
  exports.createBorder = createBorder;
6585
6729
  exports.createCustomRestApiService = createCustomRestApiService;
6586
6730
  exports.createFont = createFont;