@kizmann/pico-js 2.0.8 → 2.0.10

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 (97) hide show
  1. package/dist/pico-js.browser.js +1 -1
  2. package/dist/pico-js.browser.js.map +1 -1
  3. package/dist/pico-js.esm.js +1 -1
  4. package/dist/pico-js.esm.js.map +1 -1
  5. package/package.json +4 -6
  6. package/src/dom/{DomAttribute.js → DomAttribute.ts} +40 -63
  7. package/src/dom/{DomBuilder.js → DomBuilder.ts} +27 -44
  8. package/src/dom/{DomEvent.js → DomEvent.ts} +74 -78
  9. package/src/dom/{DomFinder.js → DomFinder.ts} +89 -129
  10. package/src/dom/DomForm.ts +38 -0
  11. package/src/dom/{DomGlobal.js → DomGlobal.ts} +34 -51
  12. package/src/dom/{DomInview.js → DomInview.ts} +37 -57
  13. package/src/dom/DomMeta.ts +48 -0
  14. package/src/dom/DomObserver.ts +17 -0
  15. package/src/dom/{DomPopover.js → DomPopover.ts} +20 -39
  16. package/src/dom/{DomRectangle.js → DomRectangle.ts} +67 -88
  17. package/src/format/{FormatFile.js → FormatFile.ts} +12 -23
  18. package/src/format/{FormatOption.js → FormatOption.ts} +15 -24
  19. package/src/format/{FormatParam.js → FormatParam.ts} +14 -25
  20. package/src/format/{FormatParser.js → FormatParser.ts} +29 -39
  21. package/src/format/{FormatUrl.js → FormatUrl.ts} +9 -21
  22. package/src/index.browser.ts +32 -0
  23. package/src/index.esm.ts +64 -0
  24. package/src/now/{NowDefault.js → NowDefault.ts} +86 -121
  25. package/src/now/{NowFormat.js → NowFormat.ts} +23 -28
  26. package/src/now/{NowGrid.js → NowGrid.ts} +41 -58
  27. package/src/now/{NowHuman.js → NowHuman.ts} +18 -27
  28. package/src/now/{NowMatch.js → NowMatch.ts} +22 -28
  29. package/src/now/{NowRange.js → NowRange.ts} +13 -22
  30. package/src/now/{NowWalker.js → NowWalker.ts} +65 -71
  31. package/src/tool/{scope.js → scope.ts} +41 -11
  32. package/src/utils/{Array.js → Array.ts} +146 -160
  33. package/src/utils/{Cookie.js → Cookie.ts} +15 -12
  34. package/src/utils/{Data.js → Data.ts} +17 -17
  35. package/src/utils/Dom.ts +204 -0
  36. package/src/utils/Format.ts +48 -0
  37. package/src/utils/{Hash.js → Hash.ts} +20 -20
  38. package/src/utils/{Locale.js → Locale.ts} +22 -22
  39. package/src/utils/{Mixed.js → Mixed.ts} +70 -58
  40. package/src/utils/{Now.js → Now.ts} +68 -69
  41. package/src/utils/{Number.js → Number.ts} +34 -36
  42. package/src/utils/{Object.js → Object.ts} +68 -122
  43. package/src/utils/{Route.js → Route.ts} +11 -9
  44. package/src/utils/{Runner.js → Runner.ts} +65 -47
  45. package/src/utils/{Signal.js → Signal.ts} +35 -22
  46. package/src/utils/{String.js → String.ts} +79 -69
  47. package/src/wip/{Element.js → Element.ts} +2 -2
  48. package/src/wip/{Map.js → Map.ts} +131 -101
  49. package/types/dom/DomAttribute.d.ts +16 -27
  50. package/types/dom/DomBuilder.d.ts +6 -9
  51. package/types/dom/DomEvent.d.ts +19 -25
  52. package/types/dom/DomFinder.d.ts +35 -58
  53. package/types/dom/DomForm.d.ts +7 -10
  54. package/types/dom/DomGlobal.d.ts +8 -15
  55. package/types/dom/DomInview.d.ts +9 -19
  56. package/types/dom/DomMeta.d.ts +9 -16
  57. package/types/dom/DomObserver.d.ts +4 -8
  58. package/types/dom/DomPopover.d.ts +8 -11
  59. package/types/dom/DomRectangle.d.ts +21 -40
  60. package/types/format/FormatFile.d.ts +5 -8
  61. package/types/format/FormatOption.d.ts +6 -8
  62. package/types/format/FormatParam.d.ts +6 -9
  63. package/types/format/FormatParser.d.ts +10 -18
  64. package/types/format/FormatUrl.d.ts +5 -8
  65. package/types/index.esm.d.ts +25 -37
  66. package/types/now/NowDefault.d.ts +30 -99
  67. package/types/now/NowFormat.d.ts +8 -21
  68. package/types/now/NowGrid.d.ts +24 -46
  69. package/types/now/NowHuman.d.ts +10 -11
  70. package/types/now/NowMatch.d.ts +6 -4
  71. package/types/now/NowRange.d.ts +5 -8
  72. package/types/now/NowWalker.d.ts +6 -4
  73. package/types/tool/scope.d.ts +11 -3
  74. package/types/utils/Array.d.ts +83 -104
  75. package/types/utils/Cookie.d.ts +11 -8
  76. package/types/utils/Data.d.ts +7 -7
  77. package/types/utils/Dom.d.ts +63 -96
  78. package/types/utils/Format.d.ts +15 -28
  79. package/types/utils/Hash.d.ts +21 -21
  80. package/types/utils/Locale.d.ts +10 -10
  81. package/types/utils/Mixed.d.ts +18 -32
  82. package/types/utils/Now.d.ts +51 -56
  83. package/types/utils/Number.d.ts +9 -20
  84. package/types/utils/Object.d.ts +21 -36
  85. package/types/utils/Route.d.ts +5 -2
  86. package/types/utils/Runner.d.ts +41 -24
  87. package/types/utils/Signal.d.ts +16 -16
  88. package/types/utils/String.d.ts +40 -76
  89. package/src/dom/DomForm.js +0 -59
  90. package/src/dom/DomMeta.js +0 -68
  91. package/src/dom/DomObserver.js +0 -38
  92. package/src/index.browser.js +0 -36
  93. package/src/index.esm.js +0 -80
  94. package/src/utils/Dom.js +0 -214
  95. package/src/utils/Format.js +0 -62
  96. package/types/wip/Element.d.ts +0 -119
  97. package/types/wip/Map.d.ts +0 -254
@@ -1,4 +1,4 @@
1
- import { go, Obj, Arr, Mix, Dom, Event, Hash } from "#src/index.esm.js";
1
+ import { Obj, Arr, Mix, Dom, Signal, Hash } from "../index.esm.ts";
2
2
 
3
3
  /**
4
4
  * @const {object} google
@@ -6,23 +6,51 @@ import { go, Obj, Arr, Mix, Dom, Event, Hash } from "#src/index.esm.js";
6
6
 
7
7
  export class PicoMap
8
8
  {
9
- map = null;
10
9
 
11
- static mapStyle = [];
10
+ /**
11
+ * @type {any[]}
12
+ */
13
+ static mapStyle : any[] = [];
12
14
 
13
- markers = {};
15
+ /**
16
+ * @type {object}
17
+ */
18
+ static markerStyles : any = {};
14
19
 
15
- static markerStyles = {};
20
+ /**
21
+ * @type {boolean}
22
+ */
23
+ static hideMarkers : boolean = true;
16
24
 
17
- cluster = null;
25
+ /**
26
+ * @type {boolean}
27
+ */
28
+ static closeInfoWindows : boolean = true;
18
29
 
19
- clusterFilter = null;
30
+ /**
31
+ * @type {any}
32
+ */
33
+ map : any = null;
20
34
 
21
- clusterOptions = {};
35
+ /**
36
+ * @type {any}
37
+ */
38
+ markers : any = {};
22
39
 
23
- static hideMarkers = true;
40
+ /**
41
+ * @type {any}
42
+ */
43
+ cluster : any = null;
24
44
 
25
- static closeInfoWindows = true;
45
+ /**
46
+ * @type {any}
47
+ */
48
+ clusterFilter : any = null;
49
+
50
+ /**
51
+ * @type {any}
52
+ */
53
+ clusterOptions : any = {};
26
54
 
27
55
  /**
28
56
  * Create map instance
@@ -32,16 +60,16 @@ export class PicoMap
32
60
  * @param {any} el Target element
33
61
  * @param {any} [options] Map options
34
62
  */
35
- constructor(el, options = {})
63
+ constructor(el : any, options : any = {})
36
64
  {
37
- if ( ! globalThis.google ) {
65
+ if ( !globalThis.google ) {
38
66
  throw new Error('Google Maps is required for pi.Map');
39
67
  }
40
68
 
41
69
  let center = Obj.only(options, ['lat', 'lng']);
42
70
 
43
- if ( ! Obj.has(options, 'styles') ) {
44
- options.styles = Map.mapStyle;
71
+ if ( !Obj.has(options, 'styles') ) {
72
+ options.styles = PicoMap.mapStyle;
45
73
  }
46
74
 
47
75
  options = Obj.assign({ gestureHandling: 'cooperative', scrollwheel: null, zoom: 12, center },
@@ -55,12 +83,12 @@ export class PicoMap
55
83
  *
56
84
  * @example Map.setMapStyle(style)
57
85
  *
58
- * @param {Array<any>} [style] Style array
86
+ * @param {any[]} [style] Style array
59
87
  * @returns {PicoMap} Current class
60
88
  */
61
- static setMapStyle(style = [])
89
+ static setMapStyle(style : any[] = []) : typeof PicoMap
62
90
  {
63
- Map.mapStyle = style;
91
+ PicoMap.mapStyle = style;
64
92
 
65
93
  return this;
66
94
  }
@@ -73,27 +101,27 @@ export class PicoMap
73
101
  * @param {string} key Style key
74
102
  * @param {any} [style] Style options
75
103
  * @param {any} [extra] Extra options
76
- * @returns {PicoMap} Current class
104
+ * @returns {typeof PicoMap} Current class
77
105
  */
78
- static setMarkerStyle(key, style = {}, extra = {})
106
+ static setMarkerStyle(key : string, style : any = {}, extra : any = {}) : typeof PicoMap
79
107
  {
80
- if ( ! globalThis.google ) {
108
+ if ( !globalThis.google ) {
81
109
  throw new Error('Google Maps is required for pi.Map');
82
110
  }
83
111
 
84
- if ( ! Obj.has(style, 'default') ) {
85
- return console.error('Marker style requires default property')
112
+ if ( !Obj.has(style, 'default') ) {
113
+ throw new Error('Marker style requires default property');
86
114
  }
87
115
 
88
- if ( ! Obj.has(style, 'width') ) {
116
+ if ( !Obj.has(style, 'width') ) {
89
117
  style.width = 45;
90
118
  }
91
119
 
92
- if ( ! Obj.has(style, 'height') ) {
120
+ if ( !Obj.has(style, 'height') ) {
93
121
  style.height = 45;
94
122
  }
95
123
 
96
- let final = {};
124
+ let final : any = {};
97
125
 
98
126
  // Marker size
99
127
  let size = new globalThis.google.maps.Size(style.width, style.height);
@@ -112,7 +140,7 @@ export class PicoMap
112
140
  final.hover = Obj.assign({}, final.default, { url: style.hover });
113
141
  }
114
142
 
115
- if ( ! Obj.has(final, 'hover') ) {
143
+ if ( !Obj.has(final, 'hover') ) {
116
144
  final.hover = final.default;
117
145
  }
118
146
 
@@ -120,7 +148,7 @@ export class PicoMap
120
148
  final.active = Obj.assign({}, final.default, { url: style.active });
121
149
  }
122
150
 
123
- if ( ! Obj.has(final, 'active') ) {
151
+ if ( !Obj.has(final, 'active') ) {
124
152
  final.active = final.default;
125
153
  }
126
154
 
@@ -128,7 +156,7 @@ export class PicoMap
128
156
  final[prop] = Obj.assign({}, final.default, { url: value });
129
157
  });
130
158
 
131
- Obj.set(Map.markerStyles, key, final);
159
+ Obj.set(PicoMap.markerStyles, key, final);
132
160
 
133
161
  return this;
134
162
  }
@@ -143,9 +171,9 @@ export class PicoMap
143
171
  * @param {boolean} [allowCreate] Create cluster
144
172
  * @returns {void} No return value
145
173
  */
146
- clusterMarkers(options = {}, filter = null, allowCreate = true)
174
+ clusterMarkers(options : any = {}, filter : any = null, allowCreate : boolean = true) : void
147
175
  {
148
- if ( ! this.cluster && ! allowCreate ) {
176
+ if ( !this.cluster && !allowCreate ) {
149
177
  return;
150
178
  }
151
179
 
@@ -153,7 +181,7 @@ export class PicoMap
153
181
  return console.error('Google Maps Cluster library not laoded!');
154
182
  }
155
183
 
156
- if ( ! Obj.has(options, 'imagePath') && ! Obj.has(options, 'styles') ) {
184
+ if ( !Obj.has(options, 'imagePath') && !Obj.has(options, 'styles') ) {
157
185
  options.imagePath = '//developers.google.com/maps/documentation/javascript/examples/markerclusterer/m';
158
186
  }
159
187
 
@@ -169,7 +197,7 @@ export class PicoMap
169
197
 
170
198
  let visible = this.getMarkerVisibility(item.key);
171
199
 
172
- if ( ! Mix.isFunction(this.clusterFilter) ) {
200
+ if ( !Mix.isFunction(this.clusterFilter) ) {
173
201
  return visible;
174
202
  }
175
203
 
@@ -189,7 +217,7 @@ export class PicoMap
189
217
  * @param {any} [type] Style type
190
218
  * @returns {void} No return value
191
219
  */
192
- styleMarker(key, type = null)
220
+ styleMarker(key : string, type : any = null) : void
193
221
  {
194
222
  let item = Obj.get(this.markers, key);
195
223
 
@@ -201,11 +229,11 @@ export class PicoMap
201
229
  type = this.getInfoVisibility(key) ? 'active' : 'default';
202
230
  }
203
231
 
204
- if ( ! Obj.has(Map.markerStyles, [item.style, type]) ) {
232
+ if ( !Obj.has(PicoMap.markerStyles, [item.style, type]) ) {
205
233
  return;
206
234
  }
207
235
 
208
- item.marker.setIcon(Obj.get(Map.markerStyles, [item.style, type]));
236
+ item.marker.setIcon(Obj.get(PicoMap.markerStyles, [item.style, type]));
209
237
  }
210
238
 
211
239
  /**
@@ -216,7 +244,7 @@ export class PicoMap
216
244
  * @param {string} key Marker key
217
245
  * @returns {any} Marker object
218
246
  */
219
- getMarker(key)
247
+ getMarker(key : string) : any
220
248
  {
221
249
  return Obj.get(this.markers, key);
222
250
  }
@@ -230,7 +258,7 @@ export class PicoMap
230
258
  * @param {boolean} [fallback] Fallback value
231
259
  * @returns {boolean} Visibility state
232
260
  */
233
- getMarkerVisibility(key, fallback = false)
261
+ getMarkerVisibility(key : string, fallback : boolean = false) : boolean
234
262
  {
235
263
  let item = Obj.get(this.markers, key);
236
264
 
@@ -250,7 +278,7 @@ export class PicoMap
250
278
  * @param {any} [fallback] Fallback value
251
279
  * @returns {any} Position object
252
280
  */
253
- getMarkerPositon(key, fallback = null)
281
+ getMarkerPositon(key : string, fallback : any = null) : any
254
282
  {
255
283
  let item = Obj.get(this.markers, key);
256
284
 
@@ -267,14 +295,14 @@ export class PicoMap
267
295
  * @example map.toggleMarker("m1")
268
296
  *
269
297
  * @param {string} key Marker key
270
- * @returns {boolean|void} Visibility state
298
+ * @returns {boolean} Visibility state
271
299
  */
272
- toggleMarker(key)
300
+ toggleMarker(key : string) : boolean
273
301
  {
274
302
  let item = Obj.get(this.markers, key);
275
303
 
276
304
  if ( Mix.isEmpty(item) ) {
277
- return console.error(`Marker "${key}" not found`);
305
+ throw new Error(`Marker "${key}" not found`);
278
306
  }
279
307
 
280
308
  if ( item.marker.getVisible() ) {
@@ -290,17 +318,17 @@ export class PicoMap
290
318
  * @example map.showMarker("m1")
291
319
  *
292
320
  * @param {string} key Marker key
293
- * @returns {boolean|void} Previous state
321
+ * @returns {boolean} Previous state
294
322
  */
295
- showMarker(key)
323
+ showMarker(key : string) : boolean
296
324
  {
297
325
  let item = Obj.get(this.markers, key);
298
326
 
299
327
  if ( Mix.isEmpty(item) ) {
300
- return console.error(`Marker "${key}" not found`);
328
+ throw new Error(`Marker "${key}" not found`);
301
329
  }
302
330
 
303
- let hidden = ! item.marker.getVisible();
331
+ let hidden = !item.marker.getVisible();
304
332
 
305
333
  if ( hidden ) {
306
334
  item.marker.setVisible(true);
@@ -315,17 +343,17 @@ export class PicoMap
315
343
  * @example map.hideMarker("m1")
316
344
  *
317
345
  * @param {string} key Marker key
318
- * @returns {boolean|void} Previous state
346
+ * @returns {boolean} Previous state
319
347
  */
320
- hideMarker(key)
348
+ hideMarker(key : string) : boolean
321
349
  {
322
350
  let item = Obj.get(this.markers, key);
323
351
 
324
352
  if ( Mix.isEmpty(item) ) {
325
- return console.error(`Marker "${key}" not found`);
353
+ throw new Error(`Marker "${key}" not found`);
326
354
  }
327
355
 
328
- let visible = !! item.marker.getVisible();
356
+ let visible = !!item.marker.getVisible();
329
357
 
330
358
  if ( visible ) {
331
359
  item.marker.setVisible(false);
@@ -342,14 +370,14 @@ export class PicoMap
342
370
  * @example map.enterMarker("m1")
343
371
  *
344
372
  * @param {string} key Marker key
345
- * @returns {this|void} Current instance
373
+ * @returns {PicoMap} Current instance
346
374
  */
347
- enterMarker(key)
375
+ enterMarker(key : string) : PicoMap
348
376
  {
349
377
  let item = Obj.get(this.markers, key);
350
378
 
351
379
  if ( Mix.isEmpty(item) ) {
352
- return console.error(`Marker "${key}" not found`);
380
+ throw new Error(`Marker "${key}" not found`);
353
381
  }
354
382
 
355
383
  let type = 'hover';
@@ -369,14 +397,14 @@ export class PicoMap
369
397
  * @example map.leaveMarker("m1")
370
398
  *
371
399
  * @param {string} key Marker key
372
- * @returns {this|void} Current instance
400
+ * @returns {PicoMap} Current instance
373
401
  */
374
- leaveMarker(key)
402
+ leaveMarker(key : string) : PicoMap
375
403
  {
376
404
  let item = Obj.get(this.markers, key);
377
405
 
378
406
  if ( Mix.isEmpty(item) ) {
379
- return console.error(`Marker "${key}" not found`);
407
+ throw new Error(`Marker "${key}" not found`);
380
408
  }
381
409
 
382
410
  let type = 'default';
@@ -399,15 +427,15 @@ export class PicoMap
399
427
  * @param {boolean} [fallback] Fallback value
400
428
  * @returns {boolean} Visibility state
401
429
  */
402
- getInfoVisibility(key, fallback = false)
430
+ getInfoVisibility(key : string, fallback : boolean = false) : boolean
403
431
  {
404
432
  let item = Obj.get(this.markers, key);
405
433
 
406
- if ( Mix.isEmpty(item) || ! Obj.has(item, 'info') ) {
434
+ if ( Mix.isEmpty(item) || !Obj.has(item, 'info') ) {
407
435
  return fallback;
408
436
  }
409
437
 
410
- return !! item.info.getMap();
438
+ return !!item.info.getMap();
411
439
  }
412
440
 
413
441
  /**
@@ -416,14 +444,14 @@ export class PicoMap
416
444
  * @example map.toggleInfo("m1")
417
445
  *
418
446
  * @param {string} key Marker key
419
- * @returns {boolean|void} Visibility state
447
+ * @returns {boolean} Visibility state
420
448
  */
421
- toggleInfo(key)
449
+ toggleInfo(key : string) : boolean
422
450
  {
423
451
  let item = Obj.get(this.markers, key);
424
452
 
425
453
  if ( Mix.isEmpty(item) ) {
426
- return console.error(`Marker "${key}" not found`);
454
+ throw new Error(`Marker "${key}" not found`);
427
455
  }
428
456
 
429
457
  if ( item.info.getMap() ) {
@@ -439,23 +467,23 @@ export class PicoMap
439
467
  * @example map.openInfo("m1")
440
468
  *
441
469
  * @param {string} key Marker key
442
- * @returns {boolean|void} Previous state
470
+ * @returns {boolean} Previous state
443
471
  */
444
- openInfo(key)
472
+ openInfo(key : string) : boolean
445
473
  {
446
474
  let item = Obj.get(this.markers, key);
447
475
 
448
476
  if ( Mix.isEmpty(item) ) {
449
- return console.error(`InfoWindow "${key}" not found`);
477
+ throw new Error(`InfoWindow "${key}" not found`);
450
478
  }
451
479
 
452
- if ( ! Obj.has(item, 'info') ) {
480
+ if ( !Obj.has(item, 'info') ) {
453
481
  return true;
454
482
  }
455
483
 
456
- let hidden = ! item.info.getMap();
484
+ let hidden = !item.info.getMap();
457
485
 
458
- if ( Map.closeInfoWindows ) {
486
+ if ( PicoMap.closeInfoWindows ) {
459
487
  Obj.each(Mix.keys(this.markers), this.closeInfo.bind(this));
460
488
  }
461
489
 
@@ -478,21 +506,21 @@ export class PicoMap
478
506
  * @example map.closeInfo("m1")
479
507
  *
480
508
  * @param {string} key Marker key
481
- * @returns {boolean|void} Previous state
509
+ * @returns {boolean} Previous state
482
510
  */
483
- closeInfo(key)
511
+ closeInfo(key : string) : boolean
484
512
  {
485
513
  let item = Obj.get(this.markers, key);
486
514
 
487
515
  if ( Mix.isEmpty(item) ) {
488
- return console.error(`InfoWindow "${key}" not found`);
516
+ throw new Error(`InfoWindow "${key}" not found`);
489
517
  }
490
518
 
491
- if ( ! Obj.has(item, 'info') ) {
519
+ if ( !Obj.has(item, 'info') ) {
492
520
  return false;
493
521
  }
494
522
 
495
- let visible = !! item.info.getMap();
523
+ let visible = !!item.info.getMap();
496
524
 
497
525
  if ( visible ) {
498
526
  item.info.close();
@@ -516,15 +544,15 @@ export class PicoMap
516
544
  * @param {any} [options] Marker options
517
545
  * @returns {any} Marker object
518
546
  */
519
- createMarker(key = null, options = {})
547
+ createMarker(key : any = null, options : any = {}) : any
520
548
  {
521
549
  if ( Mix.isEmpty(key) ) {
522
550
  key = Hash.uuid();
523
551
  }
524
552
 
525
- let item = { key };
553
+ let item : any = { key };
526
554
 
527
- if ( ! Obj.has(options, 'visible') ) {
555
+ if ( !Obj.has(options, 'visible') ) {
528
556
  options.visible = true;
529
557
  }
530
558
 
@@ -532,11 +560,11 @@ export class PicoMap
532
560
  'map', 'position', 'lat', 'lng', 'html', 'style', 'visible', 'onOpen', 'onClose'
533
561
  ]);
534
562
 
535
- if ( ! Obj.has(options, 'map') ) {
563
+ if ( !Obj.has(options, 'map') ) {
536
564
  options.map = this.map;
537
565
  }
538
566
 
539
- if ( ! Obj.has(options, 'position') ) {
567
+ if ( !Obj.has(options, 'position') ) {
540
568
  options.position = Obj.only(options, ['lat', 'lng']);
541
569
  }
542
570
 
@@ -558,11 +586,11 @@ export class PicoMap
558
586
 
559
587
  this.clusterMarkers(this.clusterOptions, null, false);
560
588
 
561
- if ( ! Obj.has(options, 'html') ) {
589
+ if ( !Obj.has(options, 'html') ) {
562
590
  return Obj.get(this.markers, key);
563
591
  }
564
592
 
565
- if ( ! Obj.has(item, 'style') ) {
593
+ if ( !Obj.has(item, 'style') ) {
566
594
  item.style = 'default';
567
595
  }
568
596
 
@@ -583,7 +611,7 @@ export class PicoMap
583
611
  item.info.addListener('closeclick', () => this.closeInfo(key));
584
612
 
585
613
  // Dom change event
586
- item.info.addListener('domready', () => Event.fire('MapsDomReady'));
614
+ item.info.addListener('domready', () => Signal.fire('MapsDomReady'));
587
615
 
588
616
  Obj.set(this.markers, key, item);
589
617
 
@@ -599,7 +627,7 @@ export class PicoMap
599
627
  * @param {any} [options] Position options
600
628
  * @returns {void} No return value
601
629
  */
602
- setMarkerPosition(key, options = {})
630
+ setMarkerPosition(key : string, options : any = {}) : void
603
631
  {
604
632
  let item = Obj.get(this.markers, key);
605
633
 
@@ -619,9 +647,9 @@ export class PicoMap
619
647
  * @param {any} address Search address
620
648
  * @returns {Promise<any>} Response promise
621
649
  */
622
- setMarkerByAddress(key, address)
650
+ setMarkerByAddress(key : string, address : any) : Promise<any>
623
651
  {
624
- return this.getLocationByAddress(address, (res) => {
652
+ return this.getLocationByAddress(address, (res : any) => {
625
653
  this.setMarkerPosition(key, Obj.get(res, '0.geometry.location', {}));
626
654
  });
627
655
  }
@@ -632,16 +660,16 @@ export class PicoMap
632
660
  * @example map.getLocationByAddress("Address")
633
661
  *
634
662
  * @param {any} address Search address
635
- * @param {function} [callback] Success callback
663
+ * @param {Function} [callback] Success callback
636
664
  * @returns {Promise<any>} Response promise
637
665
  */
638
- getLocationByAddress(address, callback = null)
666
+ getLocationByAddress(address : any, callback : Function = null) : Promise<any>
639
667
  {
640
668
  let geocoderService = new globalThis.google.maps.Geocoder();
641
669
 
642
- let geocoderPromise = (resolve, reject) => {
670
+ let geocoderPromise = (resolve : any, reject : any) => {
643
671
 
644
- let geocoderResult = (response, status) => {
672
+ let geocoderResult = (response : any, status : any) => {
645
673
 
646
674
  if ( status === 'OK' ) {
647
675
  callback(response);
@@ -668,19 +696,21 @@ export class PicoMap
668
696
  * @param {any} [filter] Marker filter
669
697
  * @returns {PicoMap} Current instance
670
698
  */
671
- showMarkers(filter = null)
699
+ showMarkers(filter : any = null) : PicoMap
672
700
  {
673
701
  let markers = this.markers;
674
702
 
675
- if ( ! Mix.isEmpty(filter) ) {
703
+ if ( !Mix.isEmpty(filter) ) {
676
704
  markers = Obj.filter(this.markers, filter);
677
705
  }
678
706
 
679
- if ( Map.hideMarkers ) {
707
+ if ( PicoMap.hideMarkers ) {
680
708
  Obj.each(Mix.keys(this.markers), this.hideMarker.bind(this));
681
709
  }
682
710
 
683
- Obj.each(markers, (item) => this.showMarker(item.key));
711
+ Obj.each(markers, (item : any) => {
712
+ return this.showMarker(item.key);
713
+ });
684
714
 
685
715
  this.clusterMarkers(this.clusterOptions, null, false);
686
716
 
@@ -695,17 +725,17 @@ export class PicoMap
695
725
  * @param {any} [filter] Marker filter
696
726
  * @returns {any} Boundary object
697
727
  */
698
- getMarkerBoundry(filter = null)
728
+ getMarkerBoundry(filter : any = null) : any
699
729
  {
700
730
  let markers = this.markers;
701
731
 
702
- if ( ! Mix.isEmpty(filter) ) {
732
+ if ( !Mix.isEmpty(filter) ) {
703
733
  markers = Obj.filter(this.markers, filter);
704
734
  }
705
735
 
706
736
  let boundry = new globalThis.google.maps.LatLngBounds();
707
737
 
708
- Obj.each(markers, (item) => {
738
+ Obj.each(markers, (item : any) => {
709
739
  if ( item.marker.getVisible() ) {
710
740
  boundry.extend(item.marker.getPosition());
711
741
  }
@@ -724,7 +754,7 @@ export class PicoMap
724
754
  * @param {number} [boundSpace] Viewport space
725
755
  * @returns {PicoMap} Current instance
726
756
  */
727
- focusMarkers(filter = null, maxZoom = 14, boundSpace = 15)
757
+ focusMarkers(filter : any = null, maxZoom : number = 14, boundSpace : number = 15) : PicoMap
728
758
  {
729
759
  let boundry = this.getMarkerBoundry(filter);
730
760
 
@@ -749,7 +779,7 @@ export class PicoMap
749
779
  * @param {any} options Render options
750
780
  * @returns {Promise<any>} Response promise
751
781
  */
752
- renderDirections(options)
782
+ renderDirections(options : any) : Promise<any>
753
783
  {
754
784
  // Get directions service
755
785
  let directionsService = new globalThis.google.maps.DirectionsService();
@@ -757,26 +787,26 @@ export class PicoMap
757
787
  // Get directions renderer
758
788
  let directionsRenderer = new globalThis.google.maps.DirectionsRenderer();
759
789
 
760
- if ( ! Obj.has(options, 'map') ) {
790
+ if ( !Obj.has(options, 'map') ) {
761
791
  options.map = this.map;
762
792
  }
763
793
 
764
- if ( ! Obj.has(options, 'travelMode') ) {
794
+ if ( !Obj.has(options, 'travelMode') ) {
765
795
  options.travelMode = 'DRIVING';
766
796
  }
767
797
 
768
798
  // Set directions map
769
799
  directionsRenderer.setMap(options.map);
770
800
 
771
- if ( Obj.has(options, 'panel') && ! Dom.find(options.panel).empty() ) {
801
+ if ( Obj.has(options, 'panel') && !Dom.find(options.panel).empty() ) {
772
802
  directionsRenderer.setPanel(Dom.find(options.panel).get(0));
773
803
  }
774
804
 
775
805
  options = Obj.only(options, ['origin', 'destination', 'travelMode']);
776
806
 
777
- let directionsPromise = (resolve, reject) => {
807
+ let directionsPromise = (resolve : any, reject : any) => {
778
808
 
779
- let directionsResult = (response, status) => {
809
+ let directionsResult = (response : any, status : any) => {
780
810
 
781
811
  if ( status === 'OK' ) {
782
812
  directionsRenderer.setDirections(response);