@dynamo-caffeina-dev/locator-frontend 0.4.0 → 0.6.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/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ export declare type ActionDefinition = {
19
19
 
20
20
  declare type ActionType = "share" | "directions" | "navigate" | "event" | "calendar" | "email";
21
21
 
22
+ declare type AddressFormats = "ZIP_CITY_PROVINCE" | "STREET_ZIP_CITY_PROVINCE" | "STREET_CITY_PROVINCE" | "ZIP_CITY" | "CITY_PROVINCE" | "STREET_CITY" | "STREET_ZIP_CITY";
23
+
22
24
  /**
23
25
  * Data structure for area search events
24
26
  */
@@ -129,8 +131,10 @@ export declare interface CTATrackingData extends BaseTrackingData {
129
131
  cta_label?: string;
130
132
  }
131
133
 
134
+ declare type CustomInfoWindowProps = Pick<MarkerWithInfoWindowProps, "title" | "actions" | "address"> & Omit<MarkerWithInfoWindowProps, "id" | "coords" | "markerType" | "onClick" | "onRightButtonClick" | "title" | "actions" | "address" | "zip" | "province" | "street" | "city" | "country">;
135
+
132
136
  declare type CustomInfoWindowType = null | {
133
- component: React.FC;
137
+ component: React.FC<CustomInfoWindowProps>;
134
138
  };
135
139
 
136
140
  declare type CustomizableComponents = "locationCard" | "ctaButton";
@@ -349,6 +353,12 @@ export declare interface LocatorProps extends LocatorConfig {
349
353
  * Defines clustering provider;
350
354
  */
351
355
  clusteringProvider?: string;
356
+ /**
357
+ * Defines presentation options;
358
+ * these are options that are presentational in nature
359
+ * and do not affect the low-level functionality of the library.
360
+ */
361
+ presentationPrefs?: PresentationOptionsType;
352
362
  }
353
363
 
354
364
  /**
@@ -396,8 +406,22 @@ export declare type MarkerType = BaseMapItem & {
396
406
  on_share?: SocialConfigType[];
397
407
  markerType?: string;
398
408
  actions?: ActionDefinition[];
409
+ zip?: string;
410
+ province?: string;
411
+ street?: string;
412
+ city?: string;
413
+ country?: string;
399
414
  };
400
415
 
416
+ declare type MarkerWithInfoWindowProps = Omit<MarkerType, "on_share" | "capabilities" | "timestamp"> & {
417
+ onClick?: () => void;
418
+ onRightButtonClick?: () => void;
419
+ };
420
+
421
+ declare type PresentationOptionsType = {
422
+ addressFormat?: AddressFormats;
423
+ } | null;
424
+
401
425
  export declare function Search(): default_2.JSX.Element | null;
402
426
 
403
427
  /**
@@ -468,7 +492,7 @@ export declare type TrackerFunction = (data: Record<string, unknown>) => void;
468
492
  export declare type TrackingConfig = {
469
493
  [key in TrackingEvent]?: {
470
494
  enabled: boolean;
471
- tracker: TrackerFunction | null;
495
+ tracker: ((data: TrackingEventDataMap[key]) => void) | null;
472
496
  };
473
497
  };
474
498
 
@@ -530,7 +554,6 @@ export declare interface TrackingEventDataMap {
530
554
  declare class TrackingService {
531
555
  private config;
532
556
  private isInitialized;
533
- private warnedEvents;
534
557
  /**
535
558
  * Initialize the tracking service with a configuration
536
559
  */
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { M as r, S as s, T as t, L as c, t as i } from "./index-BS5s16ld.js";
1
+ import { M as r, S as s, T as t, L as c, t as i } from "./index-CtD-_Wvo.js";
2
2
  export {
3
3
  r as Map,
4
4
  s as Search,