@windycom/plugin-devtools 2.0.0 → 3.0.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 +4 -0
- package/index.mjs +2 -2
- package/package.json +2 -3
- package/types/client/AccessProducts.d.ts +8 -0
- package/types/client/BottomSlide.d.ts +3 -0
- package/types/client/BottomSveltePlugins.d.ts +8 -0
- package/types/client/Calendar.d.ts +9 -17
- package/types/client/Color.d.ts +44 -91
- package/types/client/EcmwfProduct.d.ts +0 -22
- package/types/client/Evented.d.ts +4 -0
- package/types/client/ExternalSveltePlugin.d.ts +8 -2
- package/types/client/IDB.d.ts +69 -0
- package/types/client/IconProducts.d.ts +2 -0
- package/types/client/Layer.d.ts +1 -2
- package/types/client/Metric.d.ts +13 -9
- package/types/client/MetricClasses.d.ts +4 -3
- package/types/client/Overlay.d.ts +31 -16
- package/types/client/OverlayClasses.d.ts +11 -7
- package/types/client/Plugin.d.ts +6 -2
- package/types/client/Product.d.ts +33 -30
- package/types/client/RadarPlusProduct.d.ts +19 -0
- package/types/client/Renderer.d.ts +2 -10
- package/types/client/SatelliteProduct.d.ts +1 -1
- package/types/client/SveltePlugin.d.ts +16 -5
- package/types/client/TileLayer.d.ts +1 -2
- package/types/client/TopoMap.d.ts +10 -0
- package/types/client/WindowPlugin.d.ts +9 -4
- package/types/client/appsFlyer.d.ts +2 -0
- package/types/client/baseMap.d.ts +8 -5
- package/types/client/cityLabels.d.ts +10 -2
- package/types/client/cloudSync.d.ts +3 -1
- package/types/client/colorGradients.d.ts +13 -0
- package/types/client/compatibilityCheck.d.ts +1 -0
- package/types/client/connection.d.ts +1 -1
- package/types/client/customColors.d.ts +1 -0
- package/types/client/d.ts.files/Calendar.d.ts +11 -2
- package/types/client/d.ts.files/Color.d.ts +17 -5
- package/types/client/d.ts.files/LabelsLayer.d.ts +3 -20
- package/types/client/d.ts.files/Layer.d.ts +8 -1
- package/types/client/d.ts.files/Metric.d.ts +1 -0
- package/types/client/d.ts.files/Renderer.d.ts +22 -1
- package/types/client/d.ts.files/alerts.d.ts +119 -0
- package/types/client/d.ts.files/broadcast.d.ts +51 -18
- package/types/client/d.ts.files/dataSpecifications.d.ts +121 -137
- package/types/client/d.ts.files/favs.d.ts +68 -0
- package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
- package/types/client/d.ts.files/lib.d.ts +5 -7
- package/types/client/d.ts.files/notifications.d.ts +2 -2
- package/types/client/d.ts.files/plugin-params.d.ts +53 -57
- package/types/client/d.ts.files/plugins.d.ts +31 -42
- package/types/client/d.ts.files/pois.d.ts +1 -1
- package/types/client/d.ts.files/products.d.ts +16 -5
- package/types/client/d.ts.files/rootScope.d.ts +13 -31
- package/types/client/d.ts.files/startup.d.ts +65 -0
- package/types/client/d.ts.files/storage.d.ts +12 -35
- package/types/client/d.ts.files/user.d.ts +82 -24
- package/types/client/detectDevice.d.ts +0 -3
- package/types/client/device.d.ts +1 -0
- package/types/client/deviceLogging.d.ts +2 -1
- package/types/client/embed.d.ts +70 -0
- package/types/client/embed2.d.ts +14 -31
- package/types/client/errorLogger.d.ts +28 -3
- package/types/client/errors.d.ts +6 -0
- package/types/client/fetch.d.ts +41 -16
- package/types/client/format.d.ts +1 -1
- package/types/client/ga.d.ts +1 -1
- package/types/client/geolocation.d.ts +15 -7
- package/types/client/globals.d.ts +1 -0
- package/types/client/http.d.ts +17 -6
- package/types/client/idbInstances.d.ts +36 -0
- package/types/client/imaker.d.ts +112 -0
- package/types/client/imakerMain.d.ts +49 -0
- package/types/client/langFiles.d.ts +2 -0
- package/types/client/latestBroadcasts.d.ts +1 -1
- package/types/client/layers.d.ts +2 -0
- package/types/client/lib.d.ts +6 -22
- package/types/client/libHtml.d.ts +1 -1
- package/types/client/liveAlerts.d.ts +5 -0
- package/types/client/liveAlerts.types.d.ts +28 -0
- package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
- package/types/client/location.d.ts +5 -0
- package/types/client/log.d.ts +4 -1
- package/types/client/lruCache.d.ts +6 -0
- package/types/client/map.d.ts +17 -6
- package/types/client/mobile.d.ts +31 -22
- package/types/client/models.d.ts +7 -5
- package/types/client/notifications.d.ts +29 -67
- package/types/client/overlays.d.ts +4 -1
- package/types/client/params.d.ts +0 -1
- package/types/client/permanentPromos.d.ts +1 -1
- package/types/client/persistentStorage.d.ts +8 -0
- package/types/client/picker.d.ts +1 -1
- package/types/client/plugins.d.ts +4 -0
- package/types/client/pois.d.ts +1 -2
- package/types/client/promo.d.ts +6 -16
- package/types/client/pushNotifications.d.ts +1 -1
- package/types/client/queryString.d.ts +1 -1
- package/types/client/renderUtils.d.ts +1 -1
- package/types/client/renderers.d.ts +7 -3
- package/types/client/rootScope.d.ts +23 -24
- package/types/client/router.d.ts +9 -29
- package/types/client/seoParser.d.ts +0 -14
- package/types/client/serviceWorkerCtrl.d.ts +8 -0
- package/types/client/showableErrorsService.d.ts +6 -10
- package/types/client/startupWeather.d.ts +13 -9
- package/types/client/store.d.ts +2 -2
- package/types/client/storeLastPosition.d.ts +4 -0
- package/types/client/subscription.d.ts +1 -0
- package/types/client/swDownloader.d.ts +7 -7
- package/types/client/swProxy.d.ts +1 -1
- package/types/client/swUtils.d.ts +3 -3
- package/types/client/trans.d.ts +26 -37
- package/types/client/user.d.ts +7 -13
- package/types/client/userAlerts.d.ts +68 -0
- package/types/client/userConsent.d.ts +6 -0
- package/types/client/userFavs.d.ts +46 -122
- package/types/client/utils.d.ts +67 -9
- package/types/iconfont.d.ts +8 -0
- package/types/interfaces.d.ts +226 -284
- package/types/lang-files.d.ts +1334 -142
- package/types/offline.d.ts +100 -0
- package/types/types.d.ts +108 -34
- package/types/client/Bar.d.ts +0 -114
- package/types/client/BindedBar.d.ts +0 -51
- package/types/client/BindedCheckbox.d.ts +0 -30
- package/types/client/BindedSwitch.d.ts +0 -35
- package/types/client/BottomTagPlugin.d.ts +0 -8
- package/types/client/DraggableDiv.d.ts +0 -21
- package/types/client/GhostBox.d.ts +0 -17
- package/types/client/Legend.d.ts +0 -6
- package/types/client/LongTap.d.ts +0 -21
- package/types/client/MobileCalendar.d.ts +0 -51
- package/types/client/OfflineMessagesClasses.d.ts +0 -30
- package/types/client/ProductSwitch.d.ts +0 -14
- package/types/client/Scrollable.d.ts +0 -14
- package/types/client/Switch.d.ts +0 -24
- package/types/client/TimestampBar.d.ts +0 -8
- package/types/client/d.ts.files/Product.d.ts +0 -37
- package/types/client/d.ts.files/errorLogger.d.ts +0 -35
- package/types/client/d.ts.files/trans.d.ts +0 -55
- package/types/client/favs.d.ts +0 -83
- package/types/client/offlineController.d.ts +0 -20
- /package/types/client/d.ts.files/{Webcams.d.ts → webcams.d.ts} +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { Timestamp } from '@windy/types.d';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Types of data that can be downloaded (for purpose of storage management)
|
|
5
|
+
*/
|
|
6
|
+
export type StorageDataType = 'criticalFiles' | 'images' | 'clientFiles' | 'forecastData';
|
|
7
|
+
|
|
8
|
+
export type Client2ServiceWorkerMessage = 'download' | 'ping' | 'cancel' | 'goOffline' | 'goOnline';
|
|
9
|
+
|
|
10
|
+
export type ServiceWorkerStatus = 'idle' | 'downloading' | 'offlineMode';
|
|
11
|
+
|
|
12
|
+
export type ServiceWorker2ClientMessage =
|
|
13
|
+
| ServiceWorkerStatus
|
|
14
|
+
| 'progress'
|
|
15
|
+
| 'finished'
|
|
16
|
+
| 'error'
|
|
17
|
+
| 'cancelled'
|
|
18
|
+
| 'readyForOfflineMode'
|
|
19
|
+
| 'goingOnline';
|
|
20
|
+
|
|
21
|
+
export interface ServiceWorkerMessage extends Event {
|
|
22
|
+
data: {
|
|
23
|
+
type: ServiceWorker2ClientMessage;
|
|
24
|
+
error?: string;
|
|
25
|
+
downloadedInfo?: DownloadedInfo | void;
|
|
26
|
+
expires?: Timestamp;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ClientMessage {
|
|
31
|
+
type: Client2ServiceWorkerMessage;
|
|
32
|
+
payload?: DownloadPayload;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface FileInfo {
|
|
36
|
+
/**
|
|
37
|
+
* Mangled or hash encoded URL, as sent to the backend
|
|
38
|
+
*/
|
|
39
|
+
url: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Original pure URL
|
|
43
|
+
*/
|
|
44
|
+
originalUrl: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Request to download files from service worker
|
|
49
|
+
*/
|
|
50
|
+
export interface DownloadBatch {
|
|
51
|
+
type: StorageDataType;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Should we delete all files in this cache before downloading?
|
|
55
|
+
*/
|
|
56
|
+
deleteCache: boolean;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Files to download
|
|
60
|
+
*/
|
|
61
|
+
files: FileInfo[];
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Given URL's are not static, but rather backend generated API calls
|
|
65
|
+
*/
|
|
66
|
+
apiRqst?: boolean;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* serviceWorker tries twice (with CORS and no-CORS) to download files
|
|
70
|
+
*/
|
|
71
|
+
tryTwice2DownloadFiles?: boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type ErrorsByType = Record<string, number>;
|
|
75
|
+
|
|
76
|
+
export interface DownloadPayload {
|
|
77
|
+
assets: string;
|
|
78
|
+
acceptHeader: string;
|
|
79
|
+
numberOfFiles: number;
|
|
80
|
+
batches: DownloadBatch[];
|
|
81
|
+
mainEntryPoint: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface DownloadedInfo {
|
|
85
|
+
assets: string;
|
|
86
|
+
errors: number;
|
|
87
|
+
errorsByType: ErrorsByType;
|
|
88
|
+
downloaded: Timestamp;
|
|
89
|
+
downloadeAsDate: string;
|
|
90
|
+
mainEntryPoint: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface DownloadProgress {
|
|
94
|
+
type: 'progress' | 'finished' | 'error';
|
|
95
|
+
downloadedFiles: number;
|
|
96
|
+
numberOfFiles: number;
|
|
97
|
+
errors: number;
|
|
98
|
+
errorUrls: string[];
|
|
99
|
+
errorsByType: ErrorsByType;
|
|
100
|
+
}
|
package/types/types.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { MainLangFile, PluginTranslations } from '@windy/lang-files.d';
|
|
2
|
+
|
|
1
3
|
import weatherTable from '@plugins/_shared/detail-render/weatherTable';
|
|
2
|
-
import {
|
|
4
|
+
import { LatLon, WeatherParameters } from './interfaces.d';
|
|
3
5
|
|
|
4
6
|
export * from '@windy/interpolatorTypes.d';
|
|
5
7
|
|
|
@@ -18,6 +20,11 @@ export type Timestamp = number;
|
|
|
18
20
|
*/
|
|
19
21
|
export type Path = string;
|
|
20
22
|
|
|
23
|
+
/**
|
|
24
|
+
* String in a form YYYYMMDDHH
|
|
25
|
+
*/
|
|
26
|
+
export type YYYYMMDDHH = string;
|
|
27
|
+
|
|
21
28
|
/**
|
|
22
29
|
* Valid subscription tiers
|
|
23
30
|
*/
|
|
@@ -27,27 +34,10 @@ export type Platform = 'android' | 'ios' | 'desktop';
|
|
|
27
34
|
|
|
28
35
|
export type Device = 'mobile' | 'tablet' | 'desktop';
|
|
29
36
|
|
|
30
|
-
export type FavType = 'alert' | 'airport' | 'station' | 'fav' | 'webcam' | 'route';
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Search item types as received from backend
|
|
34
|
-
* There is more search types as received from backend (basically all OSM types)
|
|
35
|
-
*/
|
|
36
|
-
export type SearchType =
|
|
37
|
-
| FavType
|
|
38
|
-
| 'natural'
|
|
39
|
-
| 'tourism'
|
|
40
|
-
| 'amenity'
|
|
41
|
-
| 'admin'
|
|
42
|
-
| 'highway'
|
|
43
|
-
| 'railway';
|
|
44
|
-
|
|
45
37
|
export type DetailDisplayType = 'table' | 'meteogram' | 'airgram' | 'waves' | 'wind';
|
|
46
38
|
|
|
47
39
|
export type Directions = 'N' | 'NE' | 'E' | 'SE' | 'S' | 'SW' | 'W' | 'NW';
|
|
48
40
|
|
|
49
|
-
export type AlertConditionProps = 'wind' | 'swell' | 'snow' | 'rain' | 'temp' | 'time' | 'model';
|
|
50
|
-
|
|
51
41
|
export type HTMLElementWithSlider = HTMLElement & { noUiSlider?: noUiSlider.noUiSlider };
|
|
52
42
|
|
|
53
43
|
/**
|
|
@@ -113,9 +103,10 @@ export type SveltePluginIdent = `@plugins/${keyof import('@windy/plugins.d').Sve
|
|
|
113
103
|
export type SveltePanePluginIdent =
|
|
114
104
|
`@plugins/${keyof import('@windy/plugins.d').SveltePanePlugins}`;
|
|
115
105
|
|
|
116
|
-
export type
|
|
106
|
+
export type BottomSveltePluginIdent =
|
|
107
|
+
`@plugins/${keyof import('@windy/plugins.d').BottomSveltePlugins}`;
|
|
117
108
|
|
|
118
|
-
export type
|
|
109
|
+
export type TagPluginIdent = `@plugins/${keyof import('@windy/plugins.d').TagPlugins}`;
|
|
119
110
|
|
|
120
111
|
export type PlainPluginIdent = `@plugins/${keyof import('@windy/plugins.d').PlainPlugins}`;
|
|
121
112
|
|
|
@@ -139,12 +130,11 @@ export type MeteogramLevels =
|
|
|
139
130
|
| '1000h'
|
|
140
131
|
| 'surface';
|
|
141
132
|
|
|
142
|
-
export type CapAlertSeverity
|
|
143
|
-
| 'M'
|
|
144
|
-
/** severe **/
|
|
145
|
-
| '
|
|
146
|
-
| /**
|
|
147
|
-
| /** unknown **/ 'A';
|
|
133
|
+
export type CapAlertSeverity =
|
|
134
|
+
| 'M' /** moderate **/
|
|
135
|
+
| 'S' /** severe **/
|
|
136
|
+
| 'E' /** extreme **/
|
|
137
|
+
| 'A' /** unknown **/;
|
|
148
138
|
|
|
149
139
|
export type CapAlertType =
|
|
150
140
|
| 'T' /** thunderstorm **/
|
|
@@ -181,7 +171,14 @@ export type RouteMotionSpeed = {
|
|
|
181
171
|
};
|
|
182
172
|
|
|
183
173
|
export type LocationPreferences = {
|
|
184
|
-
status:
|
|
174
|
+
status:
|
|
175
|
+
| 'notDetermined' // Native popup asking for location permission, was not shown yet.
|
|
176
|
+
| 'restricted' // The user cannot change this app’s status, possibly due to active restrictions such as parental controls being in place.
|
|
177
|
+
| 'denied' // User disabled app permissions, turned off device location, or enabled Airplane mode.
|
|
178
|
+
| 'authorized' // Deprecated
|
|
179
|
+
| 'authorizedAlways' // This authorization allows you to use all location services and receive location events whether or not your app is in use.
|
|
180
|
+
| 'authorizedWhenInUse' // This authorization allows you to use location services only when your app is in the foreground.
|
|
181
|
+
| 'unknownState'; // Device may not have location services
|
|
185
182
|
};
|
|
186
183
|
|
|
187
184
|
export type NotificationPreferences = {
|
|
@@ -204,6 +201,10 @@ export type GoogleServicesPreferences = {
|
|
|
204
201
|
status: 'denied' | 'authorized';
|
|
205
202
|
};
|
|
206
203
|
|
|
204
|
+
export type WidgetType = {
|
|
205
|
+
widget_type: 'satellite' | 'radar' | 'webcam' | 'detail' | 'days';
|
|
206
|
+
};
|
|
207
|
+
|
|
207
208
|
export type ErrorCategory = 'location' | 'notification' | 'iCloud' | 'battery';
|
|
208
209
|
|
|
209
210
|
export type ShowableError = {
|
|
@@ -224,10 +225,6 @@ export type ShowableErrors = {
|
|
|
224
225
|
closed: Set<string>;
|
|
225
226
|
};
|
|
226
227
|
|
|
227
|
-
export type MigrationResult = {
|
|
228
|
-
status: 'migrationNotPerformed' | 'migratingData';
|
|
229
|
-
};
|
|
230
|
-
|
|
231
228
|
/**
|
|
232
229
|
* Overlay categories used for better UI navigation (mobile/tablet)
|
|
233
230
|
*/
|
|
@@ -279,12 +276,26 @@ export type LogPaths =
|
|
|
279
276
|
| 'promo'
|
|
280
277
|
| 'airport'
|
|
281
278
|
| 'appRating'
|
|
279
|
+
| 'appOpening'
|
|
282
280
|
| 'articles'
|
|
283
281
|
| 'detail2'
|
|
282
|
+
| 'appsflyer'
|
|
284
283
|
| 'onboarding'
|
|
285
284
|
| 'station'
|
|
286
285
|
| 'weather'
|
|
287
|
-
| 'events'
|
|
286
|
+
| 'events'
|
|
287
|
+
| 'locationPermissionPopup'
|
|
288
|
+
| 'widgetPromo'
|
|
289
|
+
| 'storyEvent'
|
|
290
|
+
| 'garmin';
|
|
291
|
+
|
|
292
|
+
export type LogEvents =
|
|
293
|
+
| 'logout'
|
|
294
|
+
| 'animation-started'
|
|
295
|
+
| 'user-logged'
|
|
296
|
+
| 'click-on-hp'
|
|
297
|
+
| 'article-event'
|
|
298
|
+
| 'displayed-on-hp';
|
|
288
299
|
|
|
289
300
|
/**
|
|
290
301
|
* Type of user consent
|
|
@@ -301,21 +312,29 @@ export type ProductIdent =
|
|
|
301
312
|
| 'icon-d2'
|
|
302
313
|
| 'arome'
|
|
303
314
|
| 'arome-antilles'
|
|
315
|
+
| 'arome-france'
|
|
304
316
|
| 'arome-reunion'
|
|
305
317
|
| 'can-hrdps'
|
|
306
318
|
| 'can-rdwps'
|
|
307
319
|
| 'cams-global'
|
|
308
320
|
| 'cams-eu'
|
|
321
|
+
| 'cze-aladin'
|
|
309
322
|
| 'icon-global'
|
|
310
323
|
| 'icon-gwam'
|
|
311
324
|
| 'icon-ewam'
|
|
312
325
|
| 'hrrr-alaska'
|
|
313
326
|
| 'hrrr-conus'
|
|
314
327
|
| 'bom-access'
|
|
328
|
+
| 'bom-access-c-ad'
|
|
329
|
+
| 'bom-access-c-bn'
|
|
330
|
+
| 'bom-access-c-dn'
|
|
331
|
+
| 'bom-access-c-nq'
|
|
332
|
+
| 'bom-access-c-ph'
|
|
333
|
+
| 'bom-access-c-sy'
|
|
334
|
+
| 'bom-access-c-vt'
|
|
315
335
|
| 'ukv'
|
|
316
336
|
| 'gfs'
|
|
317
337
|
| 'gfs-wave'
|
|
318
|
-
| 'ecmwf-aifs'
|
|
319
338
|
| 'ecmwf-hres'
|
|
320
339
|
| 'ecmwf-wam'
|
|
321
340
|
| 'ecmwf-efi'
|
|
@@ -331,7 +350,7 @@ export type PickerOpener = LatLon & { id: string };
|
|
|
331
350
|
|
|
332
351
|
export type ExternalPluginIdent = `windy-plugin-${string}`;
|
|
333
352
|
|
|
334
|
-
export type DropDownValues = { key: string | number; value: string | number }[];
|
|
353
|
+
export type DropDownValues = { key: string | number | null; value: string | number }[];
|
|
335
354
|
|
|
336
355
|
/*
|
|
337
356
|
* Plugin for creating backups of Local storage
|
|
@@ -344,6 +363,7 @@ export type WindyBackupPluginInfo = {
|
|
|
344
363
|
lastBackupTriggered: number;
|
|
345
364
|
triggerCounter: number;
|
|
346
365
|
deviceID: string;
|
|
366
|
+
vendorID?: string;
|
|
347
367
|
};
|
|
348
368
|
export interface WindyBackupPlugin {
|
|
349
369
|
// Compare client counter and if is older (most likely zero, when cleared)
|
|
@@ -360,3 +380,57 @@ export interface WindyBackupPlugin {
|
|
|
360
380
|
// Returns info about native backup
|
|
361
381
|
backupInfo: () => Promise<WindyBackupPluginInfo>;
|
|
362
382
|
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Currently used main map library
|
|
386
|
+
*/
|
|
387
|
+
export type UsedMapLibrary = 'leaflet' | 'maplibre' | 'globe';
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Time defined in hours
|
|
391
|
+
*/
|
|
392
|
+
export type Hours = number;
|
|
393
|
+
|
|
394
|
+
export type Minutes = number;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* All defined translation keys
|
|
398
|
+
*
|
|
399
|
+
* WARNING: Given lang files MUST be lazy loded before using the key
|
|
400
|
+
*/
|
|
401
|
+
export type LoadedTranslations = MainLangFile & PluginTranslations;
|
|
402
|
+
|
|
403
|
+
export type UserInterest =
|
|
404
|
+
| 'outdoor_activities'
|
|
405
|
+
| 'water_sports'
|
|
406
|
+
| 'winter_sports'
|
|
407
|
+
| 'wind_sports'
|
|
408
|
+
| 'aviation'
|
|
409
|
+
| 'boating'
|
|
410
|
+
| 'agriculture'
|
|
411
|
+
| 'meteorologist'
|
|
412
|
+
| 'other';
|
|
413
|
+
|
|
414
|
+
export type ParsedQueryString = Record<string, string | undefined>;
|
|
415
|
+
|
|
416
|
+
export type Size = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl' | 'ultra';
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Custom app icon for Premium users
|
|
420
|
+
*/
|
|
421
|
+
export type CustomAppIcon =
|
|
422
|
+
| 'aviation'
|
|
423
|
+
| 'boating'
|
|
424
|
+
| 'cycling'
|
|
425
|
+
| 'default'
|
|
426
|
+
| 'hiking'
|
|
427
|
+
| 'outdoor'
|
|
428
|
+
| 'paragliding'
|
|
429
|
+
| 'premium'
|
|
430
|
+
| 'running'
|
|
431
|
+
| 'scientist'
|
|
432
|
+
| 'swimming'
|
|
433
|
+
| 'water-sports'
|
|
434
|
+
| 'wind'
|
|
435
|
+
| 'windsurfing'
|
|
436
|
+
| 'winter-sports';
|
package/types/client/Bar.d.ts
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @class Bar
|
|
3
|
-
* Horizontal ProgressBar Class binded to stores's `timestamp`
|
|
4
|
-
* @example
|
|
5
|
-
*
|
|
6
|
-
* new Bar({
|
|
7
|
-
* progressLine: _.$(...) // el to catch mouseevents
|
|
8
|
-
* })
|
|
9
|
-
*/
|
|
10
|
-
import { Drag } from '@windy/Drag';
|
|
11
|
-
import { GhostBox } from '@windy/GhostBox';
|
|
12
|
-
import type { Calendar } from '@windy/Calendar';
|
|
13
|
-
import type { Timestamp } from '@windy/types';
|
|
14
|
-
export type BarInitParams = {
|
|
15
|
-
progressBar: HTMLDivElement;
|
|
16
|
-
offset?: number;
|
|
17
|
-
borderOffset?: number;
|
|
18
|
-
jumpingGhost?: boolean;
|
|
19
|
-
bcastLimit?: number;
|
|
20
|
-
jumpingWidth?: number;
|
|
21
|
-
resizableEl?: HTMLElement;
|
|
22
|
-
};
|
|
23
|
-
export declare class Bar {
|
|
24
|
-
protected drag: Drag;
|
|
25
|
-
protected ghostBox?: GhostBox;
|
|
26
|
-
/**
|
|
27
|
-
* EL of wrapping element,
|
|
28
|
-
*/
|
|
29
|
-
private progressBar;
|
|
30
|
-
/**
|
|
31
|
-
* A progress line to be used in GhostBox. We need to make a copy here for mobile where
|
|
32
|
-
* the GhostBox is not present.
|
|
33
|
-
*/
|
|
34
|
-
private progressLine;
|
|
35
|
-
/**
|
|
36
|
-
* Offset from left side of begginging of pb
|
|
37
|
-
*/
|
|
38
|
-
private offset;
|
|
39
|
-
/**
|
|
40
|
-
* offset of pb from border of a screen
|
|
41
|
-
*/
|
|
42
|
-
private borderOffset;
|
|
43
|
-
/**
|
|
44
|
-
* How often bcast dragging
|
|
45
|
-
*/
|
|
46
|
-
private bcastLimit;
|
|
47
|
-
/**
|
|
48
|
-
* Width of main box fo ghost jumping
|
|
49
|
-
*/
|
|
50
|
-
protected jumpingWidth: number;
|
|
51
|
-
private maxWidth;
|
|
52
|
-
private pxRatio;
|
|
53
|
-
private timecode;
|
|
54
|
-
private nowMark?;
|
|
55
|
-
private played?;
|
|
56
|
-
private ghostTxt?;
|
|
57
|
-
private throttledBcast;
|
|
58
|
-
protected progressWidth: number;
|
|
59
|
-
protected calendar: Calendar | null;
|
|
60
|
-
protected left: number;
|
|
61
|
-
protected calendarHours: number;
|
|
62
|
-
protected timestamp: Timestamp;
|
|
63
|
-
protected text: HTMLDivElement;
|
|
64
|
-
protected resizableEl: HTMLElement;
|
|
65
|
-
/**
|
|
66
|
-
* Should ghost box jump over timebox?
|
|
67
|
-
*/
|
|
68
|
-
jumpingGhost: boolean;
|
|
69
|
-
constructor(params: BarInitParams);
|
|
70
|
-
/**
|
|
71
|
-
* creates text in the timeBox on a basis of
|
|
72
|
-
* relative position on a progressBar
|
|
73
|
-
*/
|
|
74
|
-
protected createText(_el: HTMLDivElement): string;
|
|
75
|
-
protected pos2ts(pos: number): number;
|
|
76
|
-
protected createGhostText(_left: number): string;
|
|
77
|
-
protected setTimestamp(ts: number): void;
|
|
78
|
-
/**
|
|
79
|
-
* Time box change its position
|
|
80
|
-
*/
|
|
81
|
-
protected update(newPos: number): number;
|
|
82
|
-
/**
|
|
83
|
-
* Call recalculate && setIndex
|
|
84
|
-
*/
|
|
85
|
-
protected onresize(): void;
|
|
86
|
-
/**
|
|
87
|
-
* Click on progress bar
|
|
88
|
-
*/
|
|
89
|
-
protected click(event: MouseEvent): void;
|
|
90
|
-
/**
|
|
91
|
-
* Sets timestamp
|
|
92
|
-
* noAnimation ... do not do CSS animation
|
|
93
|
-
*/
|
|
94
|
-
protected set(timestamp: Timestamp): void;
|
|
95
|
-
protected onbcast(): void;
|
|
96
|
-
protected ondragstart(_startXY: [number, number]): void;
|
|
97
|
-
protected ondragend(_e: MouseEvent | TouchEvent): void;
|
|
98
|
-
/**
|
|
99
|
-
* Main timebox
|
|
100
|
-
*/
|
|
101
|
-
private ondrag;
|
|
102
|
-
/**
|
|
103
|
-
* Updates timestamp and broadcasts it out
|
|
104
|
-
*/
|
|
105
|
-
private bcast;
|
|
106
|
-
private addAnimation;
|
|
107
|
-
private removeAnimation;
|
|
108
|
-
/**
|
|
109
|
-
* Position based on ts
|
|
110
|
-
*/
|
|
111
|
-
private ts2pos;
|
|
112
|
-
private updateBarFreeRange;
|
|
113
|
-
private updateGhost;
|
|
114
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Bar } from '@windy/Bar';
|
|
2
|
-
import type { BarInitParams } from '@windy/Bar';
|
|
3
|
-
import type { Calendar } from '@windy/Calendar';
|
|
4
|
-
import type { PickDataSpecificationPropsByType } from '@windy/dataSpecifications.d';
|
|
5
|
-
import type { TimeFormatFunction } from '@windy/format.d';
|
|
6
|
-
import type { Timestamp } from '@windy/types.d';
|
|
7
|
-
export type BindedBarInitParams = {
|
|
8
|
-
UIident: string;
|
|
9
|
-
bindTimestamp: keyof PickDataSpecificationPropsByType<Timestamp>;
|
|
10
|
-
bindCalendar: keyof PickDataSpecificationPropsByType<Calendar, false>;
|
|
11
|
-
bindAnimation: keyof PickDataSpecificationPropsByType<boolean>;
|
|
12
|
-
} & BarInitParams;
|
|
13
|
-
export declare class BindedBar extends Bar {
|
|
14
|
-
/**
|
|
15
|
-
* To prevent cycling
|
|
16
|
-
*/
|
|
17
|
-
protected UIident: string;
|
|
18
|
-
/**
|
|
19
|
-
* Value to be binded as timetamp
|
|
20
|
-
*/
|
|
21
|
-
protected bindTimestamp: keyof PickDataSpecificationPropsByType<Timestamp>;
|
|
22
|
-
/**
|
|
23
|
-
* Value to be binded as calendar
|
|
24
|
-
*/
|
|
25
|
-
private bindCalendar;
|
|
26
|
-
/**
|
|
27
|
-
* Value binded with animation true/false
|
|
28
|
-
*/
|
|
29
|
-
private bindAnimation;
|
|
30
|
-
protected displayHour: TimeFormatFunction;
|
|
31
|
-
protected zuluMode: boolean;
|
|
32
|
-
protected numberOfHours: number;
|
|
33
|
-
constructor(params: BindedBarInitParams);
|
|
34
|
-
unmount(): void;
|
|
35
|
-
protected onbcast(): void;
|
|
36
|
-
protected stopAnim(): void;
|
|
37
|
-
protected ondragstart(_startXY: [number, number]): void;
|
|
38
|
-
/**
|
|
39
|
-
* Click on progress bar -> stop animation
|
|
40
|
-
* @param event
|
|
41
|
-
*/
|
|
42
|
-
protected click(event: MouseEvent): void;
|
|
43
|
-
/**
|
|
44
|
-
* Initialization of progressBar after changing of product etc.
|
|
45
|
-
* @param calendar
|
|
46
|
-
* @returns
|
|
47
|
-
*/
|
|
48
|
-
protected setCal(calendar: Calendar | null): void;
|
|
49
|
-
private render;
|
|
50
|
-
private ontstamp;
|
|
51
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { DataSpecifications } from '@windy/dataSpecifications.d';
|
|
2
|
-
type BindedCheckboxInitParams<T extends keyof DataSpecifications> = {
|
|
3
|
-
el: HTMLElement;
|
|
4
|
-
bindStore: T;
|
|
5
|
-
onValue?: DataSpecifications[T]['def'];
|
|
6
|
-
offValue?: DataSpecifications[T]['def'];
|
|
7
|
-
};
|
|
8
|
-
export declare class BindedCheckbox<T extends keyof DataSpecifications> {
|
|
9
|
-
/**
|
|
10
|
-
* Element in DOM
|
|
11
|
-
*/
|
|
12
|
-
private el;
|
|
13
|
-
/**
|
|
14
|
-
* Store item binded to this DOM el
|
|
15
|
-
*/
|
|
16
|
-
private bindStore;
|
|
17
|
-
/**
|
|
18
|
-
* What kind of value is considered ON in the store
|
|
19
|
-
*/
|
|
20
|
-
private onValue;
|
|
21
|
-
/**
|
|
22
|
-
* What kind of value is considered OFF in the store
|
|
23
|
-
*/
|
|
24
|
-
private offValue;
|
|
25
|
-
constructor(params: BindedCheckboxInitParams<T>);
|
|
26
|
-
unmount(): void;
|
|
27
|
-
toggle(): void;
|
|
28
|
-
private set;
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Switch } from '@windy/Switch';
|
|
2
|
-
import type { DataSpecifications } from '@windy/dataSpecifications.d';
|
|
3
|
-
import type { SwitchInitParams } from '@windy/Switch';
|
|
4
|
-
export type BindedSwitchInitParams<T extends keyof DataSpecifications> = {
|
|
5
|
-
bindStore: T;
|
|
6
|
-
} & SwitchInitParams<DataSpecifications[T]['def']>;
|
|
7
|
-
/**
|
|
8
|
-
* BindedSwitch is a switch that is bound to a store item.
|
|
9
|
-
* When the store item changes, the switch is updated.
|
|
10
|
-
* When the switch is clicked, the store item is updated.
|
|
11
|
-
*/
|
|
12
|
-
export declare class BindedSwitch<T extends keyof DataSpecifications> extends Switch<DataSpecifications[T]['def']> {
|
|
13
|
-
/**
|
|
14
|
-
* Ident of store item to bind switch with
|
|
15
|
-
*/
|
|
16
|
-
bindStore: T;
|
|
17
|
-
constructor(params: BindedSwitchInitParams<T>);
|
|
18
|
-
unmount(): void;
|
|
19
|
-
set(value: DataSpecifications[T]['def'], _uiIdent?: string | void): void;
|
|
20
|
-
/**
|
|
21
|
-
* Handles the click event for the BindedSwitch component.
|
|
22
|
-
* @param command - The command to execute.
|
|
23
|
-
* @param value - The value to pass to the command.
|
|
24
|
-
*/
|
|
25
|
-
click(command: string, value: string | DataSpecifications[T]['def']): void;
|
|
26
|
-
/**
|
|
27
|
-
* Optional method to re-render itself
|
|
28
|
-
*/
|
|
29
|
-
render?(): void;
|
|
30
|
-
/**
|
|
31
|
-
* Optional redraw used in some instances
|
|
32
|
-
*/
|
|
33
|
-
protected redraw?(): void;
|
|
34
|
-
protected getEl(value: DataSpecifications[T]['def']): HTMLElement | null;
|
|
35
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { WindowPlugin } from '@windy/WindowPlugin';
|
|
2
|
-
import type { WindowPluginInitParams } from '@windy/WindowPlugin';
|
|
3
|
-
import type { BottomTagPlugins } from '@windy/plugins.d';
|
|
4
|
-
export type BottomTagPluginInitParams<P extends keyof BottomTagPlugins> = Omit<WindowPluginInitParams<P>, 'ident'> & Pick<BottomTagPlugin<P>, 'ident'>;
|
|
5
|
-
export declare class BottomTagPlugin<P extends keyof BottomTagPlugins> extends WindowPlugin<P> {
|
|
6
|
-
ident: P;
|
|
7
|
-
constructor(params: BottomTagPluginInitParams<P>);
|
|
8
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Enables Scrollable DIV to be dragged left/right with mouse on non touch devices
|
|
3
|
-
*/
|
|
4
|
-
export type DraggableDivInitParams = {
|
|
5
|
-
scrollEl: HTMLElement;
|
|
6
|
-
};
|
|
7
|
-
export declare class DraggableDiv {
|
|
8
|
-
/**
|
|
9
|
-
* Major element
|
|
10
|
-
*/
|
|
11
|
-
private scrollEl;
|
|
12
|
-
private inertiaAnim;
|
|
13
|
-
constructor(params: DraggableDivInitParams);
|
|
14
|
-
private getX;
|
|
15
|
-
/**
|
|
16
|
-
* Scrolling the table on a basis of dragging with a mouse (non-touch devices)
|
|
17
|
-
* -- touch should be supported naturally by scrolling the DIV
|
|
18
|
-
* https://ariya.io/2013/11/javascript-kinetic-scrolling-part-2
|
|
19
|
-
*/
|
|
20
|
-
private startDrag;
|
|
21
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Drag } from './Drag';
|
|
2
|
-
export type GhostBoxInitParams = {
|
|
3
|
-
drag: Drag;
|
|
4
|
-
progressLine: HTMLElement;
|
|
5
|
-
ghost: HTMLElement | null;
|
|
6
|
-
updateGhost?(event: MouseEvent | TouchEvent): void;
|
|
7
|
-
};
|
|
8
|
-
export declare class GhostBox {
|
|
9
|
-
private drag;
|
|
10
|
-
progressLine: HTMLElement;
|
|
11
|
-
ghost: HTMLElement | null;
|
|
12
|
-
constructor(params: GhostBoxInitParams);
|
|
13
|
-
private updateGhost;
|
|
14
|
-
private onGhostMouseEnter;
|
|
15
|
-
private onGhostMouseLeave;
|
|
16
|
-
private onGhostMouseMove;
|
|
17
|
-
}
|
package/types/client/Legend.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { HapticsPlugin } from '@capacitor/haptics';
|
|
2
|
-
export type LongTapInitParams = Pick<LongTap, 'el'> & {
|
|
3
|
-
useHaptics?: boolean;
|
|
4
|
-
onClick?(e: MouseEvent | TouchEvent): void;
|
|
5
|
-
onLongTap?(ev: MouseEvent | TouchEvent): void;
|
|
6
|
-
};
|
|
7
|
-
export declare class LongTap {
|
|
8
|
-
el: HTMLElement;
|
|
9
|
-
useHaptics: boolean;
|
|
10
|
-
haptics: HapticsPlugin | null;
|
|
11
|
-
timer: ReturnType<typeof setTimeout> | null;
|
|
12
|
-
longPressed: boolean;
|
|
13
|
-
constructor(params: LongTapInitParams);
|
|
14
|
-
onClick(_e: MouseEvent | TouchEvent): void;
|
|
15
|
-
onLongTap(_e: MouseEvent | TouchEvent): void;
|
|
16
|
-
onCLickPressed(e: MouseEvent | TouchEvent): void;
|
|
17
|
-
longTapPressed(e: TouchEvent): void;
|
|
18
|
-
touchStart(e: TouchEvent): void;
|
|
19
|
-
touchEnd(): void;
|
|
20
|
-
clearLongPressTimer(): void;
|
|
21
|
-
}
|