@milemaker/milemaker-js 1.0.5-alpha.0 → 1.1.0-alpha.1
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/README.md +1 -1
- package/dist/actions/constants/actions.constants.d.ts +1 -0
- package/dist/actions/layer/truckRestrictionsLayerActions.factory.d.ts +2 -0
- package/dist/actions/layer/types/layerActions.types.d.ts +28 -0
- package/dist/components/Menu/Menu.d.ts +2 -0
- package/dist/components/Menu/Menu.types.d.ts +15 -0
- package/dist/components/Menu/MenuItem.d.ts +3 -0
- package/dist/components/Popper/Popper.d.ts +3 -0
- package/dist/components/Popper/Popper.types.d.ts +29 -0
- package/dist/components/Radio/Radio.types.d.ts +9 -0
- package/dist/components/Radio/RadioButton.d.ts +3 -0
- package/dist/components/Radio/RadioButtonGroup.d.ts +3 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/controls/createOverlayLayerControl.factory.d.ts +3 -0
- package/dist/controls/createTruckRestrictionsLayerControl.factory.d.ts +3 -0
- package/dist/controls/index.d.ts +2 -0
- package/dist/controls/types/controls.types.d.ts +22 -0
- package/dist/index.cjs +244 -125
- package/dist/index.js +13248 -12817
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Add such lines
|
|
|
33
33
|
mapInstance.controls.createBaseLayerControl();
|
|
34
34
|
mapInstance.controls.createZoomControl();
|
|
35
35
|
mapInstance.controls.createCurrentPositionControl();
|
|
36
|
-
mapInstance.controls.
|
|
36
|
+
mapInstance.controls.createOverlayLayerControl();
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
### Documentation
|
|
@@ -7,6 +7,7 @@ export declare const MAP_DEFAULT_POLYLINE_STROKE_WIDTH = 5;
|
|
|
7
7
|
export declare const MAP_DEFAULT_POLYLINE_STROKE_OPACITY = 1;
|
|
8
8
|
export declare const NMAPS_TRAFFIC_PREFIX = "traffic";
|
|
9
9
|
export declare const NMAPS_TRAFFIC_SOURCE_NAME = "ndrive-traffic";
|
|
10
|
+
export declare const NMAPS_TRUCK_SOURCE_NAME = "ndrive-truck";
|
|
10
11
|
export declare const NMAPS_LAYOUT_PROPERTY_VISIBILITY_KEY = "visibility";
|
|
11
12
|
export declare const NMAPSLAYOUT_PROPERTY_VISIBILITY_VALUES: {
|
|
12
13
|
visible: string;
|
|
@@ -44,6 +44,30 @@ export type TrafficLayerActions = {
|
|
|
44
44
|
*/
|
|
45
45
|
toggle(): void;
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Truck restrictions layer actions
|
|
49
|
+
* @interface
|
|
50
|
+
* @group Actions
|
|
51
|
+
* @category Layers
|
|
52
|
+
*/
|
|
53
|
+
export type TruckRestrictionsLayerActions = {
|
|
54
|
+
/**
|
|
55
|
+
* Show truck restrictions layer
|
|
56
|
+
*/
|
|
57
|
+
showTruckRestrictionsLayer(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Hide truck restrictions layer
|
|
60
|
+
*/
|
|
61
|
+
hideTruckRestrictionsLayer(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Get is truck restrictions layer visible
|
|
64
|
+
*/
|
|
65
|
+
getIsVisibleTruckRestrictionsLayer(): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Toggle truck restrictions layer visibility
|
|
68
|
+
*/
|
|
69
|
+
toggle(): void;
|
|
70
|
+
};
|
|
47
71
|
/**
|
|
48
72
|
* Map layer actions
|
|
49
73
|
* @interface
|
|
@@ -59,4 +83,8 @@ export type MapLayerActions = {
|
|
|
59
83
|
* Traffic layer actions
|
|
60
84
|
*/
|
|
61
85
|
trafficLayerActions: TrafficLayerActions;
|
|
86
|
+
/**
|
|
87
|
+
* Truck restrictions layer actions
|
|
88
|
+
*/
|
|
89
|
+
truckRestrictionsLayerActions: TruckRestrictionsLayerActions;
|
|
62
90
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type MenuItemConfig = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type MenuConfig = {
|
|
9
|
+
items: MenuItemConfig[];
|
|
10
|
+
onItemClick?: (value: string) => void;
|
|
11
|
+
};
|
|
12
|
+
export type MenuItemOptions = {
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare enum PopperPlacement {
|
|
2
|
+
LEFT = "left",
|
|
3
|
+
RIGHT = "right",
|
|
4
|
+
TOP = "top",
|
|
5
|
+
BOTTOM = "bottom",
|
|
6
|
+
AUTO = "auto"
|
|
7
|
+
}
|
|
8
|
+
export type PopperOffset = {
|
|
9
|
+
x?: number;
|
|
10
|
+
y?: number;
|
|
11
|
+
};
|
|
12
|
+
export type PopperOptions = {
|
|
13
|
+
placement?: PopperPlacement;
|
|
14
|
+
offset?: PopperOffset;
|
|
15
|
+
flip?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type PopperPosition = {
|
|
18
|
+
top: number;
|
|
19
|
+
left: number;
|
|
20
|
+
placement: PopperPlacement;
|
|
21
|
+
};
|
|
22
|
+
export type PopperInstance = {
|
|
23
|
+
update(): void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
setContent(content: string): void;
|
|
26
|
+
show(): void;
|
|
27
|
+
hide(): void;
|
|
28
|
+
getIsVisible(): boolean;
|
|
29
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./Popper/Popper";
|
|
2
|
+
export * from "./Popper/Popper.types";
|
|
3
|
+
export * from "./Menu/Menu";
|
|
4
|
+
export * from "./Menu/MenuItem";
|
|
5
|
+
export * from "./Menu/Menu.types";
|
|
6
|
+
export * from "./Radio/RadioButton";
|
|
7
|
+
export * from "./Radio/RadioButtonGroup";
|
|
8
|
+
export * from "./Radio/Radio.types";
|
package/dist/controls/index.d.ts
CHANGED
|
@@ -2,4 +2,6 @@ export * from "./createAttributionControl.factory";
|
|
|
2
2
|
export * from "./createBaseLayerControl.factory";
|
|
3
3
|
export * from "./createCurrentPositionControl.factory";
|
|
4
4
|
export * from "./createTrafficLayerControl.factory";
|
|
5
|
+
export * from "./createTruckRestrictionsLayerControl.factory";
|
|
6
|
+
export * from "./createOverlayLayerControl.factory";
|
|
5
7
|
export * from "./createZoomControl.factory";
|
|
@@ -85,6 +85,18 @@ export type CurrentPositionControl = BaseMapControl;
|
|
|
85
85
|
* @interface
|
|
86
86
|
*/
|
|
87
87
|
export type TrafficLayerControl = BaseMapControl;
|
|
88
|
+
/**
|
|
89
|
+
* Truck restrictions layer control
|
|
90
|
+
* @group Map Controls
|
|
91
|
+
* @interface
|
|
92
|
+
*/
|
|
93
|
+
export type TruckRestrictionsLayerControl = BaseMapControl;
|
|
94
|
+
/**
|
|
95
|
+
* Overlay layer control
|
|
96
|
+
* @group Map Controls
|
|
97
|
+
* @interface
|
|
98
|
+
*/
|
|
99
|
+
export type OverlayLayerControl = BaseMapControl;
|
|
88
100
|
/**
|
|
89
101
|
* Zoom control
|
|
90
102
|
* @group Map Controls
|
|
@@ -107,6 +119,16 @@ export type MapControlCreators = {
|
|
|
107
119
|
* @function
|
|
108
120
|
*/
|
|
109
121
|
createTrafficLayerControl: (options?: BaseControlCreatorOptions) => TrafficLayerControl;
|
|
122
|
+
/**
|
|
123
|
+
* Creates and returns a truck restrictions layer control instance.
|
|
124
|
+
* @function
|
|
125
|
+
*/
|
|
126
|
+
createTruckRestrictionsLayerControl: (options?: BaseControlCreatorOptions) => TruckRestrictionsLayerControl;
|
|
127
|
+
/**
|
|
128
|
+
* Creates and returns an overlay layer control instance.
|
|
129
|
+
* @function
|
|
130
|
+
*/
|
|
131
|
+
createOverlayLayerControl: (options?: BaseControlCreatorOptions) => OverlayLayerControl;
|
|
110
132
|
/**
|
|
111
133
|
* Creates and returns a zoom control instance.
|
|
112
134
|
* @function
|