@visuallyjs/browser-ui-angular 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/index.mjs +6 -0
- package/esm2022/lib/background.component.mjs +38 -0
- package/esm2022/lib/base.group.component.mjs +3 -3
- package/esm2022/lib/base.node.component.mjs +3 -3
- package/esm2022/lib/base.port.component.mjs +4 -4
- package/esm2022/lib/base.vertex.component.mjs +33 -12
- package/esm2022/lib/browser-ui-angular.module.mjs +38 -8
- package/esm2022/lib/charts/area.chart.component.mjs +3 -3
- package/esm2022/lib/charts/bar.chart.component.mjs +3 -3
- package/esm2022/lib/charts/bubble.chart.component.mjs +3 -3
- package/esm2022/lib/charts/column.chart.component.mjs +3 -3
- package/esm2022/lib/charts/line.chart.component.mjs +3 -3
- package/esm2022/lib/charts/pie.chart.component.mjs +3 -3
- package/esm2022/lib/charts/sankey.chart.component.mjs +4 -4
- package/esm2022/lib/charts/scatter.chart.component.mjs +3 -3
- package/esm2022/lib/charts/series.based.chart.component.mjs +4 -4
- package/esm2022/lib/charts/xy.chart.component.mjs +3 -3
- package/esm2022/lib/color.tag.component.mjs +6 -6
- package/esm2022/lib/controls-component.mjs +4 -4
- package/esm2022/lib/decorator-component.mjs +3 -3
- package/esm2022/lib/default-group-component.mjs +3 -3
- package/esm2022/lib/default-node-component.mjs +3 -3
- package/esm2022/lib/diagram-component.mjs +34 -12
- package/esm2022/lib/diagram-palette-component.mjs +4 -4
- package/esm2022/lib/edge.type.picker.component.mjs +5 -5
- package/esm2022/lib/export-controls-component.mjs +3 -3
- package/esm2022/lib/grid-background.component.mjs +77 -0
- package/esm2022/lib/image-background.component.mjs +38 -0
- package/esm2022/lib/inspector.component.mjs +4 -4
- package/esm2022/lib/miniview-component.mjs +4 -4
- package/esm2022/lib/overlay-component.mjs +52 -1
- package/esm2022/lib/palette.component.mjs +4 -4
- package/esm2022/lib/paper-component.mjs +354 -0
- package/esm2022/lib/shape.component.mjs +4 -4
- package/esm2022/lib/shape.palette.component.mjs +4 -4
- package/esm2022/lib/surface-component.mjs +87 -16
- package/esm2022/lib/surface-popup-component.mjs +62 -0
- package/esm2022/lib/tiled-image-background.component.mjs +62 -0
- package/esm2022/lib/vjs-service.mjs +3 -3
- package/fesm2022/visuallyjs-browser-ui-angular.mjs +938 -144
- package/fesm2022/visuallyjs-browser-ui-angular.mjs.map +1 -1
- package/index.d.ts +6 -0
- package/lib/background.component.d.ts +13 -0
- package/lib/base.vertex.component.d.ts +29 -3
- package/lib/browser-ui-angular.module.d.ts +27 -21
- package/lib/diagram-component.d.ts +7 -5
- package/lib/grid-background.component.d.ts +81 -0
- package/lib/image-background.component.d.ts +18 -0
- package/lib/overlay-component.d.ts +32 -8
- package/lib/paper-component.d.ts +162 -0
- package/lib/surface-component.d.ts +25 -11
- package/lib/surface-popup-component.d.ts +62 -0
- package/lib/tiled-image-background.component.d.ts +72 -0
- package/package.json +2 -2
- package/visuallyjs-browser-ui-angular.tgz +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, Injectable, inject, ElementRef, effect,
|
|
2
|
+
import { signal, Injectable, inject, ElementRef, effect, Input, Component, ChangeDetectorRef, computed, Directive, input, EventEmitter, ViewContainerRef, NgZone, reflectComponentType, Output, TemplateRef, ViewChild, ContentChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { log, Surface, Paper, MiniviewPlugin,
|
|
5
|
+
import { log, Surface, Paper, MiniviewPlugin, EVENT_EDGE_UPDATED, EVENT_NODE_UPDATED, EVENT_GROUP_UPDATED, EVENT_PORT_UPDATED, EVENT_ZOOM, BrowserUIModel, OVERLAY_TYPE_CUSTOM, ELEMENT_DIV, isGroup, extend, renderSurface, EVENT_PORT_ADDED, EVENT_DATA_LOAD_END, EVENT_EDGE_ADDED, EVENT_EDGE_REMOVED, EVENT_INTERNAL_CONNECTION, ShapeLibraryDefaults, ShapePalette, convertToMultilineText, DEFAULT_LABEL_FILL_RATIO, LassoPlugin, EVENT_SURFACE_MODE_CHANGED, EVENT_UNDOREDO_UPDATE, TRUE, FALSE, EVENT_SELECT, EVENT_DESELECT, EVENT_SELECTION_CLEARED, SURFACE_MODE_PAN, SURFACE_MODE_SELECT, supportsPathEditing, PAN_VIEW_BOX, PAN_PATH, LASSO_VIEW_BOX, LASSO_PATH, ZOOM_TO_FIT_VIEW_BOX, ZOOM_TO_FIT_PATH, ZOOM_IN_OUT_VIEW_BOX, ZOOM_IN_PATH, ZOOM_OUT_PATH, CLASS_CONTROLS_RESET_SELECTION, RESET_SELECTION_VIEW_BOX, RESET_SELECTION_PATH, CLEAR_VIEW_BOX, CLEAR_PATH, INSPECTOR_CONTEXT_EDGE_PROPERTY_MAPPINGS, EdgeTypePicker, Palette, SvgExportUI, ImageExportUI, CLASS_CONTROLS, CLASS_EXPORT_CONTROLS, INSPECTOR_CONTEXT_RECENT_COLORS, EVENT_CONTEXT_UPDATE, CLASS_COLOR_PICKER, CLASS_COLOR_PICKER_SWATCHES, CLASS_COLOR_PICKER_SWATCH, createDiagram, ColumnChart, BarChart, DiagramPalette, CategoryValueChart, LineChart, AreaChart, PieChart, ScatterChart, BubbleChart, SankeyChart, PopupHandler, CLASS_SURFACE_POPUP, renderPaper, BackgroundPlugin, SimpleBackground, TiledBackground, GeneratedGridBackground, Edge, Node, Group, Port, Inspector, EVENT_DATA_UPDATED, EVENT_GRAPH_CLEARED } from '@visuallyjs/browser-ui';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class VisuallyJsService {
|
|
@@ -202,10 +202,10 @@ class VisuallyJsService {
|
|
|
202
202
|
this.uiListeners.push(cb);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
206
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
206
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsService, providedIn: 'root' }); }
|
|
207
207
|
}
|
|
208
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsService, decorators: [{
|
|
209
209
|
type: Injectable,
|
|
210
210
|
args: [{
|
|
211
211
|
providedIn: 'root',
|
|
@@ -257,16 +257,16 @@ class MiniviewComponent {
|
|
|
257
257
|
this.$miniview.invalidate();
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
261
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
260
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MiniviewComponent, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
261
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: MiniviewComponent, selector: "vjs-miniview", inputs: { elementFilter: "elementFilter", typeFunction: "typeFunction", activeTracking: "activeTracking", clickToCenter: "clickToCenter", showLasso: "showLasso", trackSelection: "trackSelection" }, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
262
262
|
}
|
|
263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MiniviewComponent, decorators: [{
|
|
264
264
|
type: Component,
|
|
265
265
|
args: [{
|
|
266
266
|
selector: 'vjs-miniview',
|
|
267
267
|
template: `<div></div>`
|
|
268
268
|
}]
|
|
269
|
-
}], ctorParameters:
|
|
269
|
+
}], ctorParameters: () => [{ type: i0.NgZone }], propDecorators: { elementFilter: [{
|
|
270
270
|
type: Input
|
|
271
271
|
}], typeFunction: [{
|
|
272
272
|
type: Input
|
|
@@ -287,6 +287,50 @@ class BaseAngularOverlayComponent {
|
|
|
287
287
|
constructor() {
|
|
288
288
|
|
|
289
289
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
290
|
+
|
|
291
|
+
this.$edgeData = signal({});
|
|
292
|
+
|
|
293
|
+
this.$sourceData = signal({});
|
|
294
|
+
|
|
295
|
+
this.$targetData = signal({});
|
|
296
|
+
}
|
|
297
|
+
ngOnInit() {
|
|
298
|
+
this.$edgeData.set(this.edge.data);
|
|
299
|
+
this.$sourceData.set(this.edge.source.data);
|
|
300
|
+
this.$targetData.set(this.edge.target.data);
|
|
301
|
+
this._edgeUpdate = (p) => {
|
|
302
|
+
if (p.edge.id === this.edge.id) {
|
|
303
|
+
this.$edgeData.set({ ...p.edge.data });
|
|
304
|
+
this.$sourceData.set({ ...p.edge.source.data });
|
|
305
|
+
this.$targetData.set({ ...p.edge.target.data });
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
this._vertexUpdate = (p) => {
|
|
309
|
+
if (p.vertex === this.edge.source) {
|
|
310
|
+
this.$sourceData.set({ ...p.vertex.data });
|
|
311
|
+
}
|
|
312
|
+
if (p.vertex === this.edge.target) {
|
|
313
|
+
this.$targetData.set({ ...p.vertex.data });
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
this._portUpdate = (p) => {
|
|
317
|
+
if (p.port === this.edge.source) {
|
|
318
|
+
this.$sourceData.set({ ...p.port.data });
|
|
319
|
+
}
|
|
320
|
+
if (p.port === this.edge.target) {
|
|
321
|
+
this.$targetData.set({ ...p.port.data });
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
this.model.bind(EVENT_EDGE_UPDATED, this._edgeUpdate);
|
|
325
|
+
this.model.bind(EVENT_NODE_UPDATED, this._vertexUpdate);
|
|
326
|
+
this.model.bind(EVENT_GROUP_UPDATED, this._vertexUpdate);
|
|
327
|
+
this.model.bind(EVENT_PORT_UPDATED, this._portUpdate);
|
|
328
|
+
}
|
|
329
|
+
ngOnDestroy() {
|
|
330
|
+
this.model.unbind(EVENT_EDGE_UPDATED, this._edgeUpdate);
|
|
331
|
+
this.model.unbind(EVENT_NODE_UPDATED, this._vertexUpdate);
|
|
332
|
+
this.model.unbind(EVENT_GROUP_UPDATED, this._vertexUpdate);
|
|
333
|
+
this.model.unbind(EVENT_PORT_UPDATED, this._portUpdate);
|
|
290
334
|
}
|
|
291
335
|
|
|
292
336
|
updateEdge(updates) {
|
|
@@ -296,7 +340,12 @@ class BaseAngularOverlayComponent {
|
|
|
296
340
|
removeEdge() {
|
|
297
341
|
this.model.removeEdge(this.edge);
|
|
298
342
|
}
|
|
343
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseAngularOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
344
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseAngularOverlayComponent }); }
|
|
299
345
|
}
|
|
346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseAngularOverlayComponent, decorators: [{
|
|
347
|
+
type: Injectable
|
|
348
|
+
}] });
|
|
300
349
|
|
|
301
350
|
|
|
302
351
|
class BaseVertexComponent {
|
|
@@ -307,15 +356,31 @@ class BaseVertexComponent {
|
|
|
307
356
|
this.$data = signal(undefined);
|
|
308
357
|
|
|
309
358
|
this.zoom = signal(1);
|
|
359
|
+
|
|
360
|
+
this.sourceEdges = signal([]);
|
|
361
|
+
|
|
362
|
+
this.allSourceEdges = signal([]);
|
|
363
|
+
|
|
364
|
+
this.targetEdges = signal([]);
|
|
365
|
+
|
|
366
|
+
this.allTargetEdges = signal([]);
|
|
310
367
|
}
|
|
311
368
|
|
|
312
369
|
ngOnInit() {
|
|
313
370
|
this.$data.set(this.data);
|
|
314
|
-
this.
|
|
315
|
-
this.
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
371
|
+
if (this.surface) {
|
|
372
|
+
this._zoomHandler = (p) => {
|
|
373
|
+
this.zoom.set(p.zoom);
|
|
374
|
+
};
|
|
375
|
+
this.zoom.set(this.surface.getZoom());
|
|
376
|
+
this.surface.bind(EVENT_ZOOM, this._zoomHandler);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
$updateEdges() {
|
|
380
|
+
this.sourceEdges.set(this.getVertex().getSourceEdges());
|
|
381
|
+
this.allSourceEdges.set(this.getVertex().getAllSourceEdges());
|
|
382
|
+
this.targetEdges.set(this.getVertex().getTargetEdges());
|
|
383
|
+
this.allTargetEdges.set(this.getVertex().getAllTargetEdges());
|
|
319
384
|
}
|
|
320
385
|
|
|
321
386
|
getVertex() {
|
|
@@ -323,11 +388,12 @@ class BaseVertexComponent {
|
|
|
323
388
|
}
|
|
324
389
|
|
|
325
390
|
ngOnDestroy() {
|
|
326
|
-
this.surface
|
|
327
|
-
delete this._el
|
|
391
|
+
this.surface?.unbind(EVENT_ZOOM, this._zoomHandler);
|
|
392
|
+
delete this._el?._visuallyJsNgComponent._el;
|
|
328
393
|
delete this._el;
|
|
329
394
|
delete this.model;
|
|
330
395
|
delete this.surface;
|
|
396
|
+
delete this.paper;
|
|
331
397
|
}
|
|
332
398
|
|
|
333
399
|
removeVertex() {
|
|
@@ -359,16 +425,16 @@ class BaseVertexComponent {
|
|
|
359
425
|
}
|
|
360
426
|
|
|
361
427
|
cloneVertex(options) {
|
|
362
|
-
this.surface
|
|
428
|
+
this.surface?.cloneVertex(this.getVertex(), options);
|
|
363
429
|
}
|
|
364
430
|
|
|
365
431
|
flashVertex(duration, animName) {
|
|
366
|
-
this.surface
|
|
432
|
+
this.surface?.flashVertex(this.getVertex(), duration, animName);
|
|
367
433
|
}
|
|
368
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
369
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
434
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseVertexComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
435
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseVertexComponent }); }
|
|
370
436
|
}
|
|
371
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseVertexComponent, decorators: [{
|
|
372
438
|
type: Injectable
|
|
373
439
|
}], propDecorators: { data: [{
|
|
374
440
|
type: Input
|
|
@@ -376,6 +442,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
376
442
|
type: Input
|
|
377
443
|
}], surface: [{
|
|
378
444
|
type: Input
|
|
445
|
+
}], paper: [{
|
|
446
|
+
type: Input
|
|
447
|
+
}], ui: [{
|
|
448
|
+
type: Input
|
|
379
449
|
}], modelObject: [{
|
|
380
450
|
type: Input
|
|
381
451
|
}] } });
|
|
@@ -414,10 +484,10 @@ class BaseGroupComponent extends BaseVertexComponent {
|
|
|
414
484
|
getPort(portId) {
|
|
415
485
|
return this.getGroup().getPort(portId);
|
|
416
486
|
}
|
|
417
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
418
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
487
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
488
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseGroupComponent }); }
|
|
419
489
|
}
|
|
420
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseGroupComponent, decorators: [{
|
|
421
491
|
type: Injectable
|
|
422
492
|
}] });
|
|
423
493
|
|
|
@@ -427,10 +497,10 @@ class DefaultGroupComponent extends BaseGroupComponent {
|
|
|
427
497
|
super(...arguments);
|
|
428
498
|
this.label = computed(() => this.$data().label || "");
|
|
429
499
|
}
|
|
430
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
431
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
500
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DefaultGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
501
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DefaultGroupComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `<div class="vjs-default-group">{{label()}}</div>`, isInline: true }); }
|
|
432
502
|
}
|
|
433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DefaultGroupComponent, decorators: [{
|
|
434
504
|
type: Component,
|
|
435
505
|
args: [{
|
|
436
506
|
template: `<div class="vjs-default-group">{{label()}}</div>`
|
|
@@ -469,10 +539,10 @@ class BaseNodeComponent extends BaseVertexComponent {
|
|
|
469
539
|
flashNode(duration, animName) {
|
|
470
540
|
this.flashVertex(duration, animName);
|
|
471
541
|
}
|
|
472
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
473
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
542
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseNodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
543
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseNodeComponent }); }
|
|
474
544
|
}
|
|
475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
545
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BaseNodeComponent, decorators: [{
|
|
476
546
|
type: Injectable
|
|
477
547
|
}] });
|
|
478
548
|
|
|
@@ -482,10 +552,10 @@ class DefaultNodeComponent extends BaseNodeComponent {
|
|
|
482
552
|
super(...arguments);
|
|
483
553
|
this.label = computed(() => this.$data().label || "");
|
|
484
554
|
}
|
|
485
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
486
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
555
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DefaultNodeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
556
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DefaultNodeComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `<div class="vjs-default-node">{{label()}}</div>`, isInline: true }); }
|
|
487
557
|
}
|
|
488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
558
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DefaultNodeComponent, decorators: [{
|
|
489
559
|
type: Component,
|
|
490
560
|
args: [{
|
|
491
561
|
template: `<div class="vjs-default-node">{{label()}}</div>`
|
|
@@ -547,15 +617,15 @@ class BasePortComponent {
|
|
|
547
617
|
ngOnDestroy() {
|
|
548
618
|
this.parent.model.unbind(EVENT_PORT_UPDATED, this._signalBinder);
|
|
549
619
|
}
|
|
550
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
551
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
620
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BasePortComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
621
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: BasePortComponent, selector: "vjs-base-port", inputs: { parent: "parent", data: "data" }, ngImport: i0 }); }
|
|
552
622
|
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BasePortComponent, decorators: [{
|
|
554
624
|
type: Directive,
|
|
555
625
|
args: [{
|
|
556
626
|
selector: "vjs-base-port",
|
|
557
627
|
}]
|
|
558
|
-
}], ctorParameters:
|
|
628
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { parent: [{
|
|
559
629
|
type: Input
|
|
560
630
|
}], data: [{
|
|
561
631
|
type: Input
|
|
@@ -573,13 +643,36 @@ class BrowserUIAngularModel extends BrowserUIModel {
|
|
|
573
643
|
class SurfaceComponent {
|
|
574
644
|
constructor() {
|
|
575
645
|
|
|
646
|
+
this.data = input();
|
|
647
|
+
|
|
648
|
+
this.url = input();
|
|
649
|
+
|
|
576
650
|
this.vertexEvent = new EventEmitter();
|
|
577
651
|
this.$el = inject(ElementRef);
|
|
578
652
|
this.$viewContainerRef = inject(ViewContainerRef);
|
|
579
653
|
this.$ngZone = inject(NgZone);
|
|
580
654
|
this.$vjs = inject(VisuallyJsService);
|
|
655
|
+
this._dataEffect = effect(() => {
|
|
656
|
+
const currentData = this.data();
|
|
657
|
+
if (currentData) {
|
|
658
|
+
if (this.model) {
|
|
659
|
+
this.model.clear();
|
|
660
|
+
this.model.load({ data: currentData });
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
this._urlEffect = effect(() => {
|
|
665
|
+
const currentUrl = this.url();
|
|
666
|
+
if (currentUrl) {
|
|
667
|
+
// Respond to changes in the url here.
|
|
668
|
+
// For example, if you need to reload the model with new data:
|
|
669
|
+
if (this.model) {
|
|
670
|
+
this.model.clear();
|
|
671
|
+
this.model.load({ url: currentUrl });
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
});
|
|
581
675
|
}
|
|
582
|
-
// $vjsSignals = inject(VisuallyJsSignalService)
|
|
583
676
|
|
|
584
677
|
getNativeElement(component) {
|
|
585
678
|
return component.location.nativeElement.childNodes[0];
|
|
@@ -608,10 +701,16 @@ class SurfaceComponent {
|
|
|
608
701
|
this._getComponentThen(info.el, (component) => {
|
|
609
702
|
component.data = params.vertex.data;
|
|
610
703
|
component.$data?.set(component.data);
|
|
704
|
+
try {
|
|
705
|
+
;
|
|
706
|
+
component.$updateEdges();
|
|
707
|
+
}
|
|
708
|
+
catch (e) { }
|
|
611
709
|
if (component.changeDetectorRef) {
|
|
612
710
|
component.changeDetectorRef.detectChanges();
|
|
613
711
|
}
|
|
614
712
|
}, false);
|
|
713
|
+
this._maybeUpdateEdgeOverlays(params.vertex);
|
|
615
714
|
}
|
|
616
715
|
portUpdated(params) {
|
|
617
716
|
const info = this.surface.getObjectInfo(params.port, false);
|
|
@@ -623,10 +722,14 @@ class SurfaceComponent {
|
|
|
623
722
|
}
|
|
624
723
|
}
|
|
625
724
|
}, true);
|
|
725
|
+
this._maybeUpdateEdgeOverlays(params.port);
|
|
726
|
+
}
|
|
727
|
+
_maybeUpdateEdgeOverlays(vertex) {
|
|
728
|
+
vertex.getAllEdges().forEach(e => this._handleEdgeUpdate(e.id));
|
|
626
729
|
}
|
|
627
730
|
|
|
628
|
-
|
|
629
|
-
const connection = this.surface.getRenderedConnection(
|
|
731
|
+
_handleEdgeUpdate(edgeId) {
|
|
732
|
+
const connection = this.surface.getRenderedConnection(edgeId);
|
|
630
733
|
if (connection) {
|
|
631
734
|
for (let id in connection.overlays) {
|
|
632
735
|
const canvas = connection.overlays[id].contentElement;
|
|
@@ -639,6 +742,36 @@ class SurfaceComponent {
|
|
|
639
742
|
}
|
|
640
743
|
}
|
|
641
744
|
|
|
745
|
+
edgeUpdated(params) {
|
|
746
|
+
this._handleEdgeUpdate(params.edge.id);
|
|
747
|
+
}
|
|
748
|
+
edgeAddedRemoved(params) {
|
|
749
|
+
const info = this.surface.getObjectInfo(params.edge.source, false);
|
|
750
|
+
if (info.el) {
|
|
751
|
+
this._getComponentThen(info.el, (component) => {
|
|
752
|
+
try {
|
|
753
|
+
component.$updateEdges();
|
|
754
|
+
if (component.changeDetectorRef) {
|
|
755
|
+
component.changeDetectorRef.detectChanges();
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
catch (e) { }
|
|
759
|
+
}, false);
|
|
760
|
+
}
|
|
761
|
+
const info2 = this.surface.getObjectInfo(params.edge.target, false);
|
|
762
|
+
if (info2.el && info.obj.getFullId() !== info2.obj.getFullId()) {
|
|
763
|
+
this._getComponentThen(info2.el, (component) => {
|
|
764
|
+
try {
|
|
765
|
+
component.$updateEdges();
|
|
766
|
+
if (component.changeDetectorRef) {
|
|
767
|
+
component.changeDetectorRef.detectChanges();
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
catch (e) { }
|
|
771
|
+
}, false);
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
|
|
642
775
|
_processAngularOverlays(view) {
|
|
643
776
|
const self = this;
|
|
644
777
|
const edgeTypes = view.edges || {};
|
|
@@ -670,7 +803,10 @@ class SurfaceComponent {
|
|
|
670
803
|
angularOverlayComponent.data = edge.data;
|
|
671
804
|
}
|
|
672
805
|
angularOverlayComponent.model = self.model;
|
|
806
|
+
// backwards compat: remove at some point
|
|
807
|
+
;
|
|
673
808
|
angularOverlayComponent.surface = self.surface;
|
|
809
|
+
angularOverlayComponent.ui = self.surface;
|
|
674
810
|
createdComponent.changeDetectorRef.detectChanges();
|
|
675
811
|
return el;
|
|
676
812
|
};
|
|
@@ -733,6 +869,7 @@ class SurfaceComponent {
|
|
|
733
869
|
_componentRef.data = data || {};
|
|
734
870
|
_componentRef.model = model;
|
|
735
871
|
_componentRef.surface = surface;
|
|
872
|
+
_componentRef.ui = surface;
|
|
736
873
|
_componentRef.modelObject = modelObject;
|
|
737
874
|
// get the reflection data for the component
|
|
738
875
|
const componentInfo = reflectComponentType(component);
|
|
@@ -804,11 +941,17 @@ class SurfaceComponent {
|
|
|
804
941
|
model.bind(EVENT_PORT_UPDATED, this.portUpdateFn);
|
|
805
942
|
this.edgeUpdateFn = this.edgeUpdated.bind(this);
|
|
806
943
|
model.bind(EVENT_EDGE_UPDATED, this.edgeUpdateFn);
|
|
807
|
-
|
|
808
|
-
|
|
944
|
+
this.edgeAddFn = this.edgeAddedRemoved.bind(this);
|
|
945
|
+
this.edgeRemoveFn = this.edgeAddedRemoved.bind(this);
|
|
946
|
+
model.bind(EVENT_EDGE_ADDED, this.edgeAddFn);
|
|
947
|
+
model.bind(EVENT_EDGE_REMOVED, this.edgeRemoveFn);
|
|
948
|
+
const initialData = this.data();
|
|
949
|
+
const initialUrl = this.url();
|
|
950
|
+
if (initialData) {
|
|
951
|
+
this.model.load({ data: initialData });
|
|
809
952
|
}
|
|
810
|
-
else if (
|
|
811
|
-
this.model.load({ url:
|
|
953
|
+
else if (initialUrl) {
|
|
954
|
+
this.model.load({ url: initialUrl });
|
|
812
955
|
}
|
|
813
956
|
});
|
|
814
957
|
}
|
|
@@ -820,13 +963,15 @@ class SurfaceComponent {
|
|
|
820
963
|
this.model.unbind(EVENT_PORT_ADDED, this.nodeUpdateFn);
|
|
821
964
|
this.model.unbind(EVENT_PORT_UPDATED, this.portUpdateFn);
|
|
822
965
|
this.model.unbind(EVENT_EDGE_UPDATED, this.edgeUpdateFn);
|
|
966
|
+
this.model.unbind(EVENT_EDGE_ADDED, this.edgeAddFn);
|
|
967
|
+
this.model.unbind(EVENT_EDGE_REMOVED, this.edgeRemoveFn);
|
|
823
968
|
this.model.unbind(EVENT_DATA_LOAD_END, this.dataLoadEndFn);
|
|
824
969
|
this.surface.unbind(EVENT_INTERNAL_CONNECTION, this.edgeAddFn);
|
|
825
970
|
}
|
|
826
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
827
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
971
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SurfaceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
972
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: SurfaceComponent, selector: "vjs-surface", inputs: { inputModel: { classPropertyName: "inputModel", publicName: "model", isSignal: false, isRequired: false, transformFunction: null }, viewOptions: { classPropertyName: "viewOptions", publicName: "viewOptions", isSignal: false, isRequired: false, transformFunction: null }, renderOptions: { classPropertyName: "renderOptions", publicName: "renderOptions", isSignal: false, isRequired: false, transformFunction: null }, modelOptions: { classPropertyName: "modelOptions", publicName: "modelOptions", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { vertexEvent: "vertexEvent" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
828
973
|
}
|
|
829
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SurfaceComponent, decorators: [{
|
|
830
975
|
type: Component,
|
|
831
976
|
args: [{
|
|
832
977
|
selector: "vjs-surface",
|
|
@@ -841,10 +986,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
841
986
|
type: Input
|
|
842
987
|
}], modelOptions: [{
|
|
843
988
|
type: Input
|
|
844
|
-
}], data: [{
|
|
845
|
-
type: Input
|
|
846
|
-
}], url: [{
|
|
847
|
-
type: Input
|
|
848
989
|
}], vertexEvent: [{
|
|
849
990
|
type: Output
|
|
850
991
|
}] } });
|
|
@@ -895,16 +1036,16 @@ class ShapePaletteComponent {
|
|
|
895
1036
|
}
|
|
896
1037
|
});
|
|
897
1038
|
}
|
|
898
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
899
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1039
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ShapePaletteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1040
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ShapePaletteComponent, selector: "vjs-shape-palette", inputs: { initialSet: "initialSet", dragSize: "dragSize", iconSize: "iconSize", fill: "fill", outline: "outline", showAllMessage: "showAllMessage", selectAfterDrop: "selectAfterDrop", paletteStrokeWidth: "paletteStrokeWidth", onVertexAdded: "onVertexAdded", dataGenerator: "dataGenerator", preparedShapes: "preparedShapes" }, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
900
1041
|
}
|
|
901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1042
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ShapePaletteComponent, decorators: [{
|
|
902
1043
|
type: Component,
|
|
903
1044
|
args: [{
|
|
904
1045
|
template: `<div></div>`,
|
|
905
1046
|
selector: `vjs-shape-palette`
|
|
906
1047
|
}]
|
|
907
|
-
}], ctorParameters:
|
|
1048
|
+
}], ctorParameters: () => [], propDecorators: { initialSet: [{
|
|
908
1049
|
type: Input
|
|
909
1050
|
}], dragSize: [{
|
|
910
1051
|
type: Input
|
|
@@ -967,8 +1108,8 @@ class ShapeComponent {
|
|
|
967
1108
|
ngOnChanges(changes) {
|
|
968
1109
|
this._render();
|
|
969
1110
|
}
|
|
970
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
971
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ShapeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1112
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ShapeComponent, selector: "vjs-shape", inputs: { obj: "obj", width: "width", height: "height", showLabels: "showLabels", labelProperty: "labelProperty", labelStrokeWidth: "labelStrokeWidth", label: "label", multilineLabels: "multilineLabels", labelFillRatio: "labelFillRatio", font: "font" }, usesOnChanges: true, ngImport: i0, template: `<svg:svg
|
|
972
1113
|
[attr.stroke-width]="obj.outlineWidth || 2"
|
|
973
1114
|
attr.fill="{{ obj.fill }}"
|
|
974
1115
|
attr.stroke="{{ obj.outline }}"
|
|
@@ -977,7 +1118,7 @@ class ShapeComponent {
|
|
|
977
1118
|
attr.viewBox="0 0 {{ width }} {{ height }}"
|
|
978
1119
|
></svg:svg>`, isInline: true }); }
|
|
979
1120
|
}
|
|
980
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ShapeComponent, decorators: [{
|
|
981
1122
|
type: Component,
|
|
982
1123
|
args: [{
|
|
983
1124
|
template: `<svg:svg
|
|
@@ -990,7 +1131,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
990
1131
|
></svg:svg>`,
|
|
991
1132
|
selector: `vjs-shape`,
|
|
992
1133
|
}]
|
|
993
|
-
}], ctorParameters:
|
|
1134
|
+
}], ctorParameters: () => [], propDecorators: { obj: [{
|
|
994
1135
|
type: Input
|
|
995
1136
|
}], width: [{
|
|
996
1137
|
type: Input
|
|
@@ -1116,10 +1257,10 @@ class ControlsComponent {
|
|
|
1116
1257
|
t.clear();
|
|
1117
1258
|
}
|
|
1118
1259
|
}
|
|
1119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1120
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1260
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1261
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ControlsComponent, selector: "vjs-controls", inputs: { undoRedo: "undoRedo", zoomToExtents: "zoomToExtents", zoomButtons: "zoomButtons", clear: "clear", clearMessage: "clearMessage", buttons: "buttons", orientation: "orientation" }, ngImport: i0, template: "<div class=\"vjs-controls\" [attr.data-vjs-orientation]=\"orientation\">\n <i *ngIf=\"showPanButton\" class=\"vjs-pan-mode vjs-selected-mode\" data-mode=\"pan\" title=\"Pan Mode\" (click)=\"panMode()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"none\">\n <path d=\"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5 M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5 M14 5.5a1.5 1.5 0 0 1 3 0v6.5 M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47\"></path>\n </svg>\n </i>\n <i *ngIf=\"showLassoButton\" class=\"vjs-select-mode\" data-mode=\"select\" title=\"Select Mode\" (click)=\"selectMode()\">\n <svg fill=\"currentColor\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path d=\"M18.2848192,17.5777124 L20.8535534,20.1464466 C21.0488155,20.3417088 21.0488155,20.6582912 20.8535534,20.8535534 C20.6582912,21.0488155 20.3417088,21.0488155 20.1464466,20.8535534 L17.5777124,18.2848192 L15.9160251,20.7773501 C15.6899572,21.116452 15.1749357,21.0571624 15.0318354,20.6755617 L12.0318354,12.6755617 C11.8811067,12.2736185 12.2736185,11.8811067 12.6755617,12.0318354 L20.6755617,15.0318354 C21.0571624,15.1749357 21.116452,15.6899572 20.7773501,15.9160251 L18.2848192,17.5777124 L18.2848192,17.5777124 Z M17.2312404,17.0782479 L19.4104716,15.6254271 L13.3544004,13.3544004 L15.6254271,19.4104716 L17.0782479,17.2312404 C17.0974475,17.2011742 17.1201804,17.1727128 17.1464466,17.1464466 C17.1727128,17.1201804 17.2011742,17.0974475 17.2312404,17.0782479 L17.2312404,17.0782479 Z M5.5,3 C5.77614237,3 6,3.22385763 6,3.5 C6,3.77614237 5.77614237,4 5.5,4 C4.67157288,4 4,4.67157288 4,5.5 C4,5.77614237 3.77614237,6 3.5,6 C3.22385763,6 3,5.77614237 3,5.5 C3,4.11928813 4.11928813,3 5.5,3 Z M8.5,4 C8.22385763,4 8,3.77614237 8,3.5 C8,3.22385763 8.22385763,3 8.5,3 L10.5,3 C10.7761424,3 11,3.22385763 11,3.5 C11,3.77614237 10.7761424,4 10.5,4 L8.5,4 Z M13.5,4 C13.2238576,4 13,3.77614237 13,3.5 C13,3.22385763 13.2238576,3 13.5,3 L15.5,3 C15.7761424,3 16,3.22385763 16,3.5 C16,3.77614237 15.7761424,4 15.5,4 L13.5,4 Z M8.5,21 C8.22385763,21 8,20.7761424 8,20.5 C8,20.2238576 8.22385763,20 8.5,20 L10.5,20 C10.7761424,20 11,20.2238576 11,20.5 C11,20.7761424 10.7761424,21 10.5,21 L8.5,21 Z M3,8.5 C3,8.22385763 3.22385763,8 3.5,8 C3.77614237,8 4,8.22385763 4,8.5 L4,10.5 C4,10.7761424 3.77614237,11 3.5,11 C3.22385763,11 3,10.7761424 3,10.5 L3,8.5 Z M3,13.5 C3,13.2238576 3.22385763,13 3.5,13 C3.77614237,13 4,13.2238576 4,13.5 L4,15.5 C4,15.7761424 3.77614237,16 3.5,16 C3.22385763,16 3,15.7761424 3,15.5 L3,13.5 Z M3,18.5 C3,18.2238576 3.22385763,18 3.5,18 C3.77614237,18 4,18.2238576 4,18.5 C4,19.3284271 4.67157288,20 5.5,20 C5.77614237,20 6,20.2238576 6,20.5 C6,20.7761424 5.77614237,21 5.5,21 C4.11928813,21 3,19.8807119 3,18.5 Z M21,10.5 C21,10.7761424 20.7761424,11 20.5,11 C20.2238576,11 20,10.7761424 20,10.5 L20,8.5 C20,8.22385763 20.2238576,8 20.5,8 C20.7761424,8 21,8.22385763 21,8.5 L21,10.5 Z M21,5.5 C21,5.77614237 20.7761424,6 20.5,6 C20.2238576,6 20,5.77614237 20,5.5 C20,4.67157288 19.3284271,4 18.5,4 C18.2238576,4 18,3.77614237 18,3.5 C18,3.22385763 18.2238576,3 18.5,3 C19.8807119,3 21,4.11928813 21,5.5 Z\"></path>\n </svg>\n </i>\n\n <i *ngFor=\"let button of modeButtons\" data-mode=\"{{ button.mode }}\" class=\"{{ button.class }}\" title=\"{{ button.title }}\"></i>\n\n <i *ngIf=\"zoomToExtents\" class=\"vjs-zoom-to-fit\" data-reset=\"true\"title=\"Zoom To Fit\" (click)=\"zoomToFit()\">\n <svg viewBox=\"0 0 32 30\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z\"></path></svg>\n </i>\n\n <i *ngIf=\"zoomButtons\" class=\"vjs-zoom-in\" data-zoom-in=\"true\" title=\"Zoom In\" (click)=\"zoomIn()\">\n <svg viewBox=\"0 0 32 32\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M 13 6 L 13 20 M 6 13 L 20 13 M 22,22 L 30,30 M1, 13 a 12,12 0 1,0 24,0 a 12,12 0 1,0 -24,0\"></path></svg>\n </i>\n\n <i *ngIf=\"zoomButtons\" class=\"vjs-zoom-out\" data-zoom-out=\"true\" title=\"Zoom Out\" (click)=\"zoomOut()\">\n <svg viewBox=\"0 0 32 32\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M 6 13 L 20 13 M 22,22 L 30,30 M1, 13 a 12,12 0 1,0 24,0 a 12,12 0 1,0 -24,0\"></path></svg>\n </i>\n\n <i *ngIf=\"undoRedo\" class=\"vjs-undo\" data-undo=\"true\" title=\"Undo last action\" (click)=\"undo()\"></i>\n <i *ngIf=\"undoRedo\" class=\"vjs-redo\" data-redo=\"true\" title=\"Redo last action\" (click)=\"redo()\"></i>\n <i class=\"vjs-controls-reset-selection\" title=\"Clear selection\" (click)=\"resetSelection()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M2,5 V2 H5 M9,2 H11 M13,2 H15 M19,2 H22 V5 M22,9 V11 M22,13 V15 M22,19 V22 H19 M15,22 H13 M11,22 H9 M5,22 H2 V19 M2,15 V13 M2,11 V9 M9,9 L15,15 M15,9 L9,15\"></path></svg>\n </i>\n <i *ngIf=\"clear\" class=\"vjs-clear-dataset\" [title]=\"clearMessage\" (click)=\"doClear()\">\n <svg viewBox=\"0 0 24 24\" stroke=\"currentColor\" fill=\"currentColor\"><path d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"></path></svg>\n </i>\n <i *ngFor=\"let button of otherButtons\" class=\"{{ button.class }}\" title=\"{{ button.title }}\"></i>\n </div>", isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1121
1262
|
}
|
|
1122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ControlsComponent, decorators: [{
|
|
1123
1264
|
type: Component,
|
|
1124
1265
|
args: [{
|
|
1125
1266
|
selector: "vjs-controls",
|
|
@@ -1160,7 +1301,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1160
1301
|
<i *ngFor="let button of otherButtons" class="{{ button.class }}" title="{{ button.title }}"></i>
|
|
1161
1302
|
</div>`,
|
|
1162
1303
|
}]
|
|
1163
|
-
}], ctorParameters:
|
|
1304
|
+
}], ctorParameters: () => [], propDecorators: { undoRedo: [{
|
|
1164
1305
|
type: Input
|
|
1165
1306
|
}], zoomToExtents: [{
|
|
1166
1307
|
type: Input
|
|
@@ -1199,7 +1340,7 @@ class EdgeTypePickerComponent {
|
|
|
1199
1340
|
});
|
|
1200
1341
|
const current = inspector.getValue(this.propertyName) || '';
|
|
1201
1342
|
this.edgeTypePicker = new EdgeTypePicker(inspector.$ui, this.el.nativeElement, this.resolveMappings(), current, (p, v) => {
|
|
1202
|
-
inspector.setValue(this.propertyName, v);
|
|
1343
|
+
inspector.setValue(this.propertyName, v, null);
|
|
1203
1344
|
this.changeEvent.emit(v);
|
|
1204
1345
|
});
|
|
1205
1346
|
this.edgeTypePicker.render(this.propertyName, inspector._currentCommonData);
|
|
@@ -1207,16 +1348,16 @@ class EdgeTypePickerComponent {
|
|
|
1207
1348
|
}
|
|
1208
1349
|
});
|
|
1209
1350
|
}
|
|
1210
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1211
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1351
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeTypePickerComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1352
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: EdgeTypePickerComponent, selector: "vjs-edge-type", inputs: { propertyName: "propertyName", edgeMappings: "edgeMappings" }, outputs: { changeEvent: "changeEvent" }, ngImport: i0, template: `<div [attr.vjs-att]="propertyName"></div>`, isInline: true }); }
|
|
1212
1353
|
}
|
|
1213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1354
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeTypePickerComponent, decorators: [{
|
|
1214
1355
|
type: Component,
|
|
1215
1356
|
args: [{
|
|
1216
1357
|
selector: "vjs-edge-type",
|
|
1217
1358
|
template: `<div [attr.vjs-att]="propertyName"></div>`
|
|
1218
1359
|
}]
|
|
1219
|
-
}], ctorParameters:
|
|
1360
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { propertyName: [{
|
|
1220
1361
|
type: Input
|
|
1221
1362
|
}], edgeMappings: [{
|
|
1222
1363
|
type: Input
|
|
@@ -1272,15 +1413,15 @@ class PaletteComponent {
|
|
|
1272
1413
|
}
|
|
1273
1414
|
});
|
|
1274
1415
|
}
|
|
1275
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1276
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1416
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaletteComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1417
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: PaletteComponent, selector: "[vjs-palette]", inputs: { selector: "selector", dataGenerator: "dataGenerator", typeGenerator: "typeGenerator", groupIdentifier: "groupIdentifier", allowDropOnEdge: "allowDropOnEdge", allowDropOnGroup: "allowDropOnGroup", allowDropOnCanvas: "allowDropOnCanvas", allowDropOnNode: "allowDropOnNode", onVertexAdded: "onVertexAdded", dragSize: "dragSize", canvasDropFilter: "canvasDropFilter", mode: "mode", selectAfterAdd: "selectAfterAdd", allowClickToAdd: "allowClickToAdd", clickToAddOnly: "clickToAddOnly" }, ngImport: i0 }); }
|
|
1277
1418
|
}
|
|
1278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1419
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaletteComponent, decorators: [{
|
|
1279
1420
|
type: Directive,
|
|
1280
1421
|
args: [{
|
|
1281
1422
|
selector: "[vjs-palette]",
|
|
1282
1423
|
}]
|
|
1283
|
-
}], ctorParameters:
|
|
1424
|
+
}], ctorParameters: () => [], propDecorators: { selector: [{
|
|
1284
1425
|
type: Input
|
|
1285
1426
|
}], dataGenerator: [{
|
|
1286
1427
|
type: Input
|
|
@@ -1343,10 +1484,10 @@ class ExportControlsComponent {
|
|
|
1343
1484
|
type: "image/jpeg",
|
|
1344
1485
|
}));
|
|
1345
1486
|
}
|
|
1346
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1347
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1487
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ExportControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1488
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ExportControlsComponent, selector: "vjs-export-controls", inputs: { showLabel: "showLabel", label: "label", margins: "margins", svgOptions: "svgOptions", imageOptions: "imageOptions", allowSvgExport: "allowSvgExport", allowPngExport: "allowPngExport", allowJpgExport: "allowJpgExport" }, ngImport: i0, template: "<div class=\"vjs-controls vjs-export-controls\">\n <span *ngIf=\"showLabel\">{{ label }}</span>\n <i *ngIf=\"allowSvgExport\"\n ><a href=\"#\" id=\"exportSvg\" (click)=\"exportSVG()\">SVG</a></i\n >\n <i *ngIf=\"allowPngExport\"\n ><a href=\"#\" id=\"exportPng\" (click)=\"exportPNG()\">PNG</a></i\n >\n <i *ngIf=\"allowJpgExport\"\n ><a href=\"#\" id=\"exportJpg\" (click)=\"exportJPG()\">JPG</a></i\n >\n </div>", isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1348
1489
|
}
|
|
1349
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ExportControlsComponent, decorators: [{
|
|
1350
1491
|
type: Component,
|
|
1351
1492
|
args: [{
|
|
1352
1493
|
selector: "vjs-export-controls",
|
|
@@ -1408,7 +1549,7 @@ class ColorPickerComponent {
|
|
|
1408
1549
|
colorInput.onchange = () => {
|
|
1409
1550
|
const color = colorInput.value;
|
|
1410
1551
|
this.pushColor(color);
|
|
1411
|
-
i.setValue(this.propertyName, color, true);
|
|
1552
|
+
i.setValue(this.propertyName, color, null, true);
|
|
1412
1553
|
};
|
|
1413
1554
|
setTimeout(() => {
|
|
1414
1555
|
// if there is a color, maybe push to context
|
|
@@ -1428,7 +1569,7 @@ class ColorPickerComponent {
|
|
|
1428
1569
|
}
|
|
1429
1570
|
selectColor(color) {
|
|
1430
1571
|
this.$getInspector(inspector => {
|
|
1431
|
-
inspector.setValue(this.propertyName, color);
|
|
1572
|
+
inspector.setValue(this.propertyName, color, null);
|
|
1432
1573
|
this.$el.nativeElement.querySelector("[type='color']").value = color;
|
|
1433
1574
|
});
|
|
1434
1575
|
}
|
|
@@ -1447,10 +1588,10 @@ class ColorPickerComponent {
|
|
|
1447
1588
|
}
|
|
1448
1589
|
});
|
|
1449
1590
|
}
|
|
1450
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1451
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1591
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1592
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ColorPickerComponent, selector: "vjs-color", inputs: { propertyName: "propertyName", maxColors: "maxColors" }, outputs: { changeEvent: "changeEvent" }, ngImport: i0, template: "<div class=\"vjs-color-picker\">\n <input type=\"color\" [attr.vjs-att]=\"propertyName\"/>\n <div class=\"vjs-color-picker-swatches\">\n <div *ngFor=\"let swatch of swatches()\" class=\"vjs-color-picker-swatch\" attr.data-color=\"{{swatch}}\" style=\"background-color:{{swatch}}\" (click)=\"selectColor(swatch)\"></div>\n </div>\n </div>", isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
|
|
1452
1593
|
}
|
|
1453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ColorPickerComponent, decorators: [{
|
|
1454
1595
|
type: Component,
|
|
1455
1596
|
args: [{
|
|
1456
1597
|
selector: "vjs-color",
|
|
@@ -1461,7 +1602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1461
1602
|
</div>
|
|
1462
1603
|
</div>`
|
|
1463
1604
|
}]
|
|
1464
|
-
}], ctorParameters:
|
|
1605
|
+
}], ctorParameters: () => [], propDecorators: { propertyName: [{
|
|
1465
1606
|
type: Input
|
|
1466
1607
|
}], maxColors: [{
|
|
1467
1608
|
type: Input
|
|
@@ -1472,19 +1613,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1472
1613
|
|
|
1473
1614
|
class DiagramComponent {
|
|
1474
1615
|
constructor() {
|
|
1616
|
+
|
|
1617
|
+
this.data = input();
|
|
1618
|
+
|
|
1619
|
+
this.url = input();
|
|
1475
1620
|
this.$ngZone = inject(NgZone);
|
|
1476
1621
|
this.$el = inject(ElementRef);
|
|
1477
1622
|
this.$vjs = inject(VisuallyJsService);
|
|
1623
|
+
this._dataEffect = effect(() => {
|
|
1624
|
+
const currentData = this.data();
|
|
1625
|
+
if (currentData) {
|
|
1626
|
+
if (this.diagram) {
|
|
1627
|
+
this.diagram.clear();
|
|
1628
|
+
this.diagram.load({ data: currentData });
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
});
|
|
1632
|
+
this._urlEffect = effect(() => {
|
|
1633
|
+
const currentUrl = this.url();
|
|
1634
|
+
if (currentUrl) {
|
|
1635
|
+
// Respond to changes in the url here.
|
|
1636
|
+
// For example, if you need to reload the model with new data:
|
|
1637
|
+
if (this.diagram) {
|
|
1638
|
+
this.diagram.clear();
|
|
1639
|
+
this.diagram.load({ url: currentUrl });
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
});
|
|
1478
1643
|
}
|
|
1479
1644
|
ngAfterViewInit() {
|
|
1480
1645
|
this.$ngZone.runOutsideAngular(() => {
|
|
1481
1646
|
this.diagram = createDiagram(this.$el.nativeElement, this.options, this.modelOptions);
|
|
1482
1647
|
this.$vjs.$setDiagram(this.diagram);
|
|
1483
|
-
|
|
1484
|
-
|
|
1648
|
+
const initialData = this.data();
|
|
1649
|
+
const initialUrl = this.url();
|
|
1650
|
+
if (initialData) {
|
|
1651
|
+
this.diagram.load({ data: initialData });
|
|
1485
1652
|
}
|
|
1486
|
-
else if (
|
|
1487
|
-
this.diagram.load({ url:
|
|
1653
|
+
else if (initialUrl) {
|
|
1654
|
+
this.diagram.load({ url: initialUrl });
|
|
1488
1655
|
}
|
|
1489
1656
|
});
|
|
1490
1657
|
}
|
|
@@ -1499,10 +1666,10 @@ class DiagramComponent {
|
|
|
1499
1666
|
saveToUrl(options) {
|
|
1500
1667
|
this.diagram.saveToUrl(options);
|
|
1501
1668
|
}
|
|
1502
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1503
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1669
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DiagramComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1670
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: DiagramComponent, selector: "vjs-diagram", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, modelOptions: { classPropertyName: "modelOptions", publicName: "modelOptions", isSignal: false, isRequired: false, transformFunction: null } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
1504
1671
|
}
|
|
1505
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DiagramComponent, decorators: [{
|
|
1506
1673
|
type: Component,
|
|
1507
1674
|
args: [{
|
|
1508
1675
|
selector: "vjs-diagram",
|
|
@@ -1510,10 +1677,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1510
1677
|
}]
|
|
1511
1678
|
}], propDecorators: { options: [{
|
|
1512
1679
|
type: Input
|
|
1513
|
-
}], data: [{
|
|
1514
|
-
type: Input
|
|
1515
|
-
}], url: [{
|
|
1516
|
-
type: Input
|
|
1517
1680
|
}], modelOptions: [{
|
|
1518
1681
|
type: Input
|
|
1519
1682
|
}] } });
|
|
@@ -1555,12 +1718,12 @@ class SeriesBasedChartComponent {
|
|
|
1555
1718
|
ngOnDestroy() {
|
|
1556
1719
|
this.chart?.destroy();
|
|
1557
1720
|
}
|
|
1558
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1559
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1721
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SeriesBasedChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1722
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SeriesBasedChartComponent }); }
|
|
1560
1723
|
}
|
|
1561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SeriesBasedChartComponent, decorators: [{
|
|
1562
1725
|
type: Injectable
|
|
1563
|
-
}], ctorParameters:
|
|
1726
|
+
}], ctorParameters: () => [], propDecorators: { data: [{
|
|
1564
1727
|
type: Input
|
|
1565
1728
|
}], url: [{
|
|
1566
1729
|
type: Input
|
|
@@ -1575,10 +1738,10 @@ class ColumnChartComponent extends SeriesBasedChartComponent {
|
|
|
1575
1738
|
createChart(el, options) {
|
|
1576
1739
|
return new ColumnChart(el, options);
|
|
1577
1740
|
}
|
|
1578
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1579
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1741
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ColumnChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1742
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ColumnChartComponent, selector: "vjs-column-chart", inputs: { data: "data", url: "url", options: "options", useModel: "useModel" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1580
1743
|
}
|
|
1581
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ColumnChartComponent, decorators: [{
|
|
1582
1745
|
type: Component,
|
|
1583
1746
|
args: [{
|
|
1584
1747
|
selector: "vjs-column-chart",
|
|
@@ -1599,10 +1762,10 @@ class BarChartComponent extends SeriesBasedChartComponent {
|
|
|
1599
1762
|
createChart(el, options) {
|
|
1600
1763
|
return new BarChart(el, options);
|
|
1601
1764
|
}
|
|
1602
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1603
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1765
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1766
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BarChartComponent, selector: "vjs-bar-chart", inputs: { data: "data", url: "url", options: "options", useModel: "useModel" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1604
1767
|
}
|
|
1605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1768
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BarChartComponent, decorators: [{
|
|
1606
1769
|
type: Component,
|
|
1607
1770
|
args: [{
|
|
1608
1771
|
selector: "vjs-bar-chart",
|
|
@@ -1658,16 +1821,16 @@ class DiagramPaletteComponent {
|
|
|
1658
1821
|
this.$init(this.inputDiagram);
|
|
1659
1822
|
}
|
|
1660
1823
|
}
|
|
1661
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1662
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1824
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DiagramPaletteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1825
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DiagramPaletteComponent, selector: "vjs-diagram-palette", inputs: { fill: "fill", outline: "outline", dragSize: "dragSize", inspector: "inspector", iconSize: "iconSize", showLabels: "showLabels", paletteStrokeWidth: "paletteStrokeWidth", showAllMessage: "showAllMessage", onCellAdded: "onCellAdded", mode: "mode", allowClickToAdd: "allowClickToAdd", autoExitDrawMode: "autoExitDrawMode", selectAfterAdd: "selectAfterAdd", inputDiagram: ["diagram", "inputDiagram"], onVertexAdded: "onVertexAdded", preparedShapes: "preparedShapes" }, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1663
1826
|
}
|
|
1664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DiagramPaletteComponent, decorators: [{
|
|
1665
1828
|
type: Component,
|
|
1666
1829
|
args: [{
|
|
1667
1830
|
selector: "vjs-diagram-palette",
|
|
1668
1831
|
template: `<div></div>`,
|
|
1669
1832
|
}]
|
|
1670
|
-
}], ctorParameters:
|
|
1833
|
+
}], ctorParameters: () => [], propDecorators: { fill: [{
|
|
1671
1834
|
type: Input
|
|
1672
1835
|
}], outline: [{
|
|
1673
1836
|
type: Input
|
|
@@ -1707,10 +1870,10 @@ class XYChartComponent extends SeriesBasedChartComponent {
|
|
|
1707
1870
|
createChart(el, options) {
|
|
1708
1871
|
return new CategoryValueChart(el, options);
|
|
1709
1872
|
}
|
|
1710
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1711
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1873
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: XYChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1874
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: XYChartComponent, selector: "vjs-xy-chart", inputs: { data: "data", url: "url", options: "options", useModel: "useModel" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1712
1875
|
}
|
|
1713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: XYChartComponent, decorators: [{
|
|
1714
1877
|
type: Component,
|
|
1715
1878
|
args: [{
|
|
1716
1879
|
selector: "vjs-xy-chart",
|
|
@@ -1731,10 +1894,10 @@ class LineChartComponent extends SeriesBasedChartComponent {
|
|
|
1731
1894
|
createChart(el, options) {
|
|
1732
1895
|
return new LineChart(el, options);
|
|
1733
1896
|
}
|
|
1734
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1735
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1897
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LineChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1898
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: LineChartComponent, selector: "vjs-line-chart", inputs: { data: "data", url: "url", options: "options", useModel: "useModel" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1736
1899
|
}
|
|
1737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1900
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LineChartComponent, decorators: [{
|
|
1738
1901
|
type: Component,
|
|
1739
1902
|
args: [{
|
|
1740
1903
|
selector: "vjs-line-chart",
|
|
@@ -1755,10 +1918,10 @@ class AreaChartComponent extends SeriesBasedChartComponent {
|
|
|
1755
1918
|
createChart(el, options) {
|
|
1756
1919
|
return new AreaChart(el, options);
|
|
1757
1920
|
}
|
|
1758
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1759
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1921
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AreaChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1922
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AreaChartComponent, selector: "vjs-area-chart", inputs: { data: "data", url: "url", options: "options", useModel: "useModel" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1760
1923
|
}
|
|
1761
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1924
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AreaChartComponent, decorators: [{
|
|
1762
1925
|
type: Component,
|
|
1763
1926
|
args: [{
|
|
1764
1927
|
selector: "vjs-area-chart",
|
|
@@ -1779,10 +1942,10 @@ class PieChartComponent extends SeriesBasedChartComponent {
|
|
|
1779
1942
|
createChart(el, options) {
|
|
1780
1943
|
return new PieChart(el, options);
|
|
1781
1944
|
}
|
|
1782
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1783
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1945
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PieChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1946
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PieChartComponent, selector: "vjs-pie-chart", inputs: { data: "data", url: "url", options: "options", useModel: "useModel" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1784
1947
|
}
|
|
1785
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1948
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PieChartComponent, decorators: [{
|
|
1786
1949
|
type: Component,
|
|
1787
1950
|
args: [{
|
|
1788
1951
|
selector: "vjs-pie-chart",
|
|
@@ -1803,10 +1966,10 @@ class ScatterChartComponent extends SeriesBasedChartComponent {
|
|
|
1803
1966
|
createChart(el, options) {
|
|
1804
1967
|
return new ScatterChart(el, options);
|
|
1805
1968
|
}
|
|
1806
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1807
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1969
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ScatterChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1970
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ScatterChartComponent, selector: "vjs-scatter-chart", inputs: { data: "data", url: "url", options: "options", useModel: "useModel" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1808
1971
|
}
|
|
1809
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1972
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ScatterChartComponent, decorators: [{
|
|
1810
1973
|
type: Component,
|
|
1811
1974
|
args: [{
|
|
1812
1975
|
selector: "vjs-scatter-chart",
|
|
@@ -1827,10 +1990,10 @@ class BubbleChartComponent extends SeriesBasedChartComponent {
|
|
|
1827
1990
|
createChart(el, options) {
|
|
1828
1991
|
return new BubbleChart(el, options);
|
|
1829
1992
|
}
|
|
1830
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1831
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1993
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BubbleChartComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1994
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BubbleChartComponent, selector: "vjs-bubble-chart", inputs: { data: "data", url: "url", options: "options", useModel: "useModel" }, usesInheritance: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1832
1995
|
}
|
|
1833
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BubbleChartComponent, decorators: [{
|
|
1834
1997
|
type: Component,
|
|
1835
1998
|
args: [{
|
|
1836
1999
|
selector: "vjs-bubble-chart",
|
|
@@ -1896,16 +2059,16 @@ class SankeyChartComponent {
|
|
|
1896
2059
|
ngOnDestroy() {
|
|
1897
2060
|
this.chart?.destroy();
|
|
1898
2061
|
}
|
|
1899
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1900
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2062
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SankeyChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2063
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SankeyChartComponent, selector: "vjs-sankey-chart", inputs: { csvData: "csvData", jsonData: "jsonData", url: "url", interactive: "interactive", pivot: "pivot", options: "options", useModel: "useModel" }, usesOnChanges: true, ngImport: i0, template: `<div></div>`, isInline: true }); }
|
|
1901
2064
|
}
|
|
1902
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SankeyChartComponent, decorators: [{
|
|
1903
2066
|
type: Component,
|
|
1904
2067
|
args: [{
|
|
1905
2068
|
selector: "vjs-sankey-chart",
|
|
1906
2069
|
template: `<div></div>`
|
|
1907
2070
|
}]
|
|
1908
|
-
}], ctorParameters:
|
|
2071
|
+
}], ctorParameters: () => [], propDecorators: { csvData: [{
|
|
1909
2072
|
type: Input
|
|
1910
2073
|
}], jsonData: [{
|
|
1911
2074
|
type: Input
|
|
@@ -1946,14 +2109,14 @@ class DecoratorComponent {
|
|
|
1946
2109
|
this.surface.unfixElement(this.el.nativeElement.firstElementChild);
|
|
1947
2110
|
}
|
|
1948
2111
|
}
|
|
1949
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1950
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2112
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DecoratorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2113
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: DecoratorComponent, selector: "vjs-decorator", inputs: { placement: "placement", position: "position", constraints: "constraints" }, ngImport: i0, template: `
|
|
1951
2114
|
<div style="display:inline-block;">
|
|
1952
2115
|
<ng-content></ng-content>
|
|
1953
2116
|
</div>
|
|
1954
2117
|
`, isInline: true }); }
|
|
1955
2118
|
}
|
|
1956
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DecoratorComponent, decorators: [{
|
|
1957
2120
|
type: Component,
|
|
1958
2121
|
args: [{
|
|
1959
2122
|
selector: "vjs-decorator",
|
|
@@ -1972,13 +2135,621 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
1972
2135
|
}] } });
|
|
1973
2136
|
|
|
1974
2137
|
|
|
2138
|
+
class SurfacePopupComponent {
|
|
2139
|
+
constructor() {
|
|
2140
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
2141
|
+
this.vjs = inject(VisuallyJsService);
|
|
2142
|
+
this.initialized = false;
|
|
2143
|
+
this.current = signal(null);
|
|
2144
|
+
this.model = this.vjs.model;
|
|
2145
|
+
this.ui = this.vjs.ui;
|
|
2146
|
+
this.display = computed(() => (this.current() == null ? "none" : "block"));
|
|
2147
|
+
}
|
|
2148
|
+
ngAfterViewInit() {
|
|
2149
|
+
this._hideFunction = function () {
|
|
2150
|
+
this.popupHandler?.$hide();
|
|
2151
|
+
}.bind(this);
|
|
2152
|
+
this.vjs.getSurface((surface) => {
|
|
2153
|
+
if (!this.initialized) {
|
|
2154
|
+
this.initialized = true;
|
|
2155
|
+
this.popupHandler = new PopupHandler(this.selector, this.container.nativeElement, surface, (v) => {
|
|
2156
|
+
this.current.set(v);
|
|
2157
|
+
requestAnimationFrame(() => this.cdr.detectChanges());
|
|
2158
|
+
}, this.anchor);
|
|
2159
|
+
}
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
ngOnDestroy() {
|
|
2163
|
+
if (this.popupHandler) {
|
|
2164
|
+
this.popupHandler.$destroy();
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SurfacePopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2168
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SurfacePopupComponent, selector: "vjs-surface-popup", inputs: { selector: "selector", anchor: "anchor" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "\n <div #container class=\"vjs-surface-popup\" [style.display]=\"display()\" style=\"position:absolute\">\n <ng-container *ngIf=\"current()\">\n <ng-container *ngTemplateOutlet=\"template; context: { vertex: current(), model: model(), ui: ui(), hide:_hideFunction }\"></ng-container>\n </ng-container>\n </div>\n ", isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
2169
|
+
}
|
|
2170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SurfacePopupComponent, decorators: [{
|
|
2171
|
+
type: Component,
|
|
2172
|
+
args: [{
|
|
2173
|
+
selector: "vjs-surface-popup",
|
|
2174
|
+
template: `
|
|
2175
|
+
<div #container class="${CLASS_SURFACE_POPUP}" [style.display]="display()" style="position:absolute">
|
|
2176
|
+
<ng-container *ngIf="current()">
|
|
2177
|
+
<ng-container *ngTemplateOutlet="template; context: { vertex: current(), model: model(), ui: ui(), hide:_hideFunction }"></ng-container>
|
|
2178
|
+
</ng-container>
|
|
2179
|
+
</div>
|
|
2180
|
+
`
|
|
2181
|
+
}]
|
|
2182
|
+
}], propDecorators: { selector: [{
|
|
2183
|
+
type: Input,
|
|
2184
|
+
args: [{ required: true }]
|
|
2185
|
+
}], anchor: [{
|
|
2186
|
+
type: Input
|
|
2187
|
+
}], template: [{
|
|
2188
|
+
type: ContentChild,
|
|
2189
|
+
args: [TemplateRef]
|
|
2190
|
+
}], container: [{
|
|
2191
|
+
type: ViewChild,
|
|
2192
|
+
args: ["container"]
|
|
2193
|
+
}] } });
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
class PaperComponent {
|
|
2197
|
+
constructor() {
|
|
2198
|
+
|
|
2199
|
+
this.data = input();
|
|
2200
|
+
|
|
2201
|
+
this.url = input();
|
|
2202
|
+
|
|
2203
|
+
this.vertexEvent = new EventEmitter();
|
|
2204
|
+
this.$el = inject(ElementRef);
|
|
2205
|
+
this.$viewContainerRef = inject(ViewContainerRef);
|
|
2206
|
+
this.$ngZone = inject(NgZone);
|
|
2207
|
+
this.$vjs = inject(VisuallyJsService);
|
|
2208
|
+
this._dataEffect = effect(() => {
|
|
2209
|
+
const currentData = this.data();
|
|
2210
|
+
if (currentData) {
|
|
2211
|
+
if (this.model) {
|
|
2212
|
+
this.model.clear();
|
|
2213
|
+
this.model.load({ data: currentData });
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
});
|
|
2217
|
+
this._urlEffect = effect(() => {
|
|
2218
|
+
const currentUrl = this.url();
|
|
2219
|
+
if (currentUrl) {
|
|
2220
|
+
// Respond to changes in the url here.
|
|
2221
|
+
// For example, if you need to reload the model with new data:
|
|
2222
|
+
if (this.model) {
|
|
2223
|
+
this.model.clear();
|
|
2224
|
+
this.model.load({ url: currentUrl });
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
});
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
getNativeElement(component) {
|
|
2231
|
+
return component.location.nativeElement.childNodes[0];
|
|
2232
|
+
}
|
|
2233
|
+
_getComponent(el, tryParent) {
|
|
2234
|
+
if (el == null) {
|
|
2235
|
+
return null;
|
|
2236
|
+
}
|
|
2237
|
+
else {
|
|
2238
|
+
let vjc = el._visuallyJsNgComponent;
|
|
2239
|
+
if (vjc == null && tryParent && el.parentNode != null) {
|
|
2240
|
+
vjc = el.parentNode._visuallyJsNgComponent;
|
|
2241
|
+
}
|
|
2242
|
+
return vjc;
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
_getComponentThen(el, then, tryParent) {
|
|
2246
|
+
const c = this._getComponent(el, tryParent);
|
|
2247
|
+
if (c != null) {
|
|
2248
|
+
then(c);
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
nodeOrGroupUpdated(params) {
|
|
2253
|
+
const info = this.paper.getObjectInfo(params.vertex, false);
|
|
2254
|
+
this._getComponentThen(info.el, (component) => {
|
|
2255
|
+
component.data = params.vertex.data;
|
|
2256
|
+
component.$data?.set(component.data);
|
|
2257
|
+
if (component.changeDetectorRef) {
|
|
2258
|
+
component.changeDetectorRef.detectChanges();
|
|
2259
|
+
}
|
|
2260
|
+
}, false);
|
|
2261
|
+
this._maybeUpdateEdgeOverlays(params.vertex);
|
|
2262
|
+
}
|
|
2263
|
+
portUpdated(params) {
|
|
2264
|
+
const info = this.paper.getObjectInfo(params.port, false);
|
|
2265
|
+
this._getComponentThen(info.el, (component) => {
|
|
2266
|
+
if (component instanceof BasePortComponent) {
|
|
2267
|
+
component.data = params.port.data;
|
|
2268
|
+
if (component.changeDetectorRef) {
|
|
2269
|
+
component.changeDetectorRef.detectChanges();
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
}, true);
|
|
2273
|
+
this._maybeUpdateEdgeOverlays(params.port);
|
|
2274
|
+
}
|
|
2275
|
+
_maybeUpdateEdgeOverlays(vertex) {
|
|
2276
|
+
vertex.getAllEdges().forEach(e => this._handleEdgeUpdate(e.id));
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
_handleEdgeUpdate(edgeId) {
|
|
2280
|
+
const connection = this.paper.getRenderedConnection(edgeId);
|
|
2281
|
+
if (connection) {
|
|
2282
|
+
for (let id in connection.overlays) {
|
|
2283
|
+
const canvas = connection.overlays[id].contentElement;
|
|
2284
|
+
this._getComponentThen(canvas, (component) => {
|
|
2285
|
+
if (component.changeDetectorRef != null) {
|
|
2286
|
+
component.changeDetectorRef.detectChanges();
|
|
2287
|
+
}
|
|
2288
|
+
}, false);
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
edgeUpdated(params) {
|
|
2294
|
+
this._handleEdgeUpdate(params.edge.id);
|
|
2295
|
+
}
|
|
2296
|
+
edgeAddedRemoved(params) {
|
|
2297
|
+
const info = this.paper.getObjectInfo(params.edge.source, false);
|
|
2298
|
+
if (info.el) {
|
|
2299
|
+
this._getComponentThen(info.el, (component) => {
|
|
2300
|
+
try {
|
|
2301
|
+
;
|
|
2302
|
+
component.$updateEdges();
|
|
2303
|
+
if (component.changeDetectorRef) {
|
|
2304
|
+
component.changeDetectorRef.detectChanges();
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
catch (e) { }
|
|
2308
|
+
}, false);
|
|
2309
|
+
}
|
|
2310
|
+
const info2 = this.paper.getObjectInfo(params.edge.target, false);
|
|
2311
|
+
if (info2.el && info.obj.getFullId() !== info2.obj.getFullId()) {
|
|
2312
|
+
this._getComponentThen(info2.el, (component) => {
|
|
2313
|
+
try {
|
|
2314
|
+
;
|
|
2315
|
+
component.$updateEdges();
|
|
2316
|
+
// tslint:disable-next-line:align
|
|
2317
|
+
if (component.changeDetectorRef) {
|
|
2318
|
+
component.changeDetectorRef.detectChanges();
|
|
2319
|
+
}
|
|
2320
|
+
}
|
|
2321
|
+
catch (e) { }
|
|
2322
|
+
}, false);
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
_processAngularOverlays(view) {
|
|
2327
|
+
const self = this;
|
|
2328
|
+
const edgeTypes = view.edges || {};
|
|
2329
|
+
for (let edgeTypeId in edgeTypes) {
|
|
2330
|
+
const edgeType = edgeTypes[edgeTypeId];
|
|
2331
|
+
if (edgeType.overlays != null) {
|
|
2332
|
+
edgeType.overlays = edgeType.overlays.map((o) => {
|
|
2333
|
+
if (typeof o === "string") {
|
|
2334
|
+
return o;
|
|
2335
|
+
}
|
|
2336
|
+
else {
|
|
2337
|
+
const fo = o;
|
|
2338
|
+
if (fo.type === AngularComponentOverlayType) {
|
|
2339
|
+
const newSpec = Object.assign(fo, {
|
|
2340
|
+
type: OVERLAY_TYPE_CUSTOM,
|
|
2341
|
+
});
|
|
2342
|
+
newSpec.options = (newSpec.options || {});
|
|
2343
|
+
newSpec.options.create = (connection) => {
|
|
2344
|
+
const el = document.createElement(ELEMENT_DIV);
|
|
2345
|
+
let createdComponent = self.$viewContainerRef.createComponent(newSpec.options.component);
|
|
2346
|
+
let angularOverlayComponent = createdComponent.instance;
|
|
2347
|
+
let nativeEl = createdComponent.location.nativeElement.childNodes[0];
|
|
2348
|
+
el.appendChild(nativeEl);
|
|
2349
|
+
el._visuallyJsNgComponent = angularOverlayComponent;
|
|
2350
|
+
|
|
2351
|
+
if (connection != null) {
|
|
2352
|
+
const edge = connection.edge;
|
|
2353
|
+
angularOverlayComponent.edge = edge;
|
|
2354
|
+
angularOverlayComponent.data = edge.data;
|
|
2355
|
+
}
|
|
2356
|
+
angularOverlayComponent.model = self.model;
|
|
2357
|
+
angularOverlayComponent.ui = self.paper;
|
|
2358
|
+
createdComponent.changeDetectorRef.detectChanges();
|
|
2359
|
+
return el;
|
|
2360
|
+
};
|
|
2361
|
+
return newSpec;
|
|
2362
|
+
}
|
|
2363
|
+
else {
|
|
2364
|
+
return fo;
|
|
2365
|
+
}
|
|
2366
|
+
}
|
|
2367
|
+
});
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
return view;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
save(options) {
|
|
2374
|
+
this.paper.save(options);
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
exportData(options) {
|
|
2378
|
+
return this.paper.model.exportData(options);
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
dataLoadEnd() {
|
|
2382
|
+
setTimeout(() => {
|
|
2383
|
+
if (this.paper != null) {
|
|
2384
|
+
this.paper.repaintEverything();
|
|
2385
|
+
}
|
|
2386
|
+
}, 0);
|
|
2387
|
+
}
|
|
2388
|
+
$removeNgElement(el) {
|
|
2389
|
+
if (el._ref != null) {
|
|
2390
|
+
el._ref.destroy();
|
|
2391
|
+
}
|
|
2392
|
+
if (el.parentNode != null) {
|
|
2393
|
+
el.parentNode.removeChild(el);
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
ngAfterViewInit() {
|
|
2398
|
+
this.$ngZone.runOutsideAngular(() => {
|
|
2399
|
+
const view = this._processAngularOverlays(this.viewOptions || {});
|
|
2400
|
+
const self = this;
|
|
2401
|
+
this.renderOptions = this.renderOptions || {};
|
|
2402
|
+
const render = (directiveId, data, instance, objectType, paper, def, modelObject, eventInfo) => {
|
|
2403
|
+
let component;
|
|
2404
|
+
if (def.component == null) {
|
|
2405
|
+
if (isGroup(modelObject)) {
|
|
2406
|
+
component = DefaultGroupComponent;
|
|
2407
|
+
}
|
|
2408
|
+
else {
|
|
2409
|
+
component = DefaultNodeComponent;
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
else {
|
|
2413
|
+
component = def.component;
|
|
2414
|
+
}
|
|
2415
|
+
let createdComponent = self.$viewContainerRef.createComponent(component);
|
|
2416
|
+
let _componentRef = createdComponent.instance;
|
|
2417
|
+
_componentRef.data = data || {};
|
|
2418
|
+
_componentRef.model = model;
|
|
2419
|
+
_componentRef.paper = paper;
|
|
2420
|
+
_componentRef.ui = paper;
|
|
2421
|
+
_componentRef.modelObject = modelObject;
|
|
2422
|
+
// get the reflection data for the component
|
|
2423
|
+
const componentInfo = reflectComponentType(component);
|
|
2424
|
+
// ..and populate any declared inputs from data
|
|
2425
|
+
componentInfo.inputs.forEach((pt) => {
|
|
2426
|
+
const pv = _componentRef.data[pt.propName];
|
|
2427
|
+
if (pv != null) {
|
|
2428
|
+
_componentRef[pt.propName] = pv;
|
|
2429
|
+
}
|
|
2430
|
+
});
|
|
2431
|
+
// map to any outputs
|
|
2432
|
+
componentInfo.outputs.forEach((pt) => {
|
|
2433
|
+
_componentRef[pt.propName].subscribe((d) => self.vertexEvent.emit({
|
|
2434
|
+
vertex: modelObject,
|
|
2435
|
+
event: pt.propName,
|
|
2436
|
+
payload: d,
|
|
2437
|
+
component: createdComponent,
|
|
2438
|
+
}));
|
|
2439
|
+
});
|
|
2440
|
+
// if angular def has 'inputs' set, set them on the component. this is different to the mechanism above, in which values are extracted from
|
|
2441
|
+
// each node's backing data. here we inject values either as a string or from some arbitrary function.
|
|
2442
|
+
if (def.inputs != null) {
|
|
2443
|
+
for (let k in def.inputs) {
|
|
2444
|
+
const v = def.inputs[k];
|
|
2445
|
+
const value = typeof v === "string" ? v : v(modelObject);
|
|
2446
|
+
_componentRef[k] = value;
|
|
2447
|
+
}
|
|
2448
|
+
}
|
|
2449
|
+
createdComponent.changeDetectorRef.detectChanges();
|
|
2450
|
+
// TODO this should not be necessary
|
|
2451
|
+
const nativeElement = self.getNativeElement(createdComponent);
|
|
2452
|
+
_componentRef._el = nativeElement;
|
|
2453
|
+
_componentRef._el._visuallyJsNgComponent = _componentRef;
|
|
2454
|
+
_componentRef._el._ref = createdComponent; // we store _ref so we can call `destroy` on it later if the node is removed.
|
|
2455
|
+
paper.$vertexRendered(modelObject, nativeElement, def, eventInfo);
|
|
2456
|
+
};
|
|
2457
|
+
const templateRenderer = {
|
|
2458
|
+
asynchronous: false,
|
|
2459
|
+
reactive: true,
|
|
2460
|
+
usesWrapperElement: false,
|
|
2461
|
+
update: (el, data, v, renderer) => { },
|
|
2462
|
+
render,
|
|
2463
|
+
rerender: (directiveId, data, instance, objectType, paper, def, modelObject, eventInfo, originalElement) => {
|
|
2464
|
+
this.$removeNgElement(originalElement);
|
|
2465
|
+
render(directiveId, data, instance, objectType, paper, def, modelObject, eventInfo);
|
|
2466
|
+
},
|
|
2467
|
+
cleanupVertex: (objId, el) => {
|
|
2468
|
+
this.$removeNgElement(el);
|
|
2469
|
+
},
|
|
2470
|
+
cleanupPort: (objId, el) => {
|
|
2471
|
+
this.$removeNgElement(el);
|
|
2472
|
+
},
|
|
2473
|
+
};
|
|
2474
|
+
const renderParams = extend(this.renderOptions || {}, {
|
|
2475
|
+
view: view,
|
|
2476
|
+
});
|
|
2477
|
+
let model = this.inputModel || new BrowserUIAngularModel(this.modelOptions);
|
|
2478
|
+
this.model = model;
|
|
2479
|
+
this.paper = renderPaper(model, self.$el.nativeElement, templateRenderer, renderParams);
|
|
2480
|
+
this.$vjs.$setPaper(this.paper);
|
|
2481
|
+
// ----------------
|
|
2482
|
+
this.nodeUpdateFn = this.nodeOrGroupUpdated.bind(this);
|
|
2483
|
+
model.bind(EVENT_NODE_UPDATED, this.nodeUpdateFn);
|
|
2484
|
+
model.bind(EVENT_PORT_ADDED, this.nodeUpdateFn);
|
|
2485
|
+
model.bind(EVENT_GROUP_UPDATED, this.nodeUpdateFn);
|
|
2486
|
+
this.dataLoadEndFn = this.dataLoadEnd.bind(this);
|
|
2487
|
+
model.bind(EVENT_DATA_LOAD_END, this.dataLoadEndFn);
|
|
2488
|
+
this.portUpdateFn = this.portUpdated.bind(this);
|
|
2489
|
+
model.bind(EVENT_PORT_UPDATED, this.portUpdateFn);
|
|
2490
|
+
this.edgeUpdateFn = this.edgeUpdated.bind(this);
|
|
2491
|
+
model.bind(EVENT_EDGE_UPDATED, this.edgeUpdateFn);
|
|
2492
|
+
this.edgeAddFn = this.edgeAddedRemoved.bind(this);
|
|
2493
|
+
this.edgeRemoveFn = this.edgeAddedRemoved.bind(this);
|
|
2494
|
+
model.bind(EVENT_EDGE_ADDED, this.edgeAddFn);
|
|
2495
|
+
model.bind(EVENT_EDGE_REMOVED, this.edgeRemoveFn);
|
|
2496
|
+
const initialData = this.data();
|
|
2497
|
+
const initialUrl = this.url();
|
|
2498
|
+
if (initialData) {
|
|
2499
|
+
this.model.load({ data: initialData });
|
|
2500
|
+
}
|
|
2501
|
+
else if (initialUrl) {
|
|
2502
|
+
this.model.load({ url: initialUrl });
|
|
2503
|
+
}
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
ngOnDestroy() {
|
|
2508
|
+
this.paper.destroy();
|
|
2509
|
+
this.model.unbind(EVENT_NODE_UPDATED, this.nodeUpdateFn);
|
|
2510
|
+
this.model.unbind(EVENT_GROUP_UPDATED, this.nodeUpdateFn);
|
|
2511
|
+
this.model.unbind(EVENT_PORT_ADDED, this.nodeUpdateFn);
|
|
2512
|
+
this.model.unbind(EVENT_PORT_UPDATED, this.portUpdateFn);
|
|
2513
|
+
this.model.unbind(EVENT_EDGE_UPDATED, this.edgeUpdateFn);
|
|
2514
|
+
this.model.unbind(EVENT_EDGE_ADDED, this.edgeAddFn);
|
|
2515
|
+
this.model.unbind(EVENT_EDGE_REMOVED, this.edgeRemoveFn);
|
|
2516
|
+
this.model.unbind(EVENT_DATA_LOAD_END, this.dataLoadEndFn);
|
|
2517
|
+
this.paper.unbind(EVENT_INTERNAL_CONNECTION, this.edgeAddFn);
|
|
2518
|
+
}
|
|
2519
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2520
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: PaperComponent, selector: "vjs-paper", inputs: { inputModel: { classPropertyName: "inputModel", publicName: "model", isSignal: false, isRequired: false, transformFunction: null }, viewOptions: { classPropertyName: "viewOptions", publicName: "viewOptions", isSignal: false, isRequired: false, transformFunction: null }, renderOptions: { classPropertyName: "renderOptions", publicName: "renderOptions", isSignal: false, isRequired: false, transformFunction: null }, modelOptions: { classPropertyName: "modelOptions", publicName: "modelOptions", isSignal: false, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { vertexEvent: "vertexEvent" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
2521
|
+
}
|
|
2522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaperComponent, decorators: [{
|
|
2523
|
+
type: Component,
|
|
2524
|
+
args: [{
|
|
2525
|
+
selector: "vjs-paper",
|
|
2526
|
+
template: `<ng-content></ng-content>`
|
|
2527
|
+
}]
|
|
2528
|
+
}], propDecorators: { inputModel: [{
|
|
2529
|
+
type: Input,
|
|
2530
|
+
args: [{ alias: "model" }]
|
|
2531
|
+
}], viewOptions: [{
|
|
2532
|
+
type: Input
|
|
2533
|
+
}], renderOptions: [{
|
|
2534
|
+
type: Input
|
|
2535
|
+
}], modelOptions: [{
|
|
2536
|
+
type: Input
|
|
2537
|
+
}], vertexEvent: [{
|
|
2538
|
+
type: Output
|
|
2539
|
+
}] } });
|
|
2540
|
+
|
|
2541
|
+
class BackgroundComponent {
|
|
2542
|
+
constructor() {
|
|
2543
|
+
this.$vjs = inject(VisuallyJsService);
|
|
2544
|
+
this._bg = null;
|
|
2545
|
+
this._optionsEffect = effect(() => {
|
|
2546
|
+
if (this.options != null) {
|
|
2547
|
+
}
|
|
2548
|
+
});
|
|
2549
|
+
}
|
|
2550
|
+
ngAfterViewInit() {
|
|
2551
|
+
this.$vjs.getSurface(s => {
|
|
2552
|
+
try {
|
|
2553
|
+
this._bg = s.addPlugin({
|
|
2554
|
+
type: BackgroundPlugin.type,
|
|
2555
|
+
options: this.options
|
|
2556
|
+
});
|
|
2557
|
+
}
|
|
2558
|
+
catch (e) {
|
|
2559
|
+
log(`WARN: BackgroundComponent could not mount background ${e}`);
|
|
2560
|
+
}
|
|
2561
|
+
});
|
|
2562
|
+
}
|
|
2563
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BackgroundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2564
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: BackgroundComponent, selector: "vjs-background", inputs: { options: "options" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
2565
|
+
}
|
|
2566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: BackgroundComponent, decorators: [{
|
|
2567
|
+
type: Component,
|
|
2568
|
+
args: [{
|
|
2569
|
+
selector: "vjs-background",
|
|
2570
|
+
template: `<ng-content></ng-content>`
|
|
2571
|
+
}]
|
|
2572
|
+
}], propDecorators: { options: [{
|
|
2573
|
+
type: Input
|
|
2574
|
+
}] } });
|
|
2575
|
+
|
|
2576
|
+
|
|
2577
|
+
class ImageBackgroundComponent {
|
|
2578
|
+
constructor() {
|
|
2579
|
+
this.$vjs = inject(VisuallyJsService);
|
|
2580
|
+
}
|
|
2581
|
+
ngAfterViewInit() {
|
|
2582
|
+
this.$vjs.getSurface(s => {
|
|
2583
|
+
try {
|
|
2584
|
+
// tslint:disable-next-line:no-unused-expression
|
|
2585
|
+
s.addPlugin({
|
|
2586
|
+
type: BackgroundPlugin.type,
|
|
2587
|
+
options: {
|
|
2588
|
+
type: SimpleBackground.type,
|
|
2589
|
+
url: this.url
|
|
2590
|
+
}
|
|
2591
|
+
});
|
|
2592
|
+
}
|
|
2593
|
+
catch (e) {
|
|
2594
|
+
log(`WARN: ImageBackgroundComponent could not mount background ${e}`);
|
|
2595
|
+
}
|
|
2596
|
+
});
|
|
2597
|
+
}
|
|
2598
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImageBackgroundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2599
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ImageBackgroundComponent, selector: "vjs-image-background", inputs: { url: "url" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
2600
|
+
}
|
|
2601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ImageBackgroundComponent, decorators: [{
|
|
2602
|
+
type: Component,
|
|
2603
|
+
args: [{
|
|
2604
|
+
selector: "vjs-image-background",
|
|
2605
|
+
template: `<ng-content></ng-content>`
|
|
2606
|
+
}]
|
|
2607
|
+
}], propDecorators: { url: [{
|
|
2608
|
+
type: Input
|
|
2609
|
+
}] } });
|
|
2610
|
+
|
|
2611
|
+
|
|
2612
|
+
class TiledImageBackgroundComponent {
|
|
2613
|
+
constructor() {
|
|
2614
|
+
this.$vjs = inject(VisuallyJsService);
|
|
2615
|
+
this._bg = null;
|
|
2616
|
+
}
|
|
2617
|
+
ngAfterViewInit() {
|
|
2618
|
+
this.$vjs.getSurface(s => {
|
|
2619
|
+
try {
|
|
2620
|
+
this._bg = s.addPlugin({
|
|
2621
|
+
type: BackgroundPlugin.type,
|
|
2622
|
+
options: {
|
|
2623
|
+
type: TiledBackground.type,
|
|
2624
|
+
url: this.url,
|
|
2625
|
+
urlGenerator: this.urlGenerator,
|
|
2626
|
+
tileSize: this.tileSize,
|
|
2627
|
+
width: this.width,
|
|
2628
|
+
height: this.height,
|
|
2629
|
+
maxZoom: this.maxZoom,
|
|
2630
|
+
tiling: this.tiling,
|
|
2631
|
+
panDebounceTimeout: this.panDebounceTimeout,
|
|
2632
|
+
zoomDebounceTimeout: this.zoomDebounceTimeout
|
|
2633
|
+
}
|
|
2634
|
+
});
|
|
2635
|
+
}
|
|
2636
|
+
catch (e) {
|
|
2637
|
+
log(`WARN: TiledImageBackgroundComponent could not mount background ${e}`);
|
|
2638
|
+
}
|
|
2639
|
+
});
|
|
2640
|
+
}
|
|
2641
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TiledImageBackgroundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2642
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TiledImageBackgroundComponent, selector: "vjs-tiled-image-background", inputs: { url: "url", urlGenerator: "urlGenerator", tileSize: "tileSize", width: "width", height: "height", maxZoom: "maxZoom", tiling: "tiling", panDebounceTimeout: "panDebounceTimeout", zoomDebounceTimeout: "zoomDebounceTimeout" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
2643
|
+
}
|
|
2644
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TiledImageBackgroundComponent, decorators: [{
|
|
2645
|
+
type: Component,
|
|
2646
|
+
args: [{
|
|
2647
|
+
selector: "vjs-tiled-image-background",
|
|
2648
|
+
template: `<ng-content></ng-content>`
|
|
2649
|
+
}]
|
|
2650
|
+
}], propDecorators: { url: [{
|
|
2651
|
+
type: Input
|
|
2652
|
+
}], urlGenerator: [{
|
|
2653
|
+
type: Input
|
|
2654
|
+
}], tileSize: [{
|
|
2655
|
+
type: Input
|
|
2656
|
+
}], width: [{
|
|
2657
|
+
type: Input
|
|
2658
|
+
}], height: [{
|
|
2659
|
+
type: Input
|
|
2660
|
+
}], maxZoom: [{
|
|
2661
|
+
type: Input
|
|
2662
|
+
}], tiling: [{
|
|
2663
|
+
type: Input
|
|
2664
|
+
}], panDebounceTimeout: [{
|
|
2665
|
+
type: Input
|
|
2666
|
+
}], zoomDebounceTimeout: [{
|
|
2667
|
+
type: Input
|
|
2668
|
+
}] } });
|
|
2669
|
+
|
|
2670
|
+
|
|
2671
|
+
class GridBackgroundComponent {
|
|
2672
|
+
constructor() {
|
|
2673
|
+
this.$vjs = inject(VisuallyJsService);
|
|
2674
|
+
this._bg = null;
|
|
2675
|
+
}
|
|
2676
|
+
_getOptions() {
|
|
2677
|
+
return {
|
|
2678
|
+
type: GeneratedGridBackground.type,
|
|
2679
|
+
grid: this.grid,
|
|
2680
|
+
showBorder: this.showBorder,
|
|
2681
|
+
minWidth: this.minWidth,
|
|
2682
|
+
minHeight: this.minHeight,
|
|
2683
|
+
showTickMarks: this.showTickMarks,
|
|
2684
|
+
tickMarksPerCell: this.tickMarksPerCell,
|
|
2685
|
+
maxWidth: this.maxWidth,
|
|
2686
|
+
maxHeight: this.maxHeight,
|
|
2687
|
+
autoShrink: this.autoShrink,
|
|
2688
|
+
gridType: this.gridType,
|
|
2689
|
+
dotRadius: this.dotRadius,
|
|
2690
|
+
tickDotRadius: this.tickDotRadius,
|
|
2691
|
+
visible: this.visible
|
|
2692
|
+
};
|
|
2693
|
+
}
|
|
2694
|
+
ngAfterViewInit() {
|
|
2695
|
+
this.$vjs.getSurface(s => {
|
|
2696
|
+
try {
|
|
2697
|
+
this._bg = s.addPlugin({
|
|
2698
|
+
type: BackgroundPlugin.type,
|
|
2699
|
+
options: this._getOptions()
|
|
2700
|
+
});
|
|
2701
|
+
}
|
|
2702
|
+
catch (e) {
|
|
2703
|
+
log(`WARN: GridBackgroundComponent could not mount background ${e}`);
|
|
2704
|
+
}
|
|
2705
|
+
});
|
|
2706
|
+
}
|
|
2707
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GridBackgroundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2708
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: GridBackgroundComponent, selector: "vjs-grid-background", inputs: { grid: "grid", showBorder: "showBorder", minWidth: "minWidth", minHeight: "minHeight", showTickMarks: "showTickMarks", tickMarksPerCell: "tickMarksPerCell", maxWidth: "maxWidth", maxHeight: "maxHeight", autoShrink: "autoShrink", gridType: "gridType", dotRadius: "dotRadius", tickDotRadius: "tickDotRadius", visible: "visible" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
2709
|
+
}
|
|
2710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GridBackgroundComponent, decorators: [{
|
|
2711
|
+
type: Component,
|
|
2712
|
+
args: [{
|
|
2713
|
+
selector: "vjs-grid-background",
|
|
2714
|
+
template: `<ng-content></ng-content>`
|
|
2715
|
+
}]
|
|
2716
|
+
}], propDecorators: { grid: [{
|
|
2717
|
+
type: Input
|
|
2718
|
+
}], showBorder: [{
|
|
2719
|
+
type: Input
|
|
2720
|
+
}], minWidth: [{
|
|
2721
|
+
type: Input
|
|
2722
|
+
}], minHeight: [{
|
|
2723
|
+
type: Input
|
|
2724
|
+
}], showTickMarks: [{
|
|
2725
|
+
type: Input
|
|
2726
|
+
}], tickMarksPerCell: [{
|
|
2727
|
+
type: Input
|
|
2728
|
+
}], maxWidth: [{
|
|
2729
|
+
type: Input
|
|
2730
|
+
}], maxHeight: [{
|
|
2731
|
+
type: Input
|
|
2732
|
+
}], autoShrink: [{
|
|
2733
|
+
type: Input
|
|
2734
|
+
}], gridType: [{
|
|
2735
|
+
type: Input
|
|
2736
|
+
}], dotRadius: [{
|
|
2737
|
+
type: Input
|
|
2738
|
+
}], tickDotRadius: [{
|
|
2739
|
+
type: Input
|
|
2740
|
+
}], visible: [{
|
|
2741
|
+
type: Input
|
|
2742
|
+
}] } });
|
|
2743
|
+
|
|
2744
|
+
|
|
1975
2745
|
class VisuallyJsModule {
|
|
1976
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1977
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2746
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2747
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, declarations: [DefaultNodeComponent,
|
|
1978
2748
|
DefaultGroupComponent,
|
|
1979
2749
|
BasePortComponent,
|
|
1980
2750
|
MiniviewComponent,
|
|
1981
2751
|
SurfaceComponent,
|
|
2752
|
+
PaperComponent,
|
|
1982
2753
|
PaletteComponent,
|
|
1983
2754
|
ShapePaletteComponent,
|
|
1984
2755
|
DiagramPaletteComponent,
|
|
@@ -1998,8 +2769,14 @@ class VisuallyJsModule {
|
|
|
1998
2769
|
ScatterChartComponent,
|
|
1999
2770
|
BubbleChartComponent,
|
|
2000
2771
|
SankeyChartComponent,
|
|
2001
|
-
DecoratorComponent
|
|
2772
|
+
DecoratorComponent,
|
|
2773
|
+
SurfacePopupComponent,
|
|
2774
|
+
BackgroundComponent,
|
|
2775
|
+
ImageBackgroundComponent,
|
|
2776
|
+
GridBackgroundComponent,
|
|
2777
|
+
TiledImageBackgroundComponent], imports: [CommonModule], exports: [MiniviewComponent,
|
|
2002
2778
|
SurfaceComponent,
|
|
2779
|
+
PaperComponent,
|
|
2003
2780
|
PaletteComponent,
|
|
2004
2781
|
DiagramPaletteComponent,
|
|
2005
2782
|
ShapeComponent,
|
|
@@ -2018,10 +2795,15 @@ class VisuallyJsModule {
|
|
|
2018
2795
|
ScatterChartComponent,
|
|
2019
2796
|
BubbleChartComponent,
|
|
2020
2797
|
SankeyChartComponent,
|
|
2021
|
-
DecoratorComponent
|
|
2022
|
-
|
|
2798
|
+
DecoratorComponent,
|
|
2799
|
+
SurfacePopupComponent,
|
|
2800
|
+
BackgroundComponent,
|
|
2801
|
+
ImageBackgroundComponent,
|
|
2802
|
+
GridBackgroundComponent,
|
|
2803
|
+
TiledImageBackgroundComponent] }); }
|
|
2804
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, imports: [CommonModule] }); }
|
|
2023
2805
|
}
|
|
2024
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2806
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, decorators: [{
|
|
2025
2807
|
type: NgModule,
|
|
2026
2808
|
args: [{
|
|
2027
2809
|
imports: [CommonModule],
|
|
@@ -2031,6 +2813,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2031
2813
|
BasePortComponent,
|
|
2032
2814
|
MiniviewComponent,
|
|
2033
2815
|
SurfaceComponent,
|
|
2816
|
+
PaperComponent,
|
|
2034
2817
|
PaletteComponent,
|
|
2035
2818
|
ShapePaletteComponent,
|
|
2036
2819
|
DiagramPaletteComponent,
|
|
@@ -2050,11 +2833,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2050
2833
|
ScatterChartComponent,
|
|
2051
2834
|
BubbleChartComponent,
|
|
2052
2835
|
SankeyChartComponent,
|
|
2053
|
-
DecoratorComponent
|
|
2836
|
+
DecoratorComponent,
|
|
2837
|
+
SurfacePopupComponent,
|
|
2838
|
+
BackgroundComponent,
|
|
2839
|
+
ImageBackgroundComponent,
|
|
2840
|
+
GridBackgroundComponent,
|
|
2841
|
+
TiledImageBackgroundComponent
|
|
2054
2842
|
],
|
|
2055
2843
|
exports: [
|
|
2056
2844
|
MiniviewComponent,
|
|
2057
2845
|
SurfaceComponent,
|
|
2846
|
+
PaperComponent,
|
|
2058
2847
|
PaletteComponent,
|
|
2059
2848
|
DiagramPaletteComponent,
|
|
2060
2849
|
ShapeComponent,
|
|
@@ -2073,7 +2862,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
2073
2862
|
ScatterChartComponent,
|
|
2074
2863
|
BubbleChartComponent,
|
|
2075
2864
|
SankeyChartComponent,
|
|
2076
|
-
DecoratorComponent
|
|
2865
|
+
DecoratorComponent,
|
|
2866
|
+
SurfacePopupComponent,
|
|
2867
|
+
BackgroundComponent,
|
|
2868
|
+
ImageBackgroundComponent,
|
|
2869
|
+
GridBackgroundComponent,
|
|
2870
|
+
TiledImageBackgroundComponent
|
|
2077
2871
|
]
|
|
2078
2872
|
}]
|
|
2079
2873
|
}] });
|
|
@@ -2143,12 +2937,12 @@ class InspectorComponent {
|
|
|
2143
2937
|
}
|
|
2144
2938
|
|
|
2145
2939
|
afterUpdate(ui) { }
|
|
2146
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2147
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
2940
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InspectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2941
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: InspectorComponent, inputs: { cssClass: "cssClass", showCloseButton: "showCloseButton", context: "context" }, ngImport: i0 }); }
|
|
2148
2942
|
}
|
|
2149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2943
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InspectorComponent, decorators: [{
|
|
2150
2944
|
type: Directive
|
|
2151
|
-
}], ctorParameters:
|
|
2945
|
+
}], ctorParameters: () => [], propDecorators: { cssClass: [{
|
|
2152
2946
|
type: Input
|
|
2153
2947
|
}], showCloseButton: [{
|
|
2154
2948
|
type: Input
|
|
@@ -2201,5 +2995,5 @@ function useVisuallyJsUpdate(callback) {
|
|
|
2201
2995
|
|
|
2202
2996
|
|
|
2203
2997
|
|
|
2204
|
-
export { AngularComponentOverlayType, AreaChartComponent, BarChartComponent, BaseAngularOverlayComponent, BaseGroupComponent, BaseNodeComponent, BasePortComponent, BaseVertexComponent, BrowserUIAngularModel, BubbleChartComponent, ColorPickerComponent, ColumnChartComponent, ControlsComponent, DecoratorComponent, DefaultGroupComponent, DefaultNodeComponent, DiagramComponent, DiagramPaletteComponent, EdgeTypePickerComponent, ExportControlsComponent, InspectorComponent, LineChartComponent, MiniviewComponent, PaletteComponent, PieChartComponent, SankeyChartComponent, ScatterChartComponent, SeriesBasedChartComponent, ShapeComponent, ShapePaletteComponent, SurfaceComponent, VisuallyJsModule, VisuallyJsService, XYChartComponent, useVisuallyJsUpdate, useZoom };
|
|
2998
|
+
export { AngularComponentOverlayType, AreaChartComponent, BackgroundComponent, BarChartComponent, BaseAngularOverlayComponent, BaseGroupComponent, BaseNodeComponent, BasePortComponent, BaseVertexComponent, BrowserUIAngularModel, BubbleChartComponent, ColorPickerComponent, ColumnChartComponent, ControlsComponent, DecoratorComponent, DefaultGroupComponent, DefaultNodeComponent, DiagramComponent, DiagramPaletteComponent, EdgeTypePickerComponent, ExportControlsComponent, GridBackgroundComponent, ImageBackgroundComponent, InspectorComponent, LineChartComponent, MiniviewComponent, PaletteComponent, PaperComponent, PieChartComponent, SankeyChartComponent, ScatterChartComponent, SeriesBasedChartComponent, ShapeComponent, ShapePaletteComponent, SurfaceComponent, SurfacePopupComponent, TiledImageBackgroundComponent, VisuallyJsModule, VisuallyJsService, XYChartComponent, useVisuallyJsUpdate, useZoom };
|
|
2205
2999
|
//# sourceMappingURL=visuallyjs-browser-ui-angular.mjs.map
|