radar-sdk-js 4.4.5 → 4.4.6-beta.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 +7 -7
- package/dist/logger.d.ts +1 -1
- package/dist/radar.js +6 -6
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/api.ts +1 -1
- package/src/logger.ts +2 -2
- package/src/ui/RadarMap.ts +1 -1
- package/src/ui/autocomplete.ts +1 -1
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ Radar.initialize('prj_test_pk_...', { /* options */ });
|
|
|
56
56
|
|
|
57
57
|
Add the following script in your `html` file
|
|
58
58
|
```html
|
|
59
|
-
<script src="https://js.radar.com/v4.4.
|
|
59
|
+
<script src="https://js.radar.com/v4.4.6-beta.1/radar.min.js"></script>
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Then initialize the Radar SDK
|
|
@@ -73,8 +73,8 @@ To create a map, first initialize the Radar SDK with your publishable key. Then
|
|
|
73
73
|
```html
|
|
74
74
|
<html>
|
|
75
75
|
<head>
|
|
76
|
-
<link href="https://js.radar.com/v4.4.
|
|
77
|
-
<script src="https://js.radar.com/v4.4.
|
|
76
|
+
<link href="https://js.radar.com/v4.4.6-beta.1/radar.css" rel="stylesheet">
|
|
77
|
+
<script src="https://js.radar.com/v4.4.6-beta.1/radar.min.js"></script>
|
|
78
78
|
</head>
|
|
79
79
|
|
|
80
80
|
<body>
|
|
@@ -98,8 +98,8 @@ To create an autocomplete input, first initialize the Radar SDK with your publis
|
|
|
98
98
|
```html
|
|
99
99
|
<html>
|
|
100
100
|
<head>
|
|
101
|
-
<link href="https://js.radar.com/v4.4.
|
|
102
|
-
<script src="https://js.radar.com/v4.4.
|
|
101
|
+
<link href="https://js.radar.com/v4.4.6-beta.1/radar.css" rel="stylesheet">
|
|
102
|
+
<script src="https://js.radar.com/v4.4.6-beta.1/radar.min.js"></script>
|
|
103
103
|
</head>
|
|
104
104
|
|
|
105
105
|
<body>
|
|
@@ -130,8 +130,8 @@ To power [geofencing](https://radar.com/documentation/geofencing/overview) exper
|
|
|
130
130
|
```html
|
|
131
131
|
<html>
|
|
132
132
|
<head>
|
|
133
|
-
<link href="https://js.radar.com/v4.4.
|
|
134
|
-
<script src="https://js.radar.com/v4.4.
|
|
133
|
+
<link href="https://js.radar.com/v4.4.6-beta.1/radar.css" rel="stylesheet">
|
|
134
|
+
<script src="https://js.radar.com/v4.4.6-beta.1/radar.min.js"></script>
|
|
135
135
|
</head>
|
|
136
136
|
|
|
137
137
|
<body>
|
package/dist/logger.d.ts
CHANGED
package/dist/radar.js
CHANGED
|
@@ -42,9 +42,9 @@ const getLevel = () => {
|
|
|
42
42
|
return LOG_LEVELS.error; // default to error-level logging if not set
|
|
43
43
|
};
|
|
44
44
|
class Logger {
|
|
45
|
-
static debug(message) {
|
|
45
|
+
static debug(message, options) {
|
|
46
46
|
if (getLevel() === LOG_LEVELS.debug) {
|
|
47
|
-
console.log(`Radar SDK (debug): ${message.trim()}
|
|
47
|
+
console.log(`Radar SDK (debug): ${message.trim()}`, options);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
static info(message) {
|
|
@@ -405,7 +405,7 @@ class Navigator {
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
-
var SDK_VERSION = '4.4.
|
|
408
|
+
var SDK_VERSION = '4.4.6-beta.1';
|
|
409
409
|
|
|
410
410
|
const inFlightRequests = new Map();
|
|
411
411
|
class Http {
|
|
@@ -1496,7 +1496,7 @@ let Radar$1 = class Radar {
|
|
|
1496
1496
|
Config.setup(radarOptions);
|
|
1497
1497
|
Logger.info(`initialized with ${live ? 'live' : 'test'} publishableKey.`);
|
|
1498
1498
|
if (options.debug) {
|
|
1499
|
-
Logger.
|
|
1499
|
+
Logger.debug('using options', options);
|
|
1500
1500
|
}
|
|
1501
1501
|
// NOTE(jasonl): this allows us to run jest tests
|
|
1502
1502
|
// without having to mock the ConfigAPI.getConfig call
|
|
@@ -2025,7 +2025,7 @@ class RadarMap extends maplibregl.Map {
|
|
|
2025
2025
|
// configure map options
|
|
2026
2026
|
const style = getStyle(config, radarMapOptions);
|
|
2027
2027
|
const mapOptions = Object.assign({}, defaultRadarMapOptions, defaultMaplibreOptions, radarMapOptions, { style });
|
|
2028
|
-
Logger.debug(
|
|
2028
|
+
Logger.debug('map initailized with options', mapOptions);
|
|
2029
2029
|
mapOptions.transformRequest = (url, resourceType) => {
|
|
2030
2030
|
// this handles when a style is switched
|
|
2031
2031
|
if (resourceType === 'Style' && isRadarStyle(url)) {
|
|
@@ -2529,7 +2529,7 @@ class AutocompleteUI {
|
|
|
2529
2529
|
if (this.config.hideResultsOnBlur) {
|
|
2530
2530
|
this.inputField.addEventListener('blur', this.close.bind(this), true);
|
|
2531
2531
|
}
|
|
2532
|
-
Logger.debug(
|
|
2532
|
+
Logger.debug('AutocompleteUI initialized with options', this.config);
|
|
2533
2533
|
}
|
|
2534
2534
|
handleInput() {
|
|
2535
2535
|
// Fetch autocomplete results and display them
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.4.
|
|
1
|
+
declare const _default: "4.4.6-beta.1";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -76,7 +76,7 @@ class Radar {
|
|
|
76
76
|
|
|
77
77
|
Logger.info(`initialized with ${live ? 'live' : 'test'} publishableKey.`);
|
|
78
78
|
if (options.debug) {
|
|
79
|
-
Logger.
|
|
79
|
+
Logger.debug('using options', options);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// NOTE(jasonl): this allows us to run jest tests
|
package/src/logger.ts
CHANGED
|
@@ -27,9 +27,9 @@ const getLevel = (): number => {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
class Logger {
|
|
30
|
-
public static debug(message: string) {
|
|
30
|
+
public static debug(message: string, options?: any) {
|
|
31
31
|
if (getLevel() === LOG_LEVELS.debug) {
|
|
32
|
-
console.log(`Radar SDK (debug): ${message.trim()}
|
|
32
|
+
console.log(`Radar SDK (debug): ${message.trim()}`, options);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
package/src/ui/RadarMap.ts
CHANGED
|
@@ -96,7 +96,7 @@ class RadarMap extends maplibregl.Map {
|
|
|
96
96
|
radarMapOptions,
|
|
97
97
|
{ style },
|
|
98
98
|
);
|
|
99
|
-
Logger.debug(
|
|
99
|
+
Logger.debug('map initailized with options', mapOptions);
|
|
100
100
|
|
|
101
101
|
(mapOptions as maplibregl.MapOptions).transformRequest = (url, resourceType) => {
|
|
102
102
|
// this handles when a style is switched
|
package/src/ui/autocomplete.ts
CHANGED
|
@@ -186,7 +186,7 @@ class AutocompleteUI {
|
|
|
186
186
|
this.inputField.addEventListener('blur', this.close.bind(this), true);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
Logger.debug(
|
|
189
|
+
Logger.debug('AutocompleteUI initialized with options', this.config);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
public handleInput() {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.4.
|
|
1
|
+
export default '4.4.6-beta.1';
|