jpf 5.0.3 → 5.0.7
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/dist/controls/codeMirror/Editor/Editor.d.ts +19 -0
- package/dist/controls/codeMirror/Editor/Editor.js +151 -0
- package/dist/controls/codeMirror/Editor/Editor.js.map +1 -0
- package/dist/controls/codeMirror/index.d.ts +1 -2
- package/dist/controls/codeMirror/index.js +1 -2
- package/dist/controls/codeMirror/index.js.map +1 -1
- package/dist/controls/custom/FileSelector/FileSelector.d.ts +18 -18
- package/dist/controls/custom/FileSelector/FileSelector.js +47 -46
- package/dist/controls/custom/FileSelector/FileSelector.js.map +1 -1
- package/dist/controls/custom/LabeledControl/LabeledControl.d.ts +15 -15
- package/dist/controls/custom/LabeledControl/LabeledControl.js +31 -36
- package/dist/controls/custom/LabeledControl/LabeledControl.js.map +1 -1
- package/dist/controls/custom/ListItem/ListItem.d.ts +37 -36
- package/dist/controls/custom/ListItem/ListItem.js +62 -62
- package/dist/controls/custom/ListItem/ListItem.js.map +1 -1
- package/dist/controls/custom/index.d.ts +3 -3
- package/dist/controls/custom/index.js +3 -3
- package/dist/controls/html/Button/Button.d.ts +16 -16
- package/dist/controls/html/Button/Button.js +47 -50
- package/dist/controls/html/Button/Button.js.map +1 -1
- package/dist/controls/html/Div/Div.d.ts +14 -14
- package/dist/controls/html/Div/Div.js +23 -24
- package/dist/controls/html/Div/Div.js.map +1 -1
- package/dist/controls/html/Image/Image.d.ts +16 -16
- package/dist/controls/html/Image/Image.js +29 -28
- package/dist/controls/html/Image/Image.js.map +1 -1
- package/dist/controls/html/Input/Input.d.ts +34 -34
- package/dist/controls/html/Input/Input.js +166 -170
- package/dist/controls/html/Input/Input.js.map +1 -1
- package/dist/controls/html/Select/Select.d.ts +30 -30
- package/dist/controls/html/Select/Select.js +109 -110
- package/dist/controls/html/Select/Select.js.map +1 -1
- package/dist/controls/html/Span/Span.d.ts +11 -11
- package/dist/controls/html/Span/Span.js +22 -22
- package/dist/controls/html/Span/Span.js.map +1 -1
- package/dist/controls/html/index.d.ts +6 -6
- package/dist/controls/html/index.js +6 -6
- package/dist/controls/index.d.ts +14 -14
- package/dist/controls/index.js +14 -14
- package/dist/controls/index.js.map +1 -1
- package/dist/controls/{jsonViewAwesome → jsonViewerAwesome}/index.d.ts +1 -1
- package/dist/controls/{jsonViewAwesome → jsonViewerAwesome}/index.js +1 -1
- package/dist/controls/jsonViewerAwesome/index.js.map +1 -0
- package/dist/controls/jsonViewerAwesome/jsonFormatter/JsonFormatter.d.ts +28 -0
- package/dist/controls/{jsonViewAwesome → jsonViewerAwesome}/jsonFormatter/JsonFormatter.js +65 -65
- package/dist/controls/jsonViewerAwesome/jsonFormatter/JsonFormatter.js.map +1 -0
- package/dist/controls/kendo/Chart/Chart.d.ts +19 -19
- package/dist/controls/kendo/Chart/Chart.js +62 -62
- package/dist/controls/kendo/Chart/Chart.js.map +1 -1
- package/dist/controls/kendo/Culture/Culture.d.ts +1 -1
- package/dist/controls/kendo/Culture/Culture.js +25 -25
- package/dist/controls/kendo/Culture/Culture.js.map +1 -1
- package/dist/controls/kendo/DataSource/DataSource.d.ts +4 -4
- package/dist/controls/kendo/DataSource/DataSource.js +1 -1
- package/dist/controls/kendo/Editor/Editor.d.ts +14 -19
- package/dist/controls/kendo/Editor/Editor.js +94 -104
- package/dist/controls/kendo/Editor/Editor.js.map +1 -1
- package/dist/controls/kendo/Grid/Grid.d.ts +54 -54
- package/dist/controls/kendo/Grid/Grid.js +201 -218
- package/dist/controls/kendo/Grid/Grid.js.map +1 -1
- package/dist/controls/kendo/Menu/Menu.d.ts +15 -15
- package/dist/controls/kendo/Menu/Menu.js +90 -90
- package/dist/controls/kendo/Menu/Menu.js.map +1 -1
- package/dist/controls/kendo/ObservableObject/ObservableObject.d.ts +0 -5
- package/dist/controls/kendo/ObservableObject/ObservableObject.js +0 -34
- package/dist/controls/kendo/ObservableObject/ObservableObject.js.map +1 -1
- package/dist/controls/kendo/Treeview/Treeview.d.ts +17 -0
- package/dist/controls/kendo/{Tree/Tree.js → Treeview/Treeview.js} +107 -107
- package/dist/controls/kendo/Treeview/Treeview.js.map +1 -0
- package/dist/controls/kendo/Window/Window.d.ts +14 -0
- package/dist/controls/kendo/{Dialog/Dialog.js → Window/Window.js} +49 -49
- package/dist/controls/kendo/Window/Window.js.map +1 -0
- package/dist/controls/kendo/index.d.ts +8 -9
- package/dist/controls/kendo/index.js +8 -9
- package/dist/controls/kendo/index.js.map +1 -1
- package/dist/controls/leaflet/LabelControl/LabelControl.d.ts +12 -12
- package/dist/controls/leaflet/LabelControl/LabelControl.js +33 -33
- package/dist/controls/leaflet/LabelControl/LabelControl.js.map +1 -1
- package/dist/controls/leaflet/Map/Map.d.ts +45 -45
- package/dist/controls/leaflet/Map/Map.js +116 -115
- package/dist/controls/leaflet/Map/Map.js.map +1 -1
- package/dist/controls/leaflet/OpenStreetMapTileLayer/OpenStreetMapTileLayer.d.ts +8 -8
- package/dist/controls/leaflet/OpenStreetMapTileLayer/OpenStreetMapTileLayer.js +13 -13
- package/dist/controls/leaflet/OpenStreetMapTileLayer/OpenStreetMapTileLayer.js.map +1 -1
- package/dist/controls/leaflet/PointerEvent/PointerEvent.d.ts +2 -2
- package/dist/controls/leaflet/PointerEvent/PointerEvent.js +7 -7
- package/dist/controls/leaflet/PointerEvent/PointerEvent.js.map +1 -1
- package/dist/controls/leaflet/index.d.ts +4 -4
- package/dist/controls/leaflet/index.js +4 -4
- package/dist/controls/svg/Circle/Circle.d.ts +12 -12
- package/dist/controls/svg/Circle/Circle.js +20 -20
- package/dist/controls/svg/Circle/Circle.js.map +1 -1
- package/dist/controls/svg/Ellipse/Ellipse.d.ts +13 -13
- package/dist/controls/svg/Ellipse/Ellipse.js +21 -21
- package/dist/controls/svg/Ellipse/Ellipse.js.map +1 -1
- package/dist/controls/svg/ForeignObject/ForeignObject.d.ts +15 -14
- package/dist/controls/svg/ForeignObject/ForeignObject.js +21 -22
- package/dist/controls/svg/ForeignObject/ForeignObject.js.map +1 -1
- package/dist/controls/svg/Group/Group.d.ts +15 -14
- package/dist/controls/svg/Group/Group.js +21 -22
- package/dist/controls/svg/Group/Group.js.map +1 -1
- package/dist/controls/svg/Line/Line.d.ts +13 -13
- package/dist/controls/svg/Line/Line.js +21 -21
- package/dist/controls/svg/Line/Line.js.map +1 -1
- package/dist/controls/svg/Pattern/Pattern.d.ts +22 -22
- package/dist/controls/svg/Pattern/Pattern.js +22 -23
- package/dist/controls/svg/Pattern/Pattern.js.map +1 -1
- package/dist/controls/svg/Polygon/Polygon.d.ts +11 -11
- package/dist/controls/svg/Polygon/Polygon.js +20 -20
- package/dist/controls/svg/Polygon/Polygon.js.map +1 -1
- package/dist/controls/svg/Polyline/Polyline.d.ts +11 -11
- package/dist/controls/svg/Polyline/Polyline.js +19 -19
- package/dist/controls/svg/Polyline/Polyline.js.map +1 -1
- package/dist/controls/svg/Rectangle/Rectangle.d.ts +13 -13
- package/dist/controls/svg/Rectangle/Rectangle.js +21 -21
- package/dist/controls/svg/Rectangle/Rectangle.js.map +1 -1
- package/dist/controls/svg/Svg/Svg.d.ts +17 -17
- package/dist/controls/svg/Svg/Svg.js +23 -24
- package/dist/controls/svg/Svg/Svg.js.map +1 -1
- package/dist/controls/svg/Text/Text.d.ts +14 -14
- package/dist/controls/svg/Text/Text.js +22 -22
- package/dist/controls/svg/Text/Text.js.map +1 -1
- package/dist/controls/svg/Title/Title.d.ts +10 -10
- package/dist/controls/svg/Title/Title.js +16 -16
- package/dist/controls/svg/Title/Title.js.map +1 -1
- package/dist/controls/svg/index.d.ts +13 -13
- package/dist/controls/svg/index.js +13 -13
- package/dist/controls/svg/svg.d.ts +6 -6
- package/dist/controls/svg/svg.js +12 -12
- package/dist/controls/svg/svg.js.map +1 -1
- package/dist/framework/attributes.d.ts +90 -90
- package/dist/framework/attributes.js +1 -1
- package/dist/framework/{View.d.ts → element.d.ts} +61 -62
- package/dist/framework/{View.js → element.js} +157 -150
- package/dist/framework/element.js.map +1 -0
- package/dist/framework/event.d.ts +80 -80
- package/dist/framework/event.js +25 -25
- package/dist/framework/event.js.map +1 -1
- package/dist/framework/observable.d.ts +37 -12
- package/dist/framework/observable.js +66 -58
- package/dist/framework/observable.js.map +1 -1
- package/dist/framework/properties.d.ts +40 -0
- package/dist/framework/{ViewModel.js → properties.js} +303 -312
- package/dist/framework/properties.js.map +1 -0
- package/dist/framework/root.d.ts +9 -0
- package/dist/framework/root.js +38 -0
- package/dist/framework/root.js.map +1 -0
- package/dist/framework/style.d.ts +657 -658
- package/dist/framework/style.js +146 -153
- package/dist/framework/style.js.map +1 -1
- package/dist/framework/types.d.ts +87 -87
- package/dist/framework/types.js +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/utilities/blob/blob.d.ts +1 -1
- package/dist/utilities/blob/blob.js +17 -17
- package/dist/utilities/blob/blob.js.map +1 -1
- package/dist/utilities/contextMenu/contextMenu.d.ts +2 -0
- package/dist/utilities/contextMenu/contextMenu.js +11 -0
- package/dist/utilities/contextMenu/contextMenu.js.map +1 -0
- package/dist/utilities/cookie/cookie.d.ts +3 -3
- package/dist/utilities/cookie/cookie.js +26 -26
- package/dist/utilities/cookie/cookie.js.map +1 -1
- package/dist/utilities/dataReaderTable/dataReaderTable.d.ts +9 -9
- package/dist/utilities/dataReaderTable/dataReaderTable.js +23 -23
- package/dist/utilities/dataReaderTable/dataReaderTable.js.map +1 -1
- package/dist/utilities/fetch/fetch.d.ts +7 -8
- package/dist/utilities/fetch/fetch.js +139 -137
- package/dist/utilities/fetch/fetch.js.map +1 -1
- package/dist/utilities/float/float.d.ts +1 -1
- package/dist/utilities/float/float.js +3 -3
- package/dist/utilities/formData/formData.d.ts +1 -1
- package/dist/utilities/formData/formData.js +11 -11
- package/dist/utilities/formData/formData.js.map +1 -1
- package/dist/utilities/formatting/formatting.d.ts +4 -0
- package/dist/utilities/formatting/formatting.js +26 -0
- package/dist/utilities/formatting/formatting.js.map +1 -0
- package/dist/utilities/htmlElement/htmlElement.d.ts +1 -1
- package/dist/utilities/htmlElement/htmlElement.js +16 -16
- package/dist/utilities/htmlElement/htmlElement.js.map +1 -1
- package/dist/utilities/image/image.d.ts +1 -1
- package/dist/utilities/image/image.js +1 -1
- package/dist/utilities/index.d.ts +40 -36
- package/dist/utilities/index.js +40 -36
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/integer/integer.d.ts +3 -3
- package/dist/utilities/integer/integer.js +27 -27
- package/dist/utilities/integer/integer.js.map +1 -1
- package/dist/utilities/key/key.d.ts +2 -2
- package/dist/utilities/key/key.js +6 -6
- package/dist/utilities/navigator/navigator.d.ts +1 -1
- package/dist/utilities/navigator/navigator.js +8 -8
- package/dist/utilities/navigator/navigator.js.map +1 -1
- package/dist/utilities/notification/notification.d.ts +5 -5
- package/dist/utilities/notification/notification.js +66 -66
- package/dist/utilities/notification/notification.js.map +1 -1
- package/dist/utilities/querystring/querystring.d.ts +6 -6
- package/dist/utilities/querystring/querystring.js +53 -53
- package/dist/utilities/querystring/querystring.js.map +1 -1
- package/dist/utilities/router/router.d.ts +19 -19
- package/dist/utilities/router/router.js +80 -80
- package/dist/utilities/router/router.js.map +1 -1
- package/dist/utilities/stylesheet/stylesheet.d.ts +2 -2
- package/dist/utilities/stylesheet/stylesheet.js +47 -47
- package/dist/utilities/stylesheet/stylesheet.js.map +1 -1
- package/dist/utilities/uniqueId/uniqueId.d.ts +1 -1
- package/dist/utilities/uniqueId/uniqueId.js +4 -4
- package/dist/{framework → utilities/userAgent}/userAgent.d.ts +31 -31
- package/dist/{framework → utilities/userAgent}/userAgent.js +46 -46
- package/dist/utilities/userAgent/userAgent.js.map +1 -0
- package/dist/utilities/webSocket/webSocket.d.ts +1 -1
- package/dist/utilities/webSocket/webSocket.js +54 -54
- package/dist/utilities/webSocket/webSocket.js.map +1 -1
- package/package.json +15 -11
- package/src/controls/codeMirror/Editor/Editor.ts +207 -0
- package/src/controls/codeMirror/index.ts +1 -2
- package/src/controls/custom/FileSelector/FileSelector.ts +30 -28
- package/src/controls/custom/LabeledControl/LabeledControl.ts +32 -36
- package/src/controls/custom/ListItem/ListItem.ts +37 -37
- package/src/controls/html/Button/Button.ts +37 -30
- package/src/controls/html/Div/Div.ts +20 -21
- package/src/controls/html/Image/Image.ts +22 -20
- package/src/controls/html/Input/Input.ts +63 -65
- package/src/controls/html/Select/Select.ts +39 -41
- package/src/controls/html/Span/Span.ts +14 -14
- package/src/controls/index.ts +2 -2
- package/src/controls/{jsonViewAwesome → jsonViewerAwesome}/jsonFormatter/JsonFormatter.ts +24 -24
- package/src/controls/kendo/Chart/Chart.ts +37 -37
- package/src/controls/kendo/DataSource/DataSource.ts +1 -1
- package/src/controls/kendo/Editor/Editor.ts +59 -69
- package/src/controls/kendo/Grid/Grid.ts +81 -84
- package/src/controls/kendo/Menu/Menu.ts +24 -24
- package/src/controls/kendo/ObservableObject/ObservableObject.ts +45 -45
- package/src/controls/kendo/{Tree/Tree.ts → Treeview/Treeview.ts} +17 -17
- package/src/controls/kendo/{Dialog/Dialog.ts → Window/Window.ts} +21 -19
- package/src/controls/kendo/index.ts +3 -3
- package/src/controls/leaflet/LabelControl/LabelControl.ts +10 -10
- package/src/controls/leaflet/Map/Map.ts +44 -41
- package/src/controls/leaflet/OpenStreetMapTileLayer/OpenStreetMapTileLayer.ts +3 -3
- package/src/controls/svg/Circle/Circle.ts +14 -14
- package/src/controls/svg/Ellipse/Ellipse.ts +15 -15
- package/src/controls/svg/ForeignObject/ForeignObject.ts +19 -20
- package/src/controls/svg/Group/Group.ts +19 -19
- package/src/controls/svg/Line/Line.ts +15 -15
- package/src/controls/svg/Pattern/Pattern.ts +25 -25
- package/src/controls/svg/Polygon/Polygon.ts +13 -13
- package/src/controls/svg/Polyline/Polyline.ts +13 -13
- package/src/controls/svg/Rectangle/Rectangle.ts +15 -15
- package/src/controls/svg/Svg/Svg.ts +19 -19
- package/src/controls/svg/Text/Text.ts +16 -16
- package/src/controls/svg/Title/Title.ts +12 -12
- package/src/controls/svg/svg.ts +4 -4
- package/src/framework/attributes.ts +46 -46
- package/src/framework/{View.ts → element.ts} +54 -41
- package/src/framework/event.ts +7 -7
- package/src/framework/observable.ts +93 -60
- package/src/framework/properties.ts +393 -0
- package/src/framework/root.ts +45 -0
- package/src/framework/style.ts +330 -340
- package/src/index.ts +4 -4
- package/src/utilities/contextMenu/contextMenu.ts +16 -0
- package/src/utilities/fetch/fetch.ts +16 -14
- package/src/utilities/formatting/formatting.ts +29 -0
- package/src/utilities/index.ts +7 -3
- package/src/utilities/router/router.ts +3 -3
- package/dist/controls/codeMirror/HtmlEditor/HtmlEditor.d.ts +0 -16
- package/dist/controls/codeMirror/HtmlEditor/HtmlEditor.js +0 -120
- package/dist/controls/codeMirror/HtmlEditor/HtmlEditor.js.map +0 -1
- package/dist/controls/codeMirror/JsonEditor/JsonEditor.d.ts +0 -16
- package/dist/controls/codeMirror/JsonEditor/JsonEditor.js +0 -104
- package/dist/controls/codeMirror/JsonEditor/JsonEditor.js.map +0 -1
- package/dist/controls/jsonViewAwesome/index.js.map +0 -1
- package/dist/controls/jsonViewAwesome/jsonFormatter/JsonFormatter.d.ts +0 -28
- package/dist/controls/jsonViewAwesome/jsonFormatter/JsonFormatter.js.map +0 -1
- package/dist/controls/kendo/Dialog/Dialog.d.ts +0 -14
- package/dist/controls/kendo/Dialog/Dialog.js.map +0 -1
- package/dist/controls/kendo/Tree/Tree.d.ts +0 -17
- package/dist/controls/kendo/Tree/Tree.js.map +0 -1
- package/dist/framework/View.js.map +0 -1
- package/dist/framework/ViewModel.d.ts +0 -42
- package/dist/framework/ViewModel.js.map +0 -1
- package/dist/framework/userAgent.js.map +0 -1
- package/dist/utilities/html/html.d.ts +0 -1
- package/dist/utilities/html/html.js +0 -8
- package/dist/utilities/html/html.js.map +0 -1
- package/src/controls/codeMirror/HtmlEditor/HtmlEditor.ts +0 -153
- package/src/controls/codeMirror/JsonEditor/JsonEditor.ts +0 -136
- package/src/framework/ViewModel.ts +0 -528
- package/src/utilities/html/html.ts +0 -8
- /package/src/controls/{jsonViewAwesome → jsonViewerAwesome}/index.ts +0 -0
- /package/src/{framework → utilities/userAgent}/userAgent.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from "./Chart/Chart";
|
|
2
2
|
export * from "./Culture/Culture";
|
|
3
3
|
export * from "./DataSource/DataSource";
|
|
4
|
-
export * from "./Dialog/Dialog";
|
|
5
4
|
export * from "./Editor/Editor";
|
|
6
5
|
export * from "./Grid/Grid";
|
|
7
6
|
export * from "./Menu/Menu";
|
|
8
|
-
export * from "./ObservableObject/ObservableObject";
|
|
9
|
-
export * from "./
|
|
7
|
+
//export * from "./ObservableObject/ObservableObject";
|
|
8
|
+
export * from "./Treeview/Treeview";
|
|
9
|
+
export * from "./Window/Window";
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import * as leaflet from "leaflet";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { IElement, getElement } from "../../../framework/element";
|
|
3
|
+
import { Properties } from "../../../framework/properties";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
6
|
-
content: string |
|
|
5
|
+
export interface ILeafletLabelControlOptions extends leaflet.ControlOptions {
|
|
6
|
+
content: string | IElement | Properties
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export class LeafletLabelControl extends leaflet.Control {
|
|
10
|
-
constructor(options:
|
|
10
|
+
constructor(options: ILeafletLabelControlOptions) {
|
|
11
11
|
super(options);
|
|
12
12
|
|
|
13
13
|
this.content = options.content;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
private readonly content: string |
|
|
16
|
+
private readonly content: string | IElement | Properties;
|
|
17
17
|
|
|
18
18
|
onAdd(map: leaflet.Map): HTMLElement {
|
|
19
19
|
const div = document.createElement("div");
|
|
20
20
|
|
|
21
21
|
let view;
|
|
22
|
-
if (this.content instanceof
|
|
23
|
-
view =
|
|
22
|
+
if (this.content instanceof Properties) {
|
|
23
|
+
view = getElement(this.content);
|
|
24
24
|
if (view) {
|
|
25
25
|
div.appendChild(view.render());
|
|
26
26
|
}
|
|
27
27
|
} else if (typeof this.content === "string") {
|
|
28
28
|
div.innerText = this.content;
|
|
29
29
|
} else {
|
|
30
|
-
view = this.content as
|
|
30
|
+
view = this.content as IElement;
|
|
31
31
|
if (view.render) {
|
|
32
32
|
div.appendChild(view.render());
|
|
33
33
|
}
|
|
@@ -37,6 +37,6 @@ export class LeafletLabelControl extends leaflet.Control {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export function
|
|
40
|
+
export function createLeafletLabelControl(options: ILeafletLabelControlOptions) {
|
|
41
41
|
return new LeafletLabelControl(options);
|
|
42
42
|
}
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isSubscribable, unwrap, ISubscribable } from "../../../framework/observable";
|
|
2
2
|
import * as leaflet from "leaflet";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Element, registerElement } from "../../../framework/element";
|
|
4
|
+
import { Properties, IProperties, extendProperties } from "../../../framework/properties";
|
|
5
|
+
import { ILeafletEventListener } from "../../../framework/event";
|
|
5
6
|
|
|
6
|
-
export interface
|
|
7
|
+
export interface IMapProperties extends IProperties {
|
|
7
8
|
renderer?: leaflet.Renderer;
|
|
8
|
-
center?: leaflet.LatLngExpression |
|
|
9
|
+
center?: leaflet.LatLngExpression | ISubscribable<leaflet.LatLngExpression>;
|
|
9
10
|
zoom?: number;
|
|
10
11
|
south?: number;
|
|
11
12
|
north?: number;
|
|
12
13
|
west?: number;
|
|
13
14
|
east?: number;
|
|
14
15
|
tileLayers?: Array<leaflet.TileLayer>;
|
|
15
|
-
layers?: Array<leaflet.Layer> |
|
|
16
|
-
controls?: Array<leaflet.Control> |
|
|
16
|
+
layers?: Array<leaflet.Layer> | ISubscribable<Array<leaflet.Layer>>;
|
|
17
|
+
controls?: Array<leaflet.Control> | ISubscribable<Array<leaflet.Control>>;
|
|
17
18
|
zoomInTitle?: string;
|
|
18
19
|
zoomOutTitle?: string;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
|
-
export class
|
|
22
|
-
constructor(properties:
|
|
22
|
+
export class MapElement extends Element<IMapProperties> {
|
|
23
|
+
constructor(properties: IMapProperties) {
|
|
23
24
|
super(
|
|
24
25
|
{
|
|
25
26
|
tagName: "div",
|
|
26
27
|
properties: extendProperties(
|
|
28
|
+
properties,
|
|
27
29
|
{
|
|
28
|
-
|
|
30
|
+
elementType: "LeafletMap"
|
|
29
31
|
},
|
|
30
|
-
|
|
32
|
+
|
|
31
33
|
)
|
|
32
34
|
}
|
|
33
35
|
);
|
|
@@ -40,26 +42,26 @@ export class MapView extends View<MapProperties> {
|
|
|
40
42
|
build(): void {
|
|
41
43
|
super.build();
|
|
42
44
|
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
45
|
-
|
|
45
|
+
const properties = this.properties;
|
|
46
|
+
if (!properties.center) {
|
|
47
|
+
properties.center = burtonville;
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
const options: leaflet.MapOptions = {
|
|
49
|
-
renderer:
|
|
51
|
+
renderer: properties.renderer,
|
|
50
52
|
zoomControl: false
|
|
51
53
|
};
|
|
52
54
|
|
|
53
55
|
//Leaflet can not handle rendering from an element not attached to the DOM
|
|
54
56
|
setTimeout(
|
|
55
57
|
() => {
|
|
56
|
-
this.map = leaflet.map(this.element, options).setView(unwrap(
|
|
58
|
+
this.map = leaflet.map(this.element, options).setView(unwrap(properties.center), this.properties.zoom);
|
|
57
59
|
|
|
58
60
|
//Add the language specific zoom element
|
|
59
61
|
leaflet.control.zoom({
|
|
60
62
|
position: "topleft",
|
|
61
|
-
zoomInTitle:
|
|
62
|
-
zoomOutTitle:
|
|
63
|
+
zoomInTitle: properties.zoomInTitle,
|
|
64
|
+
zoomOutTitle: properties.zoomOutTitle
|
|
63
65
|
}).addTo(this.map);
|
|
64
66
|
|
|
65
67
|
if (this.properties.eventListeners) {
|
|
@@ -67,35 +69,36 @@ export class MapView extends View<MapProperties> {
|
|
|
67
69
|
this.map.on(
|
|
68
70
|
key,
|
|
69
71
|
(event) => {
|
|
70
|
-
this.properties.eventListeners[key]
|
|
72
|
+
const eventListener = this.properties.eventListeners[key] as ILeafletEventListener;
|
|
73
|
+
eventListener.listener(event);
|
|
71
74
|
}
|
|
72
75
|
);
|
|
73
76
|
});
|
|
74
77
|
}
|
|
75
78
|
|
|
76
|
-
this.setTileLayers(
|
|
79
|
+
this.setTileLayers(properties.tileLayers);
|
|
77
80
|
|
|
78
|
-
this.setLayers(unwrap(
|
|
79
|
-
if (
|
|
80
|
-
this.
|
|
81
|
-
|
|
81
|
+
this.setLayers(unwrap(properties.layers));
|
|
82
|
+
if (isSubscribable(properties.layers)) {
|
|
83
|
+
this.disposers.push(
|
|
84
|
+
properties.layers.subscribe((layers) => {
|
|
82
85
|
this.setLayers(layers);
|
|
83
86
|
})
|
|
84
87
|
);
|
|
85
88
|
}
|
|
86
89
|
|
|
87
|
-
this.setControls(unwrap(
|
|
88
|
-
if (
|
|
89
|
-
this.
|
|
90
|
-
|
|
90
|
+
this.setControls(unwrap(properties.controls));
|
|
91
|
+
if (isSubscribable(properties.controls)) {
|
|
92
|
+
this.disposers.push(
|
|
93
|
+
properties.controls.subscribe((controls) => {
|
|
91
94
|
this.setControls(controls);
|
|
92
95
|
})
|
|
93
96
|
);
|
|
94
97
|
}
|
|
95
98
|
|
|
96
|
-
if (
|
|
97
|
-
this.
|
|
98
|
-
|
|
99
|
+
if (isSubscribable(properties.center)) {
|
|
100
|
+
this.disposers.push(
|
|
101
|
+
properties.center.subscribe((center) => {
|
|
99
102
|
this.map.panTo(center);
|
|
100
103
|
})
|
|
101
104
|
);
|
|
@@ -148,33 +151,33 @@ export class MapView extends View<MapProperties> {
|
|
|
148
151
|
}
|
|
149
152
|
}
|
|
150
153
|
|
|
151
|
-
export function
|
|
152
|
-
return new
|
|
154
|
+
export function createMap(properties: IMapProperties) {
|
|
155
|
+
return new MapElement(properties);
|
|
153
156
|
}
|
|
154
157
|
|
|
155
158
|
export const burtonville: leaflet.LatLngExpression = [50.283939, 5.964070];
|
|
156
159
|
|
|
157
|
-
export class
|
|
158
|
-
constructor(properties:
|
|
160
|
+
export class MapProperties extends Properties implements IMapProperties {
|
|
161
|
+
constructor(properties: IMapProperties) {
|
|
159
162
|
super();
|
|
160
163
|
this.setProperties(this, properties);
|
|
161
164
|
}
|
|
162
165
|
|
|
163
166
|
renderer?: leaflet.Renderer;
|
|
164
|
-
center?: leaflet.LatLngExpression |
|
|
167
|
+
center?: leaflet.LatLngExpression | ISubscribable<leaflet.LatLngExpression>;
|
|
165
168
|
zoom?: number;
|
|
166
169
|
south?: number;
|
|
167
170
|
north?: number;
|
|
168
171
|
west?: number;
|
|
169
172
|
east?: number;
|
|
170
173
|
tileLayers?: Array<leaflet.TileLayer>;
|
|
171
|
-
layers?: Array<leaflet.Layer> |
|
|
172
|
-
controls?: Array<leaflet.Control> |
|
|
174
|
+
layers?: Array<leaflet.Layer> | ISubscribable<Array<leaflet.Layer>>;
|
|
175
|
+
controls?: Array<leaflet.Control> | ISubscribable<Array<leaflet.Control>>;
|
|
173
176
|
zoomInTitle?: string;
|
|
174
177
|
zoomOutTitle?: string;
|
|
175
178
|
}
|
|
176
179
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
+
registerElement(
|
|
181
|
+
MapProperties.prototype.constructor,
|
|
182
|
+
MapElement
|
|
180
183
|
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TileLayerOptions, TileLayer } from "leaflet";
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface IOpenStreetMapTileLayerOptions extends TileLayerOptions {
|
|
4
4
|
attribution?: string
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export class OpenStreetMapTileLayer extends TileLayer {
|
|
8
|
-
constructor(options?:
|
|
8
|
+
constructor(options?: IOpenStreetMapTileLayerOptions) {
|
|
9
9
|
if (!options) {
|
|
10
10
|
options = {};
|
|
11
11
|
}
|
|
@@ -14,6 +14,6 @@ export class OpenStreetMapTileLayer extends TileLayer {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export function
|
|
17
|
+
export function createOpenStreetMapTileLayer(options?: IOpenStreetMapTileLayerOptions) {
|
|
18
18
|
return new OpenStreetMapTileLayer(options);
|
|
19
19
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Element } from "../../../framework/element";
|
|
2
|
+
import { IProperties, extendProperties} from "../../../framework/properties";
|
|
3
|
+
import { ISubscribable } from "../../../framework/observable";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
6
|
-
cx: number | string |
|
|
7
|
-
cy: number | string |
|
|
8
|
-
r: number | string |
|
|
5
|
+
export interface ICircleProperties extends IProperties {
|
|
6
|
+
cx: number | string | ISubscribable<number | string>;
|
|
7
|
+
cy: number | string | ISubscribable<number | string>;
|
|
8
|
+
r: number | string | ISubscribable<number | string>;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export class
|
|
12
|
-
constructor(properties:
|
|
11
|
+
export class CircleElement extends Element<ICircleProperties> {
|
|
12
|
+
constructor(properties: ICircleProperties) {
|
|
13
13
|
super(
|
|
14
14
|
{
|
|
15
15
|
tagName: "circle",
|
|
16
16
|
properties: extendProperties(
|
|
17
|
+
properties,
|
|
17
18
|
{
|
|
18
|
-
|
|
19
|
+
elementType: "Circle",
|
|
19
20
|
attributes: {
|
|
20
21
|
cx: properties.cx,
|
|
21
22
|
cy: properties.cy,
|
|
22
23
|
r: properties.r
|
|
23
24
|
}
|
|
24
|
-
}
|
|
25
|
-
properties
|
|
25
|
+
}
|
|
26
26
|
)
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export function
|
|
33
|
-
return new
|
|
32
|
+
export function createCircle(properties: ICircleProperties) {
|
|
33
|
+
return new CircleElement(properties);
|
|
34
34
|
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Element } from "../../../framework/element";
|
|
2
|
+
import { IProperties, extendProperties} from "../../../framework/properties";
|
|
3
|
+
import { ISubscribable } from "../../../framework/observable";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
6
|
-
cx: number | string |
|
|
7
|
-
cy: number | string |
|
|
8
|
-
rx: number | string |
|
|
9
|
-
ry: number | string |
|
|
5
|
+
export interface IEllipseProperties extends IProperties {
|
|
6
|
+
cx: number | string | ISubscribable<number | string>;
|
|
7
|
+
cy: number | string | ISubscribable<number | string>;
|
|
8
|
+
rx: number | string | ISubscribable<number | string>;
|
|
9
|
+
ry: number | string | ISubscribable<number | string>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export class
|
|
13
|
-
constructor(properties:
|
|
12
|
+
export class EllipseElement extends Element<IEllipseProperties> {
|
|
13
|
+
constructor(properties: IEllipseProperties) {
|
|
14
14
|
super(
|
|
15
15
|
{
|
|
16
16
|
tagName: "ellipse",
|
|
17
17
|
properties: extendProperties(
|
|
18
|
+
properties,
|
|
18
19
|
{
|
|
19
|
-
|
|
20
|
+
elementType: "Ellipse",
|
|
20
21
|
attributes: {
|
|
21
22
|
cx: properties.cx,
|
|
22
23
|
cy: properties.cy,
|
|
23
24
|
rx: properties.rx,
|
|
24
25
|
ry: properties.ry
|
|
25
26
|
}
|
|
26
|
-
}
|
|
27
|
-
properties
|
|
27
|
+
}
|
|
28
28
|
)
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export function
|
|
35
|
-
return new
|
|
34
|
+
export function createEllipse(properties: IEllipseProperties) {
|
|
35
|
+
return new EllipseElement(properties);
|
|
36
36
|
}
|
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Element, IElement } from "../../../framework/element";
|
|
2
|
+
import { IProperties, extendProperties } from "../../../framework/properties";
|
|
3
|
+
import { ISubscribable } from "../../../framework/observable";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
6
|
-
height?: number | string |
|
|
7
|
-
width?: number | string |
|
|
8
|
-
x?: number | string |
|
|
9
|
-
y?: number | string |
|
|
10
|
-
children?: Array<
|
|
5
|
+
export interface IForeignObjectProperties extends IProperties {
|
|
6
|
+
height?: number | string | ISubscribable<number | string>;
|
|
7
|
+
width?: number | string | ISubscribable<number | string>;
|
|
8
|
+
x?: number | string | ISubscribable<number | string>;
|
|
9
|
+
y?: number | string | ISubscribable<number | string>;
|
|
10
|
+
children?: Array<IElement> | ISubscribable<Array<IElement>>;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
constructor(properties: ForeignObjectProperties) {
|
|
12
|
+
class ForeignObjectElement extends Element<IForeignObjectProperties> {
|
|
13
|
+
constructor(properties: IForeignObjectProperties,) {
|
|
15
14
|
super(
|
|
16
15
|
{
|
|
17
16
|
tagName: "foreignObject",
|
|
18
17
|
properties: extendProperties(
|
|
18
|
+
properties,
|
|
19
19
|
{
|
|
20
|
-
|
|
20
|
+
elementType: "ForeignObject",
|
|
21
21
|
attributes: {
|
|
22
22
|
height: properties.height,
|
|
23
23
|
width: properties.width,
|
|
24
24
|
x: properties.x,
|
|
25
25
|
y: properties.y
|
|
26
26
|
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
},
|
|
30
|
+
properties.children
|
|
32
31
|
);
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
export function
|
|
37
|
-
return new
|
|
35
|
+
export function createForeignObject(properties: IForeignObjectProperties) {
|
|
36
|
+
return new ForeignObjectElement(properties);
|
|
38
37
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Element, IElement } from "../../../framework/element";
|
|
2
|
+
import { IProperties, extendProperties } from "../../../framework/properties";
|
|
3
|
+
import { ISubscribable } from "../../../framework/observable";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
6
|
-
x1?: number | string |
|
|
7
|
-
x2?: number | string |
|
|
8
|
-
y1?: number | string |
|
|
9
|
-
y2?: number | string |
|
|
10
|
-
children?: Array<
|
|
5
|
+
export interface IGroupProperties extends IProperties {
|
|
6
|
+
x1?: number | string | ISubscribable<number | string>;
|
|
7
|
+
x2?: number | string | ISubscribable<number | string>;
|
|
8
|
+
y1?: number | string | ISubscribable<number | string>;
|
|
9
|
+
y2?: number | string | ISubscribable<number | string>;
|
|
10
|
+
children?: Array<IElement> | ISubscribable<Array<IElement>>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
constructor(properties:
|
|
13
|
+
class GroupElement extends Element<IGroupProperties> {
|
|
14
|
+
constructor(properties: IGroupProperties) {
|
|
15
15
|
super(
|
|
16
16
|
{
|
|
17
17
|
tagName: "g",
|
|
18
18
|
properties: extendProperties(
|
|
19
|
+
properties,
|
|
19
20
|
{
|
|
20
|
-
|
|
21
|
+
elementType: "Group",
|
|
21
22
|
attributes: {
|
|
22
23
|
x1: properties.x1,
|
|
23
24
|
x2: properties.x2,
|
|
24
25
|
y1: properties.y1,
|
|
25
26
|
y2: properties.y2
|
|
26
27
|
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
},
|
|
31
|
+
properties.children
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export function
|
|
37
|
-
return new
|
|
36
|
+
export function createGroup(properties: IGroupProperties) {
|
|
37
|
+
return new GroupElement(properties);
|
|
38
38
|
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Element } from "../../../framework/element";
|
|
2
|
+
import { IProperties, extendProperties } from "../../../framework/properties";
|
|
3
|
+
import { ISubscribable } from "../../../framework/observable";
|
|
4
4
|
|
|
5
|
-
export interface
|
|
6
|
-
x1: number | string |
|
|
7
|
-
x2: number | string |
|
|
8
|
-
y1: number | string |
|
|
9
|
-
y2: number | string |
|
|
5
|
+
export interface ILineProperties extends IProperties {
|
|
6
|
+
x1: number | string | ISubscribable<number | string>;
|
|
7
|
+
x2: number | string | ISubscribable<number | string>;
|
|
8
|
+
y1: number | string | ISubscribable<number | string>;
|
|
9
|
+
y2: number | string | ISubscribable<number | string>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
export class
|
|
13
|
-
constructor(properties:
|
|
12
|
+
export class LineElement extends Element<ILineProperties> {
|
|
13
|
+
constructor(properties: ILineProperties) {
|
|
14
14
|
super(
|
|
15
15
|
{
|
|
16
16
|
tagName: "line",
|
|
17
17
|
properties: extendProperties(
|
|
18
|
+
properties,
|
|
18
19
|
{
|
|
19
|
-
|
|
20
|
+
elementType: "Line",
|
|
20
21
|
attributes: {
|
|
21
22
|
x1: properties.x1,
|
|
22
23
|
x2: properties.x2,
|
|
23
24
|
y1: properties.y1,
|
|
24
25
|
y2: properties.y2
|
|
25
26
|
}
|
|
26
|
-
}
|
|
27
|
-
properties
|
|
27
|
+
}
|
|
28
28
|
)
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
export function
|
|
35
|
-
return new
|
|
34
|
+
export function createLine(properties: ILineProperties) {
|
|
35
|
+
return new LineElement(properties);
|
|
36
36
|
}
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Element } from "../../../framework/element";
|
|
2
|
+
import { IProperties, extendProperties } from "../../../framework/properties";
|
|
3
|
+
import { ISubscribable } from "../../../framework/observable";
|
|
4
4
|
import { PatternUnits } from "../../../framework/types";
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { CircleElement } from "../Circle/Circle";
|
|
7
|
+
import { EllipseElement } from "../Ellipse/Ellipse";
|
|
8
|
+
import { LineElement } from "../Line/Line";
|
|
9
|
+
import { PolygonElement } from "../Polygon/Polygon";
|
|
10
|
+
import { PolylineElement } from "../Polyline/Polyline";
|
|
11
|
+
import { TextElement } from "../Text/Text";
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
export interface
|
|
14
|
+
export interface IPatternProperties extends IProperties {
|
|
15
15
|
id: string;
|
|
16
|
-
width: number | string |
|
|
17
|
-
height: number | string |
|
|
18
|
-
patternUnits: PatternUnits |
|
|
19
|
-
patternTransform: string |
|
|
20
|
-
pattern:
|
|
16
|
+
width: number | string | ISubscribable<number | string>;
|
|
17
|
+
height: number | string | ISubscribable<number | string>;
|
|
18
|
+
patternUnits: PatternUnits | ISubscribable<PatternUnits>;
|
|
19
|
+
patternTransform: string | ISubscribable<string>;
|
|
20
|
+
pattern: CircleElement | EllipseElement | LineElement | PolygonElement | PolylineElement | TextElement;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export class
|
|
24
|
-
constructor(properties:
|
|
23
|
+
export class PatternElement extends Element<IPatternProperties> {
|
|
24
|
+
constructor(properties: IPatternProperties) {
|
|
25
25
|
super(
|
|
26
26
|
{
|
|
27
27
|
tagName: "pattern",
|
|
28
28
|
properties: extendProperties(
|
|
29
|
+
properties,
|
|
29
30
|
{
|
|
30
|
-
|
|
31
|
+
elementType: "Pattern",
|
|
31
32
|
attributes: {
|
|
32
33
|
id: properties.id,
|
|
33
34
|
width: properties.width,
|
|
@@ -35,15 +36,14 @@ export class PatternView extends View<PatternProperties> {
|
|
|
35
36
|
patternUnits: properties.patternUnits,
|
|
36
37
|
patternTransform: properties.patternTransform
|
|
37
38
|
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
},
|
|
42
|
+
[properties.pattern]
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export function
|
|
48
|
-
return new
|
|
47
|
+
export function createPattern(properties: IPatternProperties) {
|
|
48
|
+
return new PatternElement(properties);
|
|
49
49
|
}
|