@firestitch/block-editor 12.3.29 → 12.3.31

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.
Files changed (38) hide show
  1. package/app/components/artboard/artboard.component.d.ts +6 -5
  2. package/app/components/block/block.component.d.ts +6 -5
  3. package/app/components/block/index.d.ts +1 -0
  4. package/app/components/group/group-dialog.component.d.ts +17 -0
  5. package/app/components/group/index.d.ts +1 -0
  6. package/app/components/index.d.ts +1 -0
  7. package/app/components/layers-reorder-dialog/index.d.ts +1 -0
  8. package/app/components/sidebar/index.d.ts +1 -0
  9. package/app/components/sidebar/sidebar.component.d.ts +24 -6
  10. package/app/directives/index.d.ts +2 -0
  11. package/app/fs-block-editor.module.d.ts +20 -19
  12. package/app/interfaces/block-group.d.ts +5 -0
  13. package/app/interfaces/block.d.ts +1 -1
  14. package/app/interfaces/index.d.ts +1 -0
  15. package/app/services/block-editor.service.d.ts +13 -10
  16. package/app/services/blocks-store.service.d.ts +1 -9
  17. package/bundles/firestitch-block-editor.umd.js +398 -241
  18. package/bundles/firestitch-block-editor.umd.js.map +1 -1
  19. package/esm2015/app/components/artboard/artboard.component.js +15 -6
  20. package/esm2015/app/components/block/block.component.js +23 -18
  21. package/esm2015/app/components/block/index.js +2 -0
  22. package/esm2015/app/components/block-editor/block-editor.component.js +1 -1
  23. package/esm2015/app/components/group/group-dialog.component.js +48 -0
  24. package/esm2015/app/components/group/index.js +2 -0
  25. package/esm2015/app/components/index.js +2 -1
  26. package/esm2015/app/components/layers-reorder-dialog/index.js +2 -0
  27. package/esm2015/app/components/sidebar/index.js +2 -0
  28. package/esm2015/app/components/sidebar/sidebar.component.js +124 -28
  29. package/esm2015/app/directives/index.js +3 -0
  30. package/esm2015/app/fs-block-editor.module.js +5 -3
  31. package/esm2015/app/interfaces/block-group.js +2 -0
  32. package/esm2015/app/interfaces/block.js +1 -1
  33. package/esm2015/app/interfaces/index.js +2 -1
  34. package/esm2015/app/services/block-editor.service.js +126 -35
  35. package/esm2015/app/services/blocks-store.service.js +9 -97
  36. package/fesm2015/firestitch-block-editor.js +316 -172
  37. package/fesm2015/firestitch-block-editor.js.map +1 -1
  38. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
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/form'), require('@firestitch/menu'), require('@firestitch/zoom-pan'), require('@firestitch/autocomplete'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http'), require('moveable'), require('@firestitch/common'), require('@angular/material/dialog'), require('@angular/material/divider'), require('@firestitch/prompt'), require('@firestitch/api'), 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/form', '@firestitch/menu', '@firestitch/zoom-pan', '@firestitch/autocomplete', 'rxjs', 'rxjs/operators', '@angular/common/http', 'moveable', '@firestitch/common', '@angular/material/dialog', '@angular/material/divider', '@firestitch/prompt', '@firestitch/api', '@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$2, global.i14, global.menu, global.i2$1, global.i10, global.rxjs, global.rxjs.operators, global.ng.common.http, global.Moveable, global.common, global.ng.material.dialog, global.ng.material.divider, global.i3$1, global.i1$2, global.ng.material.core, global.ng.cdk.textField));
5
- })(this, (function (exports, i15, i0, i13, i17, i7, i6, i9, i6$1, i3, i4, i7$1, i16, i12, i2, i3$2, i14, menu, i2$1, i10, rxjs, operators, i1, Moveable, common, i1$1, i5, i3$1, i1$2, i8, i18) { 'use strict';
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/form'), require('@firestitch/menu'), require('@firestitch/zoom-pan'), require('@firestitch/autocomplete'), require('rxjs'), require('rxjs/operators'), require('@angular/common/http'), require('@angular/material/dialog'), require('@firestitch/common'), require('@angular/cdk/text-field'), require('moveable'), require('@angular/material/divider'), require('@firestitch/prompt'), require('@firestitch/api'), require('@firestitch/clipboard'), require('@firestitch/message'), require('@angular/material/core')) :
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/form', '@firestitch/menu', '@firestitch/zoom-pan', '@firestitch/autocomplete', 'rxjs', 'rxjs/operators', '@angular/common/http', '@angular/material/dialog', '@firestitch/common', '@angular/cdk/text-field', 'moveable', '@angular/material/divider', '@firestitch/prompt', '@firestitch/api', '@firestitch/clipboard', '@firestitch/message', '@angular/material/core'], 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.i15, global.i2, global.i6$1, global.i6, global.menu, global.i2$2, global.i13, global.rxjs, global.rxjs.operators, global.ng.common.http, global.ng.material.dialog, global.common, global.ng.cdk.textField, global.Moveable, global.ng.material.divider, global.i3$1, global.i1$2, global.i2$1, global.i3$2, global.ng.material.core));
5
+ })(this, (function (exports, i18, i0, i5, i7, i7$1, i4, i12, i9, i3, i4$1, i10, i19, i15, i2, i6$1, i6, menu, i2$2, i13, rxjs, operators, i1, i1$1, common, i8, Moveable, i5$1, i3$1, i1$2, i2$1, i3$2, i11) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -24,32 +24,34 @@
24
24
  return Object.freeze(n);
25
25
  }
26
26
 
27
- var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
27
+ var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
28
28
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
29
- var i13__namespace = /*#__PURE__*/_interopNamespace(i13);
30
- var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
29
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
31
30
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
32
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
33
- var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
34
- var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
35
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
36
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
37
31
  var i7__namespace$1 = /*#__PURE__*/_interopNamespace(i7$1);
38
- var i16__namespace = /*#__PURE__*/_interopNamespace(i16);
32
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
39
33
  var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
40
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
41
- var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
42
- var i14__namespace = /*#__PURE__*/_interopNamespace(i14);
43
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
34
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
35
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
36
+ var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
44
37
  var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
38
+ var i19__namespace = /*#__PURE__*/_interopNamespace(i19);
39
+ var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
40
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
41
+ var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
42
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
43
+ var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
44
+ var i13__namespace = /*#__PURE__*/_interopNamespace(i13);
45
45
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
46
- var Moveable__default = /*#__PURE__*/_interopDefaultLegacy(Moveable);
47
46
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
48
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
47
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
48
+ var Moveable__default = /*#__PURE__*/_interopDefaultLegacy(Moveable);
49
+ var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
49
50
  var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
50
51
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
51
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
52
- var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
52
+ var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
53
+ var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
54
+ var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
53
55
 
54
56
  var GoogleFontService = /** @class */ (function () {
55
57
  function GoogleFontService(httpClient) {
@@ -114,6 +116,45 @@
114
116
  type: i0.Input
115
117
  }] } });
116
118
 
119
+ var GroupDialogComponent = /** @class */ (function () {
120
+ function GroupDialogComponent(_data, _dialogRef) {
121
+ var _this = this;
122
+ this._data = _data;
123
+ this._dialogRef = _dialogRef;
124
+ this.save = function () {
125
+ if (_this.blockGroup.name) {
126
+ }
127
+ else {
128
+ _this.blockGroup = Object.assign(Object.assign({}, _this.blockGroup), { name: common.guid() });
129
+ _this._blockEditor.blockGroups.push(_this.blockGroup);
130
+ }
131
+ _this._dialogRef.close(_this.blockGroup);
132
+ return rxjs.of(true);
133
+ };
134
+ }
135
+ GroupDialogComponent.prototype.ngOnInit = function () {
136
+ this._blockEditor = this._data.blockEditor;
137
+ this.blockGroup = this._data.blockGroup || {};
138
+ this.block = this._data.block;
139
+ };
140
+ return GroupDialogComponent;
141
+ }());
142
+ GroupDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GroupDialogComponent, deps: [{ token: i1$1.MAT_DIALOG_DATA }, { token: i1__namespace$1.MatDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
143
+ GroupDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: GroupDialogComponent, selector: "ng-component", ngImport: i0__namespace, template: "<form fsForm [submit]=\"save\">\n <fs-dialog>\n <h1 mat-dialog-title>Group</h1>\n <mat-dialog-content>\n <mat-form-field class=\"full-width\">\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [(ngModel)]=\"blockGroup.label\"\n name=\"groupLabel\"\n [required]=\"true\"\n placeholder=\"Group Label\">\n </textarea>\n </mat-form-field>\n <mat-form-field class=\"full-width\">\n <mat-label>Group Description</mat-label>\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [(ngModel)]=\"blockGroup.description\"\n name=\"groupDescription\">\n </textarea>\n </mat-form-field> \n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n type=\"submit\"\n color=\"primary\">\n Save\n </button>\n <button \n mat-button \n type=\"button\"\n mat-dialog-close>\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>", styles: [""], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i9__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i4__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: i5__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { 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.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i8__namespace.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i5__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i5__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9__namespace.MatLabel, selector: "mat-label" }, { type: i6__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1__namespace$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i6__namespace.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i1__namespace$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
144
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: GroupDialogComponent, decorators: [{
145
+ type: i0.Component,
146
+ args: [{
147
+ templateUrl: './group-dialog.component.html',
148
+ styleUrls: ['./group-dialog.component.scss'],
149
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
150
+ }]
151
+ }], ctorParameters: function () {
152
+ return [{ type: undefined, decorators: [{
153
+ type: i0.Inject,
154
+ args: [i1$1.MAT_DIALOG_DATA]
155
+ }] }, { type: i1__namespace$1.MatDialogRef }];
156
+ } });
157
+
117
158
  var FsBlockEditorMarginDirective = /** @class */ (function () {
118
159
  function FsBlockEditorMarginDirective(_elementRef) {
119
160
  this._elementRef = _elementRef;
@@ -196,7 +237,7 @@
196
237
  this._init(_dialogData);
197
238
  }
198
239
  LayersReorderDialogComponent.prototype.swapItems = function (event) {
199
- i7.moveItemInArray(this.blocks, event.previousIndex, event.currentIndex);
240
+ i7$1.moveItemInArray(this.blocks, event.previousIndex, event.currentIndex);
200
241
  };
201
242
  LayersReorderDialogComponent.prototype.done = function () {
202
243
  this._dialogRef.close(this.blocks.reverse());
@@ -207,7 +248,7 @@
207
248
  return LayersReorderDialogComponent;
208
249
  }());
209
250
  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 });
210
- 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 Blocks</h1>\n <mat-dialog-content>\n <mat-list cdkDropList (cdkDropListDropped)=\"swapItems($event)\">\n <mat-divider></mat-divider>\n <ng-container *ngFor=\"let block of blocks\">\n <mat-list-item cdkDrag cdkDragLockAxis=\"y\">\n <mat-icon cdkDragHandle>drag_handle</mat-icon>\n <mat-icon>\n {{ blockTypeIcons[block.type] }}\n </mat-icon>\n <span class=\"block-label\">\n {{ block.label || 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: i15__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]" }, { type: i14__namespace.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
251
+ 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 Blocks</h1>\n <mat-dialog-content>\n <mat-list cdkDropList (cdkDropListDropped)=\"swapItems($event)\">\n <mat-divider></mat-divider>\n <ng-container *ngFor=\"let block of blocks\">\n <mat-list-item cdkDrag cdkDragLockAxis=\"y\">\n <mat-icon cdkDragHandle>drag_handle</mat-icon>\n <mat-icon>\n {{ blockTypeIcons[block.type] }}\n </mat-icon>\n <span class=\"block-label\">\n {{ block.label || 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$1.MatList, selector: "mat-list, mat-action-list", inputs: ["disableRipple", "disabled"], exportAs: ["matList"] }, { type: i5__namespace$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { type: i4__namespace$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: i4__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$1.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: i18__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace$1.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$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i1__namespace$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i6__namespace.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
211
252
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LayersReorderDialogComponent, decorators: [{
212
253
  type: i0.Component,
213
254
  args: [{
@@ -549,7 +590,6 @@
549
590
  })(EventType || (EventType = {}));
550
591
  var BlocksStore = /** @class */ (function () {
551
592
  function BlocksStore() {
552
- this._lastTabIndex = -1;
553
593
  this._eventBus$ = new rxjs.Subject();
554
594
  this._blocks$ = new rxjs.BehaviorSubject([]);
555
595
  this._destroy$ = new rxjs.Subject();
@@ -571,11 +611,11 @@
571
611
  Object.defineProperty(BlocksStore.prototype, "blockAdded$", {
572
612
  get: function () {
573
613
  return this._eventBus$
574
- .pipe(operators.filter(function (_k) {
575
- var type = _k.type;
614
+ .pipe(operators.filter(function (_a) {
615
+ var type = _a.type;
576
616
  return type === EventType.Add;
577
- }), operators.map(function (_k) {
578
- var value = _k.value;
617
+ }), operators.map(function (_a) {
618
+ var value = _a.value;
579
619
  return value;
580
620
  }));
581
621
  },
@@ -585,11 +625,11 @@
585
625
  Object.defineProperty(BlocksStore.prototype, "blockChanged$", {
586
626
  get: function () {
587
627
  return this._eventBus$
588
- .pipe(operators.filter(function (_k) {
589
- var type = _k.type;
628
+ .pipe(operators.filter(function (_a) {
629
+ var type = _a.type;
590
630
  return type === EventType.Change;
591
- }), operators.map(function (_k) {
592
- var value = _k.value;
631
+ }), operators.map(function (_a) {
632
+ var value = _a.value;
593
633
  return value;
594
634
  }));
595
635
  },
@@ -599,11 +639,11 @@
599
639
  Object.defineProperty(BlocksStore.prototype, "blockUpdated$", {
600
640
  get: function () {
601
641
  return this._eventBus$
602
- .pipe(operators.filter(function (_k) {
603
- var type = _k.type;
642
+ .pipe(operators.filter(function (_a) {
643
+ var type = _a.type;
604
644
  return type === EventType.Update;
605
- }), operators.map(function (_k) {
606
- var value = _k.value;
645
+ }), operators.map(function (_a) {
646
+ var value = _a.value;
607
647
  return value;
608
648
  }));
609
649
  },
@@ -613,11 +653,11 @@
613
653
  Object.defineProperty(BlocksStore.prototype, "blockRemoved$", {
614
654
  get: function () {
615
655
  return this._eventBus$
616
- .pipe(operators.filter(function (_k) {
617
- var type = _k.type;
656
+ .pipe(operators.filter(function (_a) {
657
+ var type = _a.type;
618
658
  return type === EventType.Remove;
619
- }), operators.map(function (_k) {
620
- var value = _k.value;
659
+ }), operators.map(function (_a) {
660
+ var value = _a.value;
621
661
  return value;
622
662
  }));
623
663
  },
@@ -628,17 +668,12 @@
628
668
  this._destroy$.next();
629
669
  this._destroy$.complete();
630
670
  };
631
- BlocksStore.prototype.init = function (config) {
671
+ BlocksStore.prototype.init = function (blocks) {
632
672
  var _this = this;
633
- this._config = config;
634
- this._setBlocks(this._config.blocks);
635
- if (this._config.blockChange) {
636
- this.blockChanged$
637
- .pipe(operators.groupBy(function (block) { return (block.guid); }), operators.map(function (group) { return group.pipe(operators.debounceTime(250)); }), operators.mergeAll())
638
- .subscribe(function (block) {
639
- _this._config.blockChange(block);
640
- });
641
- }
673
+ blocks
674
+ .forEach(function (block) {
675
+ _this._appendBlock(block);
676
+ });
642
677
  };
643
678
  BlocksStore.prototype.blockExists = function (block) {
644
679
  var index = this.blocks.findIndex(function (b) {
@@ -647,43 +682,7 @@
647
682
  return index !== -1;
648
683
  };
649
684
  BlocksStore.prototype.blockAdd = function (block) {
650
- var _this = this;
651
- if (!this._config.blockAdd) {
652
- console.warn('[BlockEditor] Config "blockAdd" is not defined');
653
- return;
654
- }
655
- block = this._createBlock(block);
656
- this._config.blockAdd(block)
657
- .pipe(operators.takeUntil(this._destroy$))
658
- .subscribe(function (newBlock) {
659
- _this._appendBlock(newBlock);
660
- });
661
- };
662
- BlocksStore.prototype.blockUpload = function (block, fsFile) {
663
- var _this = this;
664
- if (!this._config.blockUpload) {
665
- return rxjs.throwError('[BlockEditor] Config "blockUpload" is not defined');
666
- }
667
- var existing = this.blockExists(block);
668
- if (!existing) {
669
- block = this._createBlock(block);
670
- }
671
- return rxjs.from(fsFile.imageInfo)
672
- .pipe(operators.switchMap(function (imageInfo) {
673
- if (!existing && (imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.height) && (imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.width)) {
674
- var ratio = imageInfo.height / imageInfo.width;
675
- block.width = _this._config.width * .4;
676
- block.height = block.width * ratio;
677
- }
678
- return _this._config.blockUpload(block, fsFile.file);
679
- }), operators.tap(function (newBlock) {
680
- if (existing) {
681
- _this.blockUpdate(Object.assign(Object.assign({}, block), newBlock));
682
- }
683
- else {
684
- _this._appendBlock(newBlock);
685
- }
686
- }), operators.takeUntil(this._destroy$));
685
+ this._appendBlock(block);
687
686
  };
688
687
  BlocksStore.prototype.blockChange = function (block) {
689
688
  this._dispatchEvent(EventType.Change, block);
@@ -707,27 +706,8 @@
707
706
  });
708
707
  this._setBlocks(blocks);
709
708
  };
710
- BlocksStore.prototype.isReordableBlock = function (block) {
711
- return [
712
- exports.BlockType.LongText,
713
- exports.BlockType.ShortText,
714
- exports.BlockType.RadioButton,
715
- exports.BlockType.Checkbox,
716
- exports.BlockType.Date,
717
- exports.BlockType.Signature,
718
- ].indexOf(block.type) > -1;
719
- };
720
- BlocksStore.prototype.updateTabIndex = function (index) {
721
- this._lastTabIndex = index;
722
- };
723
709
  BlocksStore.prototype._setBlocks = function (blocks) {
724
- var _this = this;
725
710
  this._blocks$.next(__spreadArray([], __read(blocks)));
726
- blocks
727
- .filter(function (b) { return _this.isReordableBlock(b); })
728
- .forEach(function (b) {
729
- _this._lastTabIndex = Math.max(b.tabIndex, _this._lastTabIndex);
730
- });
731
711
  };
732
712
  BlocksStore.prototype._appendBlock = function (block) {
733
713
  var blocks = __spreadArray(__spreadArray([], __read(this.blocks)), [
@@ -743,33 +723,6 @@
743
723
  value: value,
744
724
  });
745
725
  };
746
- BlocksStore.prototype._createBlock = function (block) {
747
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
748
- var newBlock = Object.assign(Object.assign({}, block), { shapeBottomLeft: (_a = block.shapeBottomLeft) !== null && _a !== void 0 ? _a : 'round', shapeTopLeft: (_b = block.shapeTopLeft) !== null && _b !== void 0 ? _b : 'round', shapeTopRight: (_c = block.shapeTopRight) !== null && _c !== void 0 ? _c : 'round', shapeBottomRight: (_d = block.shapeBottomRight) !== null && _d !== void 0 ? _d : 'round', verticalAlign: (_e = block.verticalAlign) !== null && _e !== void 0 ? _e : 'top', horizontalAlign: (_f = block.horizontalAlign) !== null && _f !== void 0 ? _f : 'left', guid: block.guid || common.guid('xxxxxxxxxxxx'), keepRatio: (_g = block.keepRatio) !== null && _g !== void 0 ? _g : [
749
- exports.BlockType.Checkbox,
750
- exports.BlockType.RadioButton,
751
- exports.BlockType.Pdf,
752
- ]
753
- .indexOf(block.type) !== -1 });
754
- var width = (this._config.width * .333).toFixed(2);
755
- var height = width / 2;
756
- if (newBlock.type === exports.BlockType.Rectangle) {
757
- newBlock = Object.assign(Object.assign({}, newBlock), { borderColor: (_h = newBlock.borderColor) !== null && _h !== void 0 ? _h : '#cccccc', borderWidth: (_j = newBlock.borderWidth) !== null && _j !== void 0 ? _j : 1 });
758
- }
759
- else if (newBlock.type === exports.BlockType.Checkbox || newBlock.type === exports.BlockType.RadioButton) {
760
- width = .25;
761
- height = .25;
762
- }
763
- else {
764
- width = 2;
765
- height = .5;
766
- }
767
- if (this.isReordableBlock(newBlock)) {
768
- newBlock.tabIndex = this._lastTabIndex + 1;
769
- this.updateTabIndex(newBlock.tabIndex);
770
- }
771
- return Object.assign({ top: height, left: width, width: width, height: height }, newBlock);
772
- };
773
726
  BlocksStore.prototype._deduplicateIndexesFor = function (blocks) {
774
727
  blocks.forEach(function (block, index) {
775
728
  block.index = index;
@@ -788,46 +741,100 @@
788
741
  this._store = _store;
789
742
  this._dialog = _dialog;
790
743
  this._prompt = _prompt;
744
+ this.blockGroups = [];
791
745
  this._selectedBlocks$ = new rxjs.BehaviorSubject([]);
792
- this._blockComponents = new Map();
746
+ this._blockComponents$ = new rxjs.BehaviorSubject([]);
793
747
  this._blockClippable$ = new rxjs.BehaviorSubject(null);
794
748
  this._destroy$ = new rxjs.Subject();
795
- this._blockInited$ = new rxjs.Subject();
796
749
  }
797
- Object.defineProperty(BlockEditorService.prototype, "blockComponents", {
750
+ Object.defineProperty(BlockEditorService.prototype, "blockComponents$", {
798
751
  get: function () {
799
- return Array.from(this._blockComponents.values());
752
+ return this._blockComponents$.asObservable();
753
+ },
754
+ enumerable: false,
755
+ configurable: true
756
+ });
757
+ Object.defineProperty(BlockEditorService.prototype, "blockComponents", {
758
+ set: function (blockComponents) {
759
+ this._blockComponents$.next(blockComponents);
800
760
  },
801
761
  enumerable: false,
802
762
  configurable: true
803
763
  });
804
764
  BlockEditorService.prototype.init = function (config) {
805
765
  this.config = config;
806
- this._store.init(Object.assign({}, this.config));
766
+ this._store.init(config.blocks);
767
+ this._initBlockGroups();
768
+ this._initBlockChange();
807
769
  };
808
770
  BlockEditorService.prototype.blockAdd = function (block) {
809
- this._store.blockAdd(block);
771
+ var _this = this;
772
+ if (!this.config.blockAdd) {
773
+ console.warn('[BlockEditor] Config "blockAdd" is not defined');
774
+ return;
775
+ }
776
+ block = this._initBlock(block);
777
+ this.config.blockAdd(block)
778
+ .pipe(operators.takeUntil(this._destroy$))
779
+ .subscribe(function (newBlock) {
780
+ _this._store.blockAdd(newBlock);
781
+ });
810
782
  };
811
783
  BlockEditorService.prototype.blockUpload = function (block, fsFile) {
812
- return this._store.blockUpload(block, fsFile);
784
+ var _this = this;
785
+ if (!this.config.blockUpload) {
786
+ return rxjs.throwError('[BlockEditor] Config "blockUpload" is not defined');
787
+ }
788
+ var existing = this._store.blockExists(block);
789
+ if (!existing) {
790
+ block = this._initBlock(block);
791
+ }
792
+ return rxjs.from(fsFile.imageInfo)
793
+ .pipe(operators.switchMap(function (imageInfo) {
794
+ if (!existing && (imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.height) && (imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.width)) {
795
+ var ratio = imageInfo.height / imageInfo.width;
796
+ block.width = _this.config.width * .4;
797
+ block.height = block.width * ratio;
798
+ }
799
+ return _this.config.blockUpload(block, fsFile.file);
800
+ }), operators.tap(function (newBlock) {
801
+ if (existing) {
802
+ _this._store.blockUpdate(Object.assign(Object.assign({}, block), newBlock));
803
+ }
804
+ else {
805
+ _this.blockAdd(newBlock);
806
+ }
807
+ }), operators.takeUntil(this._destroy$));
808
+ };
809
+ BlockEditorService.prototype._initBlock = function (block) {
810
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
811
+ var newBlock = Object.assign(Object.assign({}, block), { shapeBottomLeft: (_a = block.shapeBottomLeft) !== null && _a !== void 0 ? _a : 'round', shapeTopLeft: (_b = block.shapeTopLeft) !== null && _b !== void 0 ? _b : 'round', shapeTopRight: (_c = block.shapeTopRight) !== null && _c !== void 0 ? _c : 'round', shapeBottomRight: (_d = block.shapeBottomRight) !== null && _d !== void 0 ? _d : 'round', verticalAlign: (_e = block.verticalAlign) !== null && _e !== void 0 ? _e : 'top', horizontalAlign: (_f = block.horizontalAlign) !== null && _f !== void 0 ? _f : 'left', index: block.guid ? block.index : this._store.blocks.length, guid: block.guid || common.guid('xxxxxxxxxxxx'), keepRatio: (_g = block.keepRatio) !== null && _g !== void 0 ? _g : [
812
+ exports.BlockType.Checkbox,
813
+ exports.BlockType.RadioButton,
814
+ exports.BlockType.Pdf,
815
+ ]
816
+ .indexOf(block.type) !== -1 });
817
+ var width = (this.config.width * .333).toFixed(2);
818
+ var height = width / 2;
819
+ if (newBlock.type === exports.BlockType.Rectangle) {
820
+ newBlock = Object.assign(Object.assign({}, newBlock), { borderColor: (_h = newBlock.borderColor) !== null && _h !== void 0 ? _h : '#cccccc', borderWidth: (_j = newBlock.borderWidth) !== null && _j !== void 0 ? _j : 1 });
821
+ }
822
+ else if (newBlock.type === exports.BlockType.Checkbox || newBlock.type === exports.BlockType.RadioButton) {
823
+ width = .25;
824
+ height = .25;
825
+ }
826
+ else {
827
+ width = 2;
828
+ height = .5;
829
+ }
830
+ //get max tabindex
831
+ // newBlock.tabIndex = this._lastTabIndex + 1;
832
+ // this.updateTabIndex(newBlock.tabIndex);
833
+ return Object.assign({ top: height, left: width, width: width, height: height }, newBlock);
813
834
  };
814
835
  BlockEditorService.prototype.blockRemove = function (block) {
815
836
  this._store.blockRemove(block);
816
837
  };
817
- BlockEditorService.prototype.removeBlocks = function (blocks) {
818
- var _this = this;
819
- this._prompt.confirm({
820
- title: 'Confirm',
821
- template: 'Are you sure your would like to delete this block?',
822
- })
823
- .pipe(operators.switchMap(function () { return _this.config.blocksRemove ? _this.config.blocksRemove(blocks) : rxjs.throwError('config.blocksRemove is not configured'); }), operators.takeUntil(this._destroy$))
824
- .subscribe(function () {
825
- blocks.forEach(function (block) {
826
- _this.blockRemove(block);
827
- });
828
- _this.selectedBlocks = [];
829
- });
830
- };
831
838
  Object.defineProperty(BlockEditorService.prototype, "blocks$", {
832
839
  get: function () {
833
840
  return this._store.blocks$;
@@ -870,13 +877,6 @@
870
877
  enumerable: false,
871
878
  configurable: true
872
879
  });
873
- Object.defineProperty(BlockEditorService.prototype, "blockInited$", {
874
- get: function () {
875
- return this._blockInited$;
876
- },
877
- enumerable: false,
878
- configurable: true
879
- });
880
880
  Object.defineProperty(BlockEditorService.prototype, "blockRemoved$", {
881
881
  get: function () {
882
882
  return this._store.blockRemoved$;
@@ -894,6 +894,12 @@
894
894
  BlockEditorService.prototype.blockChange = function (block) {
895
895
  this._store.blockChange(block);
896
896
  };
897
+ BlockEditorService.prototype.applyBlockGroup = function (block, blockGroup) {
898
+ block.name = blockGroup === null || blockGroup === void 0 ? void 0 : blockGroup.name;
899
+ block.description = blockGroup === null || blockGroup === void 0 ? void 0 : blockGroup.description;
900
+ block.label = blockGroup === null || blockGroup === void 0 ? void 0 : blockGroup.label;
901
+ this.blockChange(block);
902
+ };
897
903
  BlockEditorService.prototype.isSelectedBlock = function (block) {
898
904
  return this.selectedBlocks.indexOf(block) !== -1;
899
905
  };
@@ -908,6 +914,15 @@
908
914
  _this.blockChange(block);
909
915
  });
910
916
  };
917
+ BlockEditorService.prototype.blockGroupChangeProperty = function (blockGroup, name, value) {
918
+ var _this = this;
919
+ this.blocks
920
+ .filter(function (block) { return block.name === blockGroup.name; })
921
+ .forEach(function (block) {
922
+ block[name] = value;
923
+ _this.blockChange(block);
924
+ });
925
+ };
911
926
  Object.defineProperty(BlockEditorService.prototype, "selectedBlocks$", {
912
927
  get: function () {
913
928
  return this._selectedBlocks$;
@@ -949,19 +964,26 @@
949
964
  BlockEditorService.prototype.hasSelectionRange = function () {
950
965
  return this._selectionRange && (this._selectionRange.baseOffset - this._selectionRange.focusOffset) > 0;
951
966
  };
952
- BlockEditorService.prototype.initBlock = function (block, blockComponent) {
953
- this._blockComponents.set(block, blockComponent);
954
- this._blockInited$.next(block);
955
- };
956
- BlockEditorService.prototype.destroyBlock = function (block) {
957
- this._blockComponents.delete(block);
958
- };
959
967
  BlockEditorService.prototype.registerContainer = function (container) {
960
968
  this.container = container;
961
969
  };
962
970
  BlockEditorService.prototype.registerMargin = function (margin) {
963
971
  this.margin = margin;
964
972
  };
973
+ BlockEditorService.prototype.removeBlocks = function (blocks) {
974
+ var _this = this;
975
+ this._prompt.confirm({
976
+ title: 'Confirm',
977
+ template: 'Are you sure your would like to delete this block?',
978
+ })
979
+ .pipe(operators.switchMap(function () { return _this.config.blocksRemove ? _this.config.blocksRemove(blocks) : rxjs.throwError('config.blocksRemove is not configured'); }), operators.takeUntil(this._destroy$))
980
+ .subscribe(function () {
981
+ blocks.forEach(function (block) {
982
+ _this.blockRemove(block);
983
+ });
984
+ _this.selectedBlocks = [];
985
+ });
986
+ };
965
987
  BlockEditorService.prototype.openReorderDialog = function () {
966
988
  var _this = this;
967
989
  var blocks = this.blocks
@@ -980,7 +1002,6 @@
980
1002
  blocks
981
1003
  .forEach(function (block, index) {
982
1004
  block.index = index;
983
- _this._store.updateTabIndex(index);
984
1005
  });
985
1006
  });
986
1007
  };
@@ -988,6 +1009,30 @@
988
1009
  this._destroy$.next();
989
1010
  this._destroy$.complete();
990
1011
  };
1012
+ BlockEditorService.prototype._initBlockGroups = function () {
1013
+ this.blockGroups = Object.values(this._store.blocks
1014
+ .reduce(function (accum, block) {
1015
+ if (block.name) {
1016
+ var existing = accum[block.name] || {};
1017
+ accum[block.name] = {
1018
+ label: block.label || existing.label,
1019
+ description: block.description || existing.description,
1020
+ name: block.name,
1021
+ };
1022
+ }
1023
+ return accum;
1024
+ }, {}));
1025
+ };
1026
+ BlockEditorService.prototype._initBlockChange = function () {
1027
+ var _this = this;
1028
+ if (this.config.blockChange) {
1029
+ this.blockChanged$
1030
+ .pipe(operators.groupBy(function (block) { return (block.guid); }), operators.map(function (group) { return group.pipe(operators.debounceTime(250)); }), operators.mergeAll())
1031
+ .subscribe(function (block) {
1032
+ _this.config.blockChange(block);
1033
+ });
1034
+ }
1035
+ };
991
1036
  return BlockEditorService;
992
1037
  }());
993
1038
  BlockEditorService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BlockEditorService, deps: [{ token: BlocksStore }, { token: i2__namespace.FsDialog }, { token: i3__namespace$1.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
@@ -1287,21 +1332,18 @@
1287
1332
  _this._cdRef.markForCheck();
1288
1333
  });
1289
1334
  };
1290
- FsBlockComponent.prototype.ngAfterContentInit = function () {
1335
+ FsBlockComponent.prototype.ngAfterViewInit = function () {
1291
1336
  var _this = this;
1292
1337
  setTimeout(function () {
1293
1338
  _this._initEvents();
1294
1339
  _this._initMoveable();
1295
1340
  _this._setTransform();
1341
+ _this._initElementGuidelines();
1296
1342
  _this.rotate = _this.block.rotate;
1297
- _this._blockEditor.initBlock(_this.block, _this);
1298
- _this._blockEditor.blockInited$
1299
- .pipe(operators.takeUntil(_this._destroy$))
1300
- .subscribe(function () {
1301
- _this._updateElementGuidelines();
1302
- });
1303
1343
  });
1304
1344
  };
1345
+ FsBlockComponent.prototype.ngAfterContentInit = function () {
1346
+ };
1305
1347
  FsBlockComponent.prototype.pxToIn = function (px) {
1306
1348
  return this.round(px / 96, 2);
1307
1349
  };
@@ -1335,7 +1377,7 @@
1335
1377
  sel.addRange(range);
1336
1378
  };
1337
1379
  FsBlockComponent.prototype.ngOnDestroy = function () {
1338
- this._blockEditor.destroyBlock(this.block);
1380
+ //this._blockEditor.destroyBlock(this.block);
1339
1381
  this._destroy$.next();
1340
1382
  this._destroy$.complete();
1341
1383
  };
@@ -1347,12 +1389,11 @@
1347
1389
  FsBlockComponent.prototype._triggerChanged = function () {
1348
1390
  this._blockEditor.blockChange(this.block);
1349
1391
  };
1350
- FsBlockComponent.prototype._updateElementGuidelines = function () {
1351
- var _this = this;
1352
- this.moveable.elementGuidelines = this._blockEditor.blockComponents
1353
- .map(function (blockComponent) { return blockComponent.el; })
1354
- .filter(function (el) { return !el.isSameNode(_this.el); });
1355
- };
1392
+ // private _updateElementGuidelines() {
1393
+ // this.moveable.elementGuidelines = this._blockEditor.blockComponents
1394
+ // .map((blockComponent) => blockComponent.el)
1395
+ // .filter((el) => !el.isSameNode(this.el));
1396
+ // }
1356
1397
  FsBlockComponent.prototype._updateMoveable = function () {
1357
1398
  var value = !this.block.lock && this.selected;
1358
1399
  this.keepRatio = this.block.keepRatio;
@@ -1361,6 +1402,16 @@
1361
1402
  this.moveable.rotatable = this.block.rotatable && value;
1362
1403
  this.moveable.scalable = this.block.scalable && value;
1363
1404
  };
1405
+ FsBlockComponent.prototype._initElementGuidelines = function () {
1406
+ var _this = this;
1407
+ this._blockEditor.blockComponents$
1408
+ .pipe(operators.takeUntil(this._destroy$))
1409
+ .subscribe(function (blockComponents) {
1410
+ _this.moveable.elementGuidelines = blockComponents
1411
+ .filter(function (blockComponent) { return _this !== blockComponent; })
1412
+ .map(function (blockComponent) { return blockComponent.el; });
1413
+ });
1414
+ };
1364
1415
  FsBlockComponent.prototype._initMoveable = function () {
1365
1416
  var _this = this;
1366
1417
  this._moveable = new Moveable__default["default"](this._elementRef.nativeElement, {
@@ -1385,7 +1436,6 @@
1385
1436
  throttleResize: 1,
1386
1437
  snapDistFormat: function (v, type) { return "" + _this.round(v / 96, 2); },
1387
1438
  });
1388
- this._updateElementGuidelines();
1389
1439
  this._updateMoveable();
1390
1440
  this.moveable
1391
1441
  .on('clip', function (e) {
@@ -1604,7 +1654,7 @@
1604
1654
  return FsBlockComponent;
1605
1655
  }());
1606
1656
  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 });
1607
- 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: { listeners: { "document:keydown": "keydown($event)" }, 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;z-index:100}.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;-webkit-user-select:none;user-select:none}.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: i15__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i15__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i15__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i15__namespace.AsyncPipe, "createImageUrl": CreateImageUrlPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1657
+ 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: { listeners: { "document:keydown": "keydown($event)" }, 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.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;z-index:100}.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;-webkit-user-select:none;user-select:none}.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: i18__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i18__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i18__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i18__namespace.AsyncPipe, "createImageUrl": CreateImageUrlPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1608
1658
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockComponent, decorators: [{
1609
1659
  type: i0.Component,
1610
1660
  args: [{
@@ -1645,13 +1695,16 @@
1645
1695
  ];
1646
1696
 
1647
1697
  var SidebarComponent = /** @class */ (function () {
1648
- function SidebarComponent(_el, _blockEditor, _cdRef, _prompt, _googleFontService, _document) {
1698
+ function SidebarComponent(_el, _blockEditor, _cdRef, _googleFontService, _clipboard, _message, _prompt, _dialog, _document) {
1649
1699
  var _this = this;
1650
1700
  this._el = _el;
1651
1701
  this._blockEditor = _blockEditor;
1652
1702
  this._cdRef = _cdRef;
1653
- this._prompt = _prompt;
1654
1703
  this._googleFontService = _googleFontService;
1704
+ this._clipboard = _clipboard;
1705
+ this._message = _message;
1706
+ this._prompt = _prompt;
1707
+ this._dialog = _dialog;
1655
1708
  this._document = _document;
1656
1709
  this.zoomCenter = new i0.EventEmitter();
1657
1710
  this.BlockTypes = BlockTypes;
@@ -1681,14 +1734,30 @@
1681
1734
  enumerable: false,
1682
1735
  configurable: true
1683
1736
  });
1737
+ Object.defineProperty(SidebarComponent.prototype, "blockGroups", {
1738
+ get: function () {
1739
+ return this._blockEditor.blockGroups;
1740
+ },
1741
+ enumerable: false,
1742
+ configurable: true
1743
+ });
1684
1744
  SidebarComponent.prototype.ngOnInit = function () {
1685
1745
  var _this = this;
1686
1746
  this._blockEditor.selectedBlocks$
1687
1747
  .pipe(operators.takeUntil(this._destroy$))
1688
1748
  .subscribe(function (blocks) {
1689
1749
  _this.block = blocks[0] ? blocks[0] : null;
1690
- _this.formats = BlockFormats
1691
- .filter(function (blockFormat) { var _a; return (blockFormat.blockTypes.indexOf((_a = _this.block) === null || _a === void 0 ? void 0 : _a.type) !== -1); });
1750
+ _this.blockGroup = null;
1751
+ if (_this.block) {
1752
+ _this.formats = BlockFormats
1753
+ .filter(function (blockFormat) { return (blockFormat.blockTypes.indexOf(_this.block.type) !== -1); });
1754
+ if (_this.block.name) {
1755
+ _this.blockGroup = _this._blockEditor.blockGroups
1756
+ .find(function (blockGroup) {
1757
+ return _this.block.name === blockGroup.name;
1758
+ });
1759
+ }
1760
+ }
1692
1761
  _this._cdRef.markForCheck();
1693
1762
  });
1694
1763
  this._blockEditor.blockChanged$
@@ -1704,6 +1773,60 @@
1704
1773
  };
1705
1774
  }
1706
1775
  };
1776
+ SidebarComponent.prototype.blockGroupChange = function (blockGroup) {
1777
+ this._blockEditor.applyBlockGroup(this.block, blockGroup);
1778
+ };
1779
+ SidebarComponent.prototype.blockRequired = function (value) {
1780
+ if (this.blockGroup) {
1781
+ this._blockEditor.blockGroupChangeProperty(this.blockGroup, 'required', value);
1782
+ }
1783
+ else {
1784
+ this.blockChangeProperty(value, 'required');
1785
+ }
1786
+ };
1787
+ SidebarComponent.prototype.blockReadonly = function (value) {
1788
+ if (this.blockGroup) {
1789
+ this._blockEditor.blockGroupChangeProperty(this.blockGroup, 'readonly', value);
1790
+ }
1791
+ else {
1792
+ this.blockChangeProperty(value, 'readonly');
1793
+ }
1794
+ };
1795
+ SidebarComponent.prototype.blockGroupEdit = function (event) {
1796
+ var _this = this;
1797
+ event.preventDefault();
1798
+ event.stopImmediatePropagation();
1799
+ this.blockGroupDialog(this.blockGroup)
1800
+ .subscribe(function (blockGroup) {
1801
+ _this._blockEditor.blocks
1802
+ .filter(function (block) { return block.name === blockGroup.name; })
1803
+ .forEach(function (block) {
1804
+ _this._blockEditor.applyBlockGroup(block, blockGroup);
1805
+ });
1806
+ });
1807
+ };
1808
+ SidebarComponent.prototype.blockGroupCreate = function (event) {
1809
+ var _this = this;
1810
+ event.preventDefault();
1811
+ event.stopImmediatePropagation();
1812
+ this.blockGroupDialog()
1813
+ .subscribe(function (blockGroup) {
1814
+ _this._blockEditor.applyBlockGroup(_this.block, blockGroup);
1815
+ _this.blockGroup = blockGroup;
1816
+ _this._cdRef.markForCheck();
1817
+ });
1818
+ };
1819
+ SidebarComponent.prototype.blockGroupDialog = function (blockGroup) {
1820
+ return this._dialog.open(GroupDialogComponent, {
1821
+ data: {
1822
+ block: this.block,
1823
+ blockEditor: this._blockEditor,
1824
+ blockGroup: blockGroup,
1825
+ }
1826
+ })
1827
+ .afterClosed()
1828
+ .pipe(operators.filter(function (block) { return !!block; }), operators.takeUntil(this._destroy$));
1829
+ };
1707
1830
  SidebarComponent.prototype.fontChanged = function (font) {
1708
1831
  this._blockEditor.selectedBlockComponentChangeProperty(font === null || font === void 0 ? void 0 : font.family, 'fontFamily');
1709
1832
  };
@@ -1818,6 +1941,26 @@
1818
1941
  this.config.blocksLevelChanged(sorted.map(function (block) { return block; }));
1819
1942
  }
1820
1943
  };
1944
+ SidebarComponent.prototype.exportBlocks = function () {
1945
+ var blocks = JSON.stringify(this._blockEditor.blocks);
1946
+ this._clipboard.copy(blocks, { showMessage: false });
1947
+ this._message.success('Exported blocks to clipboard');
1948
+ };
1949
+ SidebarComponent.prototype.importBlocks = function () {
1950
+ var _this = this;
1951
+ this._prompt.input({
1952
+ title: 'Import blocks',
1953
+ })
1954
+ .subscribe(function (blocks) {
1955
+ blocks = JSON.parse(blocks);
1956
+ blocks
1957
+ .forEach(function (block) {
1958
+ block = Object.assign(Object.assign({}, block), { guid: common.guid(), imageUrl: null });
1959
+ _this._blockEditor.blockAdd(block);
1960
+ });
1961
+ _this._message.success("Imported " + blocks.length + " " + (blocks.length === 1 ? 'block' : 'blocks'));
1962
+ });
1963
+ };
1821
1964
  SidebarComponent.prototype.layerUp = function () {
1822
1965
  this.layerMove(1);
1823
1966
  };
@@ -1843,8 +1986,8 @@
1843
1986
  };
1844
1987
  return SidebarComponent;
1845
1988
  }());
1846
- SidebarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SidebarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: BlockEditorService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace$1.FsPrompt }, { token: GoogleFontService }, { token: i15.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Component });
1847
- SidebarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SidebarComponent, selector: "sidebar", inputs: { config: "config", blocks: "blocks" }, outputs: { zoomCenter: "zoomCenter" }, queries: [{ propertyName: "sidebarPanels", predicate: FsBlockEditorSidebarPanelDirective }], ngImport: i0__namespace, template: "<div class=\"sidebar\">\n <form fsForm>\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-row\">\n <ng-container *ngFor=\"let blockType of BlockTypes\">\n <ng-container *ngIf=\"blockType.type === 'draw'\">\n <ng-container [ngSwitch]=\"blockType.value\">\n <ng-container *ngSwitchCase=\"BlockType.Pdf\">\n <ng-container [ngTemplateOutlet]=\"addFile\" [ngTemplateOutletContext]=\"{ type: BlockType.Pdf }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"BlockType.Image\">\n <ng-container [ngTemplateOutlet]=\"addFile\" [ngTemplateOutletContext]=\"{ type: BlockType.Rectangle }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container \n [ngTemplateOutlet]=\"addButton\" \n [ngTemplateOutletContext]=\"{ blockType: blockType }\">\n </ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #addFile let-type=\"type\">\n <fs-file \n (select)=\"blockUpload({ type: type, keepRatio: true, borderWidth: 0 }, $event)\" \n [accept]=\"blockType.accept\">\n <ng-container [ngTemplateOutlet]=\"addButton\" [ngTemplateOutletContext]=\"{ blockType: blockType }\"></ng-container>\n </fs-file>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-row\">\n <ng-container *ngFor=\"let blockType of BlockTypes\">\n <ng-container *ngIf=\"blockType.type === 'form'\">\n <ng-container \n [ngTemplateOutlet]=\"addButton\" \n [ngTemplateOutletContext]=\"{ blockType: blockType }\">\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div> \n\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-row\">\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n matTooltip=\"Reset zoom\"\n (click)=\"zoomCenter.emit()\">\n <mat-icon>crop_free</mat-icon>\n </button>\n <ng-container *ngIf=\"blocksReordered\">\n <button\n class=\"reorder-layers\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"blocksReordered()\">\n <mat-icon>swap_vert</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"block\">\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"blockRemoveClick()\">\n <mat-icon>delete_outline</mat-icon>\n </button>\n <button\n class=\"layer-up\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"layerUp()\">\n <mat-icon>arrow_back</mat-icon>\n <mat-icon>layers</mat-icon>\n </button>\n <button\n class=\"layer-down\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"layerDown()\">\n <mat-icon>arrow_back</mat-icon>\n <mat-icon>layers</mat-icon>\n </button>\n\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"toggleLock()\"\n [matTooltip]=\"block.lock ? 'Unlock' : 'Lock'\">\n <mat-icon>{{block.lock ? 'lock_outline' : 'lock_open'}}</mat-icon>\n </button>\n\n </ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"block\">\n <div class=\"sidebar-panel info-panel\">\n <div class=\"sidebar-label\">Info</div>\n <div class=\"sidebar-row\">\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.left\"\n name=\"left\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'left', .01)\"\n (ngModelChange)=\"numberChange($event, 'left')\">\n <span matPrefix>X</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.top\"\n name=\"top\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'top', .01)\"\n (ngModelChange)=\"numberChange($event, 'top')\">\n <span matPrefix>Y</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless rotate\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.rotate\"\n name=\"rotate\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'rotate')\"\n (ngModelChange)=\"numberChange($event, 'rotate')\">\n <span matPrefix>R</span>\n </mat-form-field>\n </div>\n\n <div class=\"sidebar-row\">\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.width\"\n name=\"width\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'width', .01)\"\n (ngModelChange)=\"numberChange($event, 'width')\">\n <span matPrefix>W</span>\n </mat-form-field>\n\n <div>\n <a (click)=\"toggleKeepRatio()\" class=\"keep-ratio\">\n <mat-icon>{{block.keepRatio ? 'lock_outline' : 'lock_open'}}</mat-icon>\n </a>\n </div>\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.height\"\n name=\"height\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'height', .01)\"\n (ngModelChange)=\"numberChange($event, 'height')\">\n <span matPrefix>H</span>\n </mat-form-field>\n </div>\n </div>\n <ng-container\n *ngIf=\"block.type === BlockType.LongText || block.type === BlockType.ShortText || block.type === BlockType.RadioButton || block.type === BlockType.Checkbox || block.type === BlockType.Date || block.type === BlockType.Signature\">\n <div class=\"sidebar-panel block-form-panel\">\n <div class=\"sidebar-label\">\n <mat-icon>{{blockTypeIcons[block.type]}}</mat-icon>\n {{blockTypeNames[block.type]}}\n </div>\n <div class=\"sidebar-row\">\n\n <mat-form-field class=\"full-width\">\n <input\n matInput\n [ngModel]=\"block.label\"\n name=\"label\"\n placeholder=\"Label\"\n (ngModelChange)=\"blockChangeProperty($event, 'label')\">\n </mat-form-field>\n\n <ng-container *ngIf=\"block.type !== BlockType.Checkbox && block.type !== BlockType.RadioButton\">\n <mat-form-field class=\"full-width\">\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [ngModel]=\"block.description\"\n name=\"description\"\n placeholder=\"Description\"\n (ngModelChange)=\"blockChangeProperty($event, 'description')\">\n </textarea>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field\n *ngIf=\"formats.length\"\n class=\"full-width\">\n <mat-label>Format</mat-label>\n <mat-select\n [(ngModel)]=\"block.format\"\n name=\"format\"\n (ngModelChange)=\"blockChangeProperty($event, 'format')\">\n <mat-option [value]=\"null\">\n None\n </mat-option>\n <mat-option\n *ngFor=\"let item of formats\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <ng-container\n *ngIf=\"block.type === BlockType.LongText || block.type === BlockType.ShortText || block.type === BlockType.Date\">\n <mat-form-field class=\"full-width\">\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [ngModel]=\"block.default\"\n name=\"default\"\n [validate]=\"validate\"\n placeholder=\"Default\"\n (ngModelChange)=\"blockChangeProperty($event, 'default')\">\n </textarea>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"block.type === BlockType.LongText || block.type === BlockType.ShortText\">\n <mat-form-field class=\"full-width\">\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [ngModel]=\"block.formula\"\n name=\"formula\"\n placeholder=\"Formula\"\n (ngModelChange)=\"blockChangeProperty($event, 'formula')\">\n </textarea>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"block.type === BlockType.RadioButton || block.type === BlockType.Checkbox\">\n <mat-form-field class=\"full-width\">\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [ngModel]=\"block.groupLabel\"\n name=\"groupLabel\"\n placeholder=\"Group Label\"\n (ngModelChange)=\"blockChangeProperty($event, 'groupLabel')\">\n </textarea>\n </mat-form-field>\n\n <mat-form-field class=\"full-width\">\n <mat-label>Group Description</mat-label>\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [ngModel]=\"block.groupDescription\"\n name=\"groupDescription\"\n (ngModelChange)=\"blockChangeProperty($event, 'groupDescription')\">\n </textarea>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field class=\"full-width\">\n <input\n matInput\n [ngModel]=\"block.name\"\n name=\"name\"\n placeholder=\"Name\"\n (ngModelChange)=\"blockChangeProperty($event, 'name')\">\n </mat-form-field>\n\n <div class=\"form-field-options\">\n <mat-checkbox\n name=\"required\"\n [(ngModel)]=\"block.required\"\n (ngModelChange)=\"blockChangeProperty($event, 'required')\">\n Required\n </mat-checkbox>\n\n <mat-checkbox\n name=\"readonly\"\n [(ngModel)]=\"block.readonly\"\n (ngModelChange)=\"blockChangeProperty($event, 'readonly')\">\n Readonly\n </mat-checkbox>\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"block.type === BlockType.Rectangle || block.type === BlockType.Image || block.type === BlockType.Pdf\">\n <div class=\"sidebar-panel typography-panel\">\n <div class=\"sidebar-label\">Typography</div>\n <div class=\"sidebar-row\">\n <fs-autocomplete\n [fetch]=\"fontFetch\"\n [fetchOnFocus]=\"true\"\n [displayWith]=\"fontDisplayWith\"\n [ngModel]=\"block.fontFamily ? { family: block.fontFamily } : null\"\n placeholder=\"Font\"\n [panelClass]=\"'font-autocomplete-panel'\"\n (ngModelChange)=\"fontChanged($event)\"\n name=\"fontfamily\">\n <ng-template fsAutocompleteTemplate let-data=\"data\">\n <app-font [font]=\"data\"></app-font>\n </ng-template>\n </fs-autocomplete>\n <fs-color-picker-chip\n (changed)=\"fontColorChange($event)\"\n [color]=\"block.fontColor\">\n </fs-color-picker-chip>\n\n <mat-form-field class=\"form-field-padless font-size\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.fontSize\"\n name=\"fontSize\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'fontSize')\"\n (ngModelChange)=\"numberChange($event, 'fontSize')\"\n placeholder=\"Size\">\n <span matPrefix *ngIf=\"block.fontSize\">S</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless line-height\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.lineHeight\"\n name=\"lineHeight\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'lineHeight')\"\n (ngModelChange)=\"numberChange($event, 'lineHeight')\"\n placeholder=\"Line\">\n <span matPrefix *ngIf=\"block.lineHeight\">L</span>\n </mat-form-field>\n </div>\n\n <div class=\"sidebar-row style-row\">\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.bold }\"\n (click)=\"boldClick()\">\n <mat-icon>format_bold</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.italic }\"\n (click)=\"italicClick()\">\n <mat-icon>format_italic</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.underline }\"\n (click)=\"underlineClick()\">\n <mat-icon>format_underline</mat-icon>\n </button>\n </div>\n\n <div class=\"sidebar-row align-row\">\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.horizontalAlign === 'left' }\"\n (click)=\"horizontalAlignClick('left')\">\n <mat-icon>format_align_left</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.horizontalAlign === 'center' }\"\n (click)=\"horizontalAlignClick('center')\">\n <mat-icon>format_align_center</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.horizontalAlign === 'justify' }\"\n (click)=\"horizontalAlignClick('justify')\">\n <mat-icon>format_align_justify</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.horizontalAlign === 'right' }\"\n (click)=\"horizontalAlignClick('right')\">\n <mat-icon>format_align_right</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.verticalAlign === 'top' }\"\n (click)=\"verticalAlignClick('top')\">\n <mat-icon>vertical_align_top</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.verticalAlign === 'center' }\"\n (click)=\"verticalAlignClick('center')\">\n <mat-icon>vertical_align_center</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.verticalAlign === 'bottom' }\"\n (click)=\"verticalAlignClick('bottom')\">\n <mat-icon>vertical_align_bottom</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Border</div>\n\n <div class=\"sidebar-row\">\n <fs-color-picker-chip\n (changed)=\"borderColorChange($event)\"\n [color]=\"block.borderColor\">\n </fs-color-picker-chip>\n\n <mat-form-field class=\"form-field-padless border-width\" floatLabel=\"never\">\n <input\n matInput\n [(ngModel)]=\"block.borderWidth\"\n name=\"borderWidth\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'borderWidth')\"\n (ngModelChange)=\"numberChange($event, 'borderWidth')\"\n placeholder=\"Width\">\n <span matPrefix *ngIf=\"block.borderWidth\">W</span>\n </mat-form-field>\n </div>\n </div>\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Shape</div>\n\n <div class=\"sidebar-row\">\n <fs-color-picker-chip\n (changed)=\"backgroundColorChange($event)\"\n [color]=\"block.backgroundColor\">\n </fs-color-picker-chip>\n\n <mat-form-field class=\"form-field-padless shape-radius\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shapeRadius\"\n name=\"shapeRadius\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shapeRadius', 1)\"\n (ngModelChange)=\"numberChange($event, 'shapeRadius')\"\n placeholder=\"Radius\">\n <span matPrefix *ngIf=\"block.shapeRadius\">R</span>\n </mat-form-field>\n\n <div class=\"shape-corners\">\n <div\n class=\"shape-corner shape-corner-top-left\"\n [ngClass]=\"{ round: block.shapeTopLeft === 'round' }\"\n (click)=\"shapeRound('shapeTopLeft')\"></div>\n <div\n class=\"shape-corner shape-corner-top-right\"\n [ngClass]=\"{ round: block.shapeTopRight === 'round' }\"\n (click)=\"shapeRound('shapeTopRight')\"></div>\n <div\n class=\"shape-corner shape-corner-bottom-left\"\n [ngClass]=\"{ round: block.shapeBottomLeft === 'round' }\"\n (click)=\"shapeRound('shapeBottomLeft')\"></div>\n <div\n class=\"shape-corner shape-corner-bottom-right\"\n [ngClass]=\"{ round: block.shapeBottomRight === 'round' }\"\n (click)=\"shapeRound('shapeBottomRight')\"></div>\n </div>\n </div>\n </div>\n <div class=\"sidebar-panel shadow-panel\">\n <div class=\"sidebar-label\">Shadow</div>\n\n <div class=\"sidebar-row\">\n <fs-color-picker-chip\n (changed)=\"shadowColorChange($event)\"\n [color]=\"block.shadowColor\">\n </fs-color-picker-chip>\n\n <mat-form-field class=\"form-field-padless shadow-x\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowX\"\n name=\"shadowX\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowX')\"\n (ngModelChange)=\"numberChange($event, 'shadowX')\">\n <span matPrefix>X</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless shadow-y\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowY\"\n name=\"shadowY\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowY')\"\n (ngModelChange)=\"numberChange($event, 'shadowY')\">\n <span matPrefix>Y</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless shadow-blur\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowBlur\"\n name=\"shadowBlur\"\n placeholder=\"Blur\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowBlur')\"\n (ngModelChange)=\"numberChange($event, 'shadowBlur')\">\n <span matPrefix *ngIf=\"block.shadowBlur\">B</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowSpread\"\n name=\"shadowSpread\"\n placeholder=\"Spread\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowSpread')\"\n (ngModelChange)=\"numberChange($event, 'shadowSpread')\">\n <span matPrefix *ngIf=\"block.shadowSpread\">S</span>\n </mat-form-field>\n <!-- <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowOpacity\"\n name=\"shadowOpacity\"\n placeholder=\"Opacity\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowOpacity')\"\n (ngModelChange)=\"numberChange($event, 'shadowOpacity')\">\n <span matPrefix *ngIf=\"block.shadowOpacity\">O</span>\n </mat-form-field> -->\n </div>\n </div>\n <ng-container *ngIf=\"block.type === BlockType.Rectangle\">\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Image</div>\n <div class=\"sidebar-row image-row\">\n <fs-file (select)=\"blockUpload(block, $event)\">\n <button\n type=\"button\"\n mat-icon-button>\n <mat-icon>cloud_upload</mat-icon>\n </button>\n </fs-file>\n <ng-container *ngIf=\"block.imageUrl\">\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"imageRemove()\">\n <mat-icon>clear</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: clippable }\"\n (click)=\"imageClip()\">\n <mat-icon>crop</mat-icon>\n </button>\n\n <mat-form-field class=\"form-field-padless opacity\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.imageOpacity\"\n name=\"imageOpacity\"\n placeholder=\"Opacity\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'imageOpacity')\"\n (ngModelChange)=\"numberChange($event, 'imageOpacity')\">\n <span matPrefix *ngIf=\"block.imageOpacity\">O</span>\n </mat-form-field>\n </ng-container>\n </div>\n </div>\n </ng-container>\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Padding</div>\n <div class=\"sidebar-row padding-row\">\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [(ngModel)]=\"block.padding\"\n name=\"padding\"\n (focus)=\"inputFocus($event)\"\n (ngModelChange)=\"paddingAllChange($event)\"\n (keydown)=\"paddingAllKeypress($event, 1)\"\n placeholder=\"All\">\n <span matPrefix *ngIf=\"block.padding\">A</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.paddingTop\"\n name=\"paddingTop\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"paddingKeypress($event, 'paddingTop')\"\n (ngModelChange)=\"numberChange($event, 'paddingTop')\"\n placeholder=\"Top\">\n <span matPrefix *ngIf=\"block.paddingTop\">T</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.paddingBottom\"\n name=\"paddingBottom\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"paddingKeypress($event, 'paddingBottom')\"\n (ngModelChange)=\"numberChange($event, 'paddingBottom')\"\n placeholder=\"Bottom\">\n <span matPrefix *ngIf=\"block.paddingBottom\">B</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.paddingLeft\"\n name=\"paddingLeft\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"paddingKeypress($event, 'paddingLeft')\"\n (ngModelChange)=\"numberChange($event, 'paddingLeft')\"\n placeholder=\"Left\">\n <span matPrefix *ngIf=\"block.paddingLeft\">L</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.paddingRight\"\n name=\"paddingRight\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"paddingKeypress($event, 'paddingRight')\"\n (ngModelChange)=\"numberChange($event, 'paddingRight')\"\n placeholder=\"Right\">\n <span matPrefix *ngIf=\"block.paddingRight\">R</span>\n </mat-form-field>\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngFor=\"let sidebarPanel of sidebarPanels\">\n <div div class=\"sidebar-panel\" *ngIf=\"sidebarPanel.show\">\n <div class=\"sidebar-label\">{{sidebarPanel.label}}</div>\n <ng-container\n [ngTemplateOutlet]=\"sidebarPanel.templateRef\"\n [ngTemplateOutletContext]=\"{ block: block }\"></ng-container>\n </div>\n </ng-container>\n </form>\n</div>\n<ng-template #addButton let-blockType=\"blockType\">\n <button\n type=\"button\"\n mat-icon-button\n [matTooltip]=\"'Add ' + blockType.name\"\n (click)=\"blockAdd(blockType.value)\">\n <mat-icon>{{blockType.icon}}</mat-icon>\n </button>\n</ng-template>", styles: [".sidebar{width:285px;font-size:14px;height:100%;overflow:auto;background-color:#fff;padding:0 10px 10px;box-shadow:0 1px 3px 1px #0003;z-index:1;position:relative;box-sizing:border-box}.sidebar form{height:100%}.sidebar .sidebar-row{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}.sidebar .sidebar-row+.sidebar-row{margin-top:12px}.sidebar .sidebar-row fs-color-picker-chip{margin-left:6px}.sidebar .sidebar-row.padding-row{flex-wrap:unset}.sidebar .sidebar-row.padding-row ::ng-deep .mat-form-field{width:20%;min-width:0}.sidebar .sidebar-row.image-row{margin-bottom:-5px}.sidebar .sidebar-row.image-row .opacity{width:55px;margin-left:10px}.sidebar .sidebar-row ::ng-deep .mat-checkbox,.sidebar .sidebar-row ::ng-deep .mat-form-field{font-size:12px}.sidebar .sidebar-row>*:not(.mat-icon-button):not(fs-file){margin-right:11px}.sidebar .sidebar-row>*:not(.mat-icon-button):not(fs-file):last-child{margin-right:0}.sidebar .layer-up ::ng-deep .mat-button-wrapper,.sidebar .layer-down ::ng-deep .mat-button-wrapper{position:relative}.sidebar .layer-up ::ng-deep .mat-button-wrapper mat-icon:first-child,.sidebar .layer-down ::ng-deep .mat-button-wrapper mat-icon:first-child{position:absolute;transform:rotate(90deg) scale(.5);top:-7px;color:#fff}.sidebar .layer-down mat-icon:first-child{transform:rotate(270deg) scale(.6)}.sidebar .padding{width:45px}.sidebar .line-height,.sidebar .font-size,.sidebar .border-width{width:45px}.sidebar .shape-radius{width:50px}.sidebar .shape-corners{display:grid;grid-template-columns:1fr 1fr;grid-column-gap:1px;column-gap:1px;grid-row-gap:1px;row-gap:1px}.sidebar .shape-corners .shape-corner{height:13px;width:13px;background-color:#ccc;cursor:pointer}.sidebar .shape-corners .shape-corner.round.shape-corner-top-right{border-top-right-radius:50%}.sidebar .shape-corners .shape-corner.round.shape-corner-top-left{border-top-left-radius:50%}.sidebar .shape-corners .shape-corner.round.shape-corner-bottom-left{border-bottom-left-radius:50%}.sidebar .shape-corners .shape-corner.round.shape-corner-bottom-right{border-bottom-right-radius:50%}.sidebar button.toggle-button:not(.selected) mat-icon{color:#ccc}.sidebar .sidebar-panel{padding:10px}.sidebar .sidebar-panel+.sidebar-panel{border-top:1px solid #dadada}.sidebar .sidebar-panel.block-form-panel .sidebar-label{display:flex;align-items:center}.sidebar .sidebar-panel.block-form-panel .sidebar-label mat-icon{transform:scale(.8);color:inherit;margin-left:-5px}.sidebar .sidebar-panel.block-form-panel .form-field-options mat-checkbox{display:block}.sidebar .sidebar-panel.block-form-panel .form-field-options mat-checkbox+mat-checkbox{margin-top:2px}.sidebar .sidebar-panel.info-panel .mat-form-field{width:60px}.sidebar .sidebar-panel.info-panel .mat-form-field.rotate{width:40px}.sidebar .sidebar-panel.shadow-panel .mat-form-field{width:41px}.sidebar .sidebar-panel.shadow-panel .mat-form-field.shadow-x,.sidebar .sidebar-panel.shadow-panel .mat-form-field.shadow-y,.sidebar .sidebar-panel.shadow-panel .mat-form-field.shadow-blur{width:26px}.sidebar .sidebar-panel.typography-panel fs-autocomplete{width:100%}.sidebar .sidebar-panel.typography-panel .style-row{margin-bottom:-10px}.sidebar .sidebar-panel.typography-panel .align-row{margin-bottom:-5px}.sidebar .sidebar-panel.typography-panel .align-row .mat-icon-button{width:35px;height:35px;line-height:35px}.sidebar .sidebar-panel .sidebar-label{font-size:11px;margin-bottom:7px;color:#9e9e9e}.sidebar .sidebar-panel .keep-ratio{color:inherit;transform:scale(.85);display:block}.full-width{width:100%}:host ::ng-deep .mat-form-field-prefix{color:#9e9e9e;margin-right:3px;font-size:85%}\n"], components: [{ type: i3__namespace$2.FsFileComponent, selector: "fs-file", inputs: ["minHeight", "minWidth", "orientate", "multiple", "capture", "allowClick", "allowDrop", "accept", "disabled", "imageWidth", "imageHeight", "imageQuality"], outputs: ["select", "error", "clicked", "declined"] }, { 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"] }, { type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i6__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7__namespace$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i8__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i9__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i10__namespace.FsAutocompleteComponent, selector: "fs-autocomplete", inputs: ["fetch", "placeholder", "displayWith", "fetchOnFocus", "readonly", "required", "disabled", "appearance", "hint", "panelWidth", "panelClass", "showClear"], outputs: ["cleared", "opened", "closed"] }, { type: FontComponent, selector: "app-font", inputs: ["font"] }, { type: i12__namespace.FsColorPickerChipComponent, selector: "fs-color-picker-chip", inputs: ["color", "showClear"], outputs: ["changed"] }], directives: [{ type: i13__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i13__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i13__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i14__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i15__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i15__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i15__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i15__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i15__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i15__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i16__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i17__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i13__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i13__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i13__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i14__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i6__namespace$1.MatPrefix, selector: "[matPrefix]" }, { type: i18__namespace.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i6__namespace$1.MatLabel, selector: "mat-label" }, { type: i14__namespace.FsFormValidateDirective, selector: "[validate]", inputs: ["validate", "validateData", "validateOnSubmit"] }, { type: i10__namespace.FsAutocompleteTemplateDirective, selector: "[fsAutocompleteTemplate]" }, { type: i15__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1989
+ SidebarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SidebarComponent, deps: [{ token: i0__namespace.ElementRef }, { token: BlockEditorService }, { token: i0__namespace.ChangeDetectorRef }, { token: GoogleFontService }, { token: i2__namespace$1.FsClipboard }, { token: i3__namespace$2.FsMessage }, { token: i3__namespace$1.FsPrompt }, { token: i1__namespace$1.MatDialog }, { token: i18.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Component });
1990
+ SidebarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SidebarComponent, selector: "sidebar", inputs: { config: "config", blocks: "blocks", zoompan: "zoompan" }, outputs: { zoomCenter: "zoomCenter" }, queries: [{ propertyName: "sidebarPanels", predicate: FsBlockEditorSidebarPanelDirective }], ngImport: i0__namespace, template: "<div class=\"sidebar\">\n <form fsForm>\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-row\">\n <ng-container *ngFor=\"let blockType of BlockTypes\">\n <ng-container *ngIf=\"blockType.type === 'draw'\">\n <ng-container [ngSwitch]=\"blockType.value\">\n <ng-container *ngSwitchCase=\"BlockType.Pdf\">\n <ng-container [ngTemplateOutlet]=\"addFile\" [ngTemplateOutletContext]=\"{ type: BlockType.Pdf }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"BlockType.Image\">\n <ng-container [ngTemplateOutlet]=\"addFile\" [ngTemplateOutletContext]=\"{ type: BlockType.Rectangle }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container \n [ngTemplateOutlet]=\"addButton\" \n [ngTemplateOutletContext]=\"{ blockType: blockType }\">\n </ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #addFile let-type=\"type\">\n <fs-file \n (select)=\"blockUpload({ type: type, keepRatio: true, borderWidth: 0 }, $event)\" \n [accept]=\"blockType.accept\">\n <ng-container [ngTemplateOutlet]=\"addButton\" [ngTemplateOutletContext]=\"{ blockType: blockType }\"></ng-container>\n </fs-file>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-row\">\n <ng-container *ngFor=\"let blockType of BlockTypes\">\n <ng-container *ngIf=\"blockType.type === 'form'\">\n <ng-container \n [ngTemplateOutlet]=\"addButton\" \n [ngTemplateOutletContext]=\"{ blockType: blockType }\">\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div> \n\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-row\">\n <ng-container *ngIf=\"block\">\n <button\n class=\"layer-up\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"layerUp()\"\n [matTooltip]=\"'Increase layer'\">\n <mat-icon>arrow_back</mat-icon>\n <mat-icon>layers</mat-icon>\n </button>\n <button\n class=\"layer-down\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"layerDown()\"\n [matTooltip]=\"'Decrease layer'\">\n <mat-icon>arrow_back</mat-icon>\n <mat-icon>layers</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"toggleLock()\"\n [matTooltip]=\"block.lock ? 'Unlock' : 'Lock'\">\n <mat-icon>{{block.lock ? 'lock_outline' : 'lock_open'}}</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n [matTooltip]=\"'Delete block'\"\n (click)=\"blockRemoveClick()\">\n <mat-icon>delete_outline</mat-icon>\n </button> \n </ng-container>\n <ng-container *ngIf=\"blocksReordered\">\n <button\n class=\"reorder-layers\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"blocksReordered()\"\n [matTooltip]=\"'Reorder blocks'\">\n <mat-icon>swap_vert</mat-icon>\n </button>\n </ng-container>\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n matTooltip=\"Reset zoom\"\n (click)=\"zoomCenter.emit()\">\n <mat-icon>crop_free</mat-icon>\n </button>\n </div>\n </div>\n <ng-container *ngIf=\"block\">\n <div class=\"sidebar-panel info-panel\">\n <div class=\"sidebar-label\">Info</div>\n <div class=\"sidebar-row\">\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.left\"\n name=\"left\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'left', .01)\"\n (ngModelChange)=\"numberChange($event, 'left')\">\n <span matPrefix>X</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.top\"\n name=\"top\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'top', .01)\"\n (ngModelChange)=\"numberChange($event, 'top')\">\n <span matPrefix>Y</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless rotate\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.rotate\"\n name=\"rotate\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'rotate')\"\n (ngModelChange)=\"numberChange($event, 'rotate')\">\n <span matPrefix>R</span>\n </mat-form-field>\n </div>\n\n <div class=\"sidebar-row\">\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.width\"\n name=\"width\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'width', .01)\"\n (ngModelChange)=\"numberChange($event, 'width')\">\n <span matPrefix>W</span>\n </mat-form-field>\n\n <div>\n <a (click)=\"toggleKeepRatio()\" class=\"keep-ratio\">\n <mat-icon>{{block.keepRatio ? 'lock_outline' : 'lock_open'}}</mat-icon>\n </a>\n </div>\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.height\"\n name=\"height\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'height', .01)\"\n (ngModelChange)=\"numberChange($event, 'height')\">\n <span matPrefix>H</span>\n </mat-form-field>\n </div>\n </div>\n <ng-container\n *ngIf=\"block.type === BlockType.LongText || block.type === BlockType.ShortText || block.type === BlockType.RadioButton || block.type === BlockType.Checkbox || block.type === BlockType.Date || block.type === BlockType.Signature\">\n <div class=\"sidebar-panel block-form-panel\">\n <div class=\"sidebar-label\">\n <mat-icon>{{blockTypeIcons[block.type]}}</mat-icon>\n {{blockTypeNames[block.type]}}\n </div>\n <div class=\"sidebar-row\">\n\n <ng-container *ngIf=\"block.type === BlockType.RadioButton\">\n <mat-form-field class=\"full-width\" class=\"full-width group-block\">\n <mat-label>Group</mat-label>\n <mat-select\n [(ngModel)]=\"blockGroup\"\n (ngModelChange)=\"blockGroupChange($event)\"\n name=\"group\">\n <ng-container *ngIf=\"blockGroups.length\">\n <mat-option [value]=\"null\">\n None\n </mat-option>\n </ng-container>\n <mat-option\n *ngFor=\"let item of blockGroups\"\n [value]=\"item\">\n {{ item.label }}\n </mat-option>\n <mat-option \n [value]=\"null\"\n (click)=\"blockGroupCreate($event)\">\n Create Group\n </mat-option>\n </mat-select>\n <div matSuffix>\n <ng-container *ngIf=\"blockGroup\">\n <a \n (click)=\"blockGroupEdit($event)\">\n <mat-icon>edit</mat-icon>\n </a>\n </ng-container>\n </div>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field class=\"full-width\">\n <input\n matInput\n [ngModel]=\"block.label\"\n name=\"label\"\n placeholder=\"Label\"\n (ngModelChange)=\"blockChangeProperty($event, 'label')\">\n </mat-form-field>\n\n <ng-container *ngIf=\"block.type !== BlockType.RadioButton\">\n <mat-form-field class=\"full-width\">\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [ngModel]=\"block.description\"\n name=\"description\"\n placeholder=\"Description\"\n (ngModelChange)=\"blockChangeProperty($event, 'description')\">\n </textarea>\n </mat-form-field>\n </ng-container>\n\n <mat-form-field\n *ngIf=\"formats.length\"\n class=\"full-width\">\n <mat-label>Format</mat-label>\n <mat-select\n [(ngModel)]=\"block.format\"\n name=\"format\"\n (ngModelChange)=\"blockChangeProperty($event, 'format')\">\n <mat-option [value]=\"null\">\n None\n </mat-option>\n <mat-option\n *ngFor=\"let item of formats\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <ng-container\n *ngIf=\"block.type === BlockType.LongText || block.type === BlockType.ShortText || block.type === BlockType.Date\">\n <mat-form-field class=\"full-width\">\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [ngModel]=\"block.default\"\n name=\"default\"\n [validate]=\"validate\"\n placeholder=\"Default\"\n (ngModelChange)=\"blockChangeProperty($event, 'default')\">\n </textarea>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"block.type === BlockType.LongText || block.type === BlockType.ShortText\">\n <mat-form-field class=\"full-width\">\n <textarea\n matInput\n [cdkTextareaAutosize]=\"true\"\n [ngModel]=\"block.formula\"\n name=\"formula\"\n placeholder=\"Formula\"\n (ngModelChange)=\"blockChangeProperty($event, 'formula')\">\n </textarea>\n </mat-form-field>\n </ng-container>\n\n <ng-container *ngIf=\"!blockGroup\">\n <ng-container [ngTemplateOutlet]=\"name\"></ng-container>\n </ng-container>\n\n <ng-template #name>\n <mat-form-field class=\"full-width\">\n <input\n matInput\n [ngModel]=\"block.name\"\n name=\"name\"\n placeholder=\"Name\"\n (ngModelChange)=\"blockChangeProperty($event, 'name')\">\n </mat-form-field>\n </ng-template>\n\n <div class=\"form-field-options\">\n <mat-checkbox\n name=\"required\"\n [(ngModel)]=\"block.required\"\n (ngModelChange)=\"blockRequired($event)\">\n Required\n </mat-checkbox>\n\n <mat-checkbox\n name=\"readonly\"\n [(ngModel)]=\"block.readonly\"\n (ngModelChange)=\"blockReadonly($event)\">\n Readonly\n </mat-checkbox>\n </div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"block.type === BlockType.Rectangle || block.type === BlockType.Image || block.type === BlockType.Pdf\">\n <div class=\"sidebar-panel typography-panel\">\n <div class=\"sidebar-label\">Typography</div>\n <div class=\"sidebar-row\">\n <fs-autocomplete\n [fetch]=\"fontFetch\"\n [fetchOnFocus]=\"true\"\n [displayWith]=\"fontDisplayWith\"\n [ngModel]=\"block.fontFamily ? { family: block.fontFamily } : null\"\n placeholder=\"Font\"\n [panelClass]=\"'font-autocomplete-panel'\"\n (ngModelChange)=\"fontChanged($event)\"\n name=\"fontfamily\">\n <ng-template fsAutocompleteTemplate let-data=\"data\">\n <app-font [font]=\"data\"></app-font>\n </ng-template>\n </fs-autocomplete>\n <fs-color-picker-chip\n (changed)=\"fontColorChange($event)\"\n [color]=\"block.fontColor\">\n </fs-color-picker-chip>\n\n <mat-form-field class=\"form-field-padless font-size\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.fontSize\"\n name=\"fontSize\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'fontSize')\"\n (ngModelChange)=\"numberChange($event, 'fontSize')\"\n placeholder=\"Size\">\n <span matPrefix *ngIf=\"block.fontSize\">S</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless line-height\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.lineHeight\"\n name=\"lineHeight\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'lineHeight')\"\n (ngModelChange)=\"numberChange($event, 'lineHeight')\"\n placeholder=\"Line\">\n <span matPrefix *ngIf=\"block.lineHeight\">L</span>\n </mat-form-field>\n </div>\n\n <div class=\"sidebar-row style-row\">\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.bold }\"\n (click)=\"boldClick()\">\n <mat-icon>format_bold</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.italic }\"\n (click)=\"italicClick()\">\n <mat-icon>format_italic</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.underline }\"\n (click)=\"underlineClick()\">\n <mat-icon>format_underline</mat-icon>\n </button>\n </div>\n\n <div class=\"sidebar-row align-row\">\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.horizontalAlign === 'left' }\"\n (click)=\"horizontalAlignClick('left')\">\n <mat-icon>format_align_left</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.horizontalAlign === 'center' }\"\n (click)=\"horizontalAlignClick('center')\">\n <mat-icon>format_align_center</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.horizontalAlign === 'justify' }\"\n (click)=\"horizontalAlignClick('justify')\">\n <mat-icon>format_align_justify</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.horizontalAlign === 'right' }\"\n (click)=\"horizontalAlignClick('right')\">\n <mat-icon>format_align_right</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.verticalAlign === 'top' }\"\n (click)=\"verticalAlignClick('top')\">\n <mat-icon>vertical_align_top</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.verticalAlign === 'center' }\"\n (click)=\"verticalAlignClick('center')\">\n <mat-icon>vertical_align_center</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: block.verticalAlign === 'bottom' }\"\n (click)=\"verticalAlignClick('bottom')\">\n <mat-icon>vertical_align_bottom</mat-icon>\n </button>\n </div>\n </div>\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Border</div>\n\n <div class=\"sidebar-row\">\n <fs-color-picker-chip\n (changed)=\"borderColorChange($event)\"\n [color]=\"block.borderColor\">\n </fs-color-picker-chip>\n\n <mat-form-field class=\"form-field-padless border-width\" floatLabel=\"never\">\n <input\n matInput\n [(ngModel)]=\"block.borderWidth\"\n name=\"borderWidth\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'borderWidth')\"\n (ngModelChange)=\"numberChange($event, 'borderWidth')\"\n placeholder=\"Width\">\n <span matPrefix *ngIf=\"block.borderWidth\">W</span>\n </mat-form-field>\n </div>\n </div>\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Shape</div>\n\n <div class=\"sidebar-row\">\n <fs-color-picker-chip\n (changed)=\"backgroundColorChange($event)\"\n [color]=\"block.backgroundColor\">\n </fs-color-picker-chip>\n\n <mat-form-field class=\"form-field-padless shape-radius\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shapeRadius\"\n name=\"shapeRadius\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shapeRadius', 1)\"\n (ngModelChange)=\"numberChange($event, 'shapeRadius')\"\n placeholder=\"Radius\">\n <span matPrefix *ngIf=\"block.shapeRadius\">R</span>\n </mat-form-field>\n\n <div class=\"shape-corners\">\n <div\n class=\"shape-corner shape-corner-top-left\"\n [ngClass]=\"{ round: block.shapeTopLeft === 'round' }\"\n (click)=\"shapeRound('shapeTopLeft')\"></div>\n <div\n class=\"shape-corner shape-corner-top-right\"\n [ngClass]=\"{ round: block.shapeTopRight === 'round' }\"\n (click)=\"shapeRound('shapeTopRight')\"></div>\n <div\n class=\"shape-corner shape-corner-bottom-left\"\n [ngClass]=\"{ round: block.shapeBottomLeft === 'round' }\"\n (click)=\"shapeRound('shapeBottomLeft')\"></div>\n <div\n class=\"shape-corner shape-corner-bottom-right\"\n [ngClass]=\"{ round: block.shapeBottomRight === 'round' }\"\n (click)=\"shapeRound('shapeBottomRight')\"></div>\n </div>\n </div>\n </div>\n <div class=\"sidebar-panel shadow-panel\">\n <div class=\"sidebar-label\">Shadow</div>\n\n <div class=\"sidebar-row\">\n <fs-color-picker-chip\n (changed)=\"shadowColorChange($event)\"\n [color]=\"block.shadowColor\">\n </fs-color-picker-chip>\n\n <mat-form-field class=\"form-field-padless shadow-x\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowX\"\n name=\"shadowX\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowX')\"\n (ngModelChange)=\"numberChange($event, 'shadowX')\">\n <span matPrefix>X</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless shadow-y\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowY\"\n name=\"shadowY\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowY')\"\n (ngModelChange)=\"numberChange($event, 'shadowY')\">\n <span matPrefix>Y</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless shadow-blur\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowBlur\"\n name=\"shadowBlur\"\n placeholder=\"Blur\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowBlur')\"\n (ngModelChange)=\"numberChange($event, 'shadowBlur')\">\n <span matPrefix *ngIf=\"block.shadowBlur\">B</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowSpread\"\n name=\"shadowSpread\"\n placeholder=\"Spread\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowSpread')\"\n (ngModelChange)=\"numberChange($event, 'shadowSpread')\">\n <span matPrefix *ngIf=\"block.shadowSpread\">S</span>\n </mat-form-field>\n <!-- <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.shadowOpacity\"\n name=\"shadowOpacity\"\n placeholder=\"Opacity\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'shadowOpacity')\"\n (ngModelChange)=\"numberChange($event, 'shadowOpacity')\">\n <span matPrefix *ngIf=\"block.shadowOpacity\">O</span>\n </mat-form-field> -->\n </div>\n </div>\n <ng-container *ngIf=\"block.type === BlockType.Rectangle\">\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Image</div>\n <div class=\"sidebar-row image-row\">\n <fs-file (select)=\"blockUpload(block, $event)\">\n <button\n type=\"button\"\n mat-icon-button>\n <mat-icon>cloud_upload</mat-icon>\n </button>\n </fs-file>\n <ng-container *ngIf=\"block.imageUrl\">\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"imageRemove()\">\n <mat-icon>clear</mat-icon>\n </button>\n <button\n mat-icon-button\n class=\"toggle-button\"\n color=\"basic\"\n type=\"button\"\n [ngClass]=\"{ selected: clippable }\"\n (click)=\"imageClip()\">\n <mat-icon>crop</mat-icon>\n </button>\n\n <mat-form-field class=\"form-field-padless opacity\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.imageOpacity\"\n name=\"imageOpacity\"\n placeholder=\"Opacity\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"numericInputKeypress($event, 'imageOpacity')\"\n (ngModelChange)=\"numberChange($event, 'imageOpacity')\">\n <span matPrefix *ngIf=\"block.imageOpacity\">O</span>\n </mat-form-field>\n </ng-container>\n </div>\n </div>\n </ng-container> \n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Padding</div>\n <div class=\"sidebar-row padding-row\">\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [(ngModel)]=\"block.padding\"\n name=\"padding\"\n (focus)=\"inputFocus($event)\"\n (ngModelChange)=\"paddingAllChange($event)\"\n (keydown)=\"paddingAllKeypress($event, 1)\"\n placeholder=\"All\">\n <span matPrefix *ngIf=\"block.padding\">A</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.paddingTop\"\n name=\"paddingTop\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"paddingKeypress($event, 'paddingTop')\"\n (ngModelChange)=\"numberChange($event, 'paddingTop')\"\n placeholder=\"Top\">\n <span matPrefix *ngIf=\"block.paddingTop\">T</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.paddingBottom\"\n name=\"paddingBottom\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"paddingKeypress($event, 'paddingBottom')\"\n (ngModelChange)=\"numberChange($event, 'paddingBottom')\"\n placeholder=\"Bottom\">\n <span matPrefix *ngIf=\"block.paddingBottom\">B</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.paddingLeft\"\n name=\"paddingLeft\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"paddingKeypress($event, 'paddingLeft')\"\n (ngModelChange)=\"numberChange($event, 'paddingLeft')\"\n placeholder=\"Left\">\n <span matPrefix *ngIf=\"block.paddingLeft\">L</span>\n </mat-form-field>\n\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.paddingRight\"\n name=\"paddingRight\"\n (focus)=\"inputFocus($event)\"\n (keydown)=\"paddingKeypress($event, 'paddingRight')\"\n (ngModelChange)=\"numberChange($event, 'paddingRight')\"\n placeholder=\"Right\">\n <span matPrefix *ngIf=\"block.paddingRight\">R</span>\n </mat-form-field>\n </div>\n </div> \n </ng-container> \n </ng-container>\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Tools</div>\n <div class=\"sidebar-row padding-row\">\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"exportBlocks()\"\n [matTooltip]=\"'Export blocks'\">\n <mat-icon>download</mat-icon>\n </button>\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"importBlocks()\"\n [matTooltip]=\"'Import blocks'\">\n <mat-icon>upload</mat-icon>\n </button>\n </div>\n </div> \n\n <ng-container *ngFor=\"let sidebarPanel of sidebarPanels\">\n <div div class=\"sidebar-panel\" *ngIf=\"sidebarPanel.show\">\n <div class=\"sidebar-label\">{{sidebarPanel.label}}</div>\n <ng-container\n [ngTemplateOutlet]=\"sidebarPanel.templateRef\"\n [ngTemplateOutletContext]=\"{ block: block }\"></ng-container>\n </div>\n </ng-container>\n </form>\n</div>\n<ng-template #addButton let-blockType=\"blockType\">\n <button\n type=\"button\"\n mat-icon-button\n [matTooltip]=\"'Add ' + blockType.name\"\n (click)=\"blockAdd(blockType.value)\">\n <mat-icon>{{blockType.icon}}</mat-icon>\n </button>\n</ng-template>", styles: [".sidebar{width:285px;font-size:14px;height:100%;overflow:auto;background-color:#fff;padding:0 10px 10px;box-shadow:0 1px 3px 1px #0003;z-index:1;position:relative;box-sizing:border-box}.sidebar form{height:100%}.sidebar .sidebar-row{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}.sidebar .sidebar-row+.sidebar-row{margin-top:12px}.sidebar .sidebar-row fs-color-picker-chip{margin-left:6px}.sidebar .sidebar-row.padding-row{flex-wrap:unset}.sidebar .sidebar-row.padding-row ::ng-deep .mat-form-field{width:20%;min-width:0}.sidebar .sidebar-row.image-row{margin-bottom:-5px}.sidebar .sidebar-row.image-row .opacity{width:55px;margin-left:10px}.sidebar .sidebar-row ::ng-deep .mat-checkbox,.sidebar .sidebar-row ::ng-deep .mat-form-field{font-size:12px}.sidebar .sidebar-row>*:not(.mat-icon-button):not(fs-file){margin-right:11px}.sidebar .sidebar-row>*:not(.mat-icon-button):not(fs-file):last-child{margin-right:0}.sidebar .layer-up ::ng-deep .mat-button-wrapper,.sidebar .layer-down ::ng-deep .mat-button-wrapper{position:relative}.sidebar .layer-up ::ng-deep .mat-button-wrapper mat-icon:first-child,.sidebar .layer-down ::ng-deep .mat-button-wrapper mat-icon:first-child{position:absolute;transform:rotate(90deg) scale(.5);top:-7px;color:#fff}.sidebar .layer-down mat-icon:first-child{transform:rotate(270deg) scale(.6)}.sidebar .padding{width:45px}.sidebar .line-height,.sidebar .font-size,.sidebar .border-width{width:45px}.sidebar .shape-radius{width:50px}.sidebar .shape-corners{display:grid;grid-template-columns:1fr 1fr;grid-column-gap:1px;column-gap:1px;grid-row-gap:1px;row-gap:1px}.sidebar .shape-corners .shape-corner{height:13px;width:13px;background-color:#ccc;cursor:pointer}.sidebar .shape-corners .shape-corner.round.shape-corner-top-right{border-top-right-radius:50%}.sidebar .shape-corners .shape-corner.round.shape-corner-top-left{border-top-left-radius:50%}.sidebar .shape-corners .shape-corner.round.shape-corner-bottom-left{border-bottom-left-radius:50%}.sidebar .shape-corners .shape-corner.round.shape-corner-bottom-right{border-bottom-right-radius:50%}.sidebar button.toggle-button:not(.selected) mat-icon{color:#ccc}.sidebar .group-block ::ng-deep .mat-form-field-suffix{top:4px;padding-left:2px}.sidebar .sidebar-panel{padding:10px}.sidebar .sidebar-panel+.sidebar-panel{border-top:1px solid #dadada}.sidebar .sidebar-panel.block-form-panel .sidebar-label{display:flex;align-items:center}.sidebar .sidebar-panel.block-form-panel .sidebar-label mat-icon{transform:scale(.8);color:inherit;margin-left:-5px}.sidebar .sidebar-panel.block-form-panel .form-field-options mat-checkbox{display:block}.sidebar .sidebar-panel.block-form-panel .form-field-options mat-checkbox+mat-checkbox{margin-top:2px}.sidebar .sidebar-panel.info-panel .mat-form-field{width:60px}.sidebar .sidebar-panel.info-panel .mat-form-field.rotate{width:40px}.sidebar .sidebar-panel.shadow-panel .mat-form-field{width:41px}.sidebar .sidebar-panel.shadow-panel .mat-form-field.shadow-x,.sidebar .sidebar-panel.shadow-panel .mat-form-field.shadow-y,.sidebar .sidebar-panel.shadow-panel .mat-form-field.shadow-blur{width:26px}.sidebar .sidebar-panel.typography-panel fs-autocomplete{width:100%}.sidebar .sidebar-panel.typography-panel .style-row{margin-bottom:-10px}.sidebar .sidebar-panel.typography-panel .align-row{margin-bottom:-5px}.sidebar .sidebar-panel.typography-panel .align-row .mat-icon-button{width:35px;height:35px;line-height:35px}.sidebar .sidebar-panel .sidebar-label{font-size:11px;margin-bottom:7px;color:#9e9e9e}.sidebar .sidebar-panel .keep-ratio{color:inherit;transform:scale(.85);display:block}.full-width{width:100%}:host ::ng-deep .mat-form-field-prefix{color:#9e9e9e;margin-right:3px;font-size:85%}\n"], components: [{ type: i6__namespace$1.FsFileComponent, selector: "fs-file", inputs: ["minHeight", "minWidth", "orientate", "multiple", "capture", "allowClick", "allowDrop", "accept", "disabled", "imageWidth", "imageHeight", "imageQuality"], outputs: ["select", "error", "clicked", "declined"] }, { type: i4__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"] }, { type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i9__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i10__namespace.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i11__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i12__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i13__namespace.FsAutocompleteComponent, selector: "fs-autocomplete", inputs: ["fetch", "placeholder", "displayWith", "fetchOnFocus", "readonly", "required", "disabled", "appearance", "hint", "panelWidth", "panelClass", "showClear"], outputs: ["cleared", "opened", "closed"] }, { type: FontComponent, selector: "app-font", inputs: ["font"] }, { type: i15__namespace.FsColorPickerChipComponent, selector: "fs-color-picker-chip", inputs: ["color", "showClear"], outputs: ["changed"] }], directives: [{ type: i5__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i6__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i18__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i18__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i18__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i18__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i18__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i18__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i19__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i7__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i5__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i9__namespace.MatPrefix, selector: "[matPrefix]" }, { type: i9__namespace.MatLabel, selector: "mat-label" }, { type: i9__namespace.MatSuffix, selector: "[matSuffix]" }, { type: i8__namespace.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i6__namespace.FsFormValidateDirective, selector: "[validate]", inputs: ["validate", "validateData", "validateOnSubmit"] }, { type: i13__namespace.FsAutocompleteTemplateDirective, selector: "[fsAutocompleteTemplate]" }, { type: i18__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1848
1991
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SidebarComponent, decorators: [{
1849
1992
  type: i0.Component,
1850
1993
  args: [{
@@ -1854,9 +1997,9 @@
1854
1997
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1855
1998
  }]
1856
1999
  }], ctorParameters: function () {
1857
- return [{ type: i0__namespace.ElementRef }, { type: BlockEditorService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace$1.FsPrompt }, { type: GoogleFontService }, { type: undefined, decorators: [{
2000
+ return [{ type: i0__namespace.ElementRef }, { type: BlockEditorService }, { type: i0__namespace.ChangeDetectorRef }, { type: GoogleFontService }, { type: i2__namespace$1.FsClipboard }, { type: i3__namespace$2.FsMessage }, { type: i3__namespace$1.FsPrompt }, { type: i1__namespace$1.MatDialog }, { type: undefined, decorators: [{
1858
2001
  type: i0.Inject,
1859
- args: [i15.DOCUMENT]
2002
+ args: [i18.DOCUMENT]
1860
2003
  }] }];
1861
2004
  }, propDecorators: { sidebarPanels: [{
1862
2005
  type: i0.ContentChildren,
@@ -1865,6 +2008,8 @@
1865
2008
  type: i0.Input
1866
2009
  }], blocks: [{
1867
2010
  type: i0.Input
2011
+ }], zoompan: [{
2012
+ type: i0.Input
1868
2013
  }], zoomCenter: [{
1869
2014
  type: i0.Output
1870
2015
  }] } });
@@ -1902,6 +2047,16 @@
1902
2047
  _this._cdRef.markForCheck();
1903
2048
  });
1904
2049
  };
2050
+ ArtboardComponent.prototype.ngAfterViewInit = function () {
2051
+ var _this = this;
2052
+ this.blockComponents
2053
+ .changes
2054
+ .pipe(operators.takeUntil(this._destroy$))
2055
+ .subscribe(function () {
2056
+ _this._blockEditor.blockComponents = _this.blockComponents.toArray();
2057
+ });
2058
+ this._blockEditor.blockComponents = this.blockComponents.toArray();
2059
+ };
1905
2060
  ArtboardComponent.prototype.ngOnDestroy = function () {
1906
2061
  this._destroy$.next();
1907
2062
  this._destroy$.complete();
@@ -1909,7 +2064,7 @@
1909
2064
  return ArtboardComponent;
1910
2065
  }());
1911
2066
  ArtboardComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ArtboardComponent, deps: [{ token: i0__namespace.ElementRef }, { token: BlockEditorService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1912
- ArtboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ArtboardComponent, selector: "app-artboard", inputs: { config: "config", zoompan: "zoompan" }, queries: [{ propertyName: "sidebarPanels", predicate: FsBlockEditorSidebarPanelDirective }], viewQueries: [{ propertyName: "artboard", first: true, predicate: ["artboard"], descendants: true, static: true }, { propertyName: "marginContainer", first: true, predicate: ["marginContainer"], descendants: true, static: true }, { propertyName: "sidebar", first: true, predicate: SidebarComponent, descendants: true, static: true }, { propertyName: "blockComponents", predicate: FsBlockComponent, descendants: true }, { propertyName: "margins", predicate: FsBlockEditorMarginDirective, descendants: true }], ngImport: i0__namespace, template: "<div\n #artboard\n class=\"artboard mat-elevation-z4 deselectable\"\n [style.width]=\"config.width + config.unit\"\n [style.height]=\"config.height + config.unit\">\n <fs-block\n *ngFor=\"let block of blocks\"\n [zoompan]=\"zoompan\"\n [block]=\"block\">\n </fs-block>\n <div class=\"margin margin-top\" *ngIf=\"config.marginTop\" [style.top]=\"config.marginTop + 'in'\"></div>\n <div class=\"margin margin-left\" *ngIf=\"config.marginLeft\" [style.left]=\"config.marginLeft + 'in'\"></div>\n <div class=\"margin margin-bottom\" *ngIf=\"config.marginBottom\" [style.bottom]=\"config.marginBottom + 'in'\"></div>\n <div class=\"margin margin-right\" *ngIf=\"config.marginRight\" [style.right]=\"config.marginRight + 'in'\"></div>\n <div\n #marginContainer\n class=\"margin-container\"\n [style.top]=\"config.marginTop + 'in'\"\n [style.right]=\"config.marginRight + 'in'\"\n [style.bottom]=\"config.marginBottom + 'in'\"\n [style.left]=\"config.marginLeft + 'in'\">\n </div>\n</div> \n\n", styles: [".artboard{position:relative;display:inline-flex;background-color:#fff}.artboard .margin-container{position:absolute;z-index:-1}.artboard .margin{position:absolute;border-color:#ff85bd5e;border-style:dashed;border-width:0px}.artboard .margin.margin-top,.artboard .margin.margin-bottom{width:100%;border-top-width:1px}.artboard .margin.margin-left,.artboard .margin.margin-right{height:100%;border-left-width:1px}\n"], components: [{ type: FsBlockComponent, selector: "fs-block", inputs: ["block", "html", "zoompan"] }], directives: [{ type: i15__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i15__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2067
+ ArtboardComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ArtboardComponent, selector: "app-artboard", inputs: { config: "config", zoompan: "zoompan" }, queries: [{ propertyName: "sidebarPanels", predicate: FsBlockEditorSidebarPanelDirective }], viewQueries: [{ propertyName: "artboard", first: true, predicate: ["artboard"], descendants: true, static: true }, { propertyName: "marginContainer", first: true, predicate: ["marginContainer"], descendants: true, static: true }, { propertyName: "sidebar", first: true, predicate: SidebarComponent, descendants: true, static: true }, { propertyName: "blockComponents", predicate: FsBlockComponent, descendants: true }, { propertyName: "margins", predicate: FsBlockEditorMarginDirective, descendants: true }], ngImport: i0__namespace, template: "<div\n #artboard\n class=\"artboard mat-elevation-z4 deselectable\"\n [style.width]=\"config.width + config.unit\"\n [style.height]=\"config.height + config.unit\">\n <fs-block\n *ngFor=\"let block of blocks\"\n [zoompan]=\"zoompan\"\n [block]=\"block\">\n </fs-block>\n <div class=\"margin margin-top\" *ngIf=\"config.marginTop\" [style.top]=\"config.marginTop + 'in'\"></div>\n <div class=\"margin margin-left\" *ngIf=\"config.marginLeft\" [style.left]=\"config.marginLeft + 'in'\"></div>\n <div class=\"margin margin-bottom\" *ngIf=\"config.marginBottom\" [style.bottom]=\"config.marginBottom + 'in'\"></div>\n <div class=\"margin margin-right\" *ngIf=\"config.marginRight\" [style.right]=\"config.marginRight + 'in'\"></div>\n <div\n #marginContainer\n class=\"margin-container\"\n [style.top]=\"config.marginTop + 'in'\"\n [style.right]=\"config.marginRight + 'in'\"\n [style.bottom]=\"config.marginBottom + 'in'\"\n [style.left]=\"config.marginLeft + 'in'\">\n </div>\n</div> \n\n", styles: [".artboard{position:relative;display:inline-flex;background-color:#fff}.artboard .margin-container{position:absolute;z-index:-1}.artboard .margin{position:absolute;border-color:#ff85bd5e;border-style:dashed;border-width:0px}.artboard .margin.margin-top,.artboard .margin.margin-bottom{width:100%;border-top-width:1px}.artboard .margin.margin-left,.artboard .margin.margin-right{height:100%;border-left-width:1px}\n"], components: [{ type: FsBlockComponent, selector: "fs-block", inputs: ["block", "html", "zoompan"] }], directives: [{ type: i18__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i18__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1913
2068
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ArtboardComponent, decorators: [{
1914
2069
  type: i0.Component,
1915
2070
  args: [{
@@ -1988,7 +2143,7 @@
1988
2143
  FsBlockEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsBlockEditorComponent, selector: "fs-block-editor", inputs: { config: "config" }, providers: [
1989
2144
  BlockEditorService,
1990
2145
  BlocksStore,
1991
- ], queries: [{ propertyName: "sidebarPanels", predicate: FsBlockEditorSidebarPanelDirective }], viewQueries: [{ propertyName: "zoompan", first: true, predicate: i2$1.FsZoomPanComponent, descendants: true, static: true }, { propertyName: "artboardContainer", first: true, predicate: ["artboardContainer"], descendants: true, static: true }, { propertyName: "sidebar", first: true, predicate: SidebarComponent, descendants: true, static: true }, { propertyName: "artboard", first: true, predicate: ArtboardComponent, descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<div \n class=\"editor-container deselectable\"\n (mousedown)=\"editorContainerClick($event)\">\n <div\n #artboardContainer\n class=\"artboard-container deselectable\">\n <div #zoomPanContaner class=\"zoom-pan-container deselectable\">\n <fs-zoom-pan \n class=\"deselectable\"\n [zoomMax]=\"5\"\n [top]=\"10\">\n <ng-template fsZoomPanContent>\n <app-artboard \n [zoompan]=\"zoompan\"\n [config]=\"config\">\n </app-artboard>\n </ng-template>\n </fs-zoom-pan>\n </div>\n </div>\n <sidebar\n [config]=\"config\"\n [blocks]=\"blocks\"\n (zoomCenter)=\"zoomCenter()\">\n </sidebar>\n</div>\n", styles: [".editor-container{display:flex;flex-direction:row;position:relative;height:100%;background:#d8d8d8;overflow:hidden}.editor-container .artboard-container{display:flex;flex-grow:1;min-width:0;border:1px solid #ececec}.editor-container .zoom-pan-container{flex:1}fs-zoom-pan{height:100%}\n"], components: [{ type: i2__namespace$1.FsZoomPanComponent, selector: "fs-zoom-pan", inputs: ["zoomMax", "zoomMin", "zoomDefault", "top", "left"], outputs: ["moved", "zoomed"] }, { type: ArtboardComponent, selector: "app-artboard", inputs: ["config", "zoompan"] }, { type: SidebarComponent, selector: "sidebar", inputs: ["config", "blocks"], outputs: ["zoomCenter"] }], directives: [{ type: i2__namespace$1.FsZoomPanContentDirective, selector: "[fsZoomPanContent]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2146
+ ], queries: [{ propertyName: "sidebarPanels", predicate: FsBlockEditorSidebarPanelDirective }], viewQueries: [{ propertyName: "zoompan", first: true, predicate: i2$2.FsZoomPanComponent, descendants: true, static: true }, { propertyName: "artboardContainer", first: true, predicate: ["artboardContainer"], descendants: true, static: true }, { propertyName: "sidebar", first: true, predicate: SidebarComponent, descendants: true, static: true }, { propertyName: "artboard", first: true, predicate: ArtboardComponent, descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<div \n class=\"editor-container deselectable\"\n (mousedown)=\"editorContainerClick($event)\">\n <div\n #artboardContainer\n class=\"artboard-container deselectable\">\n <div #zoomPanContaner class=\"zoom-pan-container deselectable\">\n <fs-zoom-pan \n class=\"deselectable\"\n [zoomMax]=\"5\"\n [top]=\"10\">\n <ng-template fsZoomPanContent>\n <app-artboard \n [zoompan]=\"zoompan\"\n [config]=\"config\">\n </app-artboard>\n </ng-template>\n </fs-zoom-pan>\n </div>\n </div>\n <sidebar\n [config]=\"config\"\n [blocks]=\"blocks\"\n (zoomCenter)=\"zoomCenter()\">\n </sidebar>\n</div>\n", styles: [".editor-container{display:flex;flex-direction:row;position:relative;height:100%;background:#d8d8d8;overflow:hidden}.editor-container .artboard-container{display:flex;flex-grow:1;min-width:0;border:1px solid #ececec}.editor-container .zoom-pan-container{flex:1}fs-zoom-pan{height:100%}\n"], components: [{ type: i2__namespace$2.FsZoomPanComponent, selector: "fs-zoom-pan", inputs: ["zoomMax", "zoomMin", "zoomDefault", "top", "left"], outputs: ["moved", "zoomed"] }, { type: ArtboardComponent, selector: "app-artboard", inputs: ["config", "zoompan"] }, { type: SidebarComponent, selector: "sidebar", inputs: ["config", "blocks", "zoompan"], outputs: ["zoomCenter"] }], directives: [{ type: i2__namespace$2.FsZoomPanContentDirective, selector: "[fsZoomPanContent]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1992
2147
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorComponent, decorators: [{
1993
2148
  type: i0.Component,
1994
2149
  args: [{
@@ -2006,7 +2161,7 @@
2006
2161
  args: [FsBlockEditorSidebarPanelDirective]
2007
2162
  }], zoompan: [{
2008
2163
  type: i0.ViewChild,
2009
- args: [i2$1.FsZoomPanComponent, { static: true }]
2164
+ args: [i2$2.FsZoomPanComponent, { static: true }]
2010
2165
  }], artboardContainer: [{
2011
2166
  type: i0.ViewChild,
2012
2167
  args: ['artboardContainer', { static: true }]
@@ -2039,69 +2194,70 @@
2039
2194
  ArtboardComponent,
2040
2195
  LayersReorderDialogComponent,
2041
2196
  FontComponent,
2042
- CreateImageUrlPipe], imports: [i15.CommonModule,
2043
- i13.FormsModule,
2197
+ CreateImageUrlPipe,
2198
+ GroupDialogComponent], imports: [i18.CommonModule,
2199
+ i5.FormsModule,
2044
2200
  i3.MatIconModule,
2045
- i6.MatButtonModule,
2046
- i17.MatInputModule,
2047
- i6$1.MatFormFieldModule,
2048
- i9.MatCheckboxModule,
2049
- i16.MatTooltipModule,
2050
- i7$1.MatSelectModule,
2051
- i4.MatListModule,
2052
- i7.DragDropModule,
2053
- i3$2.FsFileModule,
2054
- i12.FsColorPickerModule,
2201
+ i4.MatButtonModule,
2202
+ i7.MatInputModule,
2203
+ i9.MatFormFieldModule,
2204
+ i12.MatCheckboxModule,
2205
+ i19.MatTooltipModule,
2206
+ i10.MatSelectModule,
2207
+ i4$1.MatListModule,
2208
+ i7$1.DragDropModule,
2209
+ i6$1.FsFileModule,
2210
+ i15.FsColorPickerModule,
2055
2211
  menu.FsMenuModule,
2056
- i2$1.FsZoomPanModule,
2057
- i14.FsFormModule,
2058
- i10.FsAutocompleteModule,
2212
+ i2$2.FsZoomPanModule,
2213
+ i6.FsFormModule,
2214
+ i13.FsAutocompleteModule,
2059
2215
  i2.FsDialogModule], exports: [FsBlockComponent,
2060
2216
  FsBlockEditorComponent,
2061
2217
  FsBlockEditorSidebarPanelDirective] });
2062
2218
  FsBlockEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorModule, providers: [
2063
2219
  GoogleFontService,
2064
2220
  ], imports: [[
2065
- i15.CommonModule,
2066
- i13.FormsModule,
2221
+ i18.CommonModule,
2222
+ i5.FormsModule,
2067
2223
  i3.MatIconModule,
2068
- i6.MatButtonModule,
2069
- i17.MatInputModule,
2070
- i6$1.MatFormFieldModule,
2071
- i9.MatCheckboxModule,
2072
- i16.MatTooltipModule,
2073
- i7$1.MatSelectModule,
2074
- i4.MatListModule,
2075
- i7.DragDropModule,
2076
- i3$2.FsFileModule,
2077
- i12.FsColorPickerModule,
2224
+ i4.MatButtonModule,
2225
+ i7.MatInputModule,
2226
+ i9.MatFormFieldModule,
2227
+ i12.MatCheckboxModule,
2228
+ i19.MatTooltipModule,
2229
+ i10.MatSelectModule,
2230
+ i4$1.MatListModule,
2231
+ i7$1.DragDropModule,
2232
+ i6$1.FsFileModule,
2233
+ i15.FsColorPickerModule,
2078
2234
  menu.FsMenuModule,
2079
- i2$1.FsZoomPanModule,
2080
- i14.FsFormModule,
2081
- i10.FsAutocompleteModule,
2235
+ i2$2.FsZoomPanModule,
2236
+ i6.FsFormModule,
2237
+ i13.FsAutocompleteModule,
2082
2238
  i2.FsDialogModule,
2083
2239
  ]] });
2084
2240
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorModule, decorators: [{
2085
2241
  type: i0.NgModule,
2086
2242
  args: [{
2087
2243
  imports: [
2088
- i15.CommonModule,
2089
- i13.FormsModule,
2244
+ i18.CommonModule,
2245
+ i5.FormsModule,
2090
2246
  i3.MatIconModule,
2091
- i6.MatButtonModule,
2092
- i17.MatInputModule,
2093
- i6$1.MatFormFieldModule,
2094
- i9.MatCheckboxModule,
2095
- i16.MatTooltipModule,
2096
- i7$1.MatSelectModule,
2097
- i4.MatListModule,
2098
- i7.DragDropModule,
2099
- i3$2.FsFileModule,
2100
- i12.FsColorPickerModule,
2247
+ i4.MatButtonModule,
2248
+ i7.MatInputModule,
2249
+ i9.MatFormFieldModule,
2250
+ i12.MatCheckboxModule,
2251
+ i19.MatTooltipModule,
2252
+ i10.MatSelectModule,
2253
+ i4$1.MatListModule,
2254
+ i7$1.DragDropModule,
2255
+ i6$1.FsFileModule,
2256
+ i15.FsColorPickerModule,
2101
2257
  menu.FsMenuModule,
2102
- i2$1.FsZoomPanModule,
2103
- i14.FsFormModule,
2104
- i10.FsAutocompleteModule,
2258
+ i2$2.FsZoomPanModule,
2259
+ i6.FsFormModule,
2260
+ i13.FsAutocompleteModule,
2105
2261
  i2.FsDialogModule,
2106
2262
  ],
2107
2263
  exports: [
@@ -2119,6 +2275,7 @@
2119
2275
  LayersReorderDialogComponent,
2120
2276
  FontComponent,
2121
2277
  CreateImageUrlPipe,
2278
+ GroupDialogComponent,
2122
2279
  ],
2123
2280
  providers: [
2124
2281
  GoogleFontService,