@acorex/layout 6.5.70 → 6.5.72

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/README.md +7 -2
  2. package/esm2022/acorex-layout.mjs +5 -0
  3. package/esm2022/index.mjs +7 -0
  4. package/esm2022/lib/widget-board/editors/widget-size-editor/widget-size.editor.mjs +49 -0
  5. package/esm2022/lib/widget-board/editors/widget-size-editor/widget-size.module.mjs +21 -0
  6. package/esm2022/lib/widget-board/widget-board.component.mjs +452 -0
  7. package/esm2022/lib/widget-board/widget-board.module.mjs +109 -0
  8. package/esm2022/lib/widget-board/widget-config.component.mjs +85 -0
  9. package/esm2022/lib/widget-board/widget-host.component.mjs +311 -0
  10. package/esm2022/lib/widget-board/widget-save.component.mjs +79 -0
  11. package/esm2022/lib/widget-board/widget.class.mjs +130 -0
  12. package/{fesm2020 → fesm2022}/acorex-layout.mjs +158 -127
  13. package/fesm2022/acorex-layout.mjs.map +1 -0
  14. package/lib/widget-board/editors/widget-size-editor/widget-size.editor.d.ts +1 -1
  15. package/lib/widget-board/widget-board.component.d.ts +1 -1
  16. package/lib/widget-board/widget-config.component.d.ts +1 -1
  17. package/lib/widget-board/widget-host.component.d.ts +1 -1
  18. package/lib/widget-board/widget-save.component.d.ts +1 -1
  19. package/package.json +12 -18
  20. package/acorex-layout.d.ts +0 -5
  21. package/esm2020/acorex-layout.mjs +0 -5
  22. package/esm2020/lib/widget-board/editors/widget-size-editor/widget-size.editor.mjs +0 -46
  23. package/esm2020/lib/widget-board/editors/widget-size-editor/widget-size.module.mjs +0 -21
  24. package/esm2020/lib/widget-board/widget-board.component.mjs +0 -444
  25. package/esm2020/lib/widget-board/widget-board.module.mjs +0 -111
  26. package/esm2020/lib/widget-board/widget-config.component.mjs +0 -82
  27. package/esm2020/lib/widget-board/widget-host.component.mjs +0 -295
  28. package/esm2020/lib/widget-board/widget-save.component.mjs +0 -79
  29. package/esm2020/lib/widget-board/widget.class.mjs +0 -127
  30. package/esm2020/public-api.mjs +0 -7
  31. package/fesm2015/acorex-layout.mjs +0 -1175
  32. package/fesm2015/acorex-layout.mjs.map +0 -1
  33. package/fesm2020/acorex-layout.mjs.map +0 -1
  34. /package/{public-api.d.ts → index.d.ts} +0 -0
@@ -0,0 +1,452 @@
1
+ import { Component, Input, ViewEncapsulation, ElementRef, ViewChild, NgZone, ChangeDetectionStrategy, ChangeDetectorRef, Output, EventEmitter, ViewChildren, QueryList } from '@angular/core';
2
+ import { AXWidgetHostComponent } from './widget-host.component';
3
+ import { AXHtmlUtil, AXClientRec } from '@acorex/core';
4
+ import { Subject } from 'rxjs';
5
+ import { debounceTime } from 'rxjs/operators';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@angular/common";
8
+ import * as i2 from "./widget-host.component";
9
+ export class AXWidgetBoardComponent {
10
+ ref;
11
+ zone;
12
+ cdr;
13
+ container;
14
+ widgetHosts;
15
+ widgets = [];
16
+ galleryItems = [];
17
+ tileSize = 80;
18
+ gapSize = 5;
19
+ readonly = false;
20
+ newWidget = null;
21
+ rtl;
22
+ _isInEditing = false;
23
+ isInEditing() {
24
+ return this._isInEditing;
25
+ }
26
+ isDragging = false;
27
+ dragItem;
28
+ saveSubject = new Subject();
29
+ provideValue;
30
+ DATA_COL = 'data-col';
31
+ DATA_ROW = 'data-row';
32
+ DATA_SIZE_X = 'data-size-x';
33
+ DATA_SIZE_Y = 'data-size-y';
34
+ DATA_OLD_COL = 'data-old-col';
35
+ DATA_OLD_ROW = 'data-old-row';
36
+ onConfigChanged = new EventEmitter();
37
+ onWidgetSave = new EventEmitter();
38
+ constructor(ref, zone, cdr) {
39
+ this.ref = ref;
40
+ this.zone = zone;
41
+ this.cdr = cdr;
42
+ }
43
+ ngOnInit() {
44
+ if (this.rtl == null) {
45
+ this.rtl = window.getComputedStyle(this.ref.nativeElement, null).getPropertyValue('direction') === 'rtl';
46
+ }
47
+ this.saveSubject.pipe(debounceTime(750)).subscribe((value) => {
48
+ this.emitConfigChanged(value);
49
+ });
50
+ }
51
+ ngOnDestroy() {
52
+ this.saveSubject?.unsubscribe();
53
+ }
54
+ ngAfterViewInit() {
55
+ this.zone.runOutsideAngular((c) => {
56
+ const style = document.createElement('style');
57
+ style.type = 'text/css';
58
+ this.ref.nativeElement.appendChild(style);
59
+ // add css data classes
60
+ for (let i = 1; i <= 50; i++) {
61
+ style.innerHTML += `[${this.DATA_COL}="${i}"] { ${this.rtl ? 'right' : 'left'}: ${(i - 1) * (this.tileSize + this.gapSize)}px; }`;
62
+ style.innerHTML += `[${this.DATA_ROW}="${i}"] { top: ${(i - 1) * (this.tileSize + this.gapSize)}px; }`;
63
+ style.innerHTML += `[${this.DATA_SIZE_X}="${i}"] { width: ${(i * this.tileSize) + ((i - 1) * this.gapSize)}px; }`;
64
+ style.innerHTML += `[${this.DATA_SIZE_Y}="${i}"] { height: ${(i * this.tileSize) + ((i - 1) * this.gapSize)}px; }`;
65
+ }
66
+ });
67
+ }
68
+ calcGridSize() {
69
+ this.zone.runOutsideAngular(() => {
70
+ const width = (Math.max(...this.widgets.map((c) => c.col + c.sizeX - 1))) * (this.tileSize + this.gapSize);
71
+ const height = (Math.max(...this.widgets.map((c) => c.row + c.sizeY - 1))) * (this.tileSize + this.gapSize);
72
+ this.container.nativeElement.style.width = width + 'px';
73
+ this.container.nativeElement.style.height = height + 'px';
74
+ });
75
+ }
76
+ toggleEdit() {
77
+ this._isInEditing ? this.finishEdit() : this.startEdit();
78
+ }
79
+ dragStart(e) {
80
+ e.preventDefault();
81
+ e.stopPropagation();
82
+ this.zone.runOutsideAngular(() => {
83
+ if (this._isInEditing && e.which === 1) {
84
+ this.dragItem = e.currentTarget;
85
+ this.dragItem.setAttribute('data-x-offset', (this.dragItem.offsetLeft - e.clientX).toString());
86
+ //
87
+ this.dragItem.setAttribute('data-y-offset', (this.dragItem.offsetTop - e.clientY).toString());
88
+ this.dragItem.classList.add('widget-dragging');
89
+ this.dragItem.classList.remove('animate__animated', 'animate__pulse');
90
+ }
91
+ });
92
+ return false;
93
+ }
94
+ removePositionData() {
95
+ this.zone.runOutsideAngular(() => {
96
+ if (this.dragItem && this._isInEditing && this.dragItem.getAttribute(this.DATA_OLD_COL) == null) {
97
+ this.dragItem.setAttribute(this.DATA_OLD_COL, this.dragItem.getAttribute(this.DATA_COL));
98
+ this.dragItem.setAttribute(this.DATA_OLD_ROW, this.dragItem.getAttribute(this.DATA_ROW));
99
+ this.dragItem.removeAttribute(this.DATA_COL);
100
+ this.dragItem.removeAttribute(this.DATA_ROW);
101
+ }
102
+ });
103
+ }
104
+ resetPositionData() {
105
+ this.zone.runOutsideAngular(() => {
106
+ if (this.dragItem && this._isInEditing) {
107
+ this.setPosition(this.dragItem, this.dragItem.getAttribute(this.DATA_OLD_COL), this.dragItem.getAttribute(this.DATA_OLD_ROW));
108
+ }
109
+ });
110
+ }
111
+ setPosition(element, col, row) {
112
+ this.zone.runOutsideAngular(() => {
113
+ element.setAttribute(this.DATA_COL, col);
114
+ element.setAttribute(this.DATA_ROW, row);
115
+ element.removeAttribute(this.DATA_OLD_COL);
116
+ element.removeAttribute(this.DATA_OLD_ROW);
117
+ element.style.removeProperty('top');
118
+ element.style.removeProperty('left');
119
+ const widget = this.widgets.find(c => c['__meta__'].instance.element === element);
120
+ widget.col = Number(col);
121
+ widget.row = Number(row);
122
+ });
123
+ }
124
+ drag(e) {
125
+ e.preventDefault();
126
+ e.stopPropagation();
127
+ this.zone.runOutsideAngular(() => {
128
+ if (this.dragItem && this._isInEditing) {
129
+ this.isDragging = true;
130
+ this.addPlaceholder();
131
+ const xOffset = Number(this.dragItem.getAttribute('data-x-offset'));
132
+ const yOffset = Number(this.dragItem.getAttribute('data-y-offset'));
133
+ this.dragItem.style.left = e.clientX + xOffset + 'px';
134
+ this.dragItem.style.top = e.clientY + yOffset + 'px';
135
+ //
136
+ this.detectBestPlacement();
137
+ this.removePositionData();
138
+ }
139
+ });
140
+ return false;
141
+ }
142
+ dragEnd(e) {
143
+ this.zone.runOutsideAngular(() => {
144
+ if (this.dragItem && this._isInEditing && this.isDragging) {
145
+ this.dragItem.classList.remove('widget-dragging');
146
+ this.dragItem.classList.add('animate__animated', 'animate__pulse');
147
+ //
148
+ const p = this.container.nativeElement.querySelector('.widget-blank-placeholder');
149
+ if (this.newWidget) {
150
+ const w = {
151
+ uniqueName: this.newWidget.uniqueName,
152
+ component: this.newWidget.component,
153
+ title: this.newWidget.title,
154
+ options: this.newWidget.options,
155
+ sizeX: this.newWidget.sizeX,
156
+ sizeY: this.newWidget.sizeY,
157
+ col: Number(p.getAttribute(this.DATA_COL)),
158
+ row: Number(p.getAttribute(this.DATA_ROW))
159
+ };
160
+ this.widgets.push(w);
161
+ this.newWidget = null;
162
+ this.container.nativeElement.removeChild(this.dragItem);
163
+ this.zone.run(() => {
164
+ this.cdr.detectChanges();
165
+ this.calcGridSize();
166
+ setTimeout(() => {
167
+ w['__meta__'].instance.element.addEventListener('mousedown', this.dragStart.bind(this), false);
168
+ }, 1000);
169
+ });
170
+ }
171
+ else {
172
+ if (p) {
173
+ this.setPosition(this.dragItem, p.getAttribute(this.DATA_COL), p.getAttribute(this.DATA_ROW));
174
+ }
175
+ else {
176
+ this.setPosition(this.dragItem, this.dragItem.getAttribute(this.DATA_OLD_COL), this.dragItem.getAttribute(this.DATA_OLD_ROW));
177
+ }
178
+ }
179
+ //
180
+ this.removePlaceholder();
181
+ this.dragItem = null;
182
+ this.calcGridSize();
183
+ this.saveSubject.next('config');
184
+ }
185
+ this.isDragging = false;
186
+ });
187
+ }
188
+ detectFirstEmptySlot(w) {
189
+ const xTile = Math.floor(this.ref.nativeElement.parentElement.offsetWidth / this.tileSize);
190
+ for (let j = 1; j <= 100; j++) {
191
+ for (let i = 1; i <= xTile - w.sizeX; i++) {
192
+ const rec = new AXClientRec({
193
+ left: i,
194
+ top: j,
195
+ width: w.sizeX,
196
+ height: w.sizeY
197
+ });
198
+ const el = this.widgets.filter(c => c !== w).find((c) => rec.intersect({
199
+ left: c.col,
200
+ top: c.row,
201
+ width: c.sizeX,
202
+ height: c.sizeY
203
+ }));
204
+ if (el == null) {
205
+ w.col = i;
206
+ w.row = j;
207
+ return;
208
+ }
209
+ }
210
+ }
211
+ }
212
+ detectBestPlacement() {
213
+ this.zone.runOutsideAngular(() => {
214
+ const p = this.container.nativeElement.querySelector('.widget-blank-placeholder');
215
+ let col = Math.ceil(this.dragItem.offsetLeft / this.tileSize);
216
+ if (this.rtl) {
217
+ col = Math.ceil((this.container.nativeElement.clientWidth - (this.dragItem.offsetLeft + this.dragItem.clientWidth)) / this.tileSize);
218
+ }
219
+ let row = Math.ceil(this.dragItem.offsetTop / this.tileSize);
220
+ if (col < 1) {
221
+ col = 1;
222
+ }
223
+ if (row < 1) {
224
+ row = 1;
225
+ }
226
+ const widgets = Array.from(this.ref.nativeElement.querySelectorAll('.widget-host')).map((c) => c);
227
+ p.setAttribute(this.DATA_COL, col.toString());
228
+ p.setAttribute(this.DATA_ROW, row.toString());
229
+ const collision = widgets.filter(c => c !== this.dragItem).some(c => AXHtmlUtil.collision(c, this.dragItem));
230
+ if (collision) {
231
+ this.removePlaceholder();
232
+ }
233
+ });
234
+ }
235
+ addPlaceholder() {
236
+ this.zone.runOutsideAngular(() => {
237
+ this.removePlaceholder();
238
+ if (this.dragItem) {
239
+ const p = document.createElement('div');
240
+ p.classList.add('widget-blank-placeholder');
241
+ p.setAttribute(this.DATA_COL, this.dragItem.getAttribute(this.DATA_COL));
242
+ p.setAttribute(this.DATA_ROW, this.dragItem.getAttribute(this.DATA_ROW));
243
+ p.setAttribute(this.DATA_SIZE_X, this.dragItem.getAttribute(this.DATA_SIZE_X));
244
+ p.setAttribute(this.DATA_SIZE_Y, this.dragItem.getAttribute(this.DATA_SIZE_Y));
245
+ this.container.nativeElement.appendChild(p);
246
+ }
247
+ });
248
+ }
249
+ removePlaceholder() {
250
+ const p = this.container.nativeElement.querySelector('.widget-blank-placeholder');
251
+ p?.remove();
252
+ }
253
+ startEdit() {
254
+ this._isInEditing = true;
255
+ this.calcGridSize();
256
+ this.ref.nativeElement.classList.add('grid-background');
257
+ const bg = this.ref.nativeElement;
258
+ bg.style.setProperty('background-position', `${this.rtl ? 'right' : 'left'} top`);
259
+ // tslint:disable-next-line: max-line-length
260
+ const pattern = `url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="${this.tileSize + this.gapSize}" height="${this.tileSize + this.gapSize}"> <rect style="fill: %23dadada" x="${this.rtl ? this.gapSize : 0}" width="${this.tileSize}" height="${this.tileSize}" y="0"></rect></svg>')`;
261
+ bg.style.setProperty('background-image', pattern);
262
+ //
263
+ const widgets = Array.from(this.ref.nativeElement.querySelectorAll('.widget-host'));
264
+ widgets.forEach((w) => {
265
+ w.addEventListener('mousedown', this.dragStart.bind(this), false);
266
+ });
267
+ this.ref.nativeElement.addEventListener('mousemove', this.drag.bind(this), false);
268
+ this.ref.nativeElement.addEventListener('mouseup', this.dragEnd.bind(this), false);
269
+ }
270
+ finishEdit() {
271
+ this.ref.nativeElement.classList.remove('grid-background');
272
+ const bg = this.ref.nativeElement;
273
+ bg.style.removeProperty('background-image');
274
+ //
275
+ this._isInEditing = false;
276
+ const widgets = Array.from(this.ref.nativeElement.querySelectorAll('.widget-host'));
277
+ widgets.forEach((w) => {
278
+ w.removeEventListener('mousedown', this.dragStart.bind(this), false);
279
+ });
280
+ this.ref.nativeElement.removeEventListener('mousemove', this.drag.bind(this), false);
281
+ this.ref.nativeElement.removeEventListener('mouseup', this.dragEnd.bind(this), false);
282
+ this.saveSubject.next('config');
283
+ }
284
+ addWidget(widget) {
285
+ this.zone.runOutsideAngular(() => {
286
+ this.newWidget = {
287
+ uniqueName: widget.uniqueName,
288
+ component: widget.component,
289
+ title: widget.title,
290
+ col: 1,
291
+ row: 1,
292
+ sizeX: widget.sizeX,
293
+ sizeY: widget.sizeY,
294
+ options: widget.options,
295
+ props: widget.props
296
+ };
297
+ this.detectFirstEmptySlot(this.newWidget);
298
+ const w = {
299
+ uniqueName: this.newWidget.uniqueName,
300
+ component: this.newWidget.component,
301
+ title: this.newWidget.title,
302
+ options: this.newWidget.options,
303
+ props: this.newWidget.props,
304
+ sizeX: this.newWidget.sizeX,
305
+ sizeY: this.newWidget.sizeY,
306
+ col: this.newWidget.col,
307
+ row: this.newWidget.row
308
+ };
309
+ this.widgets.push(w);
310
+ this.newWidget = null;
311
+ this.zone.run(() => {
312
+ this.cdr.detectChanges();
313
+ this.calcGridSize();
314
+ this.emitConfigChanged('add');
315
+ setTimeout(() => {
316
+ w['__meta__'].instance.element.addEventListener('mousedown', this.dragStart.bind(this), false);
317
+ }, 1000);
318
+ });
319
+ });
320
+ }
321
+ handleOnRemove(w) {
322
+ w.element.classList.add('animate__animated', 'animate__zoomOut');
323
+ w.element.addEventListener('animationend', () => {
324
+ this.widgets = this.widgets.filter((c) => c.__meta__.id !== w.config.__meta__.id);
325
+ this.cdr.detectChanges();
326
+ this.calcGridSize();
327
+ this.emitConfigChanged('remove');
328
+ });
329
+ }
330
+ handleOnSave(e) {
331
+ this.onWidgetSave.emit(e);
332
+ }
333
+ trackByFn(index, item) {
334
+ if (!item['__meta__']?.id) {
335
+ item['__meta__'] = {};
336
+ item['__meta__'].id = AXHtmlUtil.getUID();
337
+ }
338
+ return item['__meta__']?.id;
339
+ }
340
+ load(widgets) {
341
+ this.clear();
342
+ return new Promise((resolve, reject) => {
343
+ if (widgets) {
344
+ const loadedWidgets = [];
345
+ if (typeof widgets === 'string') {
346
+ try {
347
+ loadedWidgets.push(...JSON.parse(widgets));
348
+ this.emitConfigChanged('load');
349
+ }
350
+ catch (error) {
351
+ reject('Invalid widget json data!');
352
+ }
353
+ }
354
+ else {
355
+ loadedWidgets.push(...widgets);
356
+ this.emitConfigChanged('load');
357
+ }
358
+ let intervalId = -1;
359
+ const loadFunc = () => {
360
+ if (this.galleryItems && this.galleryItems.length > 0) {
361
+ loadedWidgets.forEach(w => {
362
+ const gitem = this.galleryItems.find(c => c.uniqueName === w.uniqueName);
363
+ if (gitem) {
364
+ w.component = gitem.component;
365
+ if (gitem.props) {
366
+ w.props = JSON.parse(JSON.stringify(gitem.props));
367
+ }
368
+ }
369
+ });
370
+ this.widgets.push(...loadedWidgets);
371
+ this.emitConfigChanged('load');
372
+ window.clearInterval(intervalId);
373
+ this.cdr.detectChanges();
374
+ resolve();
375
+ }
376
+ };
377
+ intervalId = window.setInterval(loadFunc, 200);
378
+ }
379
+ else {
380
+ resolve();
381
+ }
382
+ });
383
+ }
384
+ clear() {
385
+ if (this.widgets.length) {
386
+ this.widgets = [];
387
+ this.cdr.detectChanges();
388
+ this.saveSubject.next('clear');
389
+ }
390
+ }
391
+ save() {
392
+ const obj = this.widgets.map(c => ({
393
+ uniqueName: c.uniqueName,
394
+ component: c.component,
395
+ title: c.title,
396
+ sizeX: c.sizeX,
397
+ sizeY: c.sizeY,
398
+ col: c.col,
399
+ row: c.row,
400
+ options: c.options,
401
+ props: c.props
402
+ }));
403
+ return Promise.resolve(JSON.stringify(obj));
404
+ }
405
+ refresh() {
406
+ this.widgetHosts.forEach(host => {
407
+ host.widget.refresh();
408
+ });
409
+ }
410
+ handleOnConfigChanged(e) {
411
+ this.cdr.detectChanges();
412
+ this.saveSubject.next('config');
413
+ }
414
+ handleOnResizedChanged(e) {
415
+ this.detectFirstEmptySlot(e.config);
416
+ this.cdr.detectChanges();
417
+ this.saveSubject.next('config');
418
+ }
419
+ emitConfigChanged(mode) {
420
+ this.onConfigChanged.emit({
421
+ component: this,
422
+ mode: mode
423
+ });
424
+ }
425
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXWidgetBoardComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
426
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AXWidgetBoardComponent, selector: "ax-widget-board", inputs: { galleryItems: "galleryItems", tileSize: "tileSize", gapSize: "gapSize", readonly: "readonly", provideValue: "provideValue" }, outputs: { onConfigChanged: "onConfigChanged", onWidgetSave: "onWidgetSave" }, host: { classAttribute: "ax widget-board" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }, { propertyName: "widgetHosts", predicate: AXWidgetHostComponent, descendants: true }], ngImport: i0, template: "<div class=\"widgets-container\" [class.rtl]=\"rtl\" #container>\n <ax-widget-host *ngFor=\"let w of widgets;trackBy: trackByFn\" [config]='w' [sizeX]=\"w.sizeX\" [readonly]=\"readonly || w.readonly\"\n [sizeY]=\"w.sizeY\" [col]=\"w.col\" [row]=\"w.row\" (onRemove)=\"handleOnRemove($event)\" (onSave)=\"handleOnSave($event)\"\n (onConfigChanged)=\"handleOnConfigChanged($event)\" (onResized)=\"handleOnResizedChanged($event)\"\n [provideValue]=\"provideValue\">\n </ax-widget-host>\n</div>\n", styles: [".widget-board{display:inline-block;margin:15px 20px;min-width:calc(100% - 40px);min-height:calc(100% - 34px);--animate-duration: .5s;background-repeat:no-repeat}.widget-board.grid-background{background-repeat:repeat!important}.widget-board.grid-background .widgets-container .widget-host{touch-action:none;-webkit-user-select:none;user-select:none}.widget-board.grid-background .widgets-container .widget-host .widget-edit-overlay{display:block;cursor:move}.widget-board.grid-background .widgets-container .widget-host.widget-dragging{z-index:1000}.widget-board.grid-background .widgets-container .widget-host:focus{outline-width:1px;outline-style:solid;outline-color:var(--ax-primary-color)}.widget-board.grid-background .widget-blank-placeholder{background:var(--ax-primary-trans-light-color);position:absolute}.widget-board .widgets-container{position:relative;touch-action:none}.widget-board .widgets-container.rtl .widget-host .widget-options-menu{right:unset!important;left:0!important}.widget-board .widgets-container .widget-host{position:absolute;background:#fff;box-shadow:2px 2px 3px #dadada;z-index:0}.widget-board .widgets-container .widget-host .widget-content{width:100%;height:100%;display:flex;flex-direction:column}.widget-board .widgets-container .widget-host .widget-content .widget-title{padding:var(--ax-size-md);text-align:start;font-size:1.5em;position:absolute}.widget-board .widgets-container .widget-host .widget-edit-loading{display:none;background:rgba(255,255,255,.85);position:absolute;width:100%;height:100%;top:0;left:0;z-index:2;display:flex}.widget-board .widgets-container .widget-host .widget-config-overlay{position:absolute;background:rgb(255,255,255);width:100%;height:100%;top:0;left:0;z-index:1;padding:var(--ax-size-md);cursor:pointer}.widget-board .widgets-container .widget-host .widget-config-overlay:hover .widget-title{text-decoration:underline}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-title{text-align:start;font-size:1.5em}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-config-box{align-self:center;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:var(--ax-gray-dark-color)}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-config-box .config-title{font-size:1.2em;margin-bottom:var(--ax-size-md)}.widget-board .widgets-container .widget-host .widget-edit-overlay{display:none;background:rgba(255,255,255,.5);position:absolute;width:100%;height:100%;top:0;left:0;z-index:10}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu{margin:6px;text-align:end;float:inline-end;opacity:1;transition:opacity 1s ease}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu .widget-edit-menu-button{display:inline-block;background-color:#f0f0f0;border-radius:1px;border:2px solid #fff;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;padding:0;height:32px;width:32px;cursor:pointer;color:#666}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu .widget-edit-menu-button:hover{border-color:#a6a6a6;background-color:#c8c8c8}.widget-board .widgets-container .widget-host .widget-options-menu{display:none;position:absolute;top:0;right:0;z-index:2;cursor:pointer;padding:2px 5px}.widget-board .widgets-container .widget-host .widget-options-menu:hover{background-color:#f0f0f0}.widget-board .widgets-container .widget-host .widget-container{padding:1px;height:100%}.widget-board .widgets-container .widget-host .widget-container:hover .widget-options-menu{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.AXWidgetHostComponent, selector: "ax-widget-host", inputs: ["provideValue", "config", "readonly", "sizeX", "sizeY", "col", "row"], outputs: ["onRemove", "onConfigChanged", "onResized", "onSave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
427
+ }
428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AXWidgetBoardComponent, decorators: [{
429
+ type: Component,
430
+ args: [{ selector: 'ax-widget-board', host: { class: 'ax widget-board' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"widgets-container\" [class.rtl]=\"rtl\" #container>\n <ax-widget-host *ngFor=\"let w of widgets;trackBy: trackByFn\" [config]='w' [sizeX]=\"w.sizeX\" [readonly]=\"readonly || w.readonly\"\n [sizeY]=\"w.sizeY\" [col]=\"w.col\" [row]=\"w.row\" (onRemove)=\"handleOnRemove($event)\" (onSave)=\"handleOnSave($event)\"\n (onConfigChanged)=\"handleOnConfigChanged($event)\" (onResized)=\"handleOnResizedChanged($event)\"\n [provideValue]=\"provideValue\">\n </ax-widget-host>\n</div>\n", styles: [".widget-board{display:inline-block;margin:15px 20px;min-width:calc(100% - 40px);min-height:calc(100% - 34px);--animate-duration: .5s;background-repeat:no-repeat}.widget-board.grid-background{background-repeat:repeat!important}.widget-board.grid-background .widgets-container .widget-host{touch-action:none;-webkit-user-select:none;user-select:none}.widget-board.grid-background .widgets-container .widget-host .widget-edit-overlay{display:block;cursor:move}.widget-board.grid-background .widgets-container .widget-host.widget-dragging{z-index:1000}.widget-board.grid-background .widgets-container .widget-host:focus{outline-width:1px;outline-style:solid;outline-color:var(--ax-primary-color)}.widget-board.grid-background .widget-blank-placeholder{background:var(--ax-primary-trans-light-color);position:absolute}.widget-board .widgets-container{position:relative;touch-action:none}.widget-board .widgets-container.rtl .widget-host .widget-options-menu{right:unset!important;left:0!important}.widget-board .widgets-container .widget-host{position:absolute;background:#fff;box-shadow:2px 2px 3px #dadada;z-index:0}.widget-board .widgets-container .widget-host .widget-content{width:100%;height:100%;display:flex;flex-direction:column}.widget-board .widgets-container .widget-host .widget-content .widget-title{padding:var(--ax-size-md);text-align:start;font-size:1.5em;position:absolute}.widget-board .widgets-container .widget-host .widget-edit-loading{display:none;background:rgba(255,255,255,.85);position:absolute;width:100%;height:100%;top:0;left:0;z-index:2;display:flex}.widget-board .widgets-container .widget-host .widget-config-overlay{position:absolute;background:rgb(255,255,255);width:100%;height:100%;top:0;left:0;z-index:1;padding:var(--ax-size-md);cursor:pointer}.widget-board .widgets-container .widget-host .widget-config-overlay:hover .widget-title{text-decoration:underline}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-title{text-align:start;font-size:1.5em}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-config-box{align-self:center;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:var(--ax-gray-dark-color)}.widget-board .widgets-container .widget-host .widget-config-overlay .widget-config-box .config-title{font-size:1.2em;margin-bottom:var(--ax-size-md)}.widget-board .widgets-container .widget-host .widget-edit-overlay{display:none;background:rgba(255,255,255,.5);position:absolute;width:100%;height:100%;top:0;left:0;z-index:10}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu{margin:6px;text-align:end;float:inline-end;opacity:1;transition:opacity 1s ease}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu .widget-edit-menu-button{display:inline-block;background-color:#f0f0f0;border-radius:1px;border:2px solid #fff;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;padding:0;height:32px;width:32px;cursor:pointer;color:#666}.widget-board .widgets-container .widget-host .widget-edit-overlay .widget-edit-menu .widget-edit-menu-button:hover{border-color:#a6a6a6;background-color:#c8c8c8}.widget-board .widgets-container .widget-host .widget-options-menu{display:none;position:absolute;top:0;right:0;z-index:2;cursor:pointer;padding:2px 5px}.widget-board .widgets-container .widget-host .widget-options-menu:hover{background-color:#f0f0f0}.widget-board .widgets-container .widget-host .widget-container{padding:1px;height:100%}.widget-board .widgets-container .widget-host .widget-container:hover .widget-options-menu{display:block}\n"] }]
431
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { container: [{
432
+ type: ViewChild,
433
+ args: ['container']
434
+ }], widgetHosts: [{
435
+ type: ViewChildren,
436
+ args: [AXWidgetHostComponent]
437
+ }], galleryItems: [{
438
+ type: Input
439
+ }], tileSize: [{
440
+ type: Input
441
+ }], gapSize: [{
442
+ type: Input
443
+ }], readonly: [{
444
+ type: Input
445
+ }], provideValue: [{
446
+ type: Input
447
+ }], onConfigChanged: [{
448
+ type: Output
449
+ }], onWidgetSave: [{
450
+ type: Output
451
+ }] } });
452
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2lkZ2V0LWJvYXJkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvbGF5b3V0L3NyYy9saWIvd2lkZ2V0LWJvYXJkL3dpZGdldC1ib2FyZC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2xheW91dC9zcmMvbGliL3dpZGdldC1ib2FyZC93aWRnZXQtYm9hcmQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFFVCxLQUFLLEVBQ0wsaUJBQWlCLEVBQ2pCLFVBQVUsRUFDVixTQUFTLEVBQ1QsTUFBTSxFQUNOLHVCQUF1QixFQUN2QixpQkFBaUIsRUFDakIsTUFBTSxFQUNOLFlBQVksRUFBRSxZQUFZLEVBQUUsU0FBUyxFQUN0QyxNQUFNLGVBQWUsQ0FBQztBQU92QixPQUFPLEVBQUUscUJBQXFCL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ZUVsZW1lbnQucXVlcnlTZWxlY3RvcignLndpZGdldC1ibGFuay1wbGFjZWhvbGRlcicpO1xuICAgICAgICBpZiAodGhpcy5uZXdXaWRnZXQpIHtcbiAgICAgICAgICBjb25zdCB3ID0ge1xuICAgICAgICAgICAgdW5pcXVlTmFtZTogdGhpcy5uZXdXaWRnZXQudW5pcXVlTmFtZSxcbiAgICAgICAgICAgIGNvbXBvbmVudDogdGhpcy5uZXdXaWRnZXQuY29tcG9uZW50LFxuICAgICAgICAgICAgdGl0bGU6IHRoaXMubmV3V2lkZ2V0LnRpdGxlLFxuICAgICAgICAgICAgb3B0aW9uczogdGhpcy5uZXdXaWRnZXQub3B0aW9ucyxcbiAgICAgICAgICAgIHNpemVYOiB0aGlzLm5ld1dpZGdldC5zaXplWCxcbiAgICAgICAgICAgIHNpemVZOiB0aGlzLm5ld1dpZGdldC5zaXplWSxcbiAgICAgICAgICAgIGNvbDogTnVtYmVyKHAuZ2V0QXR0cmlidXRlKHRoaXMuREFUQV9DT0wpKSxcbiAgICAgICAgICAgIHJvdzogTnVtYmVyKHAuZ2V0QXR0cmlidXRlKHRoaXMuREFUQV9ST1cpKVxuICAgICAgICAgIH07XG5cbiAgICAgICAgICB0aGlzLndpZGdldHMucHVzaCh3KTtcbiAgICAgICAgICB0aGlzLm5ld1dpZGdldCA9IG51bGw7XG4gICAgICAgICAgdGhpcy5jb250YWluZXIubmF0aXZlRWxlbWVudC5yZW1vdmVDaGlsZCh0aGlzLmRyYWdJdGVtKTtcbiAgICAgICAgICB0aGlzLnpvbmUucnVuKCgpID0+IHtcbiAgICAgICAgICAgIHRoaXMuY2RyLmRldGVjdENoYW5nZXMoKTtcbiAgICAgICAgICAgIHRoaXMuY2FsY0dyaWRTaXplKCk7XG4gICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgd1snX19tZXRhX18nXS5pbnN0YW5jZS5lbGVtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdX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VzKCk7XG4gICAgICAgICAgICByZXNvbHZlKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBpbnRlcnZhbElkID0gd2luZG93LnNldEludGVydmFsKGxvYWRGdW5jLCAyMDApO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIHJlc29sdmUoKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxuXG4gIGNsZWFyKCkge1xuICAgIGlmICh0aGlzLndpZGdldHMubGVuZ3RoKSB7XG4gICAgICB0aGlzLndpZGdldHMgPSBbXTtcbiAgICAgIHRoaXMuY2RyLmRldGVjdENoYW5nZXMoKTtcbiAgICAgIHRoaXMuc2F2ZVN1YmplY3QubmV4dCgnY2xlYXInKTtcbiAgICB9XG4gIH1cblxuICBzYXZlKCk6IFByb21pc2U8c3RyaW5nPiB7XG4gICAgY29uc3Qgb2JqID0gdGhpcy53aWRnZXRzLm1hcChjID0+ICh7XG4gICAgICB1bmlxdWVOYW1lOiBjLnVuaXF1ZU5hbWUsXG4gICAgICBjb21wb25lbnQ6IGMuY29tcG9uZW50LFxuICAgICAgdGl0bGU6IGMudGl0bGUsXG4gICAgICBzaXplWDogYy5zaXplWCxcbiAgICAgIHNpemVZOiBjLnNpemVZLFxuICAgICAgY29sOiBjLmNvbCxcbiAgICAgIHJvdzogYy5yb3csXG4gICAgICBvcHRpb25zOiBjLm9wdGlvbnMsXG4gICAgICBwcm9wczogYy5wcm9wc1xuICAgIH0pKTtcbiAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKEpTT04uc3RyaW5naWZ5KG9iaikpO1xuICB9XG5cbiAgcmVmcmVzaCgpIHtcbiAgICB0aGlzLndpZGdldEhvc3RzLmZvckVhY2goaG9zdCA9PiB7XG4gICAgICBob3N0LndpZGdldC5yZWZyZXNoKCk7XG4gICAgfSk7XG4gIH1cblxuICBoYW5kbGVPbkNvbmZpZ0NoYW5nZWQoZTogQVhXaWRnZXRDb25maWdDaGFuZ2VkKSB7X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