@acorex/layout 6.5.28 → 6.5.31

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