@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
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { TemplateRef, ElementRef, AfterViewInit, OnDestroy } from "@angular/core";
|
|
2
|
+
import { Vertex, PopupHandler, PopupPosition } from "@visuallyjs/browser-ui";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Provides a means to wire up a popup that is shown when users tap on a vertex.
|
|
6
|
+
*
|
|
7
|
+
* Use it like this:
|
|
8
|
+
*
|
|
9
|
+
* ```html
|
|
10
|
+
* <vjs-surface-popup selector=".my-launcher" anchor="bottom">
|
|
11
|
+
* <ng-template let-vertex="vertex" let-model="model" let-ui="ui" let-hide="hide">
|
|
12
|
+
* <div>Popup content for {{vertex.data.name}}</div>
|
|
13
|
+
* </ng-template>
|
|
14
|
+
* </vjs-surface-popup>
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Your popup should expose inputs for
|
|
18
|
+
*
|
|
19
|
+
* - vertex The vertex the popup is attached to
|
|
20
|
+
* - model The underlying model
|
|
21
|
+
* - ui The UI that rendered this popup
|
|
22
|
+
* - hide A function you can invoke to close the popup, if you need to.
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
* @group Components
|
|
26
|
+
*/
|
|
27
|
+
export declare class SurfacePopupComponent implements AfterViewInit, OnDestroy {
|
|
28
|
+
/**
|
|
29
|
+
* CSS3 selector identifying elements from which this popup is launched.
|
|
30
|
+
* @input
|
|
31
|
+
*/
|
|
32
|
+
selector: string;
|
|
33
|
+
/**
|
|
34
|
+
* Optional position to place this popup. Defaults to "bottom", and can also be overridden on a per-launcher basis via a DOM attribute.
|
|
35
|
+
* @input
|
|
36
|
+
*/
|
|
37
|
+
anchor?: PopupPosition;
|
|
38
|
+
/**
|
|
39
|
+
* Template containing popup content
|
|
40
|
+
*/
|
|
41
|
+
template: TemplateRef<any>;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
container: ElementRef<HTMLDivElement>;
|
|
46
|
+
private cdr;
|
|
47
|
+
private vjs;
|
|
48
|
+
private initialized;
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
popupHandler: PopupHandler;
|
|
53
|
+
_hideFunction: () => any;
|
|
54
|
+
readonly current: import("@angular/core").WritableSignal<Vertex>;
|
|
55
|
+
readonly model: import("@angular/core").WritableSignal<import("@visuallyjs/browser-ui").BrowserUIModel>;
|
|
56
|
+
readonly ui: import("@angular/core").WritableSignal<import("@visuallyjs/browser-ui").BrowserUI<any>>;
|
|
57
|
+
readonly display: import("@angular/core").Signal<"none" | "block">;
|
|
58
|
+
ngAfterViewInit(): void;
|
|
59
|
+
ngOnDestroy(): void;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SurfacePopupComponent, never>;
|
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SurfacePopupComponent, "vjs-surface-popup", never, { "selector": { "alias": "selector"; "required": true; }; "anchor": { "alias": "anchor"; "required": false; }; }, {}, ["template"], never, false, never>;
|
|
62
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AfterViewInit } from "@angular/core";
|
|
2
|
+
import { Size, TilingStrategy } from "@visuallyjs/browser-ui";
|
|
3
|
+
import { VisuallyJsService } from "./vjs-service";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Renders a tiled image background on a surface or paper.
|
|
7
|
+
* @group Components
|
|
8
|
+
*/
|
|
9
|
+
export declare class TiledImageBackgroundComponent implements AfterViewInit {
|
|
10
|
+
/**
|
|
11
|
+
* URL for the background. You can supply this, or you can supply a `urlGenerator` function instead. If you supply `url` and no `urlGenerator`, the url you supply is treated as a template for the url for any given tile, and is expected to contain `{z}`, `{x}` and `{y}` placeholders. The form of the URL can be anything you like as long as it has the placeholders for z, x and y. For instance:
|
|
12
|
+
*
|
|
13
|
+
* http://foo.com/{z}/{x}/{y}
|
|
14
|
+
* https://bar.com?zoom={z}&x={x}&y={y}
|
|
15
|
+
*
|
|
16
|
+
* etc
|
|
17
|
+
* @input
|
|
18
|
+
*/
|
|
19
|
+
url?: string;
|
|
20
|
+
/**
|
|
21
|
+
* For tiled backgrounds, an optional function you can supply to generate the URL for a given tile. See `url` for
|
|
22
|
+
* an explanation of the default syntax for urls when using a tiled background.
|
|
23
|
+
* @param z zoom level
|
|
24
|
+
* @param x x coordinate of tile
|
|
25
|
+
* @param y y coordinate of tile
|
|
26
|
+
* @input
|
|
27
|
+
*/
|
|
28
|
+
urlGenerator?: (z: number, x: number, y: number) => string;
|
|
29
|
+
/**
|
|
30
|
+
* For tiled backgrounds, provides the width and height of tiles. Every tile is assumed to have these dimensions,
|
|
31
|
+
* even if the tile has whitespace in it. Required.
|
|
32
|
+
* @input
|
|
33
|
+
*/
|
|
34
|
+
tileSize: Size;
|
|
35
|
+
/**
|
|
36
|
+
* Required. Indicates the width of the full image.
|
|
37
|
+
* @input
|
|
38
|
+
*/
|
|
39
|
+
width: number;
|
|
40
|
+
/**
|
|
41
|
+
* Required. Indicates the height of the full image.
|
|
42
|
+
* @input
|
|
43
|
+
*/
|
|
44
|
+
height: number;
|
|
45
|
+
/**
|
|
46
|
+
* Required. Indicates the maximum zoom level. Zoom starts at 0 - fully zoomed out - and
|
|
47
|
+
* increases in integer values from there. Each successive zoom level is twice the zoom of the previous level,
|
|
48
|
+
* meaning two times as many tiles in each direction.
|
|
49
|
+
* @input
|
|
50
|
+
*/
|
|
51
|
+
maxZoom?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Default is TilingStrategies.logarithmic. See notes for `TilingStrategies` enum.
|
|
54
|
+
* @input
|
|
55
|
+
*/
|
|
56
|
+
tiling?: TilingStrategy;
|
|
57
|
+
/**
|
|
58
|
+
* How long to wait after a pan before reloading tiles.
|
|
59
|
+
* @input
|
|
60
|
+
*/
|
|
61
|
+
panDebounceTimeout?: number;
|
|
62
|
+
/**
|
|
63
|
+
* How long to wait after a zoom before reloading tiles.
|
|
64
|
+
* @input
|
|
65
|
+
*/
|
|
66
|
+
zoomDebounceTimeout?: number;
|
|
67
|
+
$vjs: VisuallyJsService;
|
|
68
|
+
private _bg;
|
|
69
|
+
ngAfterViewInit(): void;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TiledImageBackgroundComponent, never>;
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TiledImageBackgroundComponent, "vjs-tiled-image-background", never, { "url": { "alias": "url"; "required": false; }; "urlGenerator": { "alias": "urlGenerator"; "required": false; }; "tileSize": { "alias": "tileSize"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "maxZoom": { "alias": "maxZoom"; "required": false; }; "tiling": { "alias": "tiling"; "required": false; }; "panDebounceTimeout": { "alias": "panDebounceTimeout"; "required": false; }; "zoomDebounceTimeout": { "alias": "zoomDebounceTimeout"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
72
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visuallyjs/browser-ui-angular",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "*",
|
|
6
6
|
"@angular/core": "*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.0.0",
|
|
10
|
-
"@visuallyjs/browser-ui": "1.2.
|
|
10
|
+
"@visuallyjs/browser-ui": "1.2.2"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
"./css/visuallyjs-angular.css": {
|
|
Binary file
|