@windycom/plugin-devtools 1.0.9 → 2.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 +1 -0
- package/package.json +1 -1
- package/types/client/Drag.d.ts +8 -1
- package/types/client/MobileCalendar.d.ts +4 -0
- package/types/client/Product.d.ts +14 -2
- package/types/client/ProductSwitch.d.ts +1 -1
- package/types/client/SveltePanePlugin.d.ts +4 -3
- package/types/client/Window.d.ts +0 -4
- package/types/client/WindowPlugin.d.ts +9 -8
- package/types/client/d.ts.files/broadcast.d.ts +7 -8
- package/types/client/d.ts.files/dataSpecifications.d.ts +16 -18
- package/types/client/d.ts.files/plugin-params.d.ts +12 -14
- package/types/client/d.ts.files/plugins.d.ts +11 -14
- package/types/client/d.ts.files/products.d.ts +5 -0
- package/types/client/d.ts.files/satellite.d.ts +1 -0
- package/types/client/device.d.ts +0 -1
- package/types/client/embed2.d.ts +2 -5
- package/types/client/fetch.d.ts +4 -10
- package/types/client/ga.d.ts +4 -0
- package/types/client/geolocation.d.ts +0 -1
- package/types/client/interpolator.d.ts +2 -1
- package/types/client/lib.d.ts +0 -4
- package/types/client/libHtml.d.ts +1 -1
- package/types/client/mobile.d.ts +5 -7
- package/types/client/models.d.ts +1 -1
- package/types/client/nativeStorage.d.ts +0 -14
- package/types/client/patchAndPromoCtrl.d.ts +13 -0
- package/types/client/permanentPromos.d.ts +0 -1
- package/types/client/promo.d.ts +25 -31
- package/types/client/rootScope.d.ts +17 -13
- package/types/client/router.d.ts +1 -1
- package/types/client/{hp.d.ts → startupWeather.d.ts} +10 -2
- package/types/client/user.d.ts +9 -4
- package/types/client/userFavs.d.ts +5 -12
- package/types/client/utils.d.ts +18 -4
- package/types/iconfont.d.ts +5 -4
- package/types/interfaces.d.ts +188 -202
- package/types/lang-files.d.ts +58 -18
- package/types/types.d.ts +61 -9
- package/types/client/BindedDropDown.d.ts +0 -14
- package/types/client/Detail1hCheckbox.d.ts +0 -4
- package/types/client/DropDown.d.ts +0 -37
- package/types/client/Webcams.d.ts +0 -66
- package/types/client/loadersUI.d.ts +0 -1
package/types/lang-files.d.ts
CHANGED
|
@@ -74,9 +74,9 @@ export interface AlertsLangFile {
|
|
|
74
74
|
*/
|
|
75
75
|
ALERT_CORRUPTED_ACTION: string;
|
|
76
76
|
/**
|
|
77
|
-
* alerts:
|
|
77
|
+
* alerts: Delete alert
|
|
78
78
|
*/
|
|
79
|
-
|
|
79
|
+
ALERT_DELETE2: string;
|
|
80
80
|
/**
|
|
81
81
|
* alerts: Alert has been deleted.
|
|
82
82
|
*/
|
|
@@ -565,11 +565,7 @@ export interface DistanceLangFile {
|
|
|
565
565
|
|
|
566
566
|
export interface FavsLangFile {
|
|
567
567
|
/**
|
|
568
|
-
* favs:
|
|
569
|
-
*/
|
|
570
|
-
FAVS_ALERT_NOTIFICATIONS: string;
|
|
571
|
-
/**
|
|
572
|
-
* favs: Some of your unsynchronized favorites cannot be saved to the cloud. Please, try again later or delete them and create again.
|
|
568
|
+
* favs: Some of your not-synchronized favorites cannot be saved to the cloud. Please, try again later or delete them and create again.
|
|
573
569
|
*/
|
|
574
570
|
FAVS_BATCH_ERROR: string;
|
|
575
571
|
/**
|
|
@@ -580,6 +576,18 @@ export interface FavsLangFile {
|
|
|
580
576
|
* favs: Not in sync
|
|
581
577
|
*/
|
|
582
578
|
FAVS_NOT_IN_SYNC: string;
|
|
579
|
+
/**
|
|
580
|
+
* favs: Pin favorite...
|
|
581
|
+
*/
|
|
582
|
+
FAVS_PIN: string;
|
|
583
|
+
/**
|
|
584
|
+
* favs: Pin to homepage
|
|
585
|
+
*/
|
|
586
|
+
FAVS_PIN_HOMEPAGE: string;
|
|
587
|
+
/**
|
|
588
|
+
* favs: Pin to top
|
|
589
|
+
*/
|
|
590
|
+
FAVS_PIN_TOP: string;
|
|
583
591
|
/**
|
|
584
592
|
* favs: It seems our servers are not available at the moment. Try again later.
|
|
585
593
|
*/
|
|
@@ -608,6 +616,10 @@ export interface FavsLangFile {
|
|
|
608
616
|
* favs: save them to the cloud
|
|
609
617
|
*/
|
|
610
618
|
FAVS_SYNC_ERROR_SAVE_TO_CLOUD: string;
|
|
619
|
+
/**
|
|
620
|
+
* favs: Unpin from homepage
|
|
621
|
+
*/
|
|
622
|
+
FAVS_UNPIN_HOMEPAGE: string;
|
|
611
623
|
/**
|
|
612
624
|
* favs: Search favorites...
|
|
613
625
|
*/
|
|
@@ -1245,6 +1257,10 @@ export interface MainLangFile {
|
|
|
1245
1257
|
* Getting your location...
|
|
1246
1258
|
*/
|
|
1247
1259
|
GETTING_LOCATION: string;
|
|
1260
|
+
/**
|
|
1261
|
+
* Failed to determine your location. Make sure your browser has permission to access your location
|
|
1262
|
+
*/
|
|
1263
|
+
GETTING_LOCATION_ERROR: string;
|
|
1248
1264
|
/**
|
|
1249
1265
|
* Surface Ozone
|
|
1250
1266
|
*/
|
|
@@ -1861,16 +1877,12 @@ export interface MainLangFile {
|
|
|
1861
1877
|
* <span class="dotted">Open Settings</span> to change the auto closing time of weather picker.
|
|
1862
1878
|
*/
|
|
1863
1879
|
PROMO_PICKER: string;
|
|
1864
|
-
/**
|
|
1865
|
-
* Subscribe to <strong>Windy Premium</strong> and get access to higher data resolution of local models.
|
|
1866
|
-
*/
|
|
1867
|
-
PROMO_SUB_RESOLUTION: string;
|
|
1868
1880
|
/**
|
|
1869
1881
|
* Provider
|
|
1870
1882
|
*/
|
|
1871
1883
|
PROVIDER: string;
|
|
1872
1884
|
/**
|
|
1873
|
-
*
|
|
1885
|
+
* Precipitation type
|
|
1874
1886
|
*/
|
|
1875
1887
|
PTYPE: string;
|
|
1876
1888
|
/**
|
|
@@ -2161,6 +2173,10 @@ export interface MainLangFile {
|
|
|
2161
2173
|
* Your Premium is paused
|
|
2162
2174
|
*/
|
|
2163
2175
|
SUB_CUFFS_PAUSED: string;
|
|
2176
|
+
/**
|
|
2177
|
+
* Subscribe to Windy Premium to get access to extended weather forecast.
|
|
2178
|
+
*/
|
|
2179
|
+
SUB_EXTENDED: string;
|
|
2164
2180
|
/**
|
|
2165
2181
|
* Full version of 3D mode is available only to Premium users.
|
|
2166
2182
|
*/
|
|
@@ -2430,7 +2446,7 @@ export interface MainLangFile {
|
|
|
2430
2446
|
*/
|
|
2431
2447
|
WED2: string;
|
|
2432
2448
|
/**
|
|
2433
|
-
* Wet-bulb
|
|
2449
|
+
* Wet-bulb temperature
|
|
2434
2450
|
*/
|
|
2435
2451
|
WETBULB_TEMP: string;
|
|
2436
2452
|
/**
|
|
@@ -2507,6 +2523,18 @@ export interface LibLangFile {
|
|
|
2507
2523
|
}
|
|
2508
2524
|
|
|
2509
2525
|
export interface MenuLangFile {
|
|
2526
|
+
/**
|
|
2527
|
+
* menu: Arrange layers
|
|
2528
|
+
*/
|
|
2529
|
+
MM_ARRANGE: string;
|
|
2530
|
+
/**
|
|
2531
|
+
* menu: Drag your favorite layers and pin them to homepage
|
|
2532
|
+
*/
|
|
2533
|
+
MM_ARRANGE_INFO: string;
|
|
2534
|
+
/**
|
|
2535
|
+
* menu: Display less layers
|
|
2536
|
+
*/
|
|
2537
|
+
MM_DISPLAY_LESS: string;
|
|
2510
2538
|
/**
|
|
2511
2539
|
* menu: Display more layers
|
|
2512
2540
|
*/
|
|
@@ -2571,6 +2599,10 @@ export interface MenuLangFile {
|
|
|
2571
2599
|
* menu: usually not more than 6 minutes
|
|
2572
2600
|
*/
|
|
2573
2601
|
MM_NOT_MORE: string;
|
|
2602
|
+
/**
|
|
2603
|
+
* menu: Weather now
|
|
2604
|
+
*/
|
|
2605
|
+
MM_NOWCAST: string;
|
|
2574
2606
|
/**
|
|
2575
2607
|
* menu: Open the main menu and use <strong>long tap</strong> to pin your favorite features here.
|
|
2576
2608
|
*/
|
|
@@ -2595,6 +2627,10 @@ export interface MenuLangFile {
|
|
|
2595
2627
|
* menu: pressure
|
|
2596
2628
|
*/
|
|
2597
2629
|
MM_PRESS_LONG: string;
|
|
2630
|
+
/**
|
|
2631
|
+
* menu: Search layers
|
|
2632
|
+
*/
|
|
2633
|
+
MM_SEARCH_LAYER: string;
|
|
2598
2634
|
/**
|
|
2599
2635
|
* menu: Get <span class="dotted">Windy Premium</span> for more frequent updates.
|
|
2600
2636
|
*/
|
|
@@ -2619,6 +2655,10 @@ export interface MenuLangFile {
|
|
|
2619
2655
|
* menu: Warnings
|
|
2620
2656
|
*/
|
|
2621
2657
|
MM_WARNINGS: string;
|
|
2658
|
+
/**
|
|
2659
|
+
* menu: Drought and warnings
|
|
2660
|
+
*/
|
|
2661
|
+
MM_WARNINGS2: string;
|
|
2622
2662
|
}
|
|
2623
2663
|
|
|
2624
2664
|
export interface NotificationsLangFile {
|
|
@@ -2746,7 +2786,7 @@ export interface ProductsLangFile {
|
|
|
2746
2786
|
*/
|
|
2747
2787
|
dewpoint: string;
|
|
2748
2788
|
/**
|
|
2749
|
-
* products: Dust generally consists of particles in the atmosphere that come from various sources such as soil, dust lifted by weather, volcanic eruptions, and air pollution. The level of dust concentration is given in micrograms (one-millionth of a gram) per cubic meter air or µg/m3.
|
|
2789
|
+
* products: Dust generally consists of particles in the atmosphere that come from various sources such as soil, dust lifted by weather, volcanic eruptions, and air pollution. The level of dust concentration is given in micrograms (one-millionth of a gram) per cubic meter air or µg/m3 at the surface.
|
|
2750
2790
|
*/
|
|
2751
2791
|
dustsm: string;
|
|
2752
2792
|
/**
|
|
@@ -4036,6 +4076,10 @@ export interface SubscriptionLangFile {
|
|
|
4036
4076
|
* subscription: Additional <strong>mobile widgets</strong>
|
|
4037
4077
|
*/
|
|
4038
4078
|
SUB_REASON_MOBILE_WIDGETS: string;
|
|
4079
|
+
/**
|
|
4080
|
+
* subscription: <strong>Radar and Satellite archives</strong> going back <strong>1 year</strong>
|
|
4081
|
+
*/
|
|
4082
|
+
SUB_REASON_RADSAT_HISTORY: string;
|
|
4039
4083
|
/**
|
|
4040
4084
|
* subscription: <strong>12-hour</strong> loop for <strong>Radar</strong> and <strong>Satellite</strong>
|
|
4041
4085
|
*/
|
|
@@ -4044,10 +4088,6 @@ export interface SubscriptionLangFile {
|
|
|
4044
4088
|
* subscription: <strong>Route Planner</strong> for planning tasks
|
|
4045
4089
|
*/
|
|
4046
4090
|
SUB_REASON_RPLANNER: string;
|
|
4047
|
-
/**
|
|
4048
|
-
* subscription: <strong>Satellite archive</strong> going back <strong>1 year</strong>
|
|
4049
|
-
*/
|
|
4050
|
-
SUB_REASON_SAT_HISTORY: string;
|
|
4051
4091
|
/**
|
|
4052
4092
|
* subscription: Unlimited <strong>Favorites</strong> and <strong>Alerts</strong>
|
|
4053
4093
|
*/
|
package/types/types.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export type Device = 'mobile' | 'tablet' | 'desktop';
|
|
|
30
30
|
export type FavType = 'alert' | 'airport' | 'station' | 'fav' | 'webcam' | 'route';
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Search item types as
|
|
33
|
+
* Search item types as received from backend
|
|
34
34
|
* There is more search types as received from backend (basically all OSM types)
|
|
35
35
|
*/
|
|
36
36
|
export type SearchType =
|
|
@@ -51,7 +51,7 @@ export type AlertConditionProps = 'wind' | 'swell' | 'snow' | 'rain' | 'temp' |
|
|
|
51
51
|
export type HTMLElementWithSlider = HTMLElement & { noUiSlider?: noUiSlider.noUiSlider };
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Meteorological numerical value (usually in default metric as delivered from backend)
|
|
55
55
|
*/
|
|
56
56
|
export type NumValue = number;
|
|
57
57
|
|
|
@@ -104,7 +104,7 @@ export type HTMLString = string;
|
|
|
104
104
|
export type DetailRows = keyof typeof weatherTable;
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
|
-
* Width/Height or
|
|
107
|
+
* Width/Height or screen position in Pixels
|
|
108
108
|
*/
|
|
109
109
|
export type Pixel = number;
|
|
110
110
|
|
|
@@ -180,11 +180,11 @@ export type RouteMotionSpeed = {
|
|
|
180
180
|
[key in RouteType]: number;
|
|
181
181
|
};
|
|
182
182
|
|
|
183
|
-
export type
|
|
183
|
+
export type LocationPreferences = {
|
|
184
184
|
status: 'notDetermined' | 'restricted' | 'denied' | 'authorized' | 'unknownState';
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
-
export type
|
|
187
|
+
export type NotificationPreferences = {
|
|
188
188
|
status: 'notDetermined' | 'denied' | 'authorized' | 'provisional' | 'unknownState';
|
|
189
189
|
};
|
|
190
190
|
|
|
@@ -210,7 +210,7 @@ export type ShowableError = {
|
|
|
210
210
|
errorId:
|
|
211
211
|
| 'ICLOUD_9' /** iCloud denied by user settings **/
|
|
212
212
|
| 'ICLOUD_25' /** Users iCloud has full storage **/
|
|
213
|
-
| 'LOC_1' /** Location services disabled in
|
|
213
|
+
| 'LOC_1' /** Location services disabled in device (for device Android) **/
|
|
214
214
|
| 'LOC_2' /** Location services disabled for application */
|
|
215
215
|
| 'NOTIF_1' /** Notification services disabled **/
|
|
216
216
|
| 'BATTERY_1' /** Battery usage restricted */
|
|
@@ -224,8 +224,12 @@ export type ShowableErrors = {
|
|
|
224
224
|
closed: Set<string>;
|
|
225
225
|
};
|
|
226
226
|
|
|
227
|
+
export type MigrationResult = {
|
|
228
|
+
status: 'migrationNotPerformed' | 'migratingData';
|
|
229
|
+
};
|
|
230
|
+
|
|
227
231
|
/**
|
|
228
|
-
* Overlay categories used for better UI navigation
|
|
232
|
+
* Overlay categories used for better UI navigation (mobile/tablet)
|
|
229
233
|
*/
|
|
230
234
|
export type MenuCategory =
|
|
231
235
|
| 'wind'
|
|
@@ -237,6 +241,19 @@ export type MenuCategory =
|
|
|
237
241
|
| 'warnings'
|
|
238
242
|
| 'clouds';
|
|
239
243
|
|
|
244
|
+
/**
|
|
245
|
+
* Overlay categories used for better UI navigation (desktop)
|
|
246
|
+
*/
|
|
247
|
+
export type MenuCategoryDesktop =
|
|
248
|
+
| 'nowcast'
|
|
249
|
+
| 'wind'
|
|
250
|
+
| 'rain'
|
|
251
|
+
| 'sea'
|
|
252
|
+
| 'airQ'
|
|
253
|
+
| 'temp'
|
|
254
|
+
| 'clouds'
|
|
255
|
+
| 'warnings';
|
|
256
|
+
|
|
240
257
|
/**
|
|
241
258
|
* Overlay categories used for better UI navigation
|
|
242
259
|
*/
|
|
@@ -249,7 +266,7 @@ export type MenuItems = MenuCategory | 'all' | 'search';
|
|
|
249
266
|
export type PickerMobileTimeout = '3' | '6' | '9' | '12' | 'always';
|
|
250
267
|
|
|
251
268
|
/**
|
|
252
|
-
* Only these first level paths are
|
|
269
|
+
* Only these first level paths are allowed to be used in log
|
|
253
270
|
*/
|
|
254
271
|
export type LogPaths =
|
|
255
272
|
| keyof WeatherParameters
|
|
@@ -285,6 +302,8 @@ export type ProductIdent =
|
|
|
285
302
|
| 'arome'
|
|
286
303
|
| 'arome-antilles'
|
|
287
304
|
| 'arome-reunion'
|
|
305
|
+
| 'can-hrdps'
|
|
306
|
+
| 'can-rdwps'
|
|
288
307
|
| 'cams-global'
|
|
289
308
|
| 'cams-eu'
|
|
290
309
|
| 'icon-global'
|
|
@@ -296,6 +315,7 @@ export type ProductIdent =
|
|
|
296
315
|
| 'ukv'
|
|
297
316
|
| 'gfs'
|
|
298
317
|
| 'gfs-wave'
|
|
318
|
+
| 'ecmwf-aifs'
|
|
299
319
|
| 'ecmwf-hres'
|
|
300
320
|
| 'ecmwf-wam'
|
|
301
321
|
| 'ecmwf-efi'
|
|
@@ -303,8 +323,40 @@ export type ProductIdent =
|
|
|
303
323
|
| 'cmems'
|
|
304
324
|
| 'intersucho'
|
|
305
325
|
| 'intersucho-firerisk'
|
|
306
|
-
| 'nasa-firms'
|
|
326
|
+
| 'nasa-firms'
|
|
327
|
+
| 'jma-msm'
|
|
328
|
+
| 'jma-cwm';
|
|
307
329
|
|
|
308
330
|
export type PickerOpener = LatLon & { id: string };
|
|
309
331
|
|
|
310
332
|
export type ExternalPluginIdent = `windy-plugin-${string}`;
|
|
333
|
+
|
|
334
|
+
export type DropDownValues = { key: string | number; value: string | number }[];
|
|
335
|
+
|
|
336
|
+
/*
|
|
337
|
+
* Plugin for creating backups of Local storage
|
|
338
|
+
* This plugin is needed from iOS 17.2, because iOS is clearing WebKit localstorage
|
|
339
|
+
*/
|
|
340
|
+
export type WindyBackupPluginInfo = {
|
|
341
|
+
nativeCounter: number;
|
|
342
|
+
backup?: string;
|
|
343
|
+
lastBackup: number;
|
|
344
|
+
lastBackupTriggered: number;
|
|
345
|
+
triggerCounter: number;
|
|
346
|
+
deviceID: string;
|
|
347
|
+
};
|
|
348
|
+
export interface WindyBackupPlugin {
|
|
349
|
+
// Compare client counter and if is older (most likely zero, when cleared)
|
|
350
|
+
// will return saved data if exist
|
|
351
|
+
syncCounter: (arg: {
|
|
352
|
+
clientCounter: number;
|
|
353
|
+
}) => Promise<{ nativeCounter: number; backup?: string }>;
|
|
354
|
+
// Save current state of LocalStorage to native persistent Storage
|
|
355
|
+
saveBackup: (arg: { clientCounter: number; backup: string }) => Promise<void>;
|
|
356
|
+
// Reloads WebView from origin, to correctly load state of the app
|
|
357
|
+
reloadApp: () => Promise<void>;
|
|
358
|
+
// Clear native backup and resets native counter
|
|
359
|
+
clearBackup: () => Promise<void>;
|
|
360
|
+
// Returns info about native backup
|
|
361
|
+
backupInfo: () => Promise<WindyBackupPluginInfo>;
|
|
362
|
+
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { BindedSwitch } from '@windy/BindedSwitch';
|
|
2
|
-
import { DropDown } from '@windy/DropDown';
|
|
3
|
-
import type { BindedSwitchInitParams } from '@windy/BindedSwitch';
|
|
4
|
-
import type { DropDownInitParams } from '@windy/DropDown';
|
|
5
|
-
import type { DataSpecifications } from '@windy/dataSpecifications.d';
|
|
6
|
-
export type BindedDropDownInitParams<T extends keyof DataSpecifications> = DropDownInitParams<DataSpecifications[T]['def']> & BindedSwitchInitParams<T>;
|
|
7
|
-
export declare class BindedDropDown<T extends keyof DataSpecifications> extends DropDown<DataSpecifications[T]['def']> {
|
|
8
|
-
protected initValue: DataSpecifications[T]['def'];
|
|
9
|
-
protected selected: DataSpecifications[T]['def'];
|
|
10
|
-
bindedSwitch: BindedSwitch<T>;
|
|
11
|
-
constructor(params: BindedDropDownInitParams<T>);
|
|
12
|
-
set(value: DataSpecifications[T]['def'], _uiIdentOrNoEmit?: string | boolean | void): void;
|
|
13
|
-
unmount(): void;
|
|
14
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module DropDown
|
|
3
|
-
* @example
|
|
4
|
-
*
|
|
5
|
-
* ```
|
|
6
|
-
* <div ref="ddMenu" class="drop-down-menu noselect">
|
|
7
|
-
* <ul class="animation">
|
|
8
|
-
* <li data-do="set,one">First item</li>
|
|
9
|
-
* <li data-do="set,two">Second item</li>
|
|
10
|
-
* <li data-do="set,three">Third item</li>
|
|
11
|
-
* <li data-do="set,four">Fourht item</li>
|
|
12
|
-
* <li data-do="set,five">Last item</li>
|
|
13
|
-
* </ul>
|
|
14
|
-
* </div>
|
|
15
|
-
*
|
|
16
|
-
* new DropDown({
|
|
17
|
-
* el: refs.ddMenu,
|
|
18
|
-
* initValue: 'three'
|
|
19
|
-
* })
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
import { Switch } from '@windy/Switch';
|
|
23
|
-
import type { SwitchInitParams } from '@windy/Switch';
|
|
24
|
-
export type DropDownInitParams<T> = SwitchInitParams<T> & {
|
|
25
|
-
fill?(): void;
|
|
26
|
-
};
|
|
27
|
-
export declare class DropDown<T> extends Switch<T> {
|
|
28
|
-
private opened;
|
|
29
|
-
private switch;
|
|
30
|
-
protected bindedClose: () => void;
|
|
31
|
-
constructor(params: DropDownInitParams<T>);
|
|
32
|
-
set(value: T, noEmit?: boolean): void;
|
|
33
|
-
fill(): void;
|
|
34
|
-
protected toggle(): void;
|
|
35
|
-
protected open(): void;
|
|
36
|
-
protected close(): void;
|
|
37
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { ClickHandler } from '@windy/ClickHandler';
|
|
2
|
-
import type { ClickHandlerInitParams } from './d.ts.files/ClickHandler';
|
|
3
|
-
import type { WebcamDetail, WebcamsLoadingParams, WebcamMetadata } from './d.ts.files/Webcams.d';
|
|
4
|
-
import type { Plugins } from './d.ts.files/plugins.d';
|
|
5
|
-
import type { LatLon } from './d.ts.files/interfaces';
|
|
6
|
-
export type WebcamsInitParams = {
|
|
7
|
-
useHover?: boolean;
|
|
8
|
-
maxAmount?: number;
|
|
9
|
-
singleLine?: boolean;
|
|
10
|
-
imgRatio?: number;
|
|
11
|
-
toOpen?: keyof Plugins;
|
|
12
|
-
} & ClickHandlerInitParams<string>;
|
|
13
|
-
export declare class Webcams extends ClickHandler<string> {
|
|
14
|
-
protected maxAmount: number;
|
|
15
|
-
protected imgRatio: number;
|
|
16
|
-
private toOpen;
|
|
17
|
-
private currentLocation;
|
|
18
|
-
protected singleLine: boolean;
|
|
19
|
-
private useHover;
|
|
20
|
-
private hasListener;
|
|
21
|
-
protected daylight: boolean;
|
|
22
|
-
private marker;
|
|
23
|
-
data: WebcamDetail[];
|
|
24
|
-
constructor(params: WebcamsInitParams);
|
|
25
|
-
/**
|
|
26
|
-
* Based on webcam item returns additional metadata
|
|
27
|
-
*/
|
|
28
|
-
static getMetadata(loc: LatLon, cam: WebcamDetail, daylight?: boolean): WebcamMetadata;
|
|
29
|
-
/**
|
|
30
|
-
* Just adds dayligtListener
|
|
31
|
-
*/
|
|
32
|
-
addListeners(): this;
|
|
33
|
-
/**
|
|
34
|
-
* Remove listener, remove marker
|
|
35
|
-
*/
|
|
36
|
-
unmount(): void;
|
|
37
|
-
/**
|
|
38
|
-
* Loads a webcams near { lat, lon }
|
|
39
|
-
*
|
|
40
|
-
* @returns promise with loaded json
|
|
41
|
-
*/
|
|
42
|
-
load<T extends WebcamsLoadingParams>(params: T): Promise<WebcamDetail[]>;
|
|
43
|
-
/**
|
|
44
|
-
* Pulsating marker
|
|
45
|
-
*/
|
|
46
|
-
addMarker(index: number): void;
|
|
47
|
-
removeMarker(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Calls callback for each webcam
|
|
50
|
-
*/
|
|
51
|
-
forEach(cb: (el: HTMLDivElement, i: number) => void): void;
|
|
52
|
-
/**
|
|
53
|
-
* Renders HTML into page
|
|
54
|
-
*/
|
|
55
|
-
protected render(): void | string;
|
|
56
|
-
/**
|
|
57
|
-
* Sets w,h of image
|
|
58
|
-
*/
|
|
59
|
-
protected setWH(w: number, h: number): void;
|
|
60
|
-
/**
|
|
61
|
-
* Load images into it
|
|
62
|
-
*/
|
|
63
|
-
protected loadImages(): void;
|
|
64
|
-
protected click(command: string, index: string): void;
|
|
65
|
-
private index2location;
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|