@windycom/plugin-devtools 1.0.9 → 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.
Files changed (134) hide show
  1. package/README.md +4 -0
  2. package/index.mjs +2 -2
  3. package/package.json +2 -3
  4. package/types/client/AccessProducts.d.ts +8 -0
  5. package/types/client/BottomSveltePlugins.d.ts +8 -0
  6. package/types/client/Calendar.d.ts +9 -17
  7. package/types/client/Color.d.ts +43 -90
  8. package/types/client/Drag.d.ts +8 -1
  9. package/types/client/Evented.d.ts +4 -0
  10. package/types/client/ExternalSveltePlugin.d.ts +2 -1
  11. package/types/client/IDB.d.ts +63 -0
  12. package/types/client/IconProducts.d.ts +2 -0
  13. package/types/client/Layer.d.ts +1 -2
  14. package/types/client/Metric.d.ts +8 -8
  15. package/types/client/MetricClasses.d.ts +4 -3
  16. package/types/client/Overlay.d.ts +30 -15
  17. package/types/client/OverlayClasses.d.ts +11 -7
  18. package/types/client/Plugin.d.ts +2 -2
  19. package/types/client/Product.d.ts +53 -30
  20. package/types/client/RadarPlusProduct.d.ts +19 -0
  21. package/types/client/Renderer.d.ts +2 -10
  22. package/types/client/SveltePanePlugin.d.ts +4 -3
  23. package/types/client/SveltePlugin.d.ts +9 -5
  24. package/types/client/TileLayer.d.ts +1 -2
  25. package/types/client/TopoMap.d.ts +10 -0
  26. package/types/client/Window.d.ts +0 -4
  27. package/types/client/WindowPlugin.d.ts +15 -10
  28. package/types/client/appsFlyer.d.ts +3 -0
  29. package/types/client/baseMap.d.ts +8 -5
  30. package/types/client/cityLabels.d.ts +10 -2
  31. package/types/client/cloudSync.d.ts +3 -1
  32. package/types/client/colorGradients.d.ts +13 -0
  33. package/types/client/d.ts.files/Calendar.d.ts +11 -2
  34. package/types/client/d.ts.files/Color.d.ts +16 -5
  35. package/types/client/d.ts.files/LabelsLayer.d.ts +1 -18
  36. package/types/client/d.ts.files/Layer.d.ts +8 -1
  37. package/types/client/d.ts.files/Metric.d.ts +1 -0
  38. package/types/client/d.ts.files/Renderer.d.ts +22 -1
  39. package/types/client/d.ts.files/alerts.d.ts +120 -0
  40. package/types/client/d.ts.files/broadcast.d.ts +44 -17
  41. package/types/client/d.ts.files/dataSpecifications.d.ts +94 -137
  42. package/types/client/d.ts.files/favs.d.ts +69 -0
  43. package/types/client/d.ts.files/incomingMessages.d.ts +0 -4
  44. package/types/client/d.ts.files/notifications.d.ts +2 -2
  45. package/types/client/d.ts.files/plugin-params.d.ts +44 -58
  46. package/types/client/d.ts.files/plugins.d.ts +37 -52
  47. package/types/client/d.ts.files/pois.d.ts +1 -1
  48. package/types/client/d.ts.files/products.d.ts +19 -2
  49. package/types/client/d.ts.files/rootScope.d.ts +3 -21
  50. package/types/client/d.ts.files/satellite.d.ts +1 -0
  51. package/types/client/d.ts.files/startup.d.ts +59 -0
  52. package/types/client/d.ts.files/storage.d.ts +12 -35
  53. package/types/client/d.ts.files/user.d.ts +79 -24
  54. package/types/client/device.d.ts +0 -1
  55. package/types/client/deviceLogging.d.ts +2 -1
  56. package/types/client/embed2.d.ts +15 -35
  57. package/types/client/fetch.d.ts +31 -24
  58. package/types/client/ga.d.ts +4 -0
  59. package/types/client/geolocation.d.ts +14 -7
  60. package/types/client/globals.d.ts +1 -0
  61. package/types/client/http.d.ts +17 -0
  62. package/types/client/idbInstances.d.ts +45 -0
  63. package/types/client/interpolator.d.ts +2 -1
  64. package/types/client/langFiles.d.ts +2 -0
  65. package/types/client/layers.d.ts +2 -0
  66. package/types/client/lib.d.ts +7 -25
  67. package/types/client/libHtml.d.ts +1 -1
  68. package/types/client/loadArticlesOrWhatsNew.d.ts +1 -0
  69. package/types/client/log.d.ts +1 -0
  70. package/types/client/lruCache.d.ts +6 -0
  71. package/types/client/map.d.ts +17 -6
  72. package/types/client/mobile.d.ts +33 -27
  73. package/types/client/models.d.ts +1 -1
  74. package/types/client/nativeStorage.d.ts +0 -14
  75. package/types/client/notifications.d.ts +32 -67
  76. package/types/client/overlays.d.ts +4 -1
  77. package/types/client/params.d.ts +0 -1
  78. package/types/client/patchAndPromoCtrl.d.ts +13 -0
  79. package/types/client/permanentPromos.d.ts +1 -2
  80. package/types/client/persistentStorage.d.ts +8 -0
  81. package/types/client/picker.d.ts +1 -1
  82. package/types/client/pois.d.ts +1 -2
  83. package/types/client/promo.d.ts +16 -32
  84. package/types/client/pushNotifications.d.ts +13 -1
  85. package/types/client/queryString.d.ts +1 -1
  86. package/types/client/renderUtils.d.ts +1 -1
  87. package/types/client/renderers.d.ts +7 -3
  88. package/types/client/rootScope.d.ts +22 -27
  89. package/types/client/router.d.ts +10 -6
  90. package/types/client/seoParser.d.ts +21 -0
  91. package/types/client/serviceWorkerCtrl.d.ts +8 -0
  92. package/types/client/startupWeather.d.ts +27 -0
  93. package/types/client/store.d.ts +2 -2
  94. package/types/client/storeLastPosition.d.ts +1 -0
  95. package/types/client/subscription.d.ts +1 -0
  96. package/types/client/swDownloader.d.ts +7 -7
  97. package/types/client/swProxy.d.ts +1 -1
  98. package/types/client/swUtils.d.ts +3 -3
  99. package/types/client/trans.d.ts +26 -37
  100. package/types/client/user.d.ts +11 -14
  101. package/types/client/userAlerts.d.ts +68 -0
  102. package/types/client/userConsent.d.ts +6 -0
  103. package/types/client/userFavs.d.ts +46 -128
  104. package/types/client/utils.d.ts +46 -10
  105. package/types/iconfont.d.ts +6 -4
  106. package/types/interfaces.d.ts +199 -348
  107. package/types/lang-files.d.ts +736 -128
  108. package/types/offline.d.ts +100 -0
  109. package/types/types.d.ts +116 -29
  110. package/types/client/Bar.d.ts +0 -114
  111. package/types/client/BindedBar.d.ts +0 -51
  112. package/types/client/BindedCheckbox.d.ts +0 -30
  113. package/types/client/BindedDropDown.d.ts +0 -14
  114. package/types/client/BindedSwitch.d.ts +0 -35
  115. package/types/client/BottomTagPlugin.d.ts +0 -8
  116. package/types/client/Detail1hCheckbox.d.ts +0 -4
  117. package/types/client/DraggableDiv.d.ts +0 -21
  118. package/types/client/DropDown.d.ts +0 -37
  119. package/types/client/GhostBox.d.ts +0 -17
  120. package/types/client/Legend.d.ts +0 -6
  121. package/types/client/LongTap.d.ts +0 -21
  122. package/types/client/MobileCalendar.d.ts +0 -47
  123. package/types/client/OfflineMessagesClasses.d.ts +0 -30
  124. package/types/client/ProductSwitch.d.ts +0 -14
  125. package/types/client/Scrollable.d.ts +0 -14
  126. package/types/client/Switch.d.ts +0 -24
  127. package/types/client/TimestampBar.d.ts +0 -8
  128. package/types/client/Webcams.d.ts +0 -66
  129. package/types/client/d.ts.files/Product.d.ts +0 -37
  130. package/types/client/d.ts.files/trans.d.ts +0 -55
  131. package/types/client/favs.d.ts +0 -83
  132. package/types/client/hp.d.ts +0 -15
  133. package/types/client/offlineController.d.ts +0 -20
  134. /package/types/client/{loadersUI.d.ts → customColors.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 { WeatherParameters, LatLon } from './interfaces.d';
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,31 +34,14 @@ 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 recived 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
  /**
54
- * Meteorologigal numerial value (usually in default metric as delivered from backend)
44
+ * Meteorological numerical value (usually in default metric as delivered from backend)
55
45
  */
56
46
  export type NumValue = number;
57
47
 
@@ -104,7 +94,7 @@ export type HTMLString = string;
104
94
  export type DetailRows = keyof typeof weatherTable;
105
95
 
106
96
  /**
107
- * Width/Height or screenposition in Pixels
97
+ * Width/Height or screen position in Pixels
108
98
  */
109
99
  export type Pixel = number;
110
100
 
@@ -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 TagPluginIdent = `@plugins/${keyof import('@windy/plugins.d').TagPlugins}`;
106
+ export type BottomSveltePluginIdent =
107
+ `@plugins/${keyof import('@windy/plugins.d').BottomSveltePlugins}`;
117
108
 
118
- export type BottomTagPluginIdent = `@plugins/${keyof import('@windy/plugins.d').BottomTagPlugins}`;
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
 
@@ -180,11 +171,11 @@ export type RouteMotionSpeed = {
180
171
  [key in RouteType]: number;
181
172
  };
182
173
 
183
- export type LocationPrefecernces = {
174
+ export type LocationPreferences = {
184
175
  status: 'notDetermined' | 'restricted' | 'denied' | 'authorized' | 'unknownState';
185
176
  };
186
177
 
187
- export type NoticicationPrefecernces = {
178
+ export type NotificationPreferences = {
188
179
  status: 'notDetermined' | 'denied' | 'authorized' | 'provisional' | 'unknownState';
189
180
  };
190
181
 
@@ -204,13 +195,17 @@ 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 = {
210
205
  errorId:
211
206
  | 'ICLOUD_9' /** iCloud denied by user settings **/
212
207
  | 'ICLOUD_25' /** Users iCloud has full storage **/
213
- | 'LOC_1' /** Location services disabled in devide (for device Android) **/
208
+ | 'LOC_1' /** Location services disabled in device (for device Android) **/
214
209
  | 'LOC_2' /** Location services disabled for application */
215
210
  | 'NOTIF_1' /** Notification services disabled **/
216
211
  | 'BATTERY_1' /** Battery usage restricted */
@@ -224,8 +219,12 @@ export type ShowableErrors = {
224
219
  closed: Set<string>;
225
220
  };
226
221
 
222
+ export type MigrationResult = {
223
+ status: 'migrationNotPerformed' | 'migratingData' | 'migrationPerformed';
224
+ };
225
+
227
226
  /**
228
- * Overlay categories used for better UI navigation
227
+ * Overlay categories used for better UI navigation (mobile/tablet)
229
228
  */
230
229
  export type MenuCategory =
231
230
  | 'wind'
@@ -237,6 +236,19 @@ export type MenuCategory =
237
236
  | 'warnings'
238
237
  | 'clouds';
239
238
 
239
+ /**
240
+ * Overlay categories used for better UI navigation (desktop)
241
+ */
242
+ export type MenuCategoryDesktop =
243
+ | 'nowcast'
244
+ | 'wind'
245
+ | 'rain'
246
+ | 'sea'
247
+ | 'airQ'
248
+ | 'temp'
249
+ | 'clouds'
250
+ | 'warnings';
251
+
240
252
  /**
241
253
  * Overlay categories used for better UI navigation
242
254
  */
@@ -249,7 +261,7 @@ export type MenuItems = MenuCategory | 'all' | 'search';
249
261
  export type PickerMobileTimeout = '3' | '6' | '9' | '12' | 'always';
250
262
 
251
263
  /**
252
- * Only these first level paths are allowe to be used in log
264
+ * Only these first level paths are allowed to be used in log
253
265
  */
254
266
  export type LogPaths =
255
267
  | keyof WeatherParameters
@@ -264,10 +276,13 @@ export type LogPaths =
264
276
  | 'appRating'
265
277
  | 'articles'
266
278
  | 'detail2'
279
+ | 'appsflyer'
267
280
  | 'onboarding'
268
281
  | 'station'
269
282
  | 'weather'
270
- | 'events';
283
+ | 'events'
284
+ | 'locationPermissionPopup'
285
+ | 'widgetPromo';
271
286
 
272
287
  /**
273
288
  * Type of user consent
@@ -284,15 +299,26 @@ export type ProductIdent =
284
299
  | 'icon-d2'
285
300
  | 'arome'
286
301
  | 'arome-antilles'
302
+ | 'arome-france'
287
303
  | 'arome-reunion'
304
+ | 'can-hrdps'
305
+ | 'can-rdwps'
288
306
  | 'cams-global'
289
307
  | 'cams-eu'
308
+ | 'cze-aladin'
290
309
  | 'icon-global'
291
310
  | 'icon-gwam'
292
311
  | 'icon-ewam'
293
312
  | 'hrrr-alaska'
294
313
  | 'hrrr-conus'
295
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'
296
322
  | 'ukv'
297
323
  | 'gfs'
298
324
  | 'gfs-wave'
@@ -303,8 +329,69 @@ export type ProductIdent =
303
329
  | 'cmems'
304
330
  | 'intersucho'
305
331
  | 'intersucho-firerisk'
306
- | 'nasa-firms';
332
+ | 'nasa-firms'
333
+ | 'jma-msm'
334
+ | 'jma-cwm';
307
335
 
308
336
  export type PickerOpener = LatLon & { id: string };
309
337
 
310
338
  export type ExternalPluginIdent = `windy-plugin-${string}`;
339
+
340
+ export type DropDownValues = { key: string | number | null; value: string | number }[];
341
+
342
+ /*
343
+ * Plugin for creating backups of Local storage
344
+ * This plugin is needed from iOS 17.2, because iOS is clearing WebKit localstorage
345
+ */
346
+ export type WindyBackupPluginInfo = {
347
+ nativeCounter: number;
348
+ backup?: string;
349
+ lastBackup: number;
350
+ lastBackupTriggered: number;
351
+ triggerCounter: number;
352
+ deviceID: string;
353
+ vendorID?: string;
354
+ };
355
+ export interface WindyBackupPlugin {
356
+ // Compare client counter and if is older (most likely zero, when cleared)
357
+ // will return saved data if exist
358
+ syncCounter: (arg: {
359
+ clientCounter: number;
360
+ }) => Promise<{ nativeCounter: number; backup?: string }>;
361
+ // Save current state of LocalStorage to native persistent Storage
362
+ saveBackup: (arg: { clientCounter: number; backup: string }) => Promise<void>;
363
+ // Reloads WebView from origin, to correctly load state of the app
364
+ reloadApp: () => Promise<void>;
365
+ // Clear native backup and resets native counter
366
+ clearBackup: () => Promise<void>;
367
+ // Returns info about native backup
368
+ backupInfo: () => Promise<WindyBackupPluginInfo>;
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';
@@ -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,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,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,4 +0,0 @@
1
- import { BindedCheckbox } from '@windy/BindedCheckbox';
2
- export declare class Detail1hCheckbox extends BindedCheckbox<'detail1h'> {
3
- toggle(): void;
4
- }
@@ -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,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
- }