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