@firestitch/block-editor 12.3.30 → 12.3.32

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 (35) 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 +13 -3
  10. package/app/fs-block-editor.module.d.ts +20 -19
  11. package/app/interfaces/block-group.d.ts +5 -0
  12. package/app/interfaces/block.d.ts +1 -1
  13. package/app/interfaces/index.d.ts +1 -0
  14. package/app/services/block-editor.service.d.ts +14 -11
  15. package/app/services/blocks-store.service.d.ts +1 -9
  16. package/bundles/firestitch-block-editor.umd.js +391 -254
  17. package/bundles/firestitch-block-editor.umd.js.map +1 -1
  18. package/esm2015/app/components/artboard/artboard.component.js +15 -6
  19. package/esm2015/app/components/block/block.component.js +18 -18
  20. package/esm2015/app/components/block/index.js +2 -0
  21. package/esm2015/app/components/group/group-dialog.component.js +48 -0
  22. package/esm2015/app/components/group/index.js +2 -0
  23. package/esm2015/app/components/index.js +2 -1
  24. package/esm2015/app/components/layers-reorder-dialog/index.js +2 -0
  25. package/esm2015/app/components/sidebar/index.js +2 -0
  26. package/esm2015/app/components/sidebar/sidebar.component.js +111 -41
  27. package/esm2015/app/fs-block-editor.module.js +5 -3
  28. package/esm2015/app/interfaces/block-group.js +2 -0
  29. package/esm2015/app/interfaces/block.js +1 -1
  30. package/esm2015/app/interfaces/index.js +2 -1
  31. package/esm2015/app/services/block-editor.service.js +134 -37
  32. package/esm2015/app/services/blocks-store.service.js +9 -97
  33. package/fesm2015/firestitch-block-editor.js +311 -189
  34. package/fesm2015/firestitch-block-editor.js.map +1 -1
  35. 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('@firestitch/clipboard'), require('@firestitch/message'), 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', '@firestitch/clipboard', '@firestitch/message', '@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.i14, global.i2, global.i5$1, global.i16, global.menu, global.i2$2, global.i12, 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.i2$1, global.i3$2, global.ng.material.core, global.ng.cdk.textField));
5
- })(this, (function (exports, i17, i0, i15, i19, i7, i6, i11, i8, i3, i4, i9, i18, i14, i2, i5$1, i16, menu, i2$2, i12, rxjs, operators, i1, Moveable, common, i1$1, i5, i3$1, i1$2, i2$1, i3$2, i10, i20) { '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,34 +24,34 @@
24
24
  return Object.freeze(n);
25
25
  }
26
26
 
27
- var i17__namespace = /*#__PURE__*/_interopNamespace(i17);
27
+ var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
28
28
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
29
- var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
30
- var i19__namespace = /*#__PURE__*/_interopNamespace(i19);
29
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
31
30
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
32
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
33
- var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
34
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
35
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
31
+ var i7__namespace$1 = /*#__PURE__*/_interopNamespace(i7$1);
36
32
  var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
+ var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
37
34
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
38
- var i18__namespace = /*#__PURE__*/_interopNamespace(i18);
39
- var i14__namespace = /*#__PURE__*/_interopNamespace(i14);
35
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
36
+ var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
37
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
38
+ var i19__namespace = /*#__PURE__*/_interopNamespace(i19);
39
+ var i15__namespace = /*#__PURE__*/_interopNamespace(i15);
40
40
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
41
- var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
42
- var i16__namespace = /*#__PURE__*/_interopNamespace(i16);
41
+ var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
42
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
43
43
  var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
44
- var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
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
52
  var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
52
53
  var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
53
- var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
54
- var i20__namespace = /*#__PURE__*/_interopNamespace(i20);
54
+ var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
55
55
 
56
56
  var GoogleFontService = /** @class */ (function () {
57
57
  function GoogleFontService(httpClient) {
@@ -116,6 +116,45 @@
116
116
  type: i0.Input
117
117
  }] } });
118
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
+
119
158
  var FsBlockEditorMarginDirective = /** @class */ (function () {
120
159
  function FsBlockEditorMarginDirective(_elementRef) {
121
160
  this._elementRef = _elementRef;
@@ -198,7 +237,7 @@
198
237
  this._init(_dialogData);
199
238
  }
200
239
  LayersReorderDialogComponent.prototype.swapItems = function (event) {
201
- i7.moveItemInArray(this.blocks, event.previousIndex, event.currentIndex);
240
+ i7$1.moveItemInArray(this.blocks, event.previousIndex, event.currentIndex);
202
241
  };
203
242
  LayersReorderDialogComponent.prototype.done = function () {
204
243
  this._dialogRef.close(this.blocks.reverse());
@@ -209,7 +248,7 @@
209
248
  return LayersReorderDialogComponent;
210
249
  }());
211
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 });
212
- 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: i17__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: i16__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 });
213
252
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: LayersReorderDialogComponent, decorators: [{
214
253
  type: i0.Component,
215
254
  args: [{
@@ -551,7 +590,6 @@
551
590
  })(EventType || (EventType = {}));
552
591
  var BlocksStore = /** @class */ (function () {
553
592
  function BlocksStore() {
554
- this._lastTabIndex = -1;
555
593
  this._eventBus$ = new rxjs.Subject();
556
594
  this._blocks$ = new rxjs.BehaviorSubject([]);
557
595
  this._destroy$ = new rxjs.Subject();
@@ -573,11 +611,11 @@
573
611
  Object.defineProperty(BlocksStore.prototype, "blockAdded$", {
574
612
  get: function () {
575
613
  return this._eventBus$
576
- .pipe(operators.filter(function (_k) {
577
- var type = _k.type;
614
+ .pipe(operators.filter(function (_a) {
615
+ var type = _a.type;
578
616
  return type === EventType.Add;
579
- }), operators.map(function (_k) {
580
- var value = _k.value;
617
+ }), operators.map(function (_a) {
618
+ var value = _a.value;
581
619
  return value;
582
620
  }));
583
621
  },
@@ -587,11 +625,11 @@
587
625
  Object.defineProperty(BlocksStore.prototype, "blockChanged$", {
588
626
  get: function () {
589
627
  return this._eventBus$
590
- .pipe(operators.filter(function (_k) {
591
- var type = _k.type;
628
+ .pipe(operators.filter(function (_a) {
629
+ var type = _a.type;
592
630
  return type === EventType.Change;
593
- }), operators.map(function (_k) {
594
- var value = _k.value;
631
+ }), operators.map(function (_a) {
632
+ var value = _a.value;
595
633
  return value;
596
634
  }));
597
635
  },
@@ -601,11 +639,11 @@
601
639
  Object.defineProperty(BlocksStore.prototype, "blockUpdated$", {
602
640
  get: function () {
603
641
  return this._eventBus$
604
- .pipe(operators.filter(function (_k) {
605
- var type = _k.type;
642
+ .pipe(operators.filter(function (_a) {
643
+ var type = _a.type;
606
644
  return type === EventType.Update;
607
- }), operators.map(function (_k) {
608
- var value = _k.value;
645
+ }), operators.map(function (_a) {
646
+ var value = _a.value;
609
647
  return value;
610
648
  }));
611
649
  },
@@ -615,11 +653,11 @@
615
653
  Object.defineProperty(BlocksStore.prototype, "blockRemoved$", {
616
654
  get: function () {
617
655
  return this._eventBus$
618
- .pipe(operators.filter(function (_k) {
619
- var type = _k.type;
656
+ .pipe(operators.filter(function (_a) {
657
+ var type = _a.type;
620
658
  return type === EventType.Remove;
621
- }), operators.map(function (_k) {
622
- var value = _k.value;
659
+ }), operators.map(function (_a) {
660
+ var value = _a.value;
623
661
  return value;
624
662
  }));
625
663
  },
@@ -630,17 +668,12 @@
630
668
  this._destroy$.next();
631
669
  this._destroy$.complete();
632
670
  };
633
- BlocksStore.prototype.init = function (config) {
671
+ BlocksStore.prototype.init = function (blocks) {
634
672
  var _this = this;
635
- this._config = config;
636
- this._setBlocks(this._config.blocks);
637
- if (this._config.blockChange) {
638
- this.blockChanged$
639
- .pipe(operators.groupBy(function (block) { return (block.guid); }), operators.map(function (group) { return group.pipe(operators.debounceTime(250)); }), operators.mergeAll())
640
- .subscribe(function (block) {
641
- _this._config.blockChange(block);
642
- });
643
- }
673
+ blocks
674
+ .forEach(function (block) {
675
+ _this._appendBlock(block);
676
+ });
644
677
  };
645
678
  BlocksStore.prototype.blockExists = function (block) {
646
679
  var index = this.blocks.findIndex(function (b) {
@@ -649,43 +682,7 @@
649
682
  return index !== -1;
650
683
  };
651
684
  BlocksStore.prototype.blockAdd = function (block) {
652
- var _this = this;
653
- if (!this._config.blockAdd) {
654
- console.warn('[BlockEditor] Config "blockAdd" is not defined');
655
- return;
656
- }
657
- block = this._createBlock(block);
658
- this._config.blockAdd(block)
659
- .pipe(operators.takeUntil(this._destroy$))
660
- .subscribe(function (newBlock) {
661
- _this._appendBlock(newBlock);
662
- });
663
- };
664
- BlocksStore.prototype.blockUpload = function (block, fsFile) {
665
- var _this = this;
666
- if (!this._config.blockUpload) {
667
- return rxjs.throwError('[BlockEditor] Config "blockUpload" is not defined');
668
- }
669
- var existing = this.blockExists(block);
670
- if (!existing) {
671
- block = this._createBlock(block);
672
- }
673
- return rxjs.from(fsFile.imageInfo)
674
- .pipe(operators.switchMap(function (imageInfo) {
675
- if (!existing && (imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.height) && (imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.width)) {
676
- var ratio = imageInfo.height / imageInfo.width;
677
- block.width = _this._config.width * .4;
678
- block.height = block.width * ratio;
679
- }
680
- return _this._config.blockUpload(block, fsFile.file);
681
- }), operators.tap(function (newBlock) {
682
- if (existing) {
683
- _this.blockUpdate(Object.assign(Object.assign({}, block), newBlock));
684
- }
685
- else {
686
- _this._appendBlock(newBlock);
687
- }
688
- }), operators.takeUntil(this._destroy$));
685
+ this._appendBlock(block);
689
686
  };
690
687
  BlocksStore.prototype.blockChange = function (block) {
691
688
  this._dispatchEvent(EventType.Change, block);
@@ -709,27 +706,8 @@
709
706
  });
710
707
  this._setBlocks(blocks);
711
708
  };
712
- BlocksStore.prototype.isReordableBlock = function (block) {
713
- return [
714
- exports.BlockType.LongText,
715
- exports.BlockType.ShortText,
716
- exports.BlockType.RadioButton,
717
- exports.BlockType.Checkbox,
718
- exports.BlockType.Date,
719
- exports.BlockType.Signature,
720
- ].indexOf(block.type) > -1;
721
- };
722
- BlocksStore.prototype.updateTabIndex = function (index) {
723
- this._lastTabIndex = index;
724
- };
725
709
  BlocksStore.prototype._setBlocks = function (blocks) {
726
- var _this = this;
727
710
  this._blocks$.next(__spreadArray([], __read(blocks)));
728
- blocks
729
- .filter(function (b) { return _this.isReordableBlock(b); })
730
- .forEach(function (b) {
731
- _this._lastTabIndex = Math.max(b.tabIndex, _this._lastTabIndex);
732
- });
733
711
  };
734
712
  BlocksStore.prototype._appendBlock = function (block) {
735
713
  var blocks = __spreadArray(__spreadArray([], __read(this.blocks)), [
@@ -745,33 +723,6 @@
745
723
  value: value,
746
724
  });
747
725
  };
748
- BlocksStore.prototype._createBlock = function (block) {
749
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
750
- 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 : [
751
- exports.BlockType.Checkbox,
752
- exports.BlockType.RadioButton,
753
- exports.BlockType.Pdf,
754
- ]
755
- .indexOf(block.type) !== -1 });
756
- var width = (this._config.width * .333).toFixed(2);
757
- var height = width / 2;
758
- if (newBlock.type === exports.BlockType.Rectangle) {
759
- 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 });
760
- }
761
- else if (newBlock.type === exports.BlockType.Checkbox || newBlock.type === exports.BlockType.RadioButton) {
762
- width = .25;
763
- height = .25;
764
- }
765
- else {
766
- width = 2;
767
- height = .5;
768
- }
769
- if (this.isReordableBlock(newBlock)) {
770
- newBlock.tabIndex = this._lastTabIndex + 1;
771
- this.updateTabIndex(newBlock.tabIndex);
772
- }
773
- return Object.assign({ top: height, left: width, width: width, height: height }, newBlock);
774
- };
775
726
  BlocksStore.prototype._deduplicateIndexesFor = function (blocks) {
776
727
  blocks.forEach(function (block, index) {
777
728
  block.index = index;
@@ -790,46 +741,100 @@
790
741
  this._store = _store;
791
742
  this._dialog = _dialog;
792
743
  this._prompt = _prompt;
744
+ this.blockGroups = [];
793
745
  this._selectedBlocks$ = new rxjs.BehaviorSubject([]);
794
- this._blockComponents = new Map();
746
+ this._blockComponents$ = new rxjs.BehaviorSubject([]);
795
747
  this._blockClippable$ = new rxjs.BehaviorSubject(null);
796
748
  this._destroy$ = new rxjs.Subject();
797
- this._blockInited$ = new rxjs.Subject();
798
749
  }
799
- Object.defineProperty(BlockEditorService.prototype, "blockComponents", {
750
+ Object.defineProperty(BlockEditorService.prototype, "blockComponents$", {
800
751
  get: function () {
801
- 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);
802
760
  },
803
761
  enumerable: false,
804
762
  configurable: true
805
763
  });
806
764
  BlockEditorService.prototype.init = function (config) {
807
765
  this.config = config;
808
- this._store.init(Object.assign({}, this.config));
766
+ this._store.init(config.blocks);
767
+ this._initBlockGroups();
768
+ this._initBlockChange();
809
769
  };
810
770
  BlockEditorService.prototype.blockAdd = function (block) {
811
- 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
+ });
812
782
  };
813
783
  BlockEditorService.prototype.blockUpload = function (block, fsFile) {
814
- 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);
815
834
  };
816
835
  BlockEditorService.prototype.blockRemove = function (block) {
817
836
  this._store.blockRemove(block);
818
837
  };
819
- BlockEditorService.prototype.removeBlocks = function (blocks) {
820
- var _this = this;
821
- this._prompt.confirm({
822
- title: 'Confirm',
823
- template: 'Are you sure your would like to delete this block?',
824
- })
825
- .pipe(operators.switchMap(function () { return _this.config.blocksRemove ? _this.config.blocksRemove(blocks) : rxjs.throwError('config.blocksRemove is not configured'); }), operators.takeUntil(this._destroy$))
826
- .subscribe(function () {
827
- blocks.forEach(function (block) {
828
- _this.blockRemove(block);
829
- });
830
- _this.selectedBlocks = [];
831
- });
832
- };
833
838
  Object.defineProperty(BlockEditorService.prototype, "blocks$", {
834
839
  get: function () {
835
840
  return this._store.blocks$;
@@ -872,13 +877,6 @@
872
877
  enumerable: false,
873
878
  configurable: true
874
879
  });
875
- Object.defineProperty(BlockEditorService.prototype, "blockInited$", {
876
- get: function () {
877
- return this._blockInited$;
878
- },
879
- enumerable: false,
880
- configurable: true
881
- });
882
880
  Object.defineProperty(BlockEditorService.prototype, "blockRemoved$", {
883
881
  get: function () {
884
882
  return this._store.blockRemoved$;
@@ -896,17 +894,38 @@
896
894
  BlockEditorService.prototype.blockChange = function (block) {
897
895
  this._store.blockChange(block);
898
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
+ };
899
903
  BlockEditorService.prototype.isSelectedBlock = function (block) {
900
904
  return this.selectedBlocks.indexOf(block) !== -1;
901
905
  };
902
906
  BlockEditorService.prototype.indexOf = function (block) {
903
907
  return this.blocks.map(function (e) { return e.guid; }).indexOf(block.guid);
904
908
  };
905
- BlockEditorService.prototype.selectedBlockComponentChangeProperty = function (value, name) {
909
+ BlockEditorService.prototype.selectedBlockComponentChangeProperty = function (values) {
906
910
  var _this = this;
907
911
  this.selectedBlocks
908
912
  .forEach(function (block) {
909
- block[name] = value;
913
+ Object.keys(values)
914
+ .forEach(function (name) {
915
+ block[name] = values[name];
916
+ });
917
+ _this.blockChange(block);
918
+ });
919
+ };
920
+ BlockEditorService.prototype.blockGroupChangeProperty = function (blockGroup, values) {
921
+ var _this = this;
922
+ this.blocks
923
+ .filter(function (block) { return block.name === blockGroup.name; })
924
+ .forEach(function (block) {
925
+ Object.keys(values)
926
+ .forEach(function (name) {
927
+ block[name] = values[name];
928
+ });
910
929
  _this.blockChange(block);
911
930
  });
912
931
  };
@@ -951,19 +970,26 @@
951
970
  BlockEditorService.prototype.hasSelectionRange = function () {
952
971
  return this._selectionRange && (this._selectionRange.baseOffset - this._selectionRange.focusOffset) > 0;
953
972
  };
954
- BlockEditorService.prototype.initBlock = function (block, blockComponent) {
955
- this._blockComponents.set(block, blockComponent);
956
- this._blockInited$.next(block);
957
- };
958
- BlockEditorService.prototype.destroyBlock = function (block) {
959
- this._blockComponents.delete(block);
960
- };
961
973
  BlockEditorService.prototype.registerContainer = function (container) {
962
974
  this.container = container;
963
975
  };
964
976
  BlockEditorService.prototype.registerMargin = function (margin) {
965
977
  this.margin = margin;
966
978
  };
979
+ BlockEditorService.prototype.removeBlocks = function (blocks) {
980
+ var _this = this;
981
+ this._prompt.confirm({
982
+ title: 'Confirm',
983
+ template: 'Are you sure your would like to delete this block?',
984
+ })
985
+ .pipe(operators.switchMap(function () { return _this.config.blocksRemove ? _this.config.blocksRemove(blocks) : rxjs.throwError('config.blocksRemove is not configured'); }), operators.takeUntil(this._destroy$))
986
+ .subscribe(function () {
987
+ blocks.forEach(function (block) {
988
+ _this.blockRemove(block);
989
+ });
990
+ _this.selectedBlocks = [];
991
+ });
992
+ };
967
993
  BlockEditorService.prototype.openReorderDialog = function () {
968
994
  var _this = this;
969
995
  var blocks = this.blocks
@@ -982,7 +1008,6 @@
982
1008
  blocks
983
1009
  .forEach(function (block, index) {
984
1010
  block.index = index;
985
- _this._store.updateTabIndex(index);
986
1011
  });
987
1012
  });
988
1013
  };
@@ -990,6 +1015,30 @@
990
1015
  this._destroy$.next();
991
1016
  this._destroy$.complete();
992
1017
  };
1018
+ BlockEditorService.prototype._initBlockGroups = function () {
1019
+ this.blockGroups = Object.values(this._store.blocks
1020
+ .reduce(function (accum, block) {
1021
+ if (block.name) {
1022
+ var existing = accum[block.name] || {};
1023
+ accum[block.name] = {
1024
+ label: block.label || existing.label,
1025
+ description: block.description || existing.description,
1026
+ name: block.name,
1027
+ };
1028
+ }
1029
+ return accum;
1030
+ }, {}));
1031
+ };
1032
+ BlockEditorService.prototype._initBlockChange = function () {
1033
+ var _this = this;
1034
+ if (this.config.blockChange) {
1035
+ this.blockChanged$
1036
+ .pipe(operators.groupBy(function (block) { return (block.guid); }), operators.map(function (group) { return group.pipe(operators.debounceTime(250)); }), operators.mergeAll())
1037
+ .subscribe(function (block) {
1038
+ _this.config.blockChange(block);
1039
+ });
1040
+ }
1041
+ };
993
1042
  return BlockEditorService;
994
1043
  }());
995
1044
  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 });
@@ -1289,21 +1338,18 @@
1289
1338
  _this._cdRef.markForCheck();
1290
1339
  });
1291
1340
  };
1292
- FsBlockComponent.prototype.ngAfterContentInit = function () {
1341
+ FsBlockComponent.prototype.ngAfterViewInit = function () {
1293
1342
  var _this = this;
1294
1343
  setTimeout(function () {
1295
1344
  _this._initEvents();
1296
1345
  _this._initMoveable();
1297
1346
  _this._setTransform();
1347
+ _this._initElementGuidelines();
1298
1348
  _this.rotate = _this.block.rotate;
1299
- _this._blockEditor.initBlock(_this.block, _this);
1300
- _this._blockEditor.blockInited$
1301
- .pipe(operators.takeUntil(_this._destroy$))
1302
- .subscribe(function () {
1303
- _this._updateElementGuidelines();
1304
- });
1305
1349
  });
1306
1350
  };
1351
+ FsBlockComponent.prototype.ngAfterContentInit = function () {
1352
+ };
1307
1353
  FsBlockComponent.prototype.pxToIn = function (px) {
1308
1354
  return this.round(px / 96, 2);
1309
1355
  };
@@ -1337,7 +1383,7 @@
1337
1383
  sel.addRange(range);
1338
1384
  };
1339
1385
  FsBlockComponent.prototype.ngOnDestroy = function () {
1340
- this._blockEditor.destroyBlock(this.block);
1386
+ //this._blockEditor.destroyBlock(this.block);
1341
1387
  this._destroy$.next();
1342
1388
  this._destroy$.complete();
1343
1389
  };
@@ -1349,12 +1395,6 @@
1349
1395
  FsBlockComponent.prototype._triggerChanged = function () {
1350
1396
  this._blockEditor.blockChange(this.block);
1351
1397
  };
1352
- FsBlockComponent.prototype._updateElementGuidelines = function () {
1353
- var _this = this;
1354
- this.moveable.elementGuidelines = this._blockEditor.blockComponents
1355
- .map(function (blockComponent) { return blockComponent.el; })
1356
- .filter(function (el) { return !el.isSameNode(_this.el); });
1357
- };
1358
1398
  FsBlockComponent.prototype._updateMoveable = function () {
1359
1399
  var value = !this.block.lock && this.selected;
1360
1400
  this.keepRatio = this.block.keepRatio;
@@ -1363,6 +1403,16 @@
1363
1403
  this.moveable.rotatable = this.block.rotatable && value;
1364
1404
  this.moveable.scalable = this.block.scalable && value;
1365
1405
  };
1406
+ FsBlockComponent.prototype._initElementGuidelines = function () {
1407
+ var _this = this;
1408
+ this._blockEditor.blockComponents$
1409
+ .pipe(operators.takeUntil(this._destroy$))
1410
+ .subscribe(function (blockComponents) {
1411
+ _this.moveable.elementGuidelines = blockComponents
1412
+ .filter(function (blockComponent) { return _this !== blockComponent; })
1413
+ .map(function (blockComponent) { return blockComponent.el; });
1414
+ });
1415
+ };
1366
1416
  FsBlockComponent.prototype._initMoveable = function () {
1367
1417
  var _this = this;
1368
1418
  this._moveable = new Moveable__default["default"](this._elementRef.nativeElement, {
@@ -1387,7 +1437,6 @@
1387
1437
  throttleResize: 1,
1388
1438
  snapDistFormat: function (v, type) { return "" + _this.round(v / 96, 2); },
1389
1439
  });
1390
- this._updateElementGuidelines();
1391
1440
  this._updateMoveable();
1392
1441
  this.moveable
1393
1442
  .on('clip', function (e) {
@@ -1606,7 +1655,7 @@
1606
1655
  return FsBlockComponent;
1607
1656
  }());
1608
1657
  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 });
1609
- 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: i17__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i17__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i17__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i17__namespace.AsyncPipe, "createImageUrl": CreateImageUrlPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1658
+ 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 });
1610
1659
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockComponent, decorators: [{
1611
1660
  type: i0.Component,
1612
1661
  args: [{
@@ -1647,7 +1696,7 @@
1647
1696
  ];
1648
1697
 
1649
1698
  var SidebarComponent = /** @class */ (function () {
1650
- function SidebarComponent(_el, _blockEditor, _cdRef, _googleFontService, _clipboard, _message, _prompt, _document) {
1699
+ function SidebarComponent(_el, _blockEditor, _cdRef, _googleFontService, _clipboard, _message, _prompt, _dialog, _document) {
1651
1700
  var _this = this;
1652
1701
  this._el = _el;
1653
1702
  this._blockEditor = _blockEditor;
@@ -1656,6 +1705,7 @@
1656
1705
  this._clipboard = _clipboard;
1657
1706
  this._message = _message;
1658
1707
  this._prompt = _prompt;
1708
+ this._dialog = _dialog;
1659
1709
  this._document = _document;
1660
1710
  this.zoomCenter = new i0.EventEmitter();
1661
1711
  this.BlockTypes = BlockTypes;
@@ -1685,14 +1735,30 @@
1685
1735
  enumerable: false,
1686
1736
  configurable: true
1687
1737
  });
1738
+ Object.defineProperty(SidebarComponent.prototype, "blockGroups", {
1739
+ get: function () {
1740
+ return this._blockEditor.blockGroups;
1741
+ },
1742
+ enumerable: false,
1743
+ configurable: true
1744
+ });
1688
1745
  SidebarComponent.prototype.ngOnInit = function () {
1689
1746
  var _this = this;
1690
1747
  this._blockEditor.selectedBlocks$
1691
1748
  .pipe(operators.takeUntil(this._destroy$))
1692
1749
  .subscribe(function (blocks) {
1693
1750
  _this.block = blocks[0] ? blocks[0] : null;
1694
- _this.formats = BlockFormats
1695
- .filter(function (blockFormat) { var _a; return (blockFormat.blockTypes.indexOf((_a = _this.block) === null || _a === void 0 ? void 0 : _a.type) !== -1); });
1751
+ _this.blockGroup = null;
1752
+ if (_this.block) {
1753
+ _this.formats = BlockFormats
1754
+ .filter(function (blockFormat) { return (blockFormat.blockTypes.indexOf(_this.block.type) !== -1); });
1755
+ if (_this.block.name) {
1756
+ _this.blockGroup = _this._blockEditor.blockGroups
1757
+ .find(function (blockGroup) {
1758
+ return _this.block.name === blockGroup.name;
1759
+ });
1760
+ }
1761
+ }
1696
1762
  _this._cdRef.markForCheck();
1697
1763
  });
1698
1764
  this._blockEditor.blockChanged$
@@ -1708,32 +1774,88 @@
1708
1774
  };
1709
1775
  }
1710
1776
  };
1777
+ SidebarComponent.prototype.blockGroupChange = function (blockGroup) {
1778
+ this._blockEditor.applyBlockGroup(this.block, blockGroup);
1779
+ };
1780
+ SidebarComponent.prototype.blockRequired = function (value) {
1781
+ var values = { required: value, readonly: false };
1782
+ if (this.blockGroup) {
1783
+ this._blockEditor.blockGroupChangeProperty(this.blockGroup, values);
1784
+ }
1785
+ else {
1786
+ this.blockChangeProperty(values);
1787
+ }
1788
+ };
1789
+ SidebarComponent.prototype.blockReadonly = function (value) {
1790
+ var values = { readonly: value, required: false };
1791
+ if (this.blockGroup) {
1792
+ this._blockEditor.blockGroupChangeProperty(this.blockGroup, values);
1793
+ }
1794
+ else {
1795
+ this.blockChangeProperty(values);
1796
+ }
1797
+ };
1798
+ SidebarComponent.prototype.blockGroupEdit = function (event) {
1799
+ var _this = this;
1800
+ event.preventDefault();
1801
+ event.stopImmediatePropagation();
1802
+ this.blockGroupDialog(this.blockGroup)
1803
+ .subscribe(function (blockGroup) {
1804
+ _this._blockEditor.blocks
1805
+ .filter(function (block) { return block.name === blockGroup.name; })
1806
+ .forEach(function (block) {
1807
+ _this._blockEditor.applyBlockGroup(block, blockGroup);
1808
+ });
1809
+ });
1810
+ };
1811
+ SidebarComponent.prototype.blockGroupCreate = function (event) {
1812
+ var _this = this;
1813
+ event.preventDefault();
1814
+ event.stopImmediatePropagation();
1815
+ this.blockGroupDialog()
1816
+ .subscribe(function (blockGroup) {
1817
+ _this._blockEditor.applyBlockGroup(_this.block, blockGroup);
1818
+ _this.blockGroup = blockGroup;
1819
+ _this._cdRef.markForCheck();
1820
+ });
1821
+ };
1822
+ SidebarComponent.prototype.blockGroupDialog = function (blockGroup) {
1823
+ return this._dialog.open(GroupDialogComponent, {
1824
+ data: {
1825
+ block: this.block,
1826
+ blockEditor: this._blockEditor,
1827
+ blockGroup: blockGroup,
1828
+ }
1829
+ })
1830
+ .afterClosed()
1831
+ .pipe(operators.filter(function (block) { return !!block; }), operators.takeUntil(this._destroy$));
1832
+ };
1711
1833
  SidebarComponent.prototype.fontChanged = function (font) {
1712
- this._blockEditor.selectedBlockComponentChangeProperty(font === null || font === void 0 ? void 0 : font.family, 'fontFamily');
1834
+ this._blockEditor.selectedBlockComponentChangeProperty({ fontFamily: font === null || font === void 0 ? void 0 : font.family });
1713
1835
  };
1714
1836
  SidebarComponent.prototype.verticalAlignClick = function (value) {
1715
- this._blockEditor.selectedBlockComponentChangeProperty(value, 'verticalAlign');
1837
+ this._blockEditor.selectedBlockComponentChangeProperty({ verticalAlign: value });
1716
1838
  };
1717
1839
  SidebarComponent.prototype.boldClick = function () {
1718
- this._blockEditor.selectedBlockComponentChangeProperty(!this.block.bold, 'bold');
1840
+ this._blockEditor.selectedBlockComponentChangeProperty({ bold: !this.block.bold });
1719
1841
  };
1720
1842
  SidebarComponent.prototype.toggleLock = function () {
1721
- this._blockEditor.selectedBlockComponentChangeProperty(!this.block.lock, 'lock');
1843
+ this._blockEditor.selectedBlockComponentChangeProperty({ lock: !this.block.lock });
1722
1844
  };
1723
1845
  SidebarComponent.prototype.fontColorChange = function (value) {
1724
- this._blockEditor.selectedBlockComponentChangeProperty(value, 'fontColor');
1846
+ this._blockEditor.selectedBlockComponentChangeProperty({ fontColor: value });
1725
1847
  };
1726
1848
  SidebarComponent.prototype.italicClick = function () {
1727
- this._blockEditor.selectedBlockComponentChangeProperty(!this.block.italic, 'italic');
1849
+ this._blockEditor.selectedBlockComponentChangeProperty({ italic: !this.block.italic });
1728
1850
  };
1729
1851
  SidebarComponent.prototype.underlineClick = function () {
1730
- this._blockEditor.selectedBlockComponentChangeProperty(!this.block.underline, 'underline');
1852
+ this._blockEditor.selectedBlockComponentChangeProperty({ underline: !this.block.underline });
1731
1853
  };
1732
1854
  SidebarComponent.prototype.backgroundColorChange = function (value) {
1733
- this._blockEditor.selectedBlockComponentChangeProperty(value, 'backgroundColor');
1855
+ this._blockEditor.selectedBlockComponentChangeProperty({ backgroundColor: value });
1734
1856
  };
1735
1857
  SidebarComponent.prototype.shadowColorChange = function (value) {
1736
- this._blockEditor.selectedBlockComponentChangeProperty(value, 'shadowColor');
1858
+ this._blockEditor.selectedBlockComponentChangeProperty({ shadowColor: value });
1737
1859
  };
1738
1860
  SidebarComponent.prototype.paddingAllChange = function (value) {
1739
1861
  var _this = this;
@@ -1759,31 +1881,33 @@
1759
1881
  }
1760
1882
  };
1761
1883
  SidebarComponent.prototype.borderColorChange = function (value) {
1762
- this._blockEditor.selectedBlockComponentChangeProperty(value, 'borderColor');
1884
+ this._blockEditor.selectedBlockComponentChangeProperty({ borderColor: value });
1763
1885
  };
1764
1886
  SidebarComponent.prototype.toggleKeepRatio = function () {
1765
- this._blockEditor.selectedBlockComponentChangeProperty(!this.block.keepRatio, 'keepRatio');
1887
+ this._blockEditor.selectedBlockComponentChangeProperty({ keepRatio: !this.block.keepRatio });
1766
1888
  };
1767
1889
  SidebarComponent.prototype.horizontalAlignClick = function (value) {
1768
- this._blockEditor.selectedBlockComponentChangeProperty(value, 'horizontalAlign');
1890
+ this._blockEditor.selectedBlockComponentChangeProperty({ horizontalAlign: value });
1769
1891
  };
1770
1892
  SidebarComponent.prototype.shapeRound = function (name) {
1893
+ var _b;
1771
1894
  var value = this.block[name] === 'round' ? 'square' : 'round';
1772
- this._blockEditor.selectedBlockComponentChangeProperty(value, name);
1895
+ this._blockEditor.selectedBlockComponentChangeProperty((_b = {}, _b[name] = value, _b));
1773
1896
  };
1774
1897
  SidebarComponent.prototype.numberChange = function (value, name) {
1898
+ var _b;
1775
1899
  value = this.validNumeric(value) ? Number(value) : null;
1776
- this._blockEditor.selectedBlockComponentChangeProperty(value, name);
1900
+ this._blockEditor.selectedBlockComponentChangeProperty((_b = {}, _b[name] = value, _b));
1777
1901
  };
1778
1902
  SidebarComponent.prototype.imageRemove = function () {
1779
- this._blockEditor.selectedBlockComponentChangeProperty(null, 'imageUrl');
1903
+ this._blockEditor.selectedBlockComponentChangeProperty({ imageUrl: null });
1780
1904
  };
1781
1905
  SidebarComponent.prototype.imageClip = function () {
1782
1906
  this.clippable = !this.clippable;
1783
1907
  this._blockEditor.blockClippable = true;
1784
1908
  };
1785
- SidebarComponent.prototype.blockChangeProperty = function (value, name) {
1786
- this._blockEditor.selectedBlockComponentChangeProperty(value, name);
1909
+ SidebarComponent.prototype.blockChangeProperty = function (values) {
1910
+ this._blockEditor.selectedBlockComponentChangeProperty(values);
1787
1911
  };
1788
1912
  SidebarComponent.prototype.blockRemoveClick = function () {
1789
1913
  this._blockEditor.removeBlocks(this._blockEditor.selectedBlocks);
@@ -1852,10 +1976,11 @@
1852
1976
  event.target.select();
1853
1977
  };
1854
1978
  SidebarComponent.prototype.numericInputKeypress = function (event, name, unit) {
1979
+ var _b;
1855
1980
  if (unit === void 0) { unit = 1; }
1856
1981
  if (event.code === 'ArrowUp' || event.code === 'ArrowDown') {
1857
1982
  this.block[name] = common.round(Number(this.block[name] || 0) + ((event.code === 'ArrowDown' ? -1 : 1) * unit), 3);
1858
- this._blockEditor.selectedBlockComponentChangeProperty(this.block[name], name);
1983
+ this._blockEditor.selectedBlockComponentChangeProperty((_b = {}, _b[name] = this.block[name], _b));
1859
1984
  }
1860
1985
  };
1861
1986
  SidebarComponent.prototype.ngOnDestroy = function () {
@@ -1867,8 +1992,8 @@
1867
1992
  };
1868
1993
  return SidebarComponent;
1869
1994
  }());
1870
- 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: i17.DOCUMENT }], target: i0__namespace.ɵɵFactoryTarget.Component });
1871
- 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 <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 <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 .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: i5__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: 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: i8__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i9__namespace.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i10__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i11__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: i12__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: i14__namespace.FsColorPickerChipComponent, selector: "fs-color-picker-chip", inputs: ["color", "showClear"], outputs: ["changed"] }], directives: [{ type: i15__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i15__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i15__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i16__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: i17__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i17__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i17__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i17__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i17__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i17__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i18__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i19__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: i15__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: i15__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i15__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i16__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: i8__namespace.MatPrefix, selector: "[matPrefix]" }, { type: i20__namespace.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { type: i8__namespace.MatLabel, selector: "mat-label" }, { type: i16__namespace.FsFormValidateDirective, selector: "[validate]", inputs: ["validate", "validateData", "validateOnSubmit"] }, { type: i12__namespace.FsAutocompleteTemplateDirective, selector: "[fsAutocompleteTemplate]" }, { type: i17__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1995
+ 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 });
1996
+ 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 field-gap\">\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 field-gap\">\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 <div class=\"group-block\">\n <mat-form-field class=\"full-width\" class=\"full-width\">\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 </mat-form-field>\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 </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({ label: $event })\">\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({ description: $event })\">\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({ format: $event })\"> \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({ default: $event })\">\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({ formula: $event })\">\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({ name: $event })\">\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 field-gap\">\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 field-gap\">\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 field-gap\">\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 field-gap\">\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 field-gap\">\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 field-gap\">\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.field-gap>*:not(.mat-icon-button):not(fs-file){margin-right:11px}.sidebar .sidebar-row.field-gap>*: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{width:100%;display:flex;align-items:center}.sidebar .group-block a{margin-left:5px;color:inherit}.sidebar .group-block a mat-icon{transform:scale(.8)}.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: 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 });
1872
1997
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SidebarComponent, decorators: [{
1873
1998
  type: i0.Component,
1874
1999
  args: [{
@@ -1878,9 +2003,9 @@
1878
2003
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1879
2004
  }]
1880
2005
  }], ctorParameters: function () {
1881
- 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: undefined, decorators: [{
2006
+ 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: [{
1882
2007
  type: i0.Inject,
1883
- args: [i17.DOCUMENT]
2008
+ args: [i18.DOCUMENT]
1884
2009
  }] }];
1885
2010
  }, propDecorators: { sidebarPanels: [{
1886
2011
  type: i0.ContentChildren,
@@ -1928,6 +2053,16 @@
1928
2053
  _this._cdRef.markForCheck();
1929
2054
  });
1930
2055
  };
2056
+ ArtboardComponent.prototype.ngAfterViewInit = function () {
2057
+ var _this = this;
2058
+ this.blockComponents
2059
+ .changes
2060
+ .pipe(operators.takeUntil(this._destroy$))
2061
+ .subscribe(function () {
2062
+ _this._blockEditor.blockComponents = _this.blockComponents.toArray();
2063
+ });
2064
+ this._blockEditor.blockComponents = this.blockComponents.toArray();
2065
+ };
1931
2066
  ArtboardComponent.prototype.ngOnDestroy = function () {
1932
2067
  this._destroy$.next();
1933
2068
  this._destroy$.complete();
@@ -1935,7 +2070,7 @@
1935
2070
  return ArtboardComponent;
1936
2071
  }());
1937
2072
  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 });
1938
- 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: i17__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i17__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
2073
+ 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 });
1939
2074
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ArtboardComponent, decorators: [{
1940
2075
  type: i0.Component,
1941
2076
  args: [{
@@ -2065,69 +2200,70 @@
2065
2200
  ArtboardComponent,
2066
2201
  LayersReorderDialogComponent,
2067
2202
  FontComponent,
2068
- CreateImageUrlPipe], imports: [i17.CommonModule,
2069
- i15.FormsModule,
2203
+ CreateImageUrlPipe,
2204
+ GroupDialogComponent], imports: [i18.CommonModule,
2205
+ i5.FormsModule,
2070
2206
  i3.MatIconModule,
2071
- i6.MatButtonModule,
2072
- i19.MatInputModule,
2073
- i8.MatFormFieldModule,
2074
- i11.MatCheckboxModule,
2075
- i18.MatTooltipModule,
2076
- i9.MatSelectModule,
2077
- i4.MatListModule,
2078
- i7.DragDropModule,
2079
- i5$1.FsFileModule,
2080
- i14.FsColorPickerModule,
2207
+ i4.MatButtonModule,
2208
+ i7.MatInputModule,
2209
+ i9.MatFormFieldModule,
2210
+ i12.MatCheckboxModule,
2211
+ i19.MatTooltipModule,
2212
+ i10.MatSelectModule,
2213
+ i4$1.MatListModule,
2214
+ i7$1.DragDropModule,
2215
+ i6$1.FsFileModule,
2216
+ i15.FsColorPickerModule,
2081
2217
  menu.FsMenuModule,
2082
2218
  i2$2.FsZoomPanModule,
2083
- i16.FsFormModule,
2084
- i12.FsAutocompleteModule,
2219
+ i6.FsFormModule,
2220
+ i13.FsAutocompleteModule,
2085
2221
  i2.FsDialogModule], exports: [FsBlockComponent,
2086
2222
  FsBlockEditorComponent,
2087
2223
  FsBlockEditorSidebarPanelDirective] });
2088
2224
  FsBlockEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorModule, providers: [
2089
2225
  GoogleFontService,
2090
2226
  ], imports: [[
2091
- i17.CommonModule,
2092
- i15.FormsModule,
2227
+ i18.CommonModule,
2228
+ i5.FormsModule,
2093
2229
  i3.MatIconModule,
2094
- i6.MatButtonModule,
2095
- i19.MatInputModule,
2096
- i8.MatFormFieldModule,
2097
- i11.MatCheckboxModule,
2098
- i18.MatTooltipModule,
2099
- i9.MatSelectModule,
2100
- i4.MatListModule,
2101
- i7.DragDropModule,
2102
- i5$1.FsFileModule,
2103
- i14.FsColorPickerModule,
2230
+ i4.MatButtonModule,
2231
+ i7.MatInputModule,
2232
+ i9.MatFormFieldModule,
2233
+ i12.MatCheckboxModule,
2234
+ i19.MatTooltipModule,
2235
+ i10.MatSelectModule,
2236
+ i4$1.MatListModule,
2237
+ i7$1.DragDropModule,
2238
+ i6$1.FsFileModule,
2239
+ i15.FsColorPickerModule,
2104
2240
  menu.FsMenuModule,
2105
2241
  i2$2.FsZoomPanModule,
2106
- i16.FsFormModule,
2107
- i12.FsAutocompleteModule,
2242
+ i6.FsFormModule,
2243
+ i13.FsAutocompleteModule,
2108
2244
  i2.FsDialogModule,
2109
2245
  ]] });
2110
2246
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorModule, decorators: [{
2111
2247
  type: i0.NgModule,
2112
2248
  args: [{
2113
2249
  imports: [
2114
- i17.CommonModule,
2115
- i15.FormsModule,
2250
+ i18.CommonModule,
2251
+ i5.FormsModule,
2116
2252
  i3.MatIconModule,
2117
- i6.MatButtonModule,
2118
- i19.MatInputModule,
2119
- i8.MatFormFieldModule,
2120
- i11.MatCheckboxModule,
2121
- i18.MatTooltipModule,
2122
- i9.MatSelectModule,
2123
- i4.MatListModule,
2124
- i7.DragDropModule,
2125
- i5$1.FsFileModule,
2126
- i14.FsColorPickerModule,
2253
+ i4.MatButtonModule,
2254
+ i7.MatInputModule,
2255
+ i9.MatFormFieldModule,
2256
+ i12.MatCheckboxModule,
2257
+ i19.MatTooltipModule,
2258
+ i10.MatSelectModule,
2259
+ i4$1.MatListModule,
2260
+ i7$1.DragDropModule,
2261
+ i6$1.FsFileModule,
2262
+ i15.FsColorPickerModule,
2127
2263
  menu.FsMenuModule,
2128
2264
  i2$2.FsZoomPanModule,
2129
- i16.FsFormModule,
2130
- i12.FsAutocompleteModule,
2265
+ i6.FsFormModule,
2266
+ i13.FsAutocompleteModule,
2131
2267
  i2.FsDialogModule,
2132
2268
  ],
2133
2269
  exports: [
@@ -2145,6 +2281,7 @@
2145
2281
  LayersReorderDialogComponent,
2146
2282
  FontComponent,
2147
2283
  CreateImageUrlPipe,
2284
+ GroupDialogComponent,
2148
2285
  ],
2149
2286
  providers: [
2150
2287
  GoogleFontService,