@windycom/plugin-devtools 2.0.0 → 3.0.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/README.md +3 -0
- package/index.mjs +2 -2
- package/package.json +2 -3
- package/types/client/AccessProducts.d.ts +8 -0
- package/types/client/BottomSveltePlugins.d.ts +8 -0
- package/types/client/Calendar.d.ts +9 -17
- package/types/client/Color.d.ts +43 -90
- package/types/client/Evented.d.ts +4 -0
- package/types/client/ExternalSveltePlugin.d.ts +2 -1
- package/types/client/IDB.d.ts +63 -0
- package/types/client/IconProducts.d.ts +2 -0
- package/types/client/Layer.d.ts +1 -2
- package/types/client/Metric.d.ts +8 -8
- package/types/client/MetricClasses.d.ts +4 -3
- package/types/client/Overlay.d.ts +30 -15
- package/types/client/OverlayClasses.d.ts +11 -7
- package/types/client/Plugin.d.ts +2 -2
- package/types/client/Product.d.ts +40 -29
- package/types/client/RadarPlusProduct.d.ts +19 -0
- package/types/client/Renderer.d.ts +2 -10
- package/types/client/SveltePlugin.d.ts +9 -5
- package/types/client/TileLayer.d.ts +1 -2
- package/types/client/TopoMap.d.ts +10 -0
- package/types/client/WindowPlugin.d.ts +7 -3
- package/types/client/appsFlyer.d.ts +3 -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/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 +16 -5
- package/types/client/d.ts.files/LabelsLayer.d.ts +1 -18
- 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 +120 -0
- package/types/client/d.ts.files/broadcast.d.ts +38 -10
- package/types/client/d.ts.files/dataSpecifications.d.ts +81 -122
- package/types/client/d.ts.files/favs.d.ts +69 -0
- package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
- package/types/client/d.ts.files/notifications.d.ts +2 -2
- package/types/client/d.ts.files/plugin-params.d.ts +35 -47
- package/types/client/d.ts.files/plugins.d.ts +30 -42
- package/types/client/d.ts.files/pois.d.ts +1 -1
- package/types/client/d.ts.files/products.d.ts +15 -3
- package/types/client/d.ts.files/rootScope.d.ts +3 -21
- package/types/client/d.ts.files/startup.d.ts +59 -0
- package/types/client/d.ts.files/storage.d.ts +12 -35
- package/types/client/d.ts.files/user.d.ts +79 -24
- package/types/client/deviceLogging.d.ts +2 -1
- package/types/client/embed2.d.ts +14 -31
- package/types/client/fetch.d.ts +29 -16
- 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 -0
- package/types/client/idbInstances.d.ts +45 -0
- package/types/client/langFiles.d.ts +2 -0
- package/types/client/layers.d.ts +2 -0
- package/types/client/lib.d.ts +7 -21
- package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
- package/types/client/log.d.ts +1 -0
- package/types/client/lruCache.d.ts +6 -0
- package/types/client/map.d.ts +17 -6
- package/types/client/mobile.d.ts +28 -20
- package/types/client/models.d.ts +1 -1
- package/types/client/notifications.d.ts +32 -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/pois.d.ts +1 -2
- package/types/client/promo.d.ts +6 -16
- package/types/client/pushNotifications.d.ts +13 -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 +14 -23
- package/types/client/router.d.ts +9 -5
- package/types/client/seoParser.d.ts +21 -0
- package/types/client/serviceWorkerCtrl.d.ts +8 -0
- package/types/client/startupWeather.d.ts +13 -9
- package/types/client/store.d.ts +2 -2
- package/types/client/storeLastPosition.d.ts +1 -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 +5 -13
- package/types/client/userAlerts.d.ts +68 -0
- package/types/client/userConsent.d.ts +6 -0
- package/types/client/userFavs.d.ts +46 -121
- package/types/client/utils.d.ts +28 -6
- package/types/iconfont.d.ts +1 -0
- package/types/interfaces.d.ts +90 -225
- package/types/lang-files.d.ts +687 -119
- package/types/offline.d.ts +100 -0
- package/types/types.d.ts +59 -24
- 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/trans.d.ts +0 -55
- package/types/client/favs.d.ts +0 -83
- package/types/client/offlineController.d.ts +0 -20
|
@@ -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
|
|
|
@@ -204,6 +195,10 @@ export type GoogleServicesPreferences = {
|
|
|
204
195
|
status: 'denied' | 'authorized';
|
|
205
196
|
};
|
|
206
197
|
|
|
198
|
+
export type WidgetType = {
|
|
199
|
+
widget_type: 'satellite' | 'radar' | 'webcam' | 'detail' | 'days';
|
|
200
|
+
};
|
|
201
|
+
|
|
207
202
|
export type ErrorCategory = 'location' | 'notification' | 'iCloud' | 'battery';
|
|
208
203
|
|
|
209
204
|
export type ShowableError = {
|
|
@@ -225,7 +220,7 @@ export type ShowableErrors = {
|
|
|
225
220
|
};
|
|
226
221
|
|
|
227
222
|
export type MigrationResult = {
|
|
228
|
-
status: 'migrationNotPerformed' | 'migratingData';
|
|
223
|
+
status: 'migrationNotPerformed' | 'migratingData' | 'migrationPerformed';
|
|
229
224
|
};
|
|
230
225
|
|
|
231
226
|
/**
|
|
@@ -281,10 +276,13 @@ export type LogPaths =
|
|
|
281
276
|
| 'appRating'
|
|
282
277
|
| 'articles'
|
|
283
278
|
| 'detail2'
|
|
279
|
+
| 'appsflyer'
|
|
284
280
|
| 'onboarding'
|
|
285
281
|
| 'station'
|
|
286
282
|
| 'weather'
|
|
287
|
-
| 'events'
|
|
283
|
+
| 'events'
|
|
284
|
+
| 'locationPermissionPopup'
|
|
285
|
+
| 'widgetPromo';
|
|
288
286
|
|
|
289
287
|
/**
|
|
290
288
|
* Type of user consent
|
|
@@ -301,21 +299,29 @@ export type ProductIdent =
|
|
|
301
299
|
| 'icon-d2'
|
|
302
300
|
| 'arome'
|
|
303
301
|
| 'arome-antilles'
|
|
302
|
+
| 'arome-france'
|
|
304
303
|
| 'arome-reunion'
|
|
305
304
|
| 'can-hrdps'
|
|
306
305
|
| 'can-rdwps'
|
|
307
306
|
| 'cams-global'
|
|
308
307
|
| 'cams-eu'
|
|
308
|
+
| 'cze-aladin'
|
|
309
309
|
| 'icon-global'
|
|
310
310
|
| 'icon-gwam'
|
|
311
311
|
| 'icon-ewam'
|
|
312
312
|
| 'hrrr-alaska'
|
|
313
313
|
| 'hrrr-conus'
|
|
314
314
|
| 'bom-access'
|
|
315
|
+
| 'bom-access-c-ad'
|
|
316
|
+
| 'bom-access-c-bn'
|
|
317
|
+
| 'bom-access-c-dn'
|
|
318
|
+
| 'bom-access-c-nq'
|
|
319
|
+
| 'bom-access-c-ph'
|
|
320
|
+
| 'bom-access-c-sy'
|
|
321
|
+
| 'bom-access-c-vt'
|
|
315
322
|
| 'ukv'
|
|
316
323
|
| 'gfs'
|
|
317
324
|
| 'gfs-wave'
|
|
318
|
-
| 'ecmwf-aifs'
|
|
319
325
|
| 'ecmwf-hres'
|
|
320
326
|
| 'ecmwf-wam'
|
|
321
327
|
| 'ecmwf-efi'
|
|
@@ -331,7 +337,7 @@ export type PickerOpener = LatLon & { id: string };
|
|
|
331
337
|
|
|
332
338
|
export type ExternalPluginIdent = `windy-plugin-${string}`;
|
|
333
339
|
|
|
334
|
-
export type DropDownValues = { key: string | number; value: string | number }[];
|
|
340
|
+
export type DropDownValues = { key: string | number | null; value: string | number }[];
|
|
335
341
|
|
|
336
342
|
/*
|
|
337
343
|
* Plugin for creating backups of Local storage
|
|
@@ -344,6 +350,7 @@ export type WindyBackupPluginInfo = {
|
|
|
344
350
|
lastBackupTriggered: number;
|
|
345
351
|
triggerCounter: number;
|
|
346
352
|
deviceID: string;
|
|
353
|
+
vendorID?: string;
|
|
347
354
|
};
|
|
348
355
|
export interface WindyBackupPlugin {
|
|
349
356
|
// Compare client counter and if is older (most likely zero, when cleared)
|
|
@@ -360,3 +367,31 @@ export interface WindyBackupPlugin {
|
|
|
360
367
|
// Returns info about native backup
|
|
361
368
|
backupInfo: () => Promise<WindyBackupPluginInfo>;
|
|
362
369
|
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Currently used main map library
|
|
373
|
+
*/
|
|
374
|
+
export type UsedMapLibrary = 'leaflet' | 'maplibre' | 'globe';
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* All defined translation keys
|
|
378
|
+
*
|
|
379
|
+
* WARNING: Given lang files MUST be lazy loded before using the key
|
|
380
|
+
*/
|
|
381
|
+
export type LoadedTranslations = MainLangFile & PluginTranslations;
|
|
382
|
+
|
|
383
|
+
/*
|
|
384
|
+
* Time defined in hours
|
|
385
|
+
*/
|
|
386
|
+
export type Hours = number;
|
|
387
|
+
|
|
388
|
+
export type UserInterest =
|
|
389
|
+
| 'outdoor_activities'
|
|
390
|
+
| 'water_sports'
|
|
391
|
+
| 'winter_sports'
|
|
392
|
+
| 'wind_sports'
|
|
393
|
+
| 'aviation'
|
|
394
|
+
| 'boating'
|
|
395
|
+
| 'agriculture'
|
|
396
|
+
| 'meteorologist'
|
|
397
|
+
| 'other';
|
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
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Scrollable } from '@windy/Scrollable';
|
|
2
|
-
import type { Calendar } from '@windy/Calendar';
|
|
3
|
-
import type { ScrollableInitParams } from '@windy/Scrollable';
|
|
4
|
-
import type { TimeFormatFunction } from '@windy/format.d';
|
|
5
|
-
import type { Timestamp } from '@windy/types.d';
|
|
6
|
-
export type MobileCalendarInitParams = {
|
|
7
|
-
boxEl: HTMLDivElement;
|
|
8
|
-
wrapperEl: HTMLDivElement;
|
|
9
|
-
scrolling: boolean;
|
|
10
|
-
noAnimation: boolean;
|
|
11
|
-
tsPx: number;
|
|
12
|
-
calExpandedTimeout: ReturnType<typeof setTimeout> | null;
|
|
13
|
-
UIident: string;
|
|
14
|
-
bindedStore?: 'timestamp';
|
|
15
|
-
} & ScrollableInitParams;
|
|
16
|
-
export declare class MobileCalendar extends Scrollable {
|
|
17
|
-
private scrolling;
|
|
18
|
-
private noAnimation;
|
|
19
|
-
private wrapperEl;
|
|
20
|
-
/**
|
|
21
|
-
* timestamp per pixel ratio - must be in sync with CSS
|
|
22
|
-
* 3 hour = 20px
|
|
23
|
-
*/
|
|
24
|
-
private tsPx;
|
|
25
|
-
/**
|
|
26
|
-
* Handle of a timeout that controls the `mobile-calendar-expanded` class
|
|
27
|
-
*/
|
|
28
|
-
private calExpandedTimeout;
|
|
29
|
-
/**
|
|
30
|
-
* Request to change timestamp was initiated by external element
|
|
31
|
-
*/
|
|
32
|
-
private doNotChangeTimestamp;
|
|
33
|
-
private bindedStore;
|
|
34
|
-
localeHours: TimeFormatFunction;
|
|
35
|
-
zuluMode: boolean;
|
|
36
|
-
boxEl: HTMLDivElement;
|
|
37
|
-
UIident: string;
|
|
38
|
-
timestamp: Timestamp;
|
|
39
|
-
calendar: Calendar | null;
|
|
40
|
-
constructor(params: MobileCalendarInitParams);
|
|
41
|
-
unmount(): void;
|
|
42
|
-
onscroll(ev: Event): void;
|
|
43
|
-
render(): void;
|
|
44
|
-
renderBox(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Scrolls to selected ts
|
|
47
|
-
*/
|
|
48
|
-
set(ts: Timestamp, UIident?: string): void;
|
|
49
|
-
protected onscrollend(): void;
|
|
50
|
-
private slideUp;
|
|
51
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Window } from '@windy/Window';
|
|
2
|
-
import type { DownloadProgress } from '@plugins/offline/offline.d';
|
|
3
|
-
import type { Timestamp } from '@windy/types';
|
|
4
|
-
export declare class OfflineModeTopMessage extends Window {
|
|
5
|
-
lastTimeDownloaded: Timestamp;
|
|
6
|
-
timer: ReturnType<typeof setInterval> | null;
|
|
7
|
-
constructor(lastTimeDownloaded: Timestamp);
|
|
8
|
-
onclose(): void;
|
|
9
|
-
onopen(): void;
|
|
10
|
-
}
|
|
11
|
-
export declare class DownloadingProgressTopMessage extends Window {
|
|
12
|
-
bindedOnProgress: ({ data }: {
|
|
13
|
-
data: DownloadProgress;
|
|
14
|
-
}) => void;
|
|
15
|
-
progressEl: HTMLDivElement;
|
|
16
|
-
progressBarEl: HTMLDivElement;
|
|
17
|
-
constructor();
|
|
18
|
-
onProgress({ data }: {
|
|
19
|
-
data: DownloadProgress;
|
|
20
|
-
}): void;
|
|
21
|
-
onclose(): void;
|
|
22
|
-
onopen(): void;
|
|
23
|
-
}
|
|
24
|
-
export declare class GoOfflineModeTopMessage extends Window {
|
|
25
|
-
expires: Timestamp;
|
|
26
|
-
timer: ReturnType<typeof setInterval> | null;
|
|
27
|
-
constructor(expires: Timestamp);
|
|
28
|
-
onclose(): void;
|
|
29
|
-
onopen(): void;
|
|
30
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BindedSwitch } from '@windy/BindedSwitch';
|
|
2
|
-
import type { BindedSwitchInitParams } from '@windy/BindedSwitch';
|
|
3
|
-
export type ProductSwitchInitParams = {
|
|
4
|
-
showResolution?: boolean;
|
|
5
|
-
} & Omit<BindedSwitchInitParams<'product'>, 'bindStore'>;
|
|
6
|
-
export declare class ProductSwitch extends BindedSwitch<'product'> {
|
|
7
|
-
showResolution: boolean;
|
|
8
|
-
constructor(params: ProductSwitchInitParams);
|
|
9
|
-
printHTML(prods?: ("icon" | "satellite" | "radar" | "drought" | "capAlerts" | "gfs" | "ecmwf" | "ecmwfAnalysis" | "ecmwfAifs" | "ecmwfWaves" | "gfsWaves" | "iconWaves" | "cams" | "efi" | "cmems" | "fireDanger" | "activeFires" | "nems" | "namConus" | "namHawaii" | "namAlaska" | "iconEu" | "iconD2" | "arome" | "aromeAntilles" | "aromeReunion" | "canHrdps" | "canRdwpsWaves" | "camsEu" | "iconEuWaves" | "hrrrAlaska" | "hrrrConus" | "bomAccess" | "ukv" | "jmaMsm" | "jmaCwmWaves" | "mblue")[]): void;
|
|
10
|
-
/**
|
|
11
|
-
* The menu is already in a DOM since we do not modify products so often
|
|
12
|
-
*/
|
|
13
|
-
protected redraw(): void;
|
|
14
|
-
}
|