@firestitch/block-editor 12.3.19 → 12.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,50 +1,111 @@
1
+ import * as i13 from '@angular/common';
2
+ import { DOCUMENT, CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Injectable, Component, ChangeDetectionStrategy, Input, Inject, Pipe, ViewChild, HostBinding, Directive, EventEmitter, ContentChildren, Output, ViewChildren, ElementRef, HostListener, NgModule } from '@angular/core';
1
5
  import * as i16 from '@angular/forms';
2
6
  import { FormsModule } from '@angular/forms';
3
7
  import * as i15 from '@angular/material/input';
4
8
  import { MatInputModule } from '@angular/material/input';
5
- import * as i0 from '@angular/core';
6
- import { Component, ChangeDetectionStrategy, Inject, Injectable, ViewChild, Input, HostBinding, Directive, EventEmitter, ContentChildren, Output, ViewChildren, ElementRef, HostListener, NgModule } from '@angular/core';
7
- import * as i13 from '@angular/common';
8
- import { DOCUMENT, CommonModule } from '@angular/common';
9
+ import * as i7 from '@angular/cdk/drag-drop';
10
+ import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
9
11
  import * as i6 from '@angular/material/button';
10
12
  import { MatButtonModule } from '@angular/material/button';
13
+ import * as i9 from '@angular/material/checkbox';
14
+ import { MatCheckboxModule } from '@angular/material/checkbox';
11
15
  import * as i6$1 from '@angular/material/form-field';
12
16
  import { MatFormFieldModule } from '@angular/material/form-field';
13
17
  import * as i3 from '@angular/material/icon';
14
18
  import { MatIconModule } from '@angular/material/icon';
15
- import * as i9 from '@angular/material/checkbox';
16
- import { MatCheckboxModule } from '@angular/material/checkbox';
17
- import * as i14 from '@angular/material/tooltip';
18
- import { MatTooltipModule } from '@angular/material/tooltip';
19
- import * as i7$1 from '@angular/material/select';
20
- import { MatSelectModule } from '@angular/material/select';
21
19
  import * as i4 from '@angular/material/list';
22
20
  import { MatListModule } from '@angular/material/list';
23
- import * as i7 from '@angular/cdk/drag-drop';
24
- import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
21
+ import * as i7$1 from '@angular/material/select';
22
+ import { MatSelectModule } from '@angular/material/select';
23
+ import * as i14 from '@angular/material/tooltip';
24
+ import { MatTooltipModule } from '@angular/material/tooltip';
25
25
  import * as i12 from '@firestitch/colorpicker';
26
26
  import { FsColorPickerModule } from '@firestitch/colorpicker';
27
+ import * as i2 from '@firestitch/dialog';
28
+ import { FsDialogModule } from '@firestitch/dialog';
27
29
  import * as i3$1 from '@firestitch/file';
28
30
  import { FsFileModule } from '@firestitch/file';
29
31
  import { FsMenuModule } from '@firestitch/menu';
30
32
  import * as i2$2 from '@firestitch/zoom-pan';
31
33
  import { FsZoomPanComponent, FsZoomPanModule } from '@firestitch/zoom-pan';
32
- import * as i2 from '@firestitch/dialog';
33
- import { FsDialogModule } from '@firestitch/dialog';
34
- import { filter, map, groupBy, debounceTime, mergeAll, takeUntil, switchMap, delay } from 'rxjs/operators';
34
+ import * as i10 from '@firestitch/autocomplete';
35
+ import { FsAutocompleteModule } from '@firestitch/autocomplete';
36
+ import * as i1 from '@angular/common/http';
37
+ import { throwError, Subject, BehaviorSubject, from, fromEvent } from 'rxjs';
38
+ import { map, filter, groupBy, debounceTime, mergeAll, takeUntil, switchMap, delay } from 'rxjs/operators';
35
39
  import Moveable from 'moveable';
36
- import { Subject, BehaviorSubject, from, throwError, fromEvent } from 'rxjs';
37
- import * as i1 from '@angular/material/dialog';
40
+ import * as i1$1 from '@angular/material/dialog';
38
41
  import { MAT_DIALOG_DATA } from '@angular/material/dialog';
39
42
  import { index, guid, round } from '@firestitch/common';
40
43
  import * as i5 from '@angular/material/divider';
41
- import * as i1$1 from '@angular/common/http';
44
+ import * as i1$2 from '@firestitch/api';
42
45
  import * as i2$1 from '@firestitch/prompt';
43
46
  import * as i8 from '@angular/material/core';
44
- import * as i10 from '@firestitch/autocomplete';
45
- import { FsAutocompleteModule } from '@firestitch/autocomplete';
46
47
  import * as i17 from '@angular/cdk/text-field';
47
48
 
49
+ class GoogleFontService {
50
+ constructor(httpClient) {
51
+ this.httpClient = httpClient;
52
+ this._apiKey = 'AIzaSyAoT2RLzCSFUb148F4uLXyAuquAzjcjyGk';
53
+ }
54
+ loadFont(font) {
55
+ var link = document.createElement('link');
56
+ link.rel = 'stylesheet';
57
+ link.href = `https://fonts.googleapis.com/css2?family=${font.family}&family=Tangerine&display=swap`;
58
+ document.getElementsByTagName('head')[0].appendChild(link);
59
+ }
60
+ getItems() {
61
+ if (this._fonts$) {
62
+ return this._fonts$.asObservable();
63
+ }
64
+ if (!this._apiKey) {
65
+ return throwError(`Error: api key was not provided to the google fonts service`);
66
+ }
67
+ const url = `https://www.googleapis.com/webfonts/v1/webfonts?key=${this._apiKey}`;
68
+ return this.httpClient.get(url)
69
+ .pipe(map((response) => response.items
70
+ .map((item) => {
71
+ return { family: item.family };
72
+ })));
73
+ }
74
+ }
75
+ GoogleFontService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GoogleFontService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
76
+ GoogleFontService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GoogleFontService });
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GoogleFontService, decorators: [{
78
+ type: Injectable
79
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
80
+
81
+ class FontComponent {
82
+ constructor(_el, _googleFontService) {
83
+ this._el = _el;
84
+ this._googleFontService = _googleFontService;
85
+ }
86
+ ngOnInit() {
87
+ var observer = new IntersectionObserver((entries) => {
88
+ if (entries[0].isIntersecting === true) {
89
+ this._googleFontService.loadFont(this.font);
90
+ }
91
+ }, { threshold: [0] });
92
+ observer.observe(this._el.nativeElement);
93
+ }
94
+ }
95
+ FontComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FontComponent, deps: [{ token: i0.ElementRef }, { token: GoogleFontService }], target: i0.ɵɵFactoryTarget.Component });
96
+ FontComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FontComponent, selector: "app-font", inputs: { font: "font" }, ngImport: i0, template: "<div\n [style.fontFamily]=\"font.family\">\n {{font.family}}\n</div>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
97
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FontComponent, decorators: [{
98
+ type: Component,
99
+ args: [{
100
+ selector: 'app-font',
101
+ templateUrl: 'font.component.html',
102
+ styleUrls: ['font.component.scss'],
103
+ changeDetection: ChangeDetectionStrategy.OnPush,
104
+ }]
105
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: GoogleFontService }]; }, propDecorators: { font: [{
106
+ type: Input
107
+ }] } });
108
+
48
109
  var BlockType;
49
110
  (function (BlockType) {
50
111
  BlockType["Rectangle"] = "rectangle";
@@ -94,8 +155,8 @@ class LayersReorderDialogComponent {
94
155
  this.blockComponents = data.blockComponents;
95
156
  }
96
157
  }
97
- LayersReorderDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LayersReorderDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
98
- LayersReorderDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LayersReorderDialogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title><mat-icon>swap_vert</mat-icon> Reorder Fields</h1>\n <mat-dialog-content>\n <mat-list cdkDropList (cdkDropListDropped)=\"swapItems($event)\">\n <mat-divider></mat-divider>\n <ng-container *ngFor=\"let blockComponent of blockComponents\">\n <mat-list-item cdkDrag cdkDragLockAxis=\"y\">\n <mat-icon cdkDragHandle>drag_handle</mat-icon>\n <mat-icon>\n {{ blockTypeIcons[blockComponent.block.type] }}\n </mat-icon>\n <span class=\"block-label\">\n {{ blockComponent.block.label || blockComponent.block.content || 'No Content'}} \n </span>\n </mat-list-item>\n <mat-divider></mat-divider>\n </ng-container>\n </mat-list>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button color=\"primary\" (click)=\"done()\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["h1{display:flex}.mat-icon{margin-right:20px}.block-label{min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:1000px}.cdk-drag-preview{display:flex;padding-left:15px!important;background:#fff;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview ::ng-deep .mat-list-item-content{display:flex;flex-direction:row;align-items:center;font-size:16px}.cdk-drag-handle{cursor:grab}.cdk-drag-placeholder{opacity:.2}\n"], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i13.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
158
+ LayersReorderDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LayersReorderDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1$1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
159
+ LayersReorderDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LayersReorderDialogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <h1 mat-dialog-title><mat-icon>swap_vert</mat-icon> Reorder Fields</h1>\n <mat-dialog-content>\n <mat-list cdkDropList (cdkDropListDropped)=\"swapItems($event)\">\n <mat-divider></mat-divider>\n <ng-container *ngFor=\"let blockComponent of blockComponents\">\n <mat-list-item cdkDrag cdkDragLockAxis=\"y\">\n <mat-icon cdkDragHandle>drag_handle</mat-icon>\n <mat-icon>\n {{ blockTypeIcons[blockComponent.block.type] }}\n </mat-icon>\n <span class=\"block-label\">\n {{ blockComponent.block.label || blockComponent.block.content || 'No Content'}} \n </span>\n </mat-list-item>\n <mat-divider></mat-divider>\n </ng-container>\n </mat-list>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button mat-button color=\"primary\" (click)=\"done()\">Done</button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: ["h1{display:flex}.mat-icon{margin-right:20px}.block-label{min-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:1000px}.cdk-drag-preview{display:flex;padding-left:15px!important;background:#fff;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-preview ::ng-deep .mat-list-item-content{display:flex;flex-direction:row;align-items:center;font-size:16px}.cdk-drag-handle{cursor:grab}.cdk-drag-placeholder{opacity:.2}\n"], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i7.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i13.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i7.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i1$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
99
160
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LayersReorderDialogComponent, decorators: [{
100
161
  type: Component,
101
162
  args: [{
@@ -106,7 +167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
106
167
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
107
168
  type: Inject,
108
169
  args: [MAT_DIALOG_DATA]
109
- }] }, { type: i1.MatDialogRef }]; } });
170
+ }] }, { type: i1$1.MatDialogRef }]; } });
110
171
 
111
172
  var EventType;
112
173
  (function (EventType) {
@@ -451,37 +512,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
451
512
  type: Injectable
452
513
  }], ctorParameters: function () { return [{ type: BlocksStore }, { type: i2.FsDialog }]; } });
453
514
 
454
- class GoogleFontService {
455
- constructor(httpClient) {
456
- this.httpClient = httpClient;
457
- this._apiKey = 'AIzaSyAoT2RLzCSFUb148F4uLXyAuquAzjcjyGk';
515
+ class CreateImageUrlPipe {
516
+ constructor(_api) {
517
+ this._api = _api;
458
518
  }
459
- loadFont(font) {
460
- var link = document.createElement('link');
461
- link.rel = 'stylesheet';
462
- link.href = `https://fonts.googleapis.com/css2?family=${font.family}&family=Tangerine&display=swap`;
463
- document.getElementsByTagName('head')[0].appendChild(link);
464
- }
465
- getItems() {
466
- if (this._fonts$) {
467
- return this._fonts$.asObservable();
468
- }
469
- if (!this._apiKey) {
470
- return throwError(`Error: api key was not provided to the google fonts service`);
471
- }
472
- const url = `https://www.googleapis.com/webfonts/v1/webfonts?key=${this._apiKey}`;
473
- return this.httpClient.get(url)
474
- .pipe(map((response) => response.items
475
- .map((item) => {
476
- return { family: item.family };
477
- })));
519
+ transform(url) {
520
+ return this._api.createApiFile(url).safeDataUrl;
478
521
  }
479
522
  }
480
- GoogleFontService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GoogleFontService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
481
- GoogleFontService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GoogleFontService });
482
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GoogleFontService, decorators: [{
483
- type: Injectable
484
- }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
523
+ CreateImageUrlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CreateImageUrlPipe, deps: [{ token: i1$2.FsApi }], target: i0.ɵɵFactoryTarget.Pipe });
524
+ CreateImageUrlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CreateImageUrlPipe, name: "createImageUrl" });
525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CreateImageUrlPipe, decorators: [{
526
+ type: Pipe,
527
+ args: [{ name: 'createImageUrl' }]
528
+ }], ctorParameters: function () { return [{ type: i1$2.FsApi }]; } });
485
529
 
486
530
  class FsBlockComponent {
487
531
  constructor(_blockEditor, _elementRef, _cdRef, _googleFontService) {
@@ -921,7 +965,7 @@ class FsBlockComponent {
921
965
  }
922
966
  }
923
967
  FsBlockComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsBlockComponent, deps: [{ token: BlockEditorService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: GoogleFontService }], target: i0.ɵɵFactoryTarget.Component });
924
- FsBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsBlockComponent, selector: "fs-block", inputs: { block: "block", html: "html", zoompan: "zoompan" }, host: { properties: { "class.transforming": "this.transformating" } }, viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, static: true }, { propertyName: "contentElement", first: true, predicate: ["contentElement"], descendants: true, static: true }, { propertyName: "contentEditable", first: true, predicate: ["contentEditable"], descendants: true, static: true }], ngImport: i0, template: "<div\n #element\n [class]=\"'block ' + 'block-' + block.type\"\n [style.top]=\"styleTop\"\n [style.left]=\"styleLeft\"\n [style.width]=\"styleWidth\"\n [style.height]=\"styleHeight\"\n [ngClass]=\"{ \n editable: editable, \n readonly: block.readonly,\n required: block.required,\n lock: block.lock,\n selected: selected\n }\"\n [style.zIndex]=\"block.index\">\n <div\n #contentElement\n class=\"content\"\n [style.borderColor]=\"block.borderColor\"\n [style.borderWidth]=\"block.borderWidth ? block.borderWidth + 'pt' : ''\"\n [style.borderStyle]=\"block.borderColor ? 'solid' : 'dashed'\"\n [style.textAlign]=\"block.horizontalAlign\"\n [style.fontStyle]=\"block.italic ? 'italic' : ''\"\n [style.fontFamily]=\"block.fontFamily || ''\"\n [style.fontSize]=\"block.fontSize ? block.fontSize + 'pt' : ''\"\n [style.lineHeight]=\"block.lineHeight ? block.lineHeight + 'pt' : ''\"\n [style.color]=\"block.fontColor\"\n [style.fontWeight]=\"block.bold ? 'bold' : ''\"\n [style.textDecoration]=\"block.underline ? 'underline' : ''\"\n [style.paddingTop]=\"block.paddingTop ? block.paddingTop + 'in' : ''\"\n [style.paddingBottom]=\"block.paddingBottom ? block.paddingBottom + 'in' : ''\"\n [style.paddingLeft]=\"block.paddingLeft ? block.paddingLeft + 'in' : ''\"\n [style.paddingRight]=\"block.paddingRight ? block.paddingRight + 'in' : ''\"\n [style.backgroundColor]=\"block.backgroundColor\"\n [style.borderBottomLeftRadius]=\"block.shapeRadius && block.shapeBottomLeft === 'round' ? block.shapeRadius + '%' : ''\"\n [style.borderBottomRightRadius]=\"block.shapeRadius && block.shapeBottomRight === 'round' ? block.shapeRadius + '%' : ''\"\n [style.borderTopRightRadius]=\"block.shapeRadius && block.shapeTopRight === 'round' ? block.shapeRadius + '%' : ''\"\n [style.borderTopLeftRadius]=\"block.shapeRadius && block.shapeTopLeft === 'round' ? block.shapeRadius + '%' : ''\"\n [style.boxShadow]=\"styleBoxShadow\"\n [ngClass]=\"{\n 'editable': editable,\n 'vertical-align-center': block.verticalAlign === 'center',\n 'vertical-align-bottom': block.verticalAlign === 'bottom'\n }\">\n <ng-container [ngSwitch]=\"block.type\">\n <ng-container *ngIf=\"block.imageUrl\">\n <img \n [style.opacity]=\"block.imageOpacity ? block.imageOpacity/100 : 1\"\n [src]=\"block.imageUrl\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"block.type === BlockType.LongText || block.type === BlockType.ShortText || block.type === BlockType.RadioButton || block.type === BlockType.Checkbox || block.type === BlockType.Date\">\n {{block.label || block.name}}\n </ng-container>\n <div\n #contentEditable\n [contentEditable]=\"editable\"\n class=\"content-editable\"\n [innerHTML]=\"content\">\n </div>\n </div>\n <div class=\"outline\"></div>\n</div>\n", styles: [":host ::ng-deep .moveable-control{width:10px!important;height:10px!important;margin-top:-5px!important;margin-left:-5px!important}:host.transforming ::ng-deep .moveable-control,:host.transforming ::ng-deep .moveable-rotation{display:none}.block{position:absolute;display:block;outline:none;-webkit-user-select:none;user-select:none;cursor:pointer;box-sizing:border-box}.block.selected{border-color:#31a2ff95}.block.block-shorttext,.block.block-longtext,.block.block-date,.block.block-radiobutton,.block.block-signature,.block.block-checkbox{background-color:#aab5e1cc;color:#585555;font-size:12px}.block.block-radiobutton{border-radius:50%}.block.required{background-color:#f7adaa}.block .content-editable{outline:none;position:relative;margin:-1px}.block.editable .content-editable{cursor:text}.block .content{flex-direction:column;height:100%;display:flex;border:0px solid transparent;position:relative;box-sizing:border-box;overflow:hidden}.block .content fs-html-editor{width:100%}.block .content.vertical-align-center{justify-content:center}.block .content.vertical-align-bottom{justify-content:flex-end}.block .content img{width:100%;height:100%;position:absolute}.block.selected .outline,.block:hover .outline{border:1px solid rgba(68,170,255,.7);position:absolute;top:0;left:0;bottom:0;right:0}.block.selected.lock .outline,.block:hover.lock .outline{border-color:#e4181866;border-style:dashed}:host ::ng-deep fs-html-editor .bottom-line,:host ::ng-deep fs-html-editor .fr-toolbar{display:none!important}:host ::ng-deep fs-html-editor .fr-wrapper{background:none!important;border:none!important}:host ::ng-deep .moveable-line:not(.moveable-rotation-line):not(.moveable-guideline){background:transparent!important}\n"], directives: [{ type: i13.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i13.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i13.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
968
+ FsBlockComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsBlockComponent, selector: "fs-block", inputs: { block: "block", html: "html", zoompan: "zoompan" }, host: { properties: { "class.transforming": "this.transformating" } }, viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, static: true }, { propertyName: "contentElement", first: true, predicate: ["contentElement"], descendants: true, static: true }, { propertyName: "contentEditable", first: true, predicate: ["contentEditable"], descendants: true, static: true }], ngImport: i0, template: "<div\n #element\n [class]=\"'block ' + 'block-' + block.type\"\n [style.top]=\"styleTop\"\n [style.left]=\"styleLeft\"\n [style.width]=\"styleWidth\"\n [style.height]=\"styleHeight\"\n [ngClass]=\"{ \n editable: editable, \n readonly: block.readonly,\n required: block.required,\n lock: block.lock,\n selected: selected\n }\"\n [style.zIndex]=\"block.index\">\n <div\n #contentElement\n class=\"content\"\n [style.borderColor]=\"block.borderColor\"\n [style.borderWidth]=\"block.borderWidth ? block.borderWidth + 'pt' : ''\"\n [style.borderStyle]=\"block.borderColor ? 'solid' : 'dashed'\"\n [style.textAlign]=\"block.horizontalAlign\"\n [style.fontStyle]=\"block.italic ? 'italic' : ''\"\n [style.fontFamily]=\"block.fontFamily || ''\"\n [style.fontSize]=\"block.fontSize ? block.fontSize + 'pt' : ''\"\n [style.lineHeight]=\"block.lineHeight ? block.lineHeight + 'pt' : ''\"\n [style.color]=\"block.fontColor\"\n [style.fontWeight]=\"block.bold ? 'bold' : ''\"\n [style.textDecoration]=\"block.underline ? 'underline' : ''\"\n [style.paddingTop]=\"block.paddingTop ? block.paddingTop + 'in' : ''\"\n [style.paddingBottom]=\"block.paddingBottom ? block.paddingBottom + 'in' : ''\"\n [style.paddingLeft]=\"block.paddingLeft ? block.paddingLeft + 'in' : ''\"\n [style.paddingRight]=\"block.paddingRight ? block.paddingRight + 'in' : ''\"\n [style.backgroundColor]=\"block.backgroundColor\"\n [style.borderBottomLeftRadius]=\"block.shapeRadius && block.shapeBottomLeft === 'round' ? block.shapeRadius + '%' : ''\"\n [style.borderBottomRightRadius]=\"block.shapeRadius && block.shapeBottomRight === 'round' ? block.shapeRadius + '%' : ''\"\n [style.borderTopRightRadius]=\"block.shapeRadius && block.shapeTopRight === 'round' ? block.shapeRadius + '%' : ''\"\n [style.borderTopLeftRadius]=\"block.shapeRadius && block.shapeTopLeft === 'round' ? block.shapeRadius + '%' : ''\"\n [style.boxShadow]=\"styleBoxShadow\"\n [ngClass]=\"{\n 'editable': editable,\n 'vertical-align-center': block.verticalAlign === 'center',\n 'vertical-align-bottom': block.verticalAlign === 'bottom'\n }\">\n <ng-container [ngSwitch]=\"block.type\">\n <ng-container *ngIf=\"block.imageUrl && ((block.imageUrl | createImageUrl) | async) as src\">\n <img \n [style.opacity]=\"block.imageOpacity ? block.imageOpacity/100 : 1\"\n [src]=\"src\">\n </ng-container>\n\n </ng-container>\n <ng-container *ngIf=\"block.type === BlockType.LongText || block.type === BlockType.ShortText || block.type === BlockType.RadioButton || block.type === BlockType.Checkbox || block.type === BlockType.Date\">\n {{block.label || block.name}}\n </ng-container>\n <div\n #contentEditable\n [contentEditable]=\"editable\"\n class=\"content-editable\"\n [innerHTML]=\"content\">\n </div>\n </div>\n <div class=\"outline\"></div>\n</div>\n", styles: [":host ::ng-deep .moveable-control{width:10px!important;height:10px!important;margin-top:-5px!important;margin-left:-5px!important}:host.transforming ::ng-deep .moveable-control,:host.transforming ::ng-deep .moveable-rotation{display:none}.block{position:absolute;display:block;outline:none;-webkit-user-select:none;user-select:none;cursor:pointer;box-sizing:border-box}.block.selected{border-color:#31a2ff95}.block.block-shorttext,.block.block-longtext,.block.block-date,.block.block-radiobutton,.block.block-signature,.block.block-checkbox{background-color:#aab5e1cc;color:#585555;font-size:12px}.block.block-radiobutton{border-radius:50%}.block.required{background-color:#f7adaa}.block .content-editable{outline:none;position:relative;margin:-1px}.block.editable .content-editable{cursor:text}.block .content{flex-direction:column;height:100%;display:flex;border:0px solid transparent;position:relative;box-sizing:border-box;overflow:hidden}.block .content fs-html-editor{width:100%}.block .content.vertical-align-center{justify-content:center}.block .content.vertical-align-bottom{justify-content:flex-end}.block .content img{width:100%;height:100%;position:absolute}.block.selected .outline,.block:hover .outline{border:1px solid rgba(68,170,255,.7);position:absolute;top:0;left:0;bottom:0;right:0}.block.selected.lock .outline,.block:hover.lock .outline{border-color:#e4181866;border-style:dashed}:host ::ng-deep fs-html-editor .bottom-line,:host ::ng-deep fs-html-editor .fr-toolbar{display:none!important}:host ::ng-deep fs-html-editor .fr-wrapper{background:none!important;border:none!important}:host ::ng-deep .moveable-line:not(.moveable-rotation-line):not(.moveable-guideline){background:transparent!important}\n"], directives: [{ type: i13.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i13.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i13.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i13.AsyncPipe, "createImageUrl": CreateImageUrlPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
925
969
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsBlockComponent, decorators: [{
926
970
  type: Component,
927
971
  args: [{
@@ -993,34 +1037,6 @@ const BlockFormats = [
993
1037
  { value: BlockFormat.YYYYMMDD, name: 'YYYY/MM/DD', blockTypes: [BlockType.Date] },
994
1038
  ];
995
1039
 
996
- class FontComponent {
997
- constructor(_el, _googleFontService) {
998
- this._el = _el;
999
- this._googleFontService = _googleFontService;
1000
- }
1001
- ngOnInit() {
1002
- var observer = new IntersectionObserver((entries) => {
1003
- if (entries[0].isIntersecting === true) {
1004
- this._googleFontService.loadFont(this.font);
1005
- }
1006
- }, { threshold: [0] });
1007
- observer.observe(this._el.nativeElement);
1008
- }
1009
- }
1010
- FontComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FontComponent, deps: [{ token: i0.ElementRef }, { token: GoogleFontService }], target: i0.ɵɵFactoryTarget.Component });
1011
- FontComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FontComponent, selector: "app-font", inputs: { font: "font" }, ngImport: i0, template: "<div\n [style.fontFamily]=\"font.family\">\n {{font.family}}\n</div>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1012
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FontComponent, decorators: [{
1013
- type: Component,
1014
- args: [{
1015
- selector: 'app-font',
1016
- templateUrl: 'font.component.html',
1017
- styleUrls: ['font.component.scss'],
1018
- changeDetection: ChangeDetectionStrategy.OnPush,
1019
- }]
1020
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: GoogleFontService }]; }, propDecorators: { font: [{
1021
- type: Input
1022
- }] } });
1023
-
1024
1040
  class SidebarComponent {
1025
1041
  constructor(_el, _blockEditor, _cdRef, _prompt, _googleFontService, _document) {
1026
1042
  this._el = _el;
@@ -1428,7 +1444,8 @@ FsBlockEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ver
1428
1444
  SidebarComponent,
1429
1445
  ArtboardComponent,
1430
1446
  LayersReorderDialogComponent,
1431
- FontComponent], imports: [CommonModule,
1447
+ FontComponent,
1448
+ CreateImageUrlPipe], imports: [CommonModule,
1432
1449
  FormsModule,
1433
1450
  MatIconModule,
1434
1451
  MatButtonModule,
@@ -1504,6 +1521,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1504
1521
  ArtboardComponent,
1505
1522
  LayersReorderDialogComponent,
1506
1523
  FontComponent,
1524
+ CreateImageUrlPipe,
1507
1525
  ],
1508
1526
  providers: [
1509
1527
  GoogleFontService,