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