@milemaker/milemaker-js 1.1.0-alpha.1 → 2.0.0-alpha.0
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/actions/constants/actions.constants.d.ts +3 -2
- package/dist/actions/index.d.ts +4 -1
- package/dist/actions/layer/baseLayerActions.factory.d.ts +1 -1
- package/dist/actions/layer/index.d.ts +5 -2
- package/dist/actions/layer/types/layerActions.types.d.ts +34 -10
- package/dist/actions/layer/weatherLayerActions.factory.d.ts +8 -0
- package/dist/actions/marker/types/markerActions.types.d.ts +1 -1
- package/dist/actions/popup/types/popupActions.types.d.ts +1 -1
- package/dist/components/Popper/Popper.d.ts +1 -1
- package/dist/components/Popper/Popper.types.d.ts +3 -0
- package/dist/components/WeatherLegend/RainSnowIceLegend/RainSnowIceLegend.d.ts +3 -0
- package/dist/components/WeatherLegend/RainSnowIceLegend/RainSnowIceLegend.types.d.ts +18 -0
- package/dist/components/WeatherLegend/RainSnowIceLegend/index.d.ts +2 -0
- package/dist/components/WeatherLegend/WeatherAlertsLegend/WeatherAlertsLegend.constants.d.ts +2 -0
- package/dist/components/WeatherLegend/WeatherAlertsLegend/WeatherAlertsLegend.d.ts +3 -0
- package/dist/components/WeatherLegend/WeatherAlertsLegend/WeatherAlertsLegend.types.d.ts +12 -0
- package/dist/components/WeatherLegend/WeatherAlertsLegend/index.d.ts +2 -0
- package/dist/components/WeatherLegend/WeatherLegend.d.ts +3 -0
- package/dist/components/WeatherLegend/WeatherLegend.types.d.ts +19 -0
- package/dist/components/WeatherLegend/WeatherTemperaturesLegend/WeatherTemperaturesLegend.constants.d.ts +2 -0
- package/dist/components/WeatherLegend/WeatherTemperaturesLegend/WeatherTemperaturesLegend.d.ts +3 -0
- package/dist/components/WeatherLegend/WeatherTemperaturesLegend/WeatherTemperaturesLegend.types.d.ts +15 -0
- package/dist/components/WeatherLegend/WeatherTemperaturesLegend/index.d.ts +2 -0
- package/dist/components/WeatherLegend/WeatherWindSpeedsLegend/WeatherWindSpeedsLegend.constants.d.ts +6 -0
- package/dist/components/WeatherLegend/WeatherWindSpeedsLegend/WeatherWindSpeedsLegend.d.ts +3 -0
- package/dist/components/WeatherLegend/WeatherWindSpeedsLegend/WeatherWindSpeedsLegend.types.d.ts +15 -0
- package/dist/components/WeatherLegend/WeatherWindSpeedsLegend/index.d.ts +2 -0
- package/dist/components/WeatherLegend/index.d.ts +6 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/controls/createWeatherLayerControl.factory.d.ts +3 -0
- package/dist/controls/index.d.ts +1 -0
- package/dist/controls/types/controls.types.d.ts +14 -1
- package/dist/controls/utils/index.d.ts +4 -0
- package/dist/controls/utils/weatherLayers.constants.d.ts +5 -0
- package/dist/controls/utils/weatherLayers.helpers.d.ts +12 -0
- package/dist/controls/utils/weatherLayers.rendering.d.ts +2 -0
- package/dist/controls/utils/weatherLayers.types.d.ts +1 -0
- package/dist/createMap/errorMap/createMap.error.d.ts +3 -2
- package/dist/createMap/types/createMap.types.d.ts +7 -2
- package/dist/helpers/parseStringAsJson.d.ts +1 -1
- package/dist/index.cjs +309 -241
- package/dist/index.js +23909 -23037
- package/dist/types/common.enums.d.ts +23 -0
- package/dist/types/common.types.d.ts +13 -0
- package/dist/utils/constants.d.ts +28 -0
- package/dist/utils/helpers/getBrowserInfo.helper.d.ts +2 -0
- package/dist/utils/helpers/getMailToSupportHrefLink.helper.d.ts +8 -0
- package/dist/utils/helpers/limitEmailLength.helper.d.ts +2 -0
- package/dist/utils/helpers/prepareAppErrorMailToData.helper.d.ts +7 -0
- package/dist/utils/helpers/prepareContactSupportMandatoryFields.helper.d.ts +4 -0
- package/dist/utils/types.d.ts +13 -0
- package/dist/utils/version.d.ts +1 -0
- package/package.json +5 -4
- package/dist/helpers/getMailToSupportHrefLink.helper.d.ts +0 -13
|
@@ -9,3 +9,26 @@ export declare enum MapBaseLayer {
|
|
|
9
9
|
DARK = "Dark",
|
|
10
10
|
SATELLITE = "Satellite"
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Available weather layers
|
|
14
|
+
* @group Common
|
|
15
|
+
* @category Enums
|
|
16
|
+
*/
|
|
17
|
+
export declare enum WeatherLayer {
|
|
18
|
+
RADAR_GLOBAL = "radar-global",
|
|
19
|
+
TEMPERATURES = "temperatures",
|
|
20
|
+
WEATHER_WIND_SPEEDS = "wind-speeds",
|
|
21
|
+
SATELLITE_GEOCOLOR = "satellite-geocolor",
|
|
22
|
+
SATELLITE_INFRARED = "satellite-infrared-color",
|
|
23
|
+
ROAD_CONDITIONS = "road-conditions",
|
|
24
|
+
ALERTS = "alerts-severe"
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Available units formats
|
|
28
|
+
* @group Common
|
|
29
|
+
* @category Enums
|
|
30
|
+
*/
|
|
31
|
+
export declare enum UnitsFormat {
|
|
32
|
+
IMPERIAL = "imperial",
|
|
33
|
+
METRIC = "metric"
|
|
34
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UnitsFormat } from "./common.enums";
|
|
1
2
|
/**
|
|
2
3
|
* Tuple where first item is longitude and second is latitude
|
|
3
4
|
* @type
|
|
@@ -57,3 +58,15 @@ export type LngLat = {
|
|
|
57
58
|
* @category Types
|
|
58
59
|
*/
|
|
59
60
|
export type LonLatLike = LonLatTuple | Coordinates | LngLat;
|
|
61
|
+
/**
|
|
62
|
+
* General application settings configuration
|
|
63
|
+
* @interface
|
|
64
|
+
* @group Common
|
|
65
|
+
* @category Interfaces
|
|
66
|
+
*/
|
|
67
|
+
export type GeneralAppSettings = {
|
|
68
|
+
/**
|
|
69
|
+
* Units
|
|
70
|
+
*/
|
|
71
|
+
units: UnitsFormat;
|
|
72
|
+
};
|
|
@@ -20,3 +20,31 @@ export declare const MILE_MAKER_PAGE_PATH: {
|
|
|
20
20
|
export declare const FULL_MILE_MAKER_PAGE_PATH: {
|
|
21
21
|
terms: string;
|
|
22
22
|
};
|
|
23
|
+
export declare const MEASURE_UNITS_LABELS: {
|
|
24
|
+
imperial: {
|
|
25
|
+
shortDistance: string;
|
|
26
|
+
speed: string;
|
|
27
|
+
distance: string;
|
|
28
|
+
distance_one: string;
|
|
29
|
+
distance_other: string;
|
|
30
|
+
volume: string;
|
|
31
|
+
volume_one: string;
|
|
32
|
+
volume_other: string;
|
|
33
|
+
shortTemperature: string;
|
|
34
|
+
temperature: string;
|
|
35
|
+
};
|
|
36
|
+
metric: {
|
|
37
|
+
shortDistance: string;
|
|
38
|
+
speed: string;
|
|
39
|
+
distance: string;
|
|
40
|
+
distance_one: string;
|
|
41
|
+
distance_other: string;
|
|
42
|
+
volume: string;
|
|
43
|
+
volume_one: string;
|
|
44
|
+
volume_other: string;
|
|
45
|
+
shortTemperature: string;
|
|
46
|
+
temperature: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const EMAIL_SUBJECT_LENGTH_LIMITATION = 255;
|
|
50
|
+
export declare const EMAIL_BODY_LENGTH_LIMITATION = 2000;
|
package/dist/utils/types.d.ts
CHANGED
|
@@ -3,3 +3,16 @@ export declare enum Env {
|
|
|
3
3
|
STG = "STG",
|
|
4
4
|
PRD = "PRD"
|
|
5
5
|
}
|
|
6
|
+
export type UnwrapPromise<T> = T extends Promise<infer U> ? U : T;
|
|
7
|
+
export type Awaited<T> = T extends PromiseLike<infer U> ? U : T;
|
|
8
|
+
export declare enum ContactSupportMandatoryField {
|
|
9
|
+
MAP_SDK_KEY = "mapSdkKey",
|
|
10
|
+
BROWSER_INFO = "browserInfo",
|
|
11
|
+
TIMESTAMP = "timestamp",
|
|
12
|
+
APP_VERSION = "appVersion",
|
|
13
|
+
SCOPE = "scope"
|
|
14
|
+
}
|
|
15
|
+
export declare enum Mail {
|
|
16
|
+
SUPPORT = "support@milemaker.com",
|
|
17
|
+
SALES = "mmsales@milemaker.com"
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const APP_VERSION = "2.0.0-alpha.0";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milemaker/milemaker-js",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0-alpha.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"files": [
|
|
@@ -21,15 +21,16 @@
|
|
|
21
21
|
"registry": "https://registry.npmjs.org"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
+
"prebuild": "sh ./scripts/generate-version.sh",
|
|
24
25
|
"build": "tsc -p ./tsconfig.json && vite build --mode production",
|
|
25
26
|
"postbuild": "sh ./scripts/postbuild.sh",
|
|
26
|
-
"build:publish": "yarn build &&
|
|
27
|
+
"build:publish": "yarn build && sh ./scripts/publish.sh"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@googlemaps/polyline-codec": "^1.0.28",
|
|
31
|
+
"detect-browser": "^5.3.0",
|
|
30
32
|
"lodash": "^4.17.21",
|
|
31
|
-
"uuid": "^9.0.0"
|
|
32
|
-
"vite-plugin-package-version": "^1.1.0"
|
|
33
|
+
"uuid": "^9.0.0"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@milemaker/nmaps-gl": "^1.6.10",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare enum Mail {
|
|
2
|
-
SUPPORT = "support@milemaker.com"
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* This helper is used to receive the HrefLink to support
|
|
6
|
-
* @param {string} subject - Email subject
|
|
7
|
-
* @param {string} body - Email body
|
|
8
|
-
* @returns {string} - Support Href Link
|
|
9
|
-
*/
|
|
10
|
-
export declare const getMailToSupportHrefLink: ({ subject, body }?: {
|
|
11
|
-
subject?: string | undefined;
|
|
12
|
-
body?: string | undefined;
|
|
13
|
-
}) => string;
|