@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.
- package/app/fs-block-editor.module.d.ts +19 -18
- package/app/pipes/create-image-url.pipe.d.ts +10 -0
- package/bundles/firestitch-block-editor.umd.js +98 -79
- package/bundles/firestitch-block-editor.umd.js.map +1 -1
- package/esm2015/app/components/block/block.component.js +3 -2
- package/esm2015/app/fs-block-editor.module.js +19 -16
- package/esm2015/app/pipes/create-image-url.pipe.js +19 -0
- package/fesm2015/firestitch-block-editor.js +99 -81
- package/fesm2015/firestitch-block-editor.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,26 +8,27 @@ import * as i5 from "./components/sidebar/sidebar.component";
|
|
|
8
8
|
import * as i6 from "./components/artboard/artboard.component";
|
|
9
9
|
import * as i7 from "./components/layers-reorder-dialog/layers-reorder-dialog.component";
|
|
10
10
|
import * as i8 from "./components/font/font.component";
|
|
11
|
-
import * as i9 from "
|
|
12
|
-
import * as i10 from "@angular/
|
|
13
|
-
import * as i11 from "@angular/
|
|
14
|
-
import * as i12 from "@angular/material/
|
|
15
|
-
import * as i13 from "@angular/material/
|
|
16
|
-
import * as i14 from "@angular/material/
|
|
17
|
-
import * as i15 from "@angular/material/
|
|
18
|
-
import * as i16 from "@angular/material/
|
|
19
|
-
import * as i17 from "@angular/material/
|
|
20
|
-
import * as i18 from "@angular/material/
|
|
21
|
-
import * as i19 from "@angular/
|
|
22
|
-
import * as i20 from "@
|
|
23
|
-
import * as i21 from "@firestitch/
|
|
24
|
-
import * as i22 from "@firestitch/
|
|
25
|
-
import * as i23 from "@firestitch/
|
|
26
|
-
import * as i24 from "@firestitch/
|
|
27
|
-
import * as i25 from "@firestitch/
|
|
11
|
+
import * as i9 from "./pipes/create-image-url.pipe";
|
|
12
|
+
import * as i10 from "@angular/common";
|
|
13
|
+
import * as i11 from "@angular/forms";
|
|
14
|
+
import * as i12 from "@angular/material/icon";
|
|
15
|
+
import * as i13 from "@angular/material/button";
|
|
16
|
+
import * as i14 from "@angular/material/input";
|
|
17
|
+
import * as i15 from "@angular/material/form-field";
|
|
18
|
+
import * as i16 from "@angular/material/checkbox";
|
|
19
|
+
import * as i17 from "@angular/material/tooltip";
|
|
20
|
+
import * as i18 from "@angular/material/select";
|
|
21
|
+
import * as i19 from "@angular/material/list";
|
|
22
|
+
import * as i20 from "@angular/cdk/drag-drop";
|
|
23
|
+
import * as i21 from "@firestitch/file";
|
|
24
|
+
import * as i22 from "@firestitch/colorpicker";
|
|
25
|
+
import * as i23 from "@firestitch/menu";
|
|
26
|
+
import * as i24 from "@firestitch/zoom-pan";
|
|
27
|
+
import * as i25 from "@firestitch/autocomplete";
|
|
28
|
+
import * as i26 from "@firestitch/dialog";
|
|
28
29
|
export declare class FsBlockEditorModule {
|
|
29
30
|
static forRoot(): ModuleWithProviders<FsBlockEditorModule>;
|
|
30
31
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsBlockEditorModule, never>;
|
|
31
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FsBlockEditorModule, [typeof i1.FsBlockComponent, typeof i2.FsBlockEditorComponent, typeof i3.FsBlockEditorSidebarPanelDirective, typeof i4.FsBlockEditorMarginDirective, typeof i5.SidebarComponent, typeof i6.ArtboardComponent, typeof i7.LayersReorderDialogComponent, typeof i8.FontComponent], [typeof
|
|
32
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsBlockEditorModule, [typeof i1.FsBlockComponent, typeof i2.FsBlockEditorComponent, typeof i3.FsBlockEditorSidebarPanelDirective, typeof i4.FsBlockEditorMarginDirective, typeof i5.SidebarComponent, typeof i6.ArtboardComponent, typeof i7.LayersReorderDialogComponent, typeof i8.FontComponent, typeof i9.CreateImageUrlPipe], [typeof i10.CommonModule, typeof i11.FormsModule, typeof i12.MatIconModule, typeof i13.MatButtonModule, typeof i14.MatInputModule, typeof i15.MatFormFieldModule, typeof i16.MatCheckboxModule, typeof i17.MatTooltipModule, typeof i18.MatSelectModule, typeof i19.MatListModule, typeof i20.DragDropModule, typeof i21.FsFileModule, typeof i22.FsColorPickerModule, typeof i23.FsMenuModule, typeof i24.FsZoomPanModule, typeof i25.FsAutocompleteModule, typeof i26.FsDialogModule], [typeof i1.FsBlockComponent, typeof i2.FsBlockEditorComponent, typeof i3.FsBlockEditorSidebarPanelDirective]>;
|
|
32
33
|
static ɵinj: i0.ɵɵInjectorDeclaration<FsBlockEditorModule>;
|
|
33
34
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { FsApi } from '@firestitch/api';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CreateImageUrlPipe implements PipeTransform {
|
|
5
|
+
private _api;
|
|
6
|
+
constructor(_api: FsApi);
|
|
7
|
+
transform(url: any): import("rxjs").Observable<import("@angular/platform-browser").SafeUrl>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CreateImageUrlPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CreateImageUrlPipe, "createImageUrl">;
|
|
10
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@firestitch/block-editor', ['exports', '@angular/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["block-editor"] = {}), global.ng.
|
|
5
|
-
})(this, (function (exports, i16, i15,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/input'), require('@angular/cdk/drag-drop'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/material/list'), require('@angular/material/select'), require('@angular/material/tooltip'), require('@firestitch/colorpicker'), require('@firestitch/dialog'), require('@firestitch/file'), require('@firestitch/menu'), require('@firestitch/zoom-pan'), require('@firestitch/autocomplete'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http'), require('moveable'), require('@angular/material/dialog'), require('@firestitch/common'), require('@angular/material/divider'), require('@firestitch/api'), require('@firestitch/prompt'), require('@angular/material/core'), require('@angular/cdk/text-field')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@firestitch/block-editor', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/input', '@angular/cdk/drag-drop', '@angular/material/button', '@angular/material/checkbox', '@angular/material/form-field', '@angular/material/icon', '@angular/material/list', '@angular/material/select', '@angular/material/tooltip', '@firestitch/colorpicker', '@firestitch/dialog', '@firestitch/file', '@firestitch/menu', '@firestitch/zoom-pan', '@firestitch/autocomplete', 'rxjs', 'rxjs/operators', '@angular/common/http', 'moveable', '@angular/material/dialog', '@firestitch/common', '@angular/material/divider', '@firestitch/api', '@firestitch/prompt', '@angular/material/core', '@angular/cdk/text-field'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["block-editor"] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.input, global.ng.cdk.dragDrop, global.ng.material.button, global.ng.material.checkbox, global.ng.material.formField, global.ng.material.icon, global.ng.material.list, global.ng.material.select, global.ng.material.tooltip, global.i12, global.i2, global.i3$1, global.menu, global.i2$2, global.i10, global.rxjs, global.rxjs.operators, global.ng.common.http, global.Moveable, global.ng.material.dialog, global.common, global.ng.material.divider, global.i1$2, global.i2$1, global.ng.material.core, global.ng.cdk.textField));
|
|
5
|
+
})(this, (function (exports, i13, i0, i16, i15, i7, i6, i9, i6$1, i3, i4, i7$1, i14, i12, i2, i3$1, menu, i2$2, i10, rxjs, operators, i1, Moveable, i1$1, common, i5, i1$2, i2$1, i8, i17) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -24,31 +24,95 @@
|
|
|
24
24
|
return Object.freeze(n);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
var i13__namespace = /*#__PURE__*/_interopNamespace(i13);
|
|
28
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
29
|
var i16__namespace = /*#__PURE__*/_interopNamespace(i16);
|
|
28
30
|
var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
|
|
29
|
-
var
|
|
30
|
-
var i13__namespace = /*#__PURE__*/_interopNamespace(i13);
|
|
31
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
31
32
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
33
|
+
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
32
34
|
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
|
33
35
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
34
|
-
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
35
|
-
var i14__namespace = /*#__PURE__*/_interopNamespace(i14);
|
|
36
|
-
var i7__namespace$1 = /*#__PURE__*/_interopNamespace(i7$1);
|
|
37
36
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
38
|
-
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
37
|
+
var i7__namespace$1 = /*#__PURE__*/_interopNamespace(i7$1);
|
|
38
|
+
var i14__namespace = /*#__PURE__*/_interopNamespace(i14);
|
|
39
39
|
var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
|
|
40
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
40
41
|
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
41
42
|
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
|
|
42
|
-
var
|
|
43
|
-
var Moveable__default = /*#__PURE__*/_interopDefaultLegacy(Moveable);
|
|
43
|
+
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
44
44
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
45
|
-
var
|
|
45
|
+
var Moveable__default = /*#__PURE__*/_interopDefaultLegacy(Moveable);
|
|
46
46
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
47
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
48
|
+
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
47
49
|
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
48
50
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
49
|
-
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
50
51
|
var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
|
|
51
52
|
|
|
53
|
+
var GoogleFontService = /** @class */ (function () {
|
|
54
|
+
function GoogleFontService(httpClient) {
|
|
55
|
+
this.httpClient = httpClient;
|
|
56
|
+
this._apiKey = 'AIzaSyAoT2RLzCSFUb148F4uLXyAuquAzjcjyGk';
|
|
57
|
+
}
|
|
58
|
+
GoogleFontService.prototype.loadFont = function (font) {
|
|
59
|
+
var link = document.createElement('link');
|
|
60
|
+
link.rel = 'stylesheet';
|
|
61
|
+
link.href = "https://fonts.googleapis.com/css2?family=" + font.family + "&family=Tangerine&display=swap";
|
|
62
|
+
document.getElementsByTagName('head')[0].appendChild(link);
|
|
63
|
+
};
|
|
64
|
+
GoogleFontService.prototype.getItems = function () {
|
|
65
|
+
if (this._fonts$) {
|
|
66
|
+
return this._fonts$.asObservable();
|
|
67
|
+
}
|
|
68
|
+
if (!this._apiKey) {
|
|
69
|
+
return rxjs.throwError("Error: api key was not provided to the google fonts service");
|
|
70
|
+
}
|
|
71
|
+
var url = "https://www.googleapis.com/webfonts/v1/webfonts?key=" + this._apiKey;
|
|
72
|
+
return this.httpClient.get(url)
|
|
73
|
+
.pipe(operators.map(function (response) { return response.items
|
|
74
|
+
.map(function (item) {
|
|
75
|
+
return { family: item.family };
|
|
76
|
+
}); }));
|
|
77
|
+
};
|
|
78
|
+
return GoogleFontService;
|
|
79
|
+
}());
|
|
80
|
+
GoogleFontService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GoogleFontService, deps: [{ token: i1__namespace.HttpClient }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
81
|
+
GoogleFontService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GoogleFontService });
|
|
82
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GoogleFontService, decorators: [{
|
|
83
|
+
type: i0.Injectable
|
|
84
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.HttpClient }]; } });
|
|
85
|
+
|
|
86
|
+
var FontComponent = /** @class */ (function () {
|
|
87
|
+
function FontComponent(_el, _googleFontService) {
|
|
88
|
+
this._el = _el;
|
|
89
|
+
this._googleFontService = _googleFontService;
|
|
90
|
+
}
|
|
91
|
+
FontComponent.prototype.ngOnInit = function () {
|
|
92
|
+
var _this = this;
|
|
93
|
+
var observer = new IntersectionObserver(function (entries) {
|
|
94
|
+
if (entries[0].isIntersecting === true) {
|
|
95
|
+
_this._googleFontService.loadFont(_this.font);
|
|
96
|
+
}
|
|
97
|
+
}, { threshold: [0] });
|
|
98
|
+
observer.observe(this._el.nativeElement);
|
|
99
|
+
};
|
|
100
|
+
return FontComponent;
|
|
101
|
+
}());
|
|
102
|
+
FontComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FontComponent, deps: [{ token: i0__namespace.ElementRef }, { token: GoogleFontService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
103
|
+
FontComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FontComponent, selector: "app-font", inputs: { font: "font" }, ngImport: i0__namespace, template: "<div\n [style.fontFamily]=\"font.family\">\n {{font.family}}\n</div>\n", styles: [""], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
104
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FontComponent, decorators: [{
|
|
105
|
+
type: i0.Component,
|
|
106
|
+
args: [{
|
|
107
|
+
selector: 'app-font',
|
|
108
|
+
templateUrl: 'font.component.html',
|
|
109
|
+
styleUrls: ['font.component.scss'],
|
|
110
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
111
|
+
}]
|
|
112
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: GoogleFontService }]; }, propDecorators: { font: [{
|
|
113
|
+
type: i0.Input
|
|
114
|
+
}] } });
|
|
115
|
+
|
|
52
116
|
exports.BlockType = void 0;
|
|
53
117
|
(function (BlockType) {
|
|
54
118
|
BlockType["Rectangle"] = "rectangle";
|
|
@@ -99,8 +163,8 @@
|
|
|
99
163
|
};
|
|
100
164
|
return LayersReorderDialogComponent;
|
|
101
165
|
}());
|
|
102
|
-
LayersReorderDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LayersReorderDialogComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
103
|
-
LayersReorderDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LayersReorderDialogComponent, selector: "ng-component", ngImport: i0__namespace, 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__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4__namespace.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i5__namespace.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i4__namespace.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i6__namespace.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__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i7__namespace.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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.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__namespace.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
166
|
+
LayersReorderDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LayersReorderDialogComponent, deps: [{ token: i1$1.MAT_DIALOG_DATA }, { token: i1__namespace$1.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
167
|
+
LayersReorderDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LayersReorderDialogComponent, selector: "ng-component", ngImport: i0__namespace, 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__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i4__namespace.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i5__namespace.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i4__namespace.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i6__namespace.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__namespace$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i7__namespace.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__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.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__namespace.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i1__namespace$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
104
168
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LayersReorderDialogComponent, decorators: [{
|
|
105
169
|
type: i0.Component,
|
|
106
170
|
args: [{
|
|
@@ -111,8 +175,8 @@
|
|
|
111
175
|
}], ctorParameters: function () {
|
|
112
176
|
return [{ type: undefined, decorators: [{
|
|
113
177
|
type: i0.Inject,
|
|
114
|
-
args: [i1.MAT_DIALOG_DATA]
|
|
115
|
-
}] }, { type: i1__namespace.MatDialogRef }];
|
|
178
|
+
args: [i1$1.MAT_DIALOG_DATA]
|
|
179
|
+
}] }, { type: i1__namespace$1.MatDialogRef }];
|
|
116
180
|
} });
|
|
117
181
|
|
|
118
182
|
/*! *****************************************************************************
|
|
@@ -873,38 +937,21 @@
|
|
|
873
937
|
type: i0.Injectable
|
|
874
938
|
}], ctorParameters: function () { return [{ type: BlocksStore }, { type: i2__namespace.FsDialog }]; } });
|
|
875
939
|
|
|
876
|
-
var
|
|
877
|
-
function
|
|
878
|
-
this.
|
|
879
|
-
this._apiKey = 'AIzaSyAoT2RLzCSFUb148F4uLXyAuquAzjcjyGk';
|
|
940
|
+
var CreateImageUrlPipe = /** @class */ (function () {
|
|
941
|
+
function CreateImageUrlPipe(_api) {
|
|
942
|
+
this._api = _api;
|
|
880
943
|
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
link.rel = 'stylesheet';
|
|
884
|
-
link.href = "https://fonts.googleapis.com/css2?family=" + font.family + "&family=Tangerine&display=swap";
|
|
885
|
-
document.getElementsByTagName('head')[0].appendChild(link);
|
|
886
|
-
};
|
|
887
|
-
GoogleFontService.prototype.getItems = function () {
|
|
888
|
-
if (this._fonts$) {
|
|
889
|
-
return this._fonts$.asObservable();
|
|
890
|
-
}
|
|
891
|
-
if (!this._apiKey) {
|
|
892
|
-
return rxjs.throwError("Error: api key was not provided to the google fonts service");
|
|
893
|
-
}
|
|
894
|
-
var url = "https://www.googleapis.com/webfonts/v1/webfonts?key=" + this._apiKey;
|
|
895
|
-
return this.httpClient.get(url)
|
|
896
|
-
.pipe(operators.map(function (response) { return response.items
|
|
897
|
-
.map(function (item) {
|
|
898
|
-
return { family: item.family };
|
|
899
|
-
}); }));
|
|
944
|
+
CreateImageUrlPipe.prototype.transform = function (url) {
|
|
945
|
+
return this._api.createApiFile(url).safeDataUrl;
|
|
900
946
|
};
|
|
901
|
-
return
|
|
947
|
+
return CreateImageUrlPipe;
|
|
902
948
|
}());
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type:
|
|
906
|
-
type: i0.
|
|
907
|
-
|
|
949
|
+
CreateImageUrlPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CreateImageUrlPipe, deps: [{ token: i1__namespace$2.FsApi }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
950
|
+
CreateImageUrlPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CreateImageUrlPipe, name: "createImageUrl" });
|
|
951
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CreateImageUrlPipe, decorators: [{
|
|
952
|
+
type: i0.Pipe,
|
|
953
|
+
args: [{ name: 'createImageUrl' }]
|
|
954
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$2.FsApi }]; } });
|
|
908
955
|
|
|
909
956
|
var FsBlockComponent = /** @class */ (function () {
|
|
910
957
|
function FsBlockComponent(_blockEditor, _elementRef, _cdRef, _googleFontService) {
|
|
@@ -1433,7 +1480,7 @@
|
|
|
1433
1480
|
return FsBlockComponent;
|
|
1434
1481
|
}());
|
|
1435
1482
|
FsBlockComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockComponent, deps: [{ token: BlockEditorService }, { token: i0__namespace.ElementRef }, { token: i0__namespace.ChangeDetectorRef }, { token: GoogleFontService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1436
|
-
FsBlockComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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]=\"
|
|
1483
|
+
FsBlockComponent.ɵcmp = i0__namespace.ɵɵ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__namespace, 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__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i13__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i13__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i13__namespace.AsyncPipe, "createImageUrl": CreateImageUrlPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1437
1484
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockComponent, decorators: [{
|
|
1438
1485
|
type: i0.Component,
|
|
1439
1486
|
args: [{
|
|
@@ -1511,36 +1558,6 @@
|
|
|
1511
1558
|
{ value: BlockFormat.YYYYMMDD, name: 'YYYY/MM/DD', blockTypes: [exports.BlockType.Date] },
|
|
1512
1559
|
];
|
|
1513
1560
|
|
|
1514
|
-
var FontComponent = /** @class */ (function () {
|
|
1515
|
-
function FontComponent(_el, _googleFontService) {
|
|
1516
|
-
this._el = _el;
|
|
1517
|
-
this._googleFontService = _googleFontService;
|
|
1518
|
-
}
|
|
1519
|
-
FontComponent.prototype.ngOnInit = function () {
|
|
1520
|
-
var _this = this;
|
|
1521
|
-
var observer = new IntersectionObserver(function (entries) {
|
|
1522
|
-
if (entries[0].isIntersecting === true) {
|
|
1523
|
-
_this._googleFontService.loadFont(_this.font);
|
|
1524
|
-
}
|
|
1525
|
-
}, { threshold: [0] });
|
|
1526
|
-
observer.observe(this._el.nativeElement);
|
|
1527
|
-
};
|
|
1528
|
-
return FontComponent;
|
|
1529
|
-
}());
|
|
1530
|
-
FontComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FontComponent, deps: [{ token: i0__namespace.ElementRef }, { token: GoogleFontService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1531
|
-
FontComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FontComponent, selector: "app-font", inputs: { font: "font" }, ngImport: i0__namespace, template: "<div\n [style.fontFamily]=\"font.family\">\n {{font.family}}\n</div>\n", styles: [""], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1532
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FontComponent, decorators: [{
|
|
1533
|
-
type: i0.Component,
|
|
1534
|
-
args: [{
|
|
1535
|
-
selector: 'app-font',
|
|
1536
|
-
templateUrl: 'font.component.html',
|
|
1537
|
-
styleUrls: ['font.component.scss'],
|
|
1538
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1539
|
-
}]
|
|
1540
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: GoogleFontService }]; }, propDecorators: { font: [{
|
|
1541
|
-
type: i0.Input
|
|
1542
|
-
}] } });
|
|
1543
|
-
|
|
1544
1561
|
var SidebarComponent = /** @class */ (function () {
|
|
1545
1562
|
function SidebarComponent(_el, _blockEditor, _cdRef, _prompt, _googleFontService, _document) {
|
|
1546
1563
|
var _this = this;
|
|
@@ -1977,7 +1994,8 @@
|
|
|
1977
1994
|
SidebarComponent,
|
|
1978
1995
|
ArtboardComponent,
|
|
1979
1996
|
LayersReorderDialogComponent,
|
|
1980
|
-
FontComponent
|
|
1997
|
+
FontComponent,
|
|
1998
|
+
CreateImageUrlPipe], imports: [i13.CommonModule,
|
|
1981
1999
|
i16.FormsModule,
|
|
1982
2000
|
i3.MatIconModule,
|
|
1983
2001
|
i6.MatButtonModule,
|
|
@@ -2053,6 +2071,7 @@
|
|
|
2053
2071
|
ArtboardComponent,
|
|
2054
2072
|
LayersReorderDialogComponent,
|
|
2055
2073
|
FontComponent,
|
|
2074
|
+
CreateImageUrlPipe,
|
|
2056
2075
|
],
|
|
2057
2076
|
providers: [
|
|
2058
2077
|
GoogleFontService,
|