@visuallyjs/browser-ui-angular 1.2.1 → 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 +4 -0
- package/esm2022/lib/background.component.mjs +38 -0
- package/esm2022/lib/browser-ui-angular.module.mjs +24 -4
- package/esm2022/lib/grid-background.component.mjs +77 -0
- package/esm2022/lib/image-background.component.mjs +38 -0
- package/esm2022/lib/overlay-component.mjs +52 -1
- package/esm2022/lib/paper-component.mjs +11 -2
- package/esm2022/lib/surface-component.mjs +16 -2
- package/esm2022/lib/surface-popup-component.mjs +5 -5
- package/esm2022/lib/tiled-image-background.component.mjs +62 -0
- package/fesm2022/visuallyjs-browser-ui-angular.mjs +306 -15
- package/fesm2022/visuallyjs-browser-ui-angular.mjs.map +1 -1
- package/index.d.ts +4 -0
- package/lib/background.component.d.ts +13 -0
- package/lib/browser-ui-angular.module.d.ts +6 -2
- package/lib/grid-background.component.d.ts +81 -0
- package/lib/image-background.component.d.ts +18 -0
- package/lib/overlay-component.d.ts +29 -5
- package/lib/paper-component.d.ts +6 -0
- package/lib/surface-component.d.ts +6 -0
- package/lib/surface-popup-component.d.ts +1 -1
- package/lib/tiled-image-background.component.d.ts +72 -0
- package/package.json +2 -2
- package/visuallyjs-browser-ui-angular.tgz +0 -0
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
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 {
|
|
@@ -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 {
|
|
@@ -652,10 +701,16 @@ class SurfaceComponent {
|
|
|
652
701
|
this._getComponentThen(info.el, (component) => {
|
|
653
702
|
component.data = params.vertex.data;
|
|
654
703
|
component.$data?.set(component.data);
|
|
704
|
+
try {
|
|
705
|
+
;
|
|
706
|
+
component.$updateEdges();
|
|
707
|
+
}
|
|
708
|
+
catch (e) { }
|
|
655
709
|
if (component.changeDetectorRef) {
|
|
656
710
|
component.changeDetectorRef.detectChanges();
|
|
657
711
|
}
|
|
658
712
|
}, false);
|
|
713
|
+
this._maybeUpdateEdgeOverlays(params.vertex);
|
|
659
714
|
}
|
|
660
715
|
portUpdated(params) {
|
|
661
716
|
const info = this.surface.getObjectInfo(params.port, false);
|
|
@@ -667,10 +722,14 @@ class SurfaceComponent {
|
|
|
667
722
|
}
|
|
668
723
|
}
|
|
669
724
|
}, true);
|
|
725
|
+
this._maybeUpdateEdgeOverlays(params.port);
|
|
726
|
+
}
|
|
727
|
+
_maybeUpdateEdgeOverlays(vertex) {
|
|
728
|
+
vertex.getAllEdges().forEach(e => this._handleEdgeUpdate(e.id));
|
|
670
729
|
}
|
|
671
730
|
|
|
672
|
-
|
|
673
|
-
const connection = this.surface.getRenderedConnection(
|
|
731
|
+
_handleEdgeUpdate(edgeId) {
|
|
732
|
+
const connection = this.surface.getRenderedConnection(edgeId);
|
|
674
733
|
if (connection) {
|
|
675
734
|
for (let id in connection.overlays) {
|
|
676
735
|
const canvas = connection.overlays[id].contentElement;
|
|
@@ -682,6 +741,10 @@ class SurfaceComponent {
|
|
|
682
741
|
}
|
|
683
742
|
}
|
|
684
743
|
}
|
|
744
|
+
|
|
745
|
+
edgeUpdated(params) {
|
|
746
|
+
this._handleEdgeUpdate(params.edge.id);
|
|
747
|
+
}
|
|
685
748
|
edgeAddedRemoved(params) {
|
|
686
749
|
const info = this.surface.getObjectInfo(params.edge.source, false);
|
|
687
750
|
if (info.el) {
|
|
@@ -2082,10 +2145,10 @@ class SurfacePopupComponent {
|
|
|
2082
2145
|
this.ui = this.vjs.ui;
|
|
2083
2146
|
this.display = computed(() => (this.current() == null ? "none" : "block"));
|
|
2084
2147
|
}
|
|
2085
|
-
$hide() {
|
|
2086
|
-
this.popupHandler?.$hide();
|
|
2087
|
-
}
|
|
2088
2148
|
ngAfterViewInit() {
|
|
2149
|
+
this._hideFunction = function () {
|
|
2150
|
+
this.popupHandler?.$hide();
|
|
2151
|
+
}.bind(this);
|
|
2089
2152
|
this.vjs.getSurface((surface) => {
|
|
2090
2153
|
if (!this.initialized) {
|
|
2091
2154
|
this.initialized = true;
|
|
@@ -2102,7 +2165,7 @@ class SurfacePopupComponent {
|
|
|
2102
2165
|
}
|
|
2103
2166
|
}
|
|
2104
2167
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SurfacePopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2105
|
-
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
|
|
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"] }] }); }
|
|
2106
2169
|
}
|
|
2107
2170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SurfacePopupComponent, decorators: [{
|
|
2108
2171
|
type: Component,
|
|
@@ -2111,7 +2174,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2111
2174
|
template: `
|
|
2112
2175
|
<div #container class="${CLASS_SURFACE_POPUP}" [style.display]="display()" style="position:absolute">
|
|
2113
2176
|
<ng-container *ngIf="current()">
|
|
2114
|
-
<ng-container *ngTemplateOutlet="template; context: { vertex: current(), model: model(), ui: ui(), hide
|
|
2177
|
+
<ng-container *ngTemplateOutlet="template; context: { vertex: current(), model: model(), ui: ui(), hide:_hideFunction }"></ng-container>
|
|
2115
2178
|
</ng-container>
|
|
2116
2179
|
</div>
|
|
2117
2180
|
`
|
|
@@ -2195,6 +2258,7 @@ class PaperComponent {
|
|
|
2195
2258
|
component.changeDetectorRef.detectChanges();
|
|
2196
2259
|
}
|
|
2197
2260
|
}, false);
|
|
2261
|
+
this._maybeUpdateEdgeOverlays(params.vertex);
|
|
2198
2262
|
}
|
|
2199
2263
|
portUpdated(params) {
|
|
2200
2264
|
const info = this.paper.getObjectInfo(params.port, false);
|
|
@@ -2206,10 +2270,14 @@ class PaperComponent {
|
|
|
2206
2270
|
}
|
|
2207
2271
|
}
|
|
2208
2272
|
}, true);
|
|
2273
|
+
this._maybeUpdateEdgeOverlays(params.port);
|
|
2274
|
+
}
|
|
2275
|
+
_maybeUpdateEdgeOverlays(vertex) {
|
|
2276
|
+
vertex.getAllEdges().forEach(e => this._handleEdgeUpdate(e.id));
|
|
2209
2277
|
}
|
|
2210
2278
|
|
|
2211
|
-
|
|
2212
|
-
const connection = this.paper.getRenderedConnection(
|
|
2279
|
+
_handleEdgeUpdate(edgeId) {
|
|
2280
|
+
const connection = this.paper.getRenderedConnection(edgeId);
|
|
2213
2281
|
if (connection) {
|
|
2214
2282
|
for (let id in connection.overlays) {
|
|
2215
2283
|
const canvas = connection.overlays[id].contentElement;
|
|
@@ -2221,6 +2289,10 @@ class PaperComponent {
|
|
|
2221
2289
|
}
|
|
2222
2290
|
}
|
|
2223
2291
|
}
|
|
2292
|
+
|
|
2293
|
+
edgeUpdated(params) {
|
|
2294
|
+
this._handleEdgeUpdate(params.edge.id);
|
|
2295
|
+
}
|
|
2224
2296
|
edgeAddedRemoved(params) {
|
|
2225
2297
|
const info = this.paper.getObjectInfo(params.edge.source, false);
|
|
2226
2298
|
if (info.el) {
|
|
@@ -2466,6 +2538,209 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2466
2538
|
type: Output
|
|
2467
2539
|
}] } });
|
|
2468
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
|
+
|
|
2469
2744
|
|
|
2470
2745
|
class VisuallyJsModule {
|
|
2471
2746
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -2495,7 +2770,11 @@ class VisuallyJsModule {
|
|
|
2495
2770
|
BubbleChartComponent,
|
|
2496
2771
|
SankeyChartComponent,
|
|
2497
2772
|
DecoratorComponent,
|
|
2498
|
-
SurfacePopupComponent
|
|
2773
|
+
SurfacePopupComponent,
|
|
2774
|
+
BackgroundComponent,
|
|
2775
|
+
ImageBackgroundComponent,
|
|
2776
|
+
GridBackgroundComponent,
|
|
2777
|
+
TiledImageBackgroundComponent], imports: [CommonModule], exports: [MiniviewComponent,
|
|
2499
2778
|
SurfaceComponent,
|
|
2500
2779
|
PaperComponent,
|
|
2501
2780
|
PaletteComponent,
|
|
@@ -2517,7 +2796,11 @@ class VisuallyJsModule {
|
|
|
2517
2796
|
BubbleChartComponent,
|
|
2518
2797
|
SankeyChartComponent,
|
|
2519
2798
|
DecoratorComponent,
|
|
2520
|
-
SurfacePopupComponent
|
|
2799
|
+
SurfacePopupComponent,
|
|
2800
|
+
BackgroundComponent,
|
|
2801
|
+
ImageBackgroundComponent,
|
|
2802
|
+
GridBackgroundComponent,
|
|
2803
|
+
TiledImageBackgroundComponent] }); }
|
|
2521
2804
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, imports: [CommonModule] }); }
|
|
2522
2805
|
}
|
|
2523
2806
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VisuallyJsModule, decorators: [{
|
|
@@ -2551,7 +2834,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2551
2834
|
BubbleChartComponent,
|
|
2552
2835
|
SankeyChartComponent,
|
|
2553
2836
|
DecoratorComponent,
|
|
2554
|
-
SurfacePopupComponent
|
|
2837
|
+
SurfacePopupComponent,
|
|
2838
|
+
BackgroundComponent,
|
|
2839
|
+
ImageBackgroundComponent,
|
|
2840
|
+
GridBackgroundComponent,
|
|
2841
|
+
TiledImageBackgroundComponent
|
|
2555
2842
|
],
|
|
2556
2843
|
exports: [
|
|
2557
2844
|
MiniviewComponent,
|
|
@@ -2576,7 +2863,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2576
2863
|
BubbleChartComponent,
|
|
2577
2864
|
SankeyChartComponent,
|
|
2578
2865
|
DecoratorComponent,
|
|
2579
|
-
SurfacePopupComponent
|
|
2866
|
+
SurfacePopupComponent,
|
|
2867
|
+
BackgroundComponent,
|
|
2868
|
+
ImageBackgroundComponent,
|
|
2869
|
+
GridBackgroundComponent,
|
|
2870
|
+
TiledImageBackgroundComponent
|
|
2580
2871
|
]
|
|
2581
2872
|
}]
|
|
2582
2873
|
}] });
|
|
@@ -2704,5 +2995,5 @@ function useVisuallyJsUpdate(callback) {
|
|
|
2704
2995
|
|
|
2705
2996
|
|
|
2706
2997
|
|
|
2707
|
-
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, PaperComponent, PieChartComponent, SankeyChartComponent, ScatterChartComponent, SeriesBasedChartComponent, ShapeComponent, ShapePaletteComponent, SurfaceComponent, SurfacePopupComponent, 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 };
|
|
2708
2999
|
//# sourceMappingURL=visuallyjs-browser-ui-angular.mjs.map
|