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