@firestitch/block-editor 9.0.10 → 12.0.1

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 (41) hide show
  1. package/app/components/block/block.component.d.ts +3 -6
  2. package/app/components/block-editor/block-editor.component.d.ts +9 -2
  3. package/app/components/sidebar/sidebar.component.d.ts +5 -2
  4. package/app/directives/block-editor-margin.directive.d.ts +3 -0
  5. package/app/directives/block-editor-sidebar-panel.directive.d.ts +3 -0
  6. package/app/fs-block-editor.module.d.ts +17 -0
  7. package/app/interfaces/block.d.ts +0 -1
  8. package/app/services/block-editor.service.d.ts +3 -0
  9. package/bundles/firestitch-block-editor.umd.js +489 -372
  10. package/bundles/firestitch-block-editor.umd.js.map +1 -1
  11. package/esm2015/app/components/block/block.component.js +34 -64
  12. package/esm2015/app/components/block-editor/block-editor.component.js +67 -57
  13. package/esm2015/app/components/sidebar/sidebar.component.js +37 -46
  14. package/esm2015/app/directives/block-editor-margin.directive.js +13 -15
  15. package/esm2015/app/directives/block-editor-sidebar-panel.directive.js +16 -22
  16. package/esm2015/app/fs-block-editor.module.js +49 -27
  17. package/esm2015/app/interfaces/block-editor-config.js +2 -1
  18. package/esm2015/app/interfaces/block.js +2 -1
  19. package/esm2015/app/services/block-editor.service.js +9 -9
  20. package/esm2015/firestitch-block-editor.js +1 -4
  21. package/esm2015/public_api.js +1 -1
  22. package/fesm2015/firestitch-block-editor.js +203 -217
  23. package/fesm2015/firestitch-block-editor.js.map +1 -1
  24. package/firestitch-block-editor.d.ts +1 -3
  25. package/package.json +5 -12
  26. package/bundles/firestitch-block-editor.umd.min.js +0 -2
  27. package/bundles/firestitch-block-editor.umd.min.js.map +0 -1
  28. package/esm5/app/components/block/block.component.js +0 -498
  29. package/esm5/app/components/block-editor/block-editor.component.js +0 -137
  30. package/esm5/app/components/sidebar/sidebar.component.js +0 -334
  31. package/esm5/app/directives/block-editor-margin.directive.js +0 -26
  32. package/esm5/app/directives/block-editor-sidebar-panel.directive.js +0 -28
  33. package/esm5/app/fs-block-editor.module.js +0 -57
  34. package/esm5/app/interfaces/block-editor-config.js +0 -1
  35. package/esm5/app/interfaces/block.js +0 -1
  36. package/esm5/app/services/block-editor.service.js +0 -124
  37. package/esm5/firestitch-block-editor.js +0 -8
  38. package/esm5/public_api.js +0 -8
  39. package/fesm5/firestitch-block-editor.js +0 -1177
  40. package/fesm5/firestitch-block-editor.js.map +0 -1
  41. package/firestitch-block-editor.metadata.json +0 -1
@@ -1,55 +1,87 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/forms'), require('@angular/material/input'), require('@angular/core'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@firestitch/html-editor'), require('@firestitch/colorpicker'), require('@firestitch/file'), require('rxjs/operators'), require('moveable'), require('rxjs'), require('@firestitch/common')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/block-editor', ['exports', '@angular/forms', '@angular/material/input', '@angular/core', '@angular/common', '@angular/material/button', '@angular/material/form-field', '@angular/material/icon', '@firestitch/html-editor', '@firestitch/colorpicker', '@firestitch/file', 'rxjs/operators', 'moveable', 'rxjs', '@firestitch/common'], factory) :
4
- (global = global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch['block-editor'] = {}), global.ng.forms, global.ng.material.input, global.ng.core, global.ng.common, global.ng.material.button, global.ng.material.formField, global.ng.material.icon, global.htmlEditor, global.colorpicker, global.file, global.rxjs.operators, global.Moveable, global.rxjs, global.common$1));
5
- }(this, (function (exports, forms, input, core, common, button, formField, icon, htmlEditor, colorpicker, file, operators, Moveable, rxjs, common$1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/forms'), require('@angular/material/input'), require('@angular/core'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@firestitch/colorpicker'), require('@firestitch/file'), require('rxjs/operators'), require('moveable'), require('rxjs'), require('@firestitch/common')) :
3
+ typeof define === 'function' && define.amd ? define('@firestitch/block-editor', ['exports', '@angular/forms', '@angular/material/input', '@angular/core', '@angular/common', '@angular/material/button', '@angular/material/form-field', '@angular/material/icon', '@firestitch/colorpicker', '@firestitch/file', 'rxjs/operators', 'moveable', 'rxjs', '@firestitch/common'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["block-editor"] = {}), global.ng.forms, global.ng.material.input, global.ng.core, global.ng.common, global.ng.material.button, global.ng.material.formField, global.ng.material.icon, global.i5, global.i6, global.rxjs.operators, global.Moveable, global.rxjs, global.common));
5
+ })(this, (function (exports, i9, i8, i0, i7, i2, i4, i3, i5, i6, operators, Moveable, rxjs, common) { 'use strict';
6
6
 
7
- Moveable = Moveable && Object.prototype.hasOwnProperty.call(Moveable, 'default') ? Moveable['default'] : Moveable;
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
28
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
29
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
30
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
31
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
32
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
33
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
34
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
35
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
36
+ var Moveable__default = /*#__PURE__*/_interopDefaultLegacy(Moveable);
8
37
 
9
38
  /*! *****************************************************************************
10
- Copyright (c) Microsoft Corporation. All rights reserved.
11
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
12
- this file except in compliance with the License. You may obtain a copy of the
13
- License at http://www.apache.org/licenses/LICENSE-2.0
39
+ Copyright (c) Microsoft Corporation.
14
40
 
15
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
17
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
18
- MERCHANTABLITY OR NON-INFRINGEMENT.
41
+ Permission to use, copy, modify, and/or distribute this software for any
42
+ purpose with or without fee is hereby granted.
19
43
 
20
- See the Apache Version 2.0 License for specific language governing permissions
21
- and limitations under the License.
44
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
45
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
46
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
47
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
48
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
49
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
50
+ PERFORMANCE OF THIS SOFTWARE.
22
51
  ***************************************************************************** */
23
52
  /* global Reflect, Promise */
24
-
25
- var extendStatics = function(d, b) {
53
+ var extendStatics = function (d, b) {
26
54
  extendStatics = Object.setPrototypeOf ||
27
55
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
28
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
56
+ function (d, b) { for (var p in b)
57
+ if (Object.prototype.hasOwnProperty.call(b, p))
58
+ d[p] = b[p]; };
29
59
  return extendStatics(d, b);
30
60
  };
31
-
32
61
  function __extends(d, b) {
62
+ if (typeof b !== "function" && b !== null)
63
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33
64
  extendStatics(d, b);
34
65
  function __() { this.constructor = d; }
35
66
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
67
  }
37
-
38
- var __assign = function() {
68
+ var __assign = function () {
39
69
  __assign = Object.assign || function __assign(t) {
40
70
  for (var s, i = 1, n = arguments.length; i < n; i++) {
41
71
  s = arguments[i];
42
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
72
+ for (var p in s)
73
+ if (Object.prototype.hasOwnProperty.call(s, p))
74
+ t[p] = s[p];
43
75
  }
44
76
  return t;
45
77
  };
46
78
  return __assign.apply(this, arguments);
47
79
  };
48
-
49
80
  function __rest(s, e) {
50
81
  var t = {};
51
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
52
- t[p] = s[p];
82
+ for (var p in s)
83
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
84
+ t[p] = s[p];
53
85
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
54
86
  for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
55
87
  if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
@@ -57,167 +89,268 @@
57
89
  }
58
90
  return t;
59
91
  }
60
-
61
92
  function __decorate(decorators, target, key, desc) {
62
93
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
63
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
64
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
94
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
95
+ r = Reflect.decorate(decorators, target, key, desc);
96
+ else
97
+ for (var i = decorators.length - 1; i >= 0; i--)
98
+ if (d = decorators[i])
99
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
65
100
  return c > 3 && r && Object.defineProperty(target, key, r), r;
66
101
  }
67
-
68
102
  function __param(paramIndex, decorator) {
69
- return function (target, key) { decorator(target, key, paramIndex); }
103
+ return function (target, key) { decorator(target, key, paramIndex); };
70
104
  }
71
-
72
105
  function __metadata(metadataKey, metadataValue) {
73
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
106
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
107
+ return Reflect.metadata(metadataKey, metadataValue);
74
108
  }
75
-
76
109
  function __awaiter(thisArg, _arguments, P, generator) {
77
110
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
78
111
  return new (P || (P = Promise))(function (resolve, reject) {
79
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
80
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
112
+ function fulfilled(value) { try {
113
+ step(generator.next(value));
114
+ }
115
+ catch (e) {
116
+ reject(e);
117
+ } }
118
+ function rejected(value) { try {
119
+ step(generator["throw"](value));
120
+ }
121
+ catch (e) {
122
+ reject(e);
123
+ } }
81
124
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
82
125
  step((generator = generator.apply(thisArg, _arguments || [])).next());
83
126
  });
84
127
  }
85
-
86
128
  function __generator(thisArg, body) {
87
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
88
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
129
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
130
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
131
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
89
132
  function verb(n) { return function (v) { return step([n, v]); }; }
90
133
  function step(op) {
91
- if (f) throw new TypeError("Generator is already executing.");
92
- while (_) try {
93
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
94
- if (y = 0, t) op = [op[0] & 2, t.value];
95
- switch (op[0]) {
96
- case 0: case 1: t = op; break;
97
- case 4: _.label++; return { value: op[1], done: false };
98
- case 5: _.label++; y = op[1]; op = [0]; continue;
99
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
100
- default:
101
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
102
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
103
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
104
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
105
- if (t[2]) _.ops.pop();
106
- _.trys.pop(); continue;
134
+ if (f)
135
+ throw new TypeError("Generator is already executing.");
136
+ while (_)
137
+ try {
138
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
139
+ return t;
140
+ if (y = 0, t)
141
+ op = [op[0] & 2, t.value];
142
+ switch (op[0]) {
143
+ case 0:
144
+ case 1:
145
+ t = op;
146
+ break;
147
+ case 4:
148
+ _.label++;
149
+ return { value: op[1], done: false };
150
+ case 5:
151
+ _.label++;
152
+ y = op[1];
153
+ op = [0];
154
+ continue;
155
+ case 7:
156
+ op = _.ops.pop();
157
+ _.trys.pop();
158
+ continue;
159
+ default:
160
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
161
+ _ = 0;
162
+ continue;
163
+ }
164
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
165
+ _.label = op[1];
166
+ break;
167
+ }
168
+ if (op[0] === 6 && _.label < t[1]) {
169
+ _.label = t[1];
170
+ t = op;
171
+ break;
172
+ }
173
+ if (t && _.label < t[2]) {
174
+ _.label = t[2];
175
+ _.ops.push(op);
176
+ break;
177
+ }
178
+ if (t[2])
179
+ _.ops.pop();
180
+ _.trys.pop();
181
+ continue;
182
+ }
183
+ op = body.call(thisArg, _);
184
+ }
185
+ catch (e) {
186
+ op = [6, e];
187
+ y = 0;
107
188
  }
108
- op = body.call(thisArg, _);
109
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
110
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
189
+ finally {
190
+ f = t = 0;
191
+ }
192
+ if (op[0] & 5)
193
+ throw op[1];
194
+ return { value: op[0] ? op[1] : void 0, done: true };
111
195
  }
112
196
  }
113
-
114
- function __exportStar(m, exports) {
115
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
197
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
198
+ if (k2 === undefined)
199
+ k2 = k;
200
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
201
+ }) : (function (o, m, k, k2) {
202
+ if (k2 === undefined)
203
+ k2 = k;
204
+ o[k2] = m[k];
205
+ });
206
+ function __exportStar(m, o) {
207
+ for (var p in m)
208
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
209
+ __createBinding(o, m, p);
116
210
  }
117
-
118
211
  function __values(o) {
119
212
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
120
- if (m) return m.call(o);
121
- if (o && typeof o.length === "number") return {
122
- next: function () {
123
- if (o && i >= o.length) o = void 0;
124
- return { value: o && o[i++], done: !o };
125
- }
126
- };
213
+ if (m)
214
+ return m.call(o);
215
+ if (o && typeof o.length === "number")
216
+ return {
217
+ next: function () {
218
+ if (o && i >= o.length)
219
+ o = void 0;
220
+ return { value: o && o[i++], done: !o };
221
+ }
222
+ };
127
223
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
128
224
  }
129
-
130
225
  function __read(o, n) {
131
226
  var m = typeof Symbol === "function" && o[Symbol.iterator];
132
- if (!m) return o;
227
+ if (!m)
228
+ return o;
133
229
  var i = m.call(o), r, ar = [], e;
134
230
  try {
135
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
231
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
232
+ ar.push(r.value);
233
+ }
234
+ catch (error) {
235
+ e = { error: error };
136
236
  }
137
- catch (error) { e = { error: error }; }
138
237
  finally {
139
238
  try {
140
- if (r && !r.done && (m = i["return"])) m.call(i);
239
+ if (r && !r.done && (m = i["return"]))
240
+ m.call(i);
241
+ }
242
+ finally {
243
+ if (e)
244
+ throw e.error;
141
245
  }
142
- finally { if (e) throw e.error; }
143
246
  }
144
247
  return ar;
145
248
  }
146
-
249
+ /** @deprecated */
147
250
  function __spread() {
148
251
  for (var ar = [], i = 0; i < arguments.length; i++)
149
252
  ar = ar.concat(__read(arguments[i]));
150
253
  return ar;
151
254
  }
152
-
255
+ /** @deprecated */
153
256
  function __spreadArrays() {
154
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
257
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
258
+ s += arguments[i].length;
155
259
  for (var r = Array(s), k = 0, i = 0; i < il; i++)
156
260
  for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
157
261
  r[k] = a[j];
158
262
  return r;
159
- };
160
-
263
+ }
264
+ function __spreadArray(to, from, pack) {
265
+ if (pack || arguments.length === 2)
266
+ for (var i = 0, l = from.length, ar; i < l; i++) {
267
+ if (ar || !(i in from)) {
268
+ if (!ar)
269
+ ar = Array.prototype.slice.call(from, 0, i);
270
+ ar[i] = from[i];
271
+ }
272
+ }
273
+ return to.concat(ar || Array.prototype.slice.call(from));
274
+ }
161
275
  function __await(v) {
162
276
  return this instanceof __await ? (this.v = v, this) : new __await(v);
163
277
  }
164
-
165
278
  function __asyncGenerator(thisArg, _arguments, generator) {
166
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
279
+ if (!Symbol.asyncIterator)
280
+ throw new TypeError("Symbol.asyncIterator is not defined.");
167
281
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
168
282
  return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
169
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
170
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
283
+ function verb(n) { if (g[n])
284
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
285
+ function resume(n, v) { try {
286
+ step(g[n](v));
287
+ }
288
+ catch (e) {
289
+ settle(q[0][3], e);
290
+ } }
171
291
  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
172
292
  function fulfill(value) { resume("next", value); }
173
293
  function reject(value) { resume("throw", value); }
174
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
294
+ function settle(f, v) { if (f(v), q.shift(), q.length)
295
+ resume(q[0][0], q[0][1]); }
175
296
  }
176
-
177
297
  function __asyncDelegator(o) {
178
298
  var i, p;
179
299
  return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
180
300
  function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
181
301
  }
182
-
183
302
  function __asyncValues(o) {
184
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
303
+ if (!Symbol.asyncIterator)
304
+ throw new TypeError("Symbol.asyncIterator is not defined.");
185
305
  var m = o[Symbol.asyncIterator], i;
186
306
  return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
187
307
  function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
188
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
308
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
189
309
  }
190
-
191
310
  function __makeTemplateObject(cooked, raw) {
192
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
311
+ if (Object.defineProperty) {
312
+ Object.defineProperty(cooked, "raw", { value: raw });
313
+ }
314
+ else {
315
+ cooked.raw = raw;
316
+ }
193
317
  return cooked;
318
+ }
319
+ ;
320
+ var __setModuleDefault = Object.create ? (function (o, v) {
321
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
322
+ }) : function (o, v) {
323
+ o["default"] = v;
194
324
  };
195
-
196
325
  function __importStar(mod) {
197
- if (mod && mod.__esModule) return mod;
326
+ if (mod && mod.__esModule)
327
+ return mod;
198
328
  var result = {};
199
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
200
- result.default = mod;
329
+ if (mod != null)
330
+ for (var k in mod)
331
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
332
+ __createBinding(result, mod, k);
333
+ __setModuleDefault(result, mod);
201
334
  return result;
202
335
  }
203
-
204
336
  function __importDefault(mod) {
205
337
  return (mod && mod.__esModule) ? mod : { default: mod };
206
338
  }
207
-
208
- function __classPrivateFieldGet(receiver, privateMap) {
209
- if (!privateMap.has(receiver)) {
210
- throw new TypeError("attempted to get private field on non-instance");
211
- }
212
- return privateMap.get(receiver);
339
+ function __classPrivateFieldGet(receiver, state, kind, f) {
340
+ if (kind === "a" && !f)
341
+ throw new TypeError("Private accessor was defined without a getter");
342
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
343
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
344
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
213
345
  }
214
-
215
- function __classPrivateFieldSet(receiver, privateMap, value) {
216
- if (!privateMap.has(receiver)) {
217
- throw new TypeError("attempted to set private field on non-instance");
218
- }
219
- privateMap.set(receiver, value);
220
- return value;
346
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
347
+ if (kind === "m")
348
+ throw new TypeError("Private method is not writable");
349
+ if (kind === "a" && !f)
350
+ throw new TypeError("Private accessor was defined without a setter");
351
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
352
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
353
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
221
354
  }
222
355
 
223
356
  var BlockEditorService = /** @class */ (function () {
@@ -228,18 +361,18 @@
228
361
  }
229
362
  Object.defineProperty(BlockEditorService.prototype, "elementGuidelines", {
230
363
  get: function () {
231
- return __spread(this.blockComponents.map(function (block) {
364
+ return __spreadArray(__spreadArray([], __read(this.blockComponents.map(function (block) {
232
365
  return block.el;
233
- }), [
366
+ }))), [
234
367
  this.container,
235
368
  this.margin,
236
369
  ]);
237
370
  },
238
- enumerable: true,
371
+ enumerable: false,
239
372
  configurable: true
240
373
  });
241
374
  BlockEditorService.prototype.addBlock = function (block) {
242
- this.blocks$.next(__spread(this.blocks, [this.sanitizeBlock(block)]));
375
+ this.blocks$.next(__spreadArray(__spreadArray([], __read(this.blocks)), [this.sanitizeBlock(block)]));
243
376
  };
244
377
  BlockEditorService.prototype.removeBlock = function (block) {
245
378
  var index = this.indexOf(block);
@@ -252,7 +385,7 @@
252
385
  get: function () {
253
386
  return this._blocks$;
254
387
  },
255
- enumerable: true,
388
+ enumerable: false,
256
389
  configurable: true
257
390
  });
258
391
  Object.defineProperty(BlockEditorService.prototype, "blocks", {
@@ -262,7 +395,7 @@
262
395
  set: function (blocks) {
263
396
  this._blocks$.next(blocks);
264
397
  },
265
- enumerable: true,
398
+ enumerable: false,
266
399
  configurable: true
267
400
  });
268
401
  BlockEditorService.prototype.isSelectedBlock = function (block) {
@@ -282,21 +415,21 @@
282
415
  });
283
416
  this._selectedBlockComponents$.next(blocks);
284
417
  },
285
- enumerable: true,
418
+ enumerable: false,
286
419
  configurable: true
287
420
  });
288
421
  Object.defineProperty(BlockEditorService.prototype, "selectedBlocks", {
289
422
  get: function () {
290
423
  return this.selectedBlockComponents.map(function (blockComponent) { return blockComponent.block; });
291
424
  },
292
- enumerable: true,
425
+ enumerable: false,
293
426
  configurable: true
294
427
  });
295
428
  Object.defineProperty(BlockEditorService.prototype, "selectedBlockComponents$", {
296
429
  get: function () {
297
430
  return this._selectedBlockComponents$;
298
431
  },
299
- enumerable: true,
432
+ enumerable: false,
300
433
  configurable: true
301
434
  });
302
435
  BlockEditorService.prototype.saveSelection = function () {
@@ -331,38 +464,37 @@
331
464
  this.margin = margin;
332
465
  };
333
466
  BlockEditorService.prototype.sanitizeBlock = function (block) {
334
- return __assign({ shapeBottomLeft: 'round', shapeTopLeft: 'round', shapeTopRight: 'round', shapeBottomRight: 'round', verticalAlign: 'top', horizontalAlign: 'left' }, block);
467
+ return Object.assign({ shapeBottomLeft: 'round', shapeTopLeft: 'round', shapeTopRight: 'round', shapeBottomRight: 'round', verticalAlign: 'top', horizontalAlign: 'left' }, block);
335
468
  };
336
- BlockEditorService = __decorate([
337
- core.Injectable(),
338
- __metadata("design:paramtypes", [])
339
- ], BlockEditorService);
340
469
  return BlockEditorService;
341
- }());
470
+ }());
471
+ BlockEditorService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BlockEditorService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
472
+ BlockEditorService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BlockEditorService });
473
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BlockEditorService, decorators: [{
474
+ type: i0.Injectable
475
+ }], ctorParameters: function () { return []; } });
342
476
 
343
477
  var FsBlockComponent = /** @class */ (function () {
344
478
  function FsBlockComponent(_service, _elementRef, _cdRef) {
345
479
  this._service = _service;
346
480
  this._elementRef = _elementRef;
347
481
  this._cdRef = _cdRef;
348
- this.changed = new core.EventEmitter();
349
- this.htmlConfig = {};
482
+ this.changed = new i0.EventEmitter();
350
483
  this._editable = false;
351
- this._selectedElements = [];
352
484
  this._destroy$ = new rxjs.Subject();
353
485
  }
354
486
  Object.defineProperty(FsBlockComponent.prototype, "el", {
355
487
  get: function () {
356
488
  return this.element.nativeElement;
357
489
  },
358
- enumerable: true,
490
+ enumerable: false,
359
491
  configurable: true
360
492
  });
361
493
  Object.defineProperty(FsBlockComponent.prototype, "moveable", {
362
494
  get: function () {
363
495
  return this._moveable;
364
496
  },
365
- enumerable: true,
497
+ enumerable: false,
366
498
  configurable: true
367
499
  });
368
500
  Object.defineProperty(FsBlockComponent.prototype, "editable", {
@@ -375,21 +507,21 @@
375
507
  this.deselectContent();
376
508
  }
377
509
  },
378
- enumerable: true,
510
+ enumerable: false,
379
511
  configurable: true
380
512
  });
381
513
  Object.defineProperty(FsBlockComponent.prototype, "elementGuidelines", {
382
514
  set: function (value) {
383
515
  this._moveable.elementGuidelines = value;
384
516
  },
385
- enumerable: true,
517
+ enumerable: false,
386
518
  configurable: true
387
519
  });
388
520
  Object.defineProperty(FsBlockComponent.prototype, "clippable", {
389
521
  set: function (value) {
390
522
  this._moveable.clippable = value;
391
523
  },
392
- enumerable: true,
524
+ enumerable: false,
393
525
  configurable: true
394
526
  });
395
527
  Object.defineProperty(FsBlockComponent.prototype, "transformable", {
@@ -404,7 +536,7 @@
404
536
  this.moveable.roundable = value;
405
537
  this.moveable.rotatable = value;
406
538
  },
407
- enumerable: true,
539
+ enumerable: false,
408
540
  configurable: true
409
541
  });
410
542
  Object.defineProperty(FsBlockComponent.prototype, "lineHeight", {
@@ -412,7 +544,7 @@
412
544
  this.block.lineHeight = value;
413
545
  this._triggerChanged();
414
546
  },
415
- enumerable: true,
547
+ enumerable: false,
416
548
  configurable: true
417
549
  });
418
550
  Object.defineProperty(FsBlockComponent.prototype, "borderWidth", {
@@ -420,7 +552,7 @@
420
552
  this.block.borderWidth = value;
421
553
  this._triggerChanged();
422
554
  },
423
- enumerable: true,
555
+ enumerable: false,
424
556
  configurable: true
425
557
  });
426
558
  Object.defineProperty(FsBlockComponent.prototype, "fontSize", {
@@ -428,7 +560,7 @@
428
560
  this.block.fontSize = value;
429
561
  this._triggerChanged();
430
562
  },
431
- enumerable: true,
563
+ enumerable: false,
432
564
  configurable: true
433
565
  });
434
566
  Object.defineProperty(FsBlockComponent.prototype, "backgroundColor", {
@@ -436,7 +568,7 @@
436
568
  this.block.backgroundColor = value;
437
569
  this._triggerChanged();
438
570
  },
439
- enumerable: true,
571
+ enumerable: false,
440
572
  configurable: true
441
573
  });
442
574
  Object.defineProperty(FsBlockComponent.prototype, "width", {
@@ -446,7 +578,7 @@
446
578
  this._moveable.updateRect();
447
579
  this._triggerChanged();
448
580
  },
449
- enumerable: true,
581
+ enumerable: false,
450
582
  configurable: true
451
583
  });
452
584
  Object.defineProperty(FsBlockComponent.prototype, "height", {
@@ -456,7 +588,7 @@
456
588
  this._moveable.updateRect();
457
589
  this._triggerChanged();
458
590
  },
459
- enumerable: true,
591
+ enumerable: false,
460
592
  configurable: true
461
593
  });
462
594
  Object.defineProperty(FsBlockComponent.prototype, "top", {
@@ -466,7 +598,7 @@
466
598
  this._moveable.updateRect();
467
599
  this._triggerChanged();
468
600
  },
469
- enumerable: true,
601
+ enumerable: false,
470
602
  configurable: true
471
603
  });
472
604
  Object.defineProperty(FsBlockComponent.prototype, "left", {
@@ -476,7 +608,7 @@
476
608
  this._moveable.updateRect();
477
609
  this._triggerChanged();
478
610
  },
479
- enumerable: true,
611
+ enumerable: false,
480
612
  configurable: true
481
613
  });
482
614
  Object.defineProperty(FsBlockComponent.prototype, "rotate", {
@@ -485,7 +617,7 @@
485
617
  this._moveable.request('rotatable', { rotate: this.block.rotate }, true);
486
618
  this._triggerChanged();
487
619
  },
488
- enumerable: true,
620
+ enumerable: false,
489
621
  configurable: true
490
622
  });
491
623
  Object.defineProperty(FsBlockComponent.prototype, "shapeRadius", {
@@ -493,14 +625,14 @@
493
625
  this.block.shapeRadius = value;
494
626
  this._triggerChanged();
495
627
  },
496
- enumerable: true,
628
+ enumerable: false,
497
629
  configurable: true
498
630
  });
499
631
  Object.defineProperty(FsBlockComponent.prototype, "index", {
500
632
  set: function (value) {
501
633
  this.block.index = value;
502
634
  },
503
- enumerable: true,
635
+ enumerable: false,
504
636
  configurable: true
505
637
  });
506
638
  Object.defineProperty(FsBlockComponent.prototype, "borderColor", {
@@ -508,7 +640,7 @@
508
640
  this.block.borderColor = value;
509
641
  this._triggerChanged();
510
642
  },
511
- enumerable: true,
643
+ enumerable: false,
512
644
  configurable: true
513
645
  });
514
646
  Object.defineProperty(FsBlockComponent.prototype, "paddingAll", {
@@ -520,7 +652,7 @@
520
652
  this.block.paddingRight = null;
521
653
  this._triggerChanged();
522
654
  },
523
- enumerable: true,
655
+ enumerable: false,
524
656
  configurable: true
525
657
  });
526
658
  FsBlockComponent.prototype.padding = function (name, value) {
@@ -533,7 +665,7 @@
533
665
  this.block.imageUrl = value;
534
666
  this._triggerChanged();
535
667
  },
536
- enumerable: true,
668
+ enumerable: false,
537
669
  configurable: true
538
670
  });
539
671
  Object.defineProperty(FsBlockComponent.prototype, "fontColor", {
@@ -541,7 +673,7 @@
541
673
  this.block.fontColor = value;
542
674
  this._triggerChanged();
543
675
  },
544
- enumerable: true,
676
+ enumerable: false,
545
677
  configurable: true
546
678
  });
547
679
  Object.defineProperty(FsBlockComponent.prototype, "verticalAlign", {
@@ -549,7 +681,7 @@
549
681
  this.block.verticalAlign = value;
550
682
  this._triggerChanged();
551
683
  },
552
- enumerable: true,
684
+ enumerable: false,
553
685
  configurable: true
554
686
  });
555
687
  FsBlockComponent.prototype.shapeRound = function (name, value) {
@@ -561,7 +693,7 @@
561
693
  this.block.horizontalAlign = value;
562
694
  this._triggerChanged();
563
695
  },
564
- enumerable: true,
696
+ enumerable: false,
565
697
  configurable: true
566
698
  });
567
699
  Object.defineProperty(FsBlockComponent.prototype, "italic", {
@@ -572,7 +704,7 @@
572
704
  this.block.italic = value;
573
705
  this._triggerChanged();
574
706
  },
575
- enumerable: true,
707
+ enumerable: false,
576
708
  configurable: true
577
709
  });
578
710
  Object.defineProperty(FsBlockComponent.prototype, "bold", {
@@ -583,7 +715,7 @@
583
715
  this.block.bold = value;
584
716
  this._triggerChanged();
585
717
  },
586
- enumerable: true,
718
+ enumerable: false,
587
719
  configurable: true
588
720
  });
589
721
  Object.defineProperty(FsBlockComponent.prototype, "underline", {
@@ -594,7 +726,7 @@
594
726
  this.block.underline = value;
595
727
  this._triggerChanged();
596
728
  },
597
- enumerable: true,
729
+ enumerable: false,
598
730
  configurable: true
599
731
  });
600
732
  FsBlockComponent.prototype.updateRect = function () {
@@ -607,16 +739,6 @@
607
739
  this.block = this._service.sanitizeBlock(this.block);
608
740
  this.unit = this._service.config.unit;
609
741
  this.content = this.block.content;
610
- this.htmlConfig = {
611
- autofocus: false,
612
- froalaConfig: {}
613
- };
614
- };
615
- FsBlockComponent.prototype.saveSelectedElements = function () {
616
- this._selectedElements = this.htmlEditor.editor.selection.blocks();
617
- };
618
- FsBlockComponent.prototype.clearSelectedElements = function () {
619
- this._selectedElements = [];
620
742
  };
621
743
  FsBlockComponent.prototype.ngAfterContentInit = function () {
622
744
  var _this = this;
@@ -657,7 +779,7 @@
657
779
  });
658
780
  }
659
781
  });
660
- this._moveable = new Moveable(this._elementRef.nativeElement, {
782
+ this._moveable = new Moveable__default["default"](this._elementRef.nativeElement, {
661
783
  target: this.el,
662
784
  container: this._service.container,
663
785
  draggable: false,
@@ -774,7 +896,7 @@
774
896
  };
775
897
  FsBlockComponent.prototype._setTransform = function (transforms) {
776
898
  if (transforms === void 0) { transforms = []; }
777
- transforms = (transforms !== null && transforms !== void 0 ? transforms : []);
899
+ transforms = transforms !== null && transforms !== void 0 ? transforms : [];
778
900
  if (this.block.rotate) {
779
901
  transforms.push("rotate(" + this.block.rotate + "deg)");
780
902
  }
@@ -783,77 +905,54 @@
783
905
  FsBlockComponent.prototype._triggerChanged = function () {
784
906
  this.changed.emit(this.block);
785
907
  };
786
- FsBlockComponent.ctorParameters = function () { return [
787
- { type: BlockEditorService },
788
- { type: core.ElementRef },
789
- { type: core.ChangeDetectorRef }
790
- ]; };
791
- __decorate([
792
- core.ViewChild('element', { static: true }),
793
- __metadata("design:type", core.ElementRef)
794
- ], FsBlockComponent.prototype, "element", void 0);
795
- __decorate([
796
- core.ViewChild('contentElement', { static: true }),
797
- __metadata("design:type", core.ElementRef)
798
- ], FsBlockComponent.prototype, "contentElement", void 0);
799
- __decorate([
800
- core.ViewChild('contentEditable', { static: true }),
801
- __metadata("design:type", core.ElementRef)
802
- ], FsBlockComponent.prototype, "contentEditable", void 0);
803
- __decorate([
804
- core.ViewChild(htmlEditor.FsHtmlEditorComponent),
805
- __metadata("design:type", htmlEditor.FsHtmlEditorComponent)
806
- ], FsBlockComponent.prototype, "htmlEditor", void 0);
807
- __decorate([
808
- core.Input(),
809
- __metadata("design:type", Object)
810
- ], FsBlockComponent.prototype, "block", void 0);
811
- __decorate([
812
- core.Input(),
813
- __metadata("design:type", String)
814
- ], FsBlockComponent.prototype, "html", void 0);
815
- __decorate([
816
- core.Output(),
817
- __metadata("design:type", Object)
818
- ], FsBlockComponent.prototype, "changed", void 0);
819
- FsBlockComponent = __decorate([
820
- core.Component({
821
- selector: 'fs-block',
822
- template: "<div\n #element\n class=\"block\"\n [ngClass]=\"{ editable: editable }\">\n <div\n #contentElement\n class=\"content\"\n [style.zIndex]=\"block.index\"\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.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 + unit : ''\"\n [style.paddingBottom]=\"block.paddingBottom ? block.paddingBottom + unit : ''\"\n [style.paddingLeft]=\"block.paddingLeft ? block.paddingLeft + unit : ''\"\n [style.paddingRight]=\"block.paddingRight ? block.paddingRight + unit : ''\"\n [style.padding]=\"block.padding ? block.padding + unit : ''\"\n [style.clipPath]=\"block.clipPath\"\n [style.backgroundColor]=\"block.backgroundColor\"\n [style.borderBottomLeftRadius]=\"block.shapeRadius && block.shapeBottomLeft === 'round' ? block.shapeRadius + unit : ''\"\n [style.borderBottomRightRadius]=\"block.shapeRadius && block.shapeBottomRight === 'round' ? block.shapeRadius + unit : ''\"\n [style.borderTopRightRadius]=\"block.shapeRadius && block.shapeTopRight === 'round' ? block.shapeRadius + unit : ''\"\n [style.borderTopLeftRadius]=\"block.shapeRadius && block.shapeTopLeft === 'round' ? block.shapeRadius + unit : ''\"\n [ngClass]=\"{\n 'editable': editable,\n 'vertical-align-center': block.verticalAlign === 'center',\n 'vertical-align-bottom': block.verticalAlign === 'bottom'\n }\">\n <img [src]=\"block.imageUrl\" *ngIf=\"block.imageUrl\">\n <div\n #contentEditable\n [contentEditable]=\"editable\"\n class=\"content-editable\"\n [innerHTML]=\"content\">\n </div>\n </div>\n</div>\n",
823
- changeDetection: core.ChangeDetectionStrategy.OnPush,
824
- styles: [".block{position:absolute;display:block;outline:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.block .content-editable{outline:0;position:relative}.block.editable .content-editable{cursor:text}.block .content{flex-direction:column;height:100%;display:flex;border:1px dashed #c5c5c5;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}: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:0 0!important;border:none!important}:host ::ng-deep .moveable-line:not(.moveable-rotation-line):not(.moveable-guideline){background:0 0!important}"]
825
- }),
826
- __metadata("design:paramtypes", [BlockEditorService,
827
- core.ElementRef,
828
- core.ChangeDetectorRef])
829
- ], FsBlockComponent);
830
908
  return FsBlockComponent;
831
- }());
909
+ }());
910
+ 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 }], target: i0__namespace.ɵɵFactoryTarget.Component });
911
+ FsBlockComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsBlockComponent, selector: "fs-block", inputs: { block: "block", html: "html" }, outputs: { changed: "changed" }, 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\"\n [ngClass]=\"{ editable: editable, readonly: block.readonly }\">\n <div\n #contentElement\n class=\"content\"\n [style.zIndex]=\"block.index\"\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.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 + unit : ''\"\n [style.paddingBottom]=\"block.paddingBottom ? block.paddingBottom + unit : ''\"\n [style.paddingLeft]=\"block.paddingLeft ? block.paddingLeft + unit : ''\"\n [style.paddingRight]=\"block.paddingRight ? block.paddingRight + unit : ''\"\n [style.padding]=\"block.padding ? block.padding + unit : ''\"\n [style.clipPath]=\"block.clipPath\"\n [style.backgroundColor]=\"block.backgroundColor\"\n [style.borderBottomLeftRadius]=\"block.shapeRadius && block.shapeBottomLeft === 'round' ? block.shapeRadius + unit : ''\"\n [style.borderBottomRightRadius]=\"block.shapeRadius && block.shapeBottomRight === 'round' ? block.shapeRadius + unit : ''\"\n [style.borderTopRightRadius]=\"block.shapeRadius && block.shapeTopRight === 'round' ? block.shapeRadius + unit : ''\"\n [style.borderTopLeftRadius]=\"block.shapeRadius && block.shapeTopLeft === 'round' ? block.shapeRadius + unit : ''\"\n [ngClass]=\"{\n 'editable': editable,\n 'vertical-align-center': block.verticalAlign === 'center',\n 'vertical-align-bottom': block.verticalAlign === 'bottom'\n }\">\n <img [src]=\"block.imageUrl\" *ngIf=\"block.imageUrl\">\n <div\n #contentEditable\n [contentEditable]=\"editable\"\n class=\"content-editable\"\n [innerHTML]=\"content\">\n </div>\n </div>\n</div>\n", styles: [".block{position:absolute;display:block;outline:none;-webkit-user-select:none;user-select:none}.block:not(.readonly){cursor:pointer}.block .content-editable{outline:none;position:relative}.block.editable .content-editable{cursor:text}.block .content{flex-direction:column;height:100%;display:flex;border:1px dashed #c5c5c5;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}: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: i7__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
912
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockComponent, decorators: [{
913
+ type: i0.Component,
914
+ args: [{
915
+ selector: 'fs-block',
916
+ templateUrl: 'block.component.html',
917
+ styleUrls: ['block.component.scss'],
918
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
919
+ }]
920
+ }], ctorParameters: function () { return [{ type: BlockEditorService }, { type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { element: [{
921
+ type: i0.ViewChild,
922
+ args: ['element', { static: true }]
923
+ }], contentElement: [{
924
+ type: i0.ViewChild,
925
+ args: ['contentElement', { static: true }]
926
+ }], contentEditable: [{
927
+ type: i0.ViewChild,
928
+ args: ['contentEditable', { static: true }]
929
+ }], block: [{
930
+ type: i0.Input
931
+ }], html: [{
932
+ type: i0.Input
933
+ }], changed: [{
934
+ type: i0.Output
935
+ }] } });
832
936
 
833
937
  var FsBlockEditorSidebarPanelDirective = /** @class */ (function () {
834
938
  function FsBlockEditorSidebarPanelDirective(templateRef) {
835
939
  this.templateRef = templateRef;
836
940
  this.show = true;
837
941
  }
838
- FsBlockEditorSidebarPanelDirective.ctorParameters = function () { return [
839
- { type: core.TemplateRef }
840
- ]; };
841
- __decorate([
842
- core.Input(),
843
- __metadata("design:type", String)
844
- ], FsBlockEditorSidebarPanelDirective.prototype, "label", void 0);
845
- __decorate([
846
- core.Input(),
847
- __metadata("design:type", Object)
848
- ], FsBlockEditorSidebarPanelDirective.prototype, "show", void 0);
849
- FsBlockEditorSidebarPanelDirective = __decorate([
850
- core.Directive({
851
- selector: '[fsBlockEditorSidebarPanel]'
852
- }),
853
- __metadata("design:paramtypes", [core.TemplateRef])
854
- ], FsBlockEditorSidebarPanelDirective);
855
942
  return FsBlockEditorSidebarPanelDirective;
856
- }());
943
+ }());
944
+ FsBlockEditorSidebarPanelDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorSidebarPanelDirective, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
945
+ FsBlockEditorSidebarPanelDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsBlockEditorSidebarPanelDirective, selector: "[fsBlockEditorSidebarPanel]", inputs: { label: "label", show: "show" }, ngImport: i0__namespace });
946
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorSidebarPanelDirective, decorators: [{
947
+ type: i0.Directive,
948
+ args: [{
949
+ selector: '[fsBlockEditorSidebarPanel]'
950
+ }]
951
+ }], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; }, propDecorators: { label: [{
952
+ type: i0.Input
953
+ }], show: [{
954
+ type: i0.Input
955
+ }] } });
857
956
 
858
957
  var FsBlockEditorMarginDirective = /** @class */ (function () {
859
958
  function FsBlockEditorMarginDirective(_elementRef) {
@@ -863,20 +962,19 @@
863
962
  get: function () {
864
963
  return this._elementRef.nativeElement;
865
964
  },
866
- enumerable: true,
965
+ enumerable: false,
867
966
  configurable: true
868
967
  });
869
- FsBlockEditorMarginDirective.ctorParameters = function () { return [
870
- { type: core.ElementRef }
871
- ]; };
872
- FsBlockEditorMarginDirective = __decorate([
873
- core.Directive({
874
- selector: '[fsBlockEditorMargin]'
875
- }),
876
- __metadata("design:paramtypes", [core.ElementRef])
877
- ], FsBlockEditorMarginDirective);
878
968
  return FsBlockEditorMarginDirective;
879
- }());
969
+ }());
970
+ FsBlockEditorMarginDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorMarginDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
971
+ FsBlockEditorMarginDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsBlockEditorMarginDirective, selector: "[fsBlockEditorMargin]", ngImport: i0__namespace });
972
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorMarginDirective, decorators: [{
973
+ type: i0.Directive,
974
+ args: [{
975
+ selector: '[fsBlockEditorMargin]'
976
+ }]
977
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; } });
880
978
 
881
979
  var SidebarComponent = /** @class */ (function () {
882
980
  function SidebarComponent(_el, _service, _cdRef) {
@@ -889,14 +987,14 @@
889
987
  get: function () {
890
988
  return this._cdRef;
891
989
  },
892
- enumerable: true,
990
+ enumerable: false,
893
991
  configurable: true
894
992
  });
895
993
  Object.defineProperty(SidebarComponent.prototype, "el", {
896
994
  get: function () {
897
995
  return this._el.nativeElement;
898
996
  },
899
- enumerable: true,
997
+ enumerable: false,
900
998
  configurable: true
901
999
  });
902
1000
  SidebarComponent.prototype.ngOnInit = function () {
@@ -1082,7 +1180,7 @@
1082
1180
  var _this = this;
1083
1181
  var width = (this.config.width * .333).toFixed(2);
1084
1182
  var height = (this.config.height * .333).toFixed(2);
1085
- var reference = common$1.guid();
1183
+ var reference = common.guid();
1086
1184
  var block = {
1087
1185
  type: 'text',
1088
1186
  reference: reference,
@@ -1097,15 +1195,10 @@
1097
1195
  .subscribe(function (block) {
1098
1196
  _this.addBlock(block);
1099
1197
  _this.changeDetector.markForCheck();
1100
- _this.blockComponents.changes
1198
+ _this.blockAdded
1101
1199
  .pipe(operators.take(1), operators.takeUntil(_this._destroy$))
1102
- .subscribe(function (queryList) {
1103
- var blockComponent = queryList.find(function (item) {
1104
- return item.block.reference === reference;
1105
- });
1106
- if (blockComponent) {
1107
- _this._service.selectedBlockComponents = [blockComponent];
1108
- }
1200
+ .subscribe(function (blockComponent) {
1201
+ _this._service.selectedBlockComponents = [blockComponent];
1109
1202
  });
1110
1203
  });
1111
1204
  }
@@ -1169,58 +1262,50 @@
1169
1262
  SidebarComponent.prototype.validNumeric = function (value) {
1170
1263
  return !value || !!String(value).match(/^\d*\.?\d*$/);
1171
1264
  };
1172
- SidebarComponent.ctorParameters = function () { return [
1173
- { type: core.ElementRef },
1174
- { type: BlockEditorService },
1175
- { type: core.ChangeDetectorRef }
1176
- ]; };
1177
- __decorate([
1178
- core.ContentChildren(FsBlockEditorSidebarPanelDirective),
1179
- __metadata("design:type", core.QueryList)
1180
- ], SidebarComponent.prototype, "sidebarPanels", void 0);
1181
- __decorate([
1182
- core.Input(),
1183
- __metadata("design:type", Object)
1184
- ], SidebarComponent.prototype, "config", void 0);
1185
- __decorate([
1186
- core.Input(),
1187
- __metadata("design:type", Object)
1188
- ], SidebarComponent.prototype, "blocks", void 0);
1189
- __decorate([
1190
- core.Input(),
1191
- __metadata("design:type", core.QueryList)
1192
- ], SidebarComponent.prototype, "blockComponents", void 0);
1193
- SidebarComponent = __decorate([
1194
- core.Component({
1195
- selector: 'sidebar',
1196
- template: "<div class=\"sidebar mat-elevation-z2\">\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Tools</div>\n <div class=\"sidebar-row\">\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"blockAddClick()\">\n <mat-icon>add</mat-icon>\n </button>\n <ng-container *ngIf=\"block\">\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"blockRemoveClick()\">\n <mat-icon>clear</mat-icon>\n </button>\n <button\n class=\"layer-up\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"layerUp()\">\n <mat-icon>arrow_back</mat-icon>\n <mat-icon>layers</mat-icon>\n </button>\n <button\n class=\"layer-down\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"layerDown()\">\n <mat-icon>arrow_back</mat-icon>\n <mat-icon>layers</mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"block\">\n <div class=\"sidebar-panel info-panel\">\n <div class=\"sidebar-label\">Info</div>\n <div class=\"sidebar-row\">\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.width\"\n name=\"width\"\n (focus)=\"inputFocus($event)\"\n (ngModelChange)=\"widthChange($event)\">\n <span matPrefix>W</span>\n </mat-form-field>\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 (ngModelChange)=\"heightChange($event)\">\n <span matPrefix>H</span>\n </mat-form-field>\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 (ngModelChange)=\"leftChange($event)\">\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 (ngModelChange)=\"topChange($event)\">\n <span matPrefix>Y</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.rotate || 0\"\n name=\"rotate\"\n (focus)=\"inputFocus($event)\"\n (ngModelChange)=\"rotateChange($event)\">\n <span matPrefix>R</span>\n </mat-form-field>\n </div>\n </div>\n <div class=\"sidebar-panel typography-panel\">\n <div class=\"sidebar-label\">Typography</div>\n <div class=\"sidebar-row\">\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 (ngModelChange)=\"fontSizeChange($event)\"\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 (ngModelChange)=\"lineHeightChange($event)\"\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 === '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 (ngModelChange)=\"borderWidthChange($event)\"\n placeholder=\"Width\">\n <span matPrefix *ngIf=\"block.borderWidth\">W</span>\n </mat-form-field>\n </div>\n </div>\n\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 (ngModelChange)=\"shapeRadiusChange($event)\"\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\">\n <div class=\"sidebar-label\">Image</div>\n <div class=\"sidebar-row image-row\">\n <fs-file (select)=\"fileSelect($event)\">\n <button type=\"button\" mat-icon-button><mat-icon>cloud_upload</mat-icon></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 </ng-container>\n </div>\n </div>\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 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 (ngModelChange)=\"paddingChange('paddingTop',$event)\"\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 (ngModelChange)=\"paddingChange('paddingBottom',$event)\"\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 (ngModelChange)=\"paddingChange('paddingLeft',$event)\"\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 (ngModelChange)=\"paddingChange('paddingRight',$event)\"\n placeholder=\"Right\">\n <span matPrefix *ngIf=\"block.paddingRight\">R</span>\n </mat-form-field>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngFor=\"let sidebarPanel of sidebarPanels\">\n <div div class=\"sidebar-panel\" *ngIf=\"sidebarPanel.show\">\n <div class=\"sidebar-label\">{{sidebarPanel.label}}</div>\n <ng-container\n [ngTemplateOutlet]=\"sidebarPanel.templateRef\"\n [ngTemplateOutletContext]=\"{ block: block }\"></ng-container>\n </div>\n </ng-container>\n</div>\n",
1197
- changeDetection: core.ChangeDetectionStrategy.OnPush,
1198
- styles: [".sidebar{width:285px;font-size:14px;height:100%}.sidebar .sidebar-row{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}.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 ::ng-deep .field-label,.sidebar .sidebar-row ::ng-deep .mat-form-field-prefix{color:#a5a5a5;font-size:11px;margin-right:2px}.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-down ::ng-deep .mat-button-wrapper,.sidebar .layer-up ::ng-deep .mat-button-wrapper{position:relative}.sidebar .layer-down ::ng-deep .mat-button-wrapper mat-icon:first-child,.sidebar .layer-up ::ng-deep .mat-button-wrapper mat-icon:first-child{position:absolute;transform:rotate(90deg) scale(.6);top:-6px;color:#fff}.sidebar .layer-down mat-icon:first-child{transform:rotate(270deg) scale(.6)}.sidebar .border-width,.sidebar .font-size,.sidebar .line-height,.sidebar .padding{width:45px}.sidebar .shape-radius{width:50px}.sidebar .shape-corners{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;-moz-column-gap:1px;column-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;border-bottom:1px solid #dadada}.sidebar .sidebar-panel.info-panel .sidebar-row{justify-content:space-evenly}.sidebar .sidebar-panel.info-panel .sidebar-row .mat-form-field{width:41px}.sidebar .sidebar-panel.info-panel .sidebar-row>{margin:0}.sidebar .sidebar-panel.typography-panel .style-row{margin-bottom:-10px}.sidebar .sidebar-panel.typography-panel .align-row{margin-bottom:-5px}.sidebar .sidebar-panel .sidebar-label{font-size:11px;margin-bottom:3px;color:#9e9e9e}"]
1199
- }),
1200
- __metadata("design:paramtypes", [core.ElementRef,
1201
- BlockEditorService,
1202
- core.ChangeDetectorRef])
1203
- ], SidebarComponent);
1204
1265
  return SidebarComponent;
1205
- }());
1266
+ }());
1267
+ 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 }], target: i0__namespace.ɵɵFactoryTarget.Component });
1268
+ SidebarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SidebarComponent, selector: "sidebar", inputs: { config: "config", blocks: "blocks", blockAdded: "blockAdded" }, queries: [{ propertyName: "sidebarPanels", predicate: FsBlockEditorSidebarPanelDirective }], ngImport: i0__namespace, template: "<div class=\"sidebar mat-elevation-z2\">\n <div class=\"sidebar-panel\">\n <div class=\"sidebar-label\">Tools</div>\n <div class=\"sidebar-row\">\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"blockAddClick()\">\n <mat-icon>add</mat-icon>\n </button>\n <ng-container *ngIf=\"block\">\n <button\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"blockRemoveClick()\">\n <mat-icon>clear</mat-icon>\n </button>\n <button\n class=\"layer-up\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"layerUp()\">\n <mat-icon>arrow_back</mat-icon>\n <mat-icon>layers</mat-icon>\n </button>\n <button\n class=\"layer-down\"\n mat-icon-button\n color=\"basic\"\n type=\"button\"\n (click)=\"layerDown()\">\n <mat-icon>arrow_back</mat-icon>\n <mat-icon>layers</mat-icon>\n </button>\n </ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"block\">\n <div class=\"sidebar-panel info-panel\">\n <div class=\"sidebar-label\">Info</div>\n <div class=\"sidebar-row\">\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.width\"\n name=\"width\"\n (focus)=\"inputFocus($event)\"\n (ngModelChange)=\"widthChange($event)\">\n <span matPrefix>W</span>\n </mat-form-field>\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 (ngModelChange)=\"heightChange($event)\">\n <span matPrefix>H</span>\n </mat-form-field>\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 (ngModelChange)=\"leftChange($event)\">\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 (ngModelChange)=\"topChange($event)\">\n <span matPrefix>Y</span>\n </mat-form-field>\n <mat-form-field class=\"form-field-padless\" floatLabel=\"never\">\n <input\n matInput\n [ngModel]=\"block.rotate || 0\"\n name=\"rotate\"\n (focus)=\"inputFocus($event)\"\n (ngModelChange)=\"rotateChange($event)\">\n <span matPrefix>R</span>\n </mat-form-field>\n </div>\n </div>\n <div class=\"sidebar-panel typography-panel\">\n <div class=\"sidebar-label\">Typography</div>\n <div class=\"sidebar-row\">\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 (ngModelChange)=\"fontSizeChange($event)\"\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 (ngModelChange)=\"lineHeightChange($event)\"\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 === '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 (ngModelChange)=\"borderWidthChange($event)\"\n placeholder=\"Width\">\n <span matPrefix *ngIf=\"block.borderWidth\">W</span>\n </mat-form-field>\n </div>\n </div>\n\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 (ngModelChange)=\"shapeRadiusChange($event)\"\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\">\n <div class=\"sidebar-label\">Image</div>\n <div class=\"sidebar-row image-row\">\n <fs-file (select)=\"fileSelect($event)\">\n <button type=\"button\" mat-icon-button><mat-icon>cloud_upload</mat-icon></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 </ng-container>\n </div>\n </div>\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 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 (ngModelChange)=\"paddingChange('paddingTop',$event)\"\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 (ngModelChange)=\"paddingChange('paddingBottom',$event)\"\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 (ngModelChange)=\"paddingChange('paddingLeft',$event)\"\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 (ngModelChange)=\"paddingChange('paddingRight',$event)\"\n placeholder=\"Right\">\n <span matPrefix *ngIf=\"block.paddingRight\">R</span>\n </mat-form-field>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngFor=\"let sidebarPanel of sidebarPanels\">\n <div div class=\"sidebar-panel\" *ngIf=\"sidebarPanel.show\">\n <div class=\"sidebar-label\">{{sidebarPanel.label}}</div>\n <ng-container\n [ngTemplateOutlet]=\"sidebarPanel.templateRef\"\n [ngTemplateOutletContext]=\"{ block: block }\"></ng-container>\n </div>\n </ng-container>\n</div>\n", styles: [".sidebar{width:285px;font-size:14px;height:100%}.sidebar .sidebar-row{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}.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 ::ng-deep .mat-form-field-prefix,.sidebar .sidebar-row ::ng-deep .field-label{color:#a5a5a5;font-size:11px;margin-right:2px}.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(.6);top:-6px;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;border-bottom:1px solid #dadada}.sidebar .sidebar-panel.info-panel .sidebar-row{justify-content:space-evenly}.sidebar .sidebar-panel.info-panel .sidebar-row .mat-form-field{width:41px}.sidebar .sidebar-panel.info-panel .sidebar-row >{margin:0}.sidebar .sidebar-panel.typography-panel .style-row{margin-bottom:-10px}.sidebar .sidebar-panel.typography-panel .align-row{margin-bottom:-5px}.sidebar .sidebar-panel .sidebar-label{font-size:11px;margin-bottom:3px;color:#9e9e9e}\n"], components: [{ type: i2__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: i4__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace.FsColorPickerChipComponent, selector: "fs-color-picker-chip", inputs: ["color"], outputs: ["changed"] }, { type: i6__namespace.FsFileComponent, selector: "fs-file", inputs: ["minHeight", "minWidth", "multiple", "capture", "allowClick", "allowDrop", "accept", "disabled", "imageWidth", "imageHeight", "imageQuality"], outputs: ["select", "error", "clicked", "declined"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__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: i9__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: i9__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i4__namespace.MatPrefix, selector: "[matPrefix]" }, { type: i7__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1269
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SidebarComponent, decorators: [{
1270
+ type: i0.Component,
1271
+ args: [{
1272
+ selector: 'sidebar',
1273
+ templateUrl: 'sidebar.component.html',
1274
+ styleUrls: ['sidebar.component.scss'],
1275
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1276
+ }]
1277
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: BlockEditorService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { sidebarPanels: [{
1278
+ type: i0.ContentChildren,
1279
+ args: [FsBlockEditorSidebarPanelDirective]
1280
+ }], config: [{
1281
+ type: i0.Input
1282
+ }], blocks: [{
1283
+ type: i0.Input
1284
+ }], blockAdded: [{
1285
+ type: i0.Input
1286
+ }] } });
1206
1287
 
1207
1288
  var FsBlockEditorComponent = /** @class */ (function () {
1208
- function FsBlockEditorComponent(_el, _service, _cdRef) {
1289
+ function FsBlockEditorComponent(_el, _service, _cdRef, _differs) {
1209
1290
  this._el = _el;
1210
1291
  this._service = _service;
1211
1292
  this._cdRef = _cdRef;
1293
+ this._differs = _differs;
1294
+ this.blockAdded = new i0.EventEmitter();
1295
+ this.blockRemoved = new i0.EventEmitter();
1212
1296
  this._destroy$ = new rxjs.Subject();
1297
+ this._differ = _differs.find([]).create(null);
1213
1298
  }
1214
1299
  Object.defineProperty(FsBlockEditorComponent.prototype, "el", {
1215
1300
  get: function () {
1216
1301
  return this._el.nativeElement;
1217
1302
  },
1218
- enumerable: true,
1303
+ enumerable: false,
1219
1304
  configurable: true
1220
1305
  });
1221
1306
  FsBlockEditorComponent.prototype.ngOnInit = function () {
1222
1307
  var _this = this;
1223
- this.config = __assign(__assign({}, this.config), { unit: 'in' });
1308
+ this.config = Object.assign(Object.assign({}, this.config), { unit: 'in' });
1224
1309
  this._service.registerContainer(this.artboard.nativeElement);
1225
1310
  this._service.registerMargin(this.marginContainer.nativeElement);
1226
1311
  this._service.blocks = this.config.blocks;
@@ -1272,114 +1357,146 @@
1272
1357
  }
1273
1358
  };
1274
1359
  FsBlockEditorComponent.prototype.ngAfterViewInit = function () {
1360
+ var _this = this;
1361
+ this.blockComponents.changes.subscribe(function (changes) {
1362
+ var changeDiff = _this._differ.diff(changes);
1363
+ if (changeDiff) {
1364
+ changeDiff.forEachAddedItem(function (change) {
1365
+ _this.blockAdded.emit(change.item);
1366
+ });
1367
+ changeDiff.forEachRemovedItem(function (change) {
1368
+ _this.blockRemoved.emit(change.item);
1369
+ });
1370
+ }
1371
+ });
1275
1372
  };
1276
1373
  FsBlockEditorComponent.prototype.ngOnDestroy = function () {
1277
1374
  this._destroy$.next();
1278
1375
  this._destroy$.complete();
1279
1376
  };
1280
- FsBlockEditorComponent.ctorParameters = function () { return [
1281
- { type: core.ElementRef },
1282
- { type: BlockEditorService },
1283
- { type: core.ChangeDetectorRef }
1284
- ]; };
1285
- __decorate([
1286
- core.ContentChildren(FsBlockEditorSidebarPanelDirective),
1287
- __metadata("design:type", core.QueryList)
1288
- ], FsBlockEditorComponent.prototype, "sidebarPanels", void 0);
1289
- __decorate([
1290
- core.ViewChildren(FsBlockComponent),
1291
- __metadata("design:type", core.QueryList)
1292
- ], FsBlockEditorComponent.prototype, "blockComponents", void 0);
1293
- __decorate([
1294
- core.ViewChild('artboard', { static: true }),
1295
- __metadata("design:type", core.ElementRef)
1296
- ], FsBlockEditorComponent.prototype, "artboard", void 0);
1297
- __decorate([
1298
- core.ViewChild('marginContainer', { static: true }),
1299
- __metadata("design:type", core.ElementRef)
1300
- ], FsBlockEditorComponent.prototype, "marginContainer", void 0);
1301
- __decorate([
1302
- core.ViewChildren(FsBlockEditorMarginDirective),
1303
- __metadata("design:type", core.QueryList)
1304
- ], FsBlockEditorComponent.prototype, "margins", void 0);
1305
- __decorate([
1306
- core.ViewChild('artboardContainer', { static: true }),
1307
- __metadata("design:type", core.ElementRef)
1308
- ], FsBlockEditorComponent.prototype, "artboardContainer", void 0);
1309
- __decorate([
1310
- core.ViewChild(SidebarComponent, { static: true }),
1311
- __metadata("design:type", SidebarComponent)
1312
- ], FsBlockEditorComponent.prototype, "sidebar", void 0);
1313
- __decorate([
1314
- core.Input(),
1315
- __metadata("design:type", Object)
1316
- ], FsBlockEditorComponent.prototype, "config", void 0);
1317
- FsBlockEditorComponent = __decorate([
1318
- core.Component({
1319
- selector: 'fs-block-editor',
1320
- template: "<div class=\"editor-container\">\n <div\n #artboardContainer\n class=\"artboard-container\"\n (click)=\"artboardClick($event)\">\n <div\n #artboard\n class=\"artboard mat-elevation-z2\"\n [style.width]=\"config.width + config.unit\"\n [style.height]=\"config.height + config.unit\">\n <fs-block\n *ngFor=\"let block of blocks; trackBy\"\n [block]=\"block\"\n (changed)=\"blockChanged($event)\">\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'\"></div>\n </div>\n </div>\n <sidebar\n [config]=\"config\"\n [blocks]=\"blocks\"\n [blockComponents]=\"blockComponents\">\n </sidebar>\n</div>\n",
1321
- changeDetection: core.ChangeDetectionStrategy.OnPush,
1322
- providers: [
1323
- BlockEditorService,
1324
- ],
1325
- styles: [".editor-container{display:flex;flex-direction:row;position:relative}.editor-container .artboard-container{display:flex;flex-grow:1;justify-content:center;padding:25px;overflow:auto;min-width:0}.editor-container .artboard-container .artboard{position:relative}.editor-container .artboard-container .artboard .margin-container{position:absolute;z-index:-1}.editor-container .artboard-container .artboard .margin{position:absolute;border:0 dashed #ff85bd5e}.editor-container .artboard-container .artboard .margin.margin-bottom,.editor-container .artboard-container .artboard .margin.margin-top{width:100%;border-top-width:1px}.editor-container .artboard-container .artboard .margin.margin-left,.editor-container .artboard-container .artboard .margin.margin-right{height:100%;border-left-width:1px}"]
1326
- }),
1327
- __metadata("design:paramtypes", [core.ElementRef,
1328
- BlockEditorService,
1329
- core.ChangeDetectorRef])
1330
- ], FsBlockEditorComponent);
1331
1377
  return FsBlockEditorComponent;
1332
- }());
1378
+ }());
1379
+ FsBlockEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorComponent, deps: [{ token: i0__namespace.ElementRef }, { token: BlockEditorService }, { token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.IterableDiffers }], target: i0__namespace.ɵɵFactoryTarget.Component });
1380
+ FsBlockEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsBlockEditorComponent, selector: "fs-block-editor", inputs: { config: "config" }, outputs: { blockAdded: "blockAdded", blockRemoved: "blockRemoved" }, providers: [
1381
+ BlockEditorService,
1382
+ ], 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: "artboardContainer", first: true, predicate: ["artboardContainer"], 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 class=\"editor-container\">\n <div\n #artboardContainer\n class=\"artboard-container\"\n (click)=\"artboardClick($event)\">\n <div\n #artboard\n class=\"artboard mat-elevation-z2\"\n [style.width]=\"config.width + config.unit\"\n [style.height]=\"config.height + config.unit\">\n <fs-block\n *ngFor=\"let block of blocks; trackBy\"\n [block]=\"block\"\n (changed)=\"blockChanged($event)\">\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'\"></div>\n </div>\n </div>\n <sidebar\n [config]=\"config\"\n [blocks]=\"blocks\"\n [blockAdded]=\"blockAdded\">\n </sidebar>\n</div>\n", styles: [".editor-container{display:flex;flex-direction:row;position:relative}.editor-container .artboard-container{display:flex;flex-grow:1;justify-content:center;padding:25px;overflow:auto;min-width:0}.editor-container .artboard-container .artboard{position:relative}.editor-container .artboard-container .artboard .margin-container{position:absolute;z-index:-1}.editor-container .artboard-container .artboard .margin{position:absolute;border-color:#ff85bd5e;border-style:dashed;border-width:0px}.editor-container .artboard-container .artboard .margin.margin-top,.editor-container .artboard-container .artboard .margin.margin-bottom{width:100%;border-top-width:1px}.editor-container .artboard-container .artboard .margin.margin-left,.editor-container .artboard-container .artboard .margin.margin-right{height:100%;border-left-width:1px}\n"], components: [{ type: FsBlockComponent, selector: "fs-block", inputs: ["block", "html"], outputs: ["changed"] }, { type: SidebarComponent, selector: "sidebar", inputs: ["config", "blocks", "blockAdded"] }], directives: [{ type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1383
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorComponent, decorators: [{
1384
+ type: i0.Component,
1385
+ args: [{
1386
+ selector: 'fs-block-editor',
1387
+ templateUrl: 'block-editor.component.html',
1388
+ styleUrls: ['block-editor.component.scss'],
1389
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1390
+ providers: [
1391
+ BlockEditorService,
1392
+ ]
1393
+ }]
1394
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: BlockEditorService }, { type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.IterableDiffers }]; }, propDecorators: { sidebarPanels: [{
1395
+ type: i0.ContentChildren,
1396
+ args: [FsBlockEditorSidebarPanelDirective]
1397
+ }], blockComponents: [{
1398
+ type: i0.ViewChildren,
1399
+ args: [FsBlockComponent]
1400
+ }], artboard: [{
1401
+ type: i0.ViewChild,
1402
+ args: ['artboard', { static: true }]
1403
+ }], marginContainer: [{
1404
+ type: i0.ViewChild,
1405
+ args: ['marginContainer', { static: true }]
1406
+ }], margins: [{
1407
+ type: i0.ViewChildren,
1408
+ args: [FsBlockEditorMarginDirective]
1409
+ }], artboardContainer: [{
1410
+ type: i0.ViewChild,
1411
+ args: ['artboardContainer', { static: true }]
1412
+ }], sidebar: [{
1413
+ type: i0.ViewChild,
1414
+ args: [SidebarComponent, { static: true }]
1415
+ }], config: [{
1416
+ type: i0.Input
1417
+ }], blockAdded: [{
1418
+ type: i0.Output
1419
+ }], blockRemoved: [{
1420
+ type: i0.Output
1421
+ }] } });
1333
1422
 
1334
1423
  var FsBlockEditorModule = /** @class */ (function () {
1335
1424
  function FsBlockEditorModule() {
1336
1425
  }
1337
- FsBlockEditorModule_1 = FsBlockEditorModule;
1338
1426
  FsBlockEditorModule.forRoot = function () {
1339
1427
  return {
1340
- ngModule: FsBlockEditorModule_1,
1428
+ ngModule: FsBlockEditorModule,
1341
1429
  };
1342
1430
  };
1343
- var FsBlockEditorModule_1;
1344
- FsBlockEditorModule = FsBlockEditorModule_1 = __decorate([
1345
- core.NgModule({
1346
- imports: [
1347
- common.CommonModule,
1348
- forms.FormsModule,
1349
- icon.MatIconModule,
1350
- button.MatButtonModule,
1351
- input.MatInputModule,
1352
- formField.MatFormFieldModule,
1353
- htmlEditor.FsHtmlEditorModule,
1354
- file.FsFileModule,
1355
- colorpicker.FsColorPickerModule,
1356
- ],
1357
- exports: [
1358
- FsBlockComponent,
1359
- FsBlockEditorComponent,
1360
- FsBlockEditorSidebarPanelDirective,
1361
- ],
1362
- declarations: [
1363
- FsBlockComponent,
1364
- FsBlockEditorComponent,
1365
- FsBlockEditorSidebarPanelDirective,
1366
- FsBlockEditorMarginDirective,
1367
- SidebarComponent,
1368
- ],
1369
- })
1370
- ], FsBlockEditorModule);
1371
1431
  return FsBlockEditorModule;
1372
- }());
1432
+ }());
1433
+ FsBlockEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1434
+ FsBlockEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorModule, declarations: [FsBlockComponent,
1435
+ FsBlockEditorComponent,
1436
+ FsBlockEditorSidebarPanelDirective,
1437
+ FsBlockEditorMarginDirective,
1438
+ SidebarComponent], imports: [i7.CommonModule,
1439
+ i9.FormsModule,
1440
+ i3.MatIconModule,
1441
+ i2.MatButtonModule,
1442
+ i8.MatInputModule,
1443
+ i4.MatFormFieldModule,
1444
+ i6.FsFileModule,
1445
+ i5.FsColorPickerModule], exports: [FsBlockComponent,
1446
+ FsBlockEditorComponent,
1447
+ FsBlockEditorSidebarPanelDirective] });
1448
+ FsBlockEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorModule, imports: [[
1449
+ i7.CommonModule,
1450
+ i9.FormsModule,
1451
+ i3.MatIconModule,
1452
+ i2.MatButtonModule,
1453
+ i8.MatInputModule,
1454
+ i4.MatFormFieldModule,
1455
+ i6.FsFileModule,
1456
+ i5.FsColorPickerModule,
1457
+ ]] });
1458
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsBlockEditorModule, decorators: [{
1459
+ type: i0.NgModule,
1460
+ args: [{
1461
+ imports: [
1462
+ i7.CommonModule,
1463
+ i9.FormsModule,
1464
+ i3.MatIconModule,
1465
+ i2.MatButtonModule,
1466
+ i8.MatInputModule,
1467
+ i4.MatFormFieldModule,
1468
+ i6.FsFileModule,
1469
+ i5.FsColorPickerModule,
1470
+ ],
1471
+ exports: [
1472
+ FsBlockComponent,
1473
+ FsBlockEditorComponent,
1474
+ FsBlockEditorSidebarPanelDirective,
1475
+ ],
1476
+ declarations: [
1477
+ FsBlockComponent,
1478
+ FsBlockEditorComponent,
1479
+ FsBlockEditorSidebarPanelDirective,
1480
+ FsBlockEditorMarginDirective,
1481
+ SidebarComponent,
1482
+ ],
1483
+ }]
1484
+ }] });
1485
+
1486
+ /*
1487
+ * Public API Surface of fs-menu
1488
+ */
1489
+
1490
+ /**
1491
+ * Generated bundle index. Do not edit.
1492
+ */
1373
1493
 
1374
1494
  exports.FsBlockComponent = FsBlockComponent;
1375
1495
  exports.FsBlockEditorComponent = FsBlockEditorComponent;
1376
1496
  exports.FsBlockEditorModule = FsBlockEditorModule;
1377
1497
  exports.FsBlockEditorSidebarPanelDirective = FsBlockEditorSidebarPanelDirective;
1378
- exports.ɵa = BlockEditorService;
1379
- exports.ɵb = FsBlockEditorMarginDirective;
1380
- exports.ɵc = SidebarComponent;
1381
1498
 
1382
1499
  Object.defineProperty(exports, '__esModule', { value: true });
1383
1500
 
1384
- })));
1501
+ }));
1385
1502
  //# sourceMappingURL=firestitch-block-editor.umd.js.map