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