@omnic/widget-locations 1.0.84 → 1.0.86

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.
@@ -1,6 +1,6 @@
1
1
  import type { RefObject } from "react";
2
2
  import type { Locale } from "./i18n";
3
- import type { LocationSelectHandler, MapProvider, PointClickHandler, StartScreenType } from "./map";
3
+ import type { CloseLocationSelectorHandler, LocationSelectHandler, MapProvider, PointClickHandler, StartScreenType } from "./map";
4
4
  export type HexColor = `#${string}`;
5
5
  export interface Palette {
6
6
  primary?: HexColor;
@@ -55,6 +55,9 @@ export interface WidgetConfig {
55
55
  palette?: Palette;
56
56
  hideLogo?: boolean;
57
57
  hideMapUI?: boolean;
58
+ hideHeader?: boolean;
59
+ hideFilters?: boolean;
60
+ hideSearchInput?: boolean;
58
61
  inputs?: WidgetInputs;
59
62
  handlers?: WidgetHandlers;
60
63
  startScreen?: StartScreenType;
@@ -62,7 +65,7 @@ export interface WidgetConfig {
62
65
  hideCloseButtonOnLocationScreen?: boolean;
63
66
  onPointClick?: PointClickHandler;
64
67
  onLocationSelect?: LocationSelectHandler;
65
- onCloseLocationSelector?: () => void;
68
+ onCloseLocationSelector?: CloseLocationSelectorHandler;
66
69
  }
67
70
  export interface WidgetOptions {
68
71
  baseURL?: string;
@@ -4,6 +4,7 @@ export interface MapProps {
4
4
  className?: string;
5
5
  }
6
6
  export type MapMode = "self_pickup" | "courier_delivery";
7
+ export type CloseLocationSelectorHandler = () => void;
7
8
  export type PointClickHandler = (point: LocationPoint | CourierDeliveryPoint) => void;
8
9
  export type LocationSelectHandler = (result: google.maps.places.PlaceResult) => void;
9
10
  export type MapProvider = "yandex" | "google";
@@ -1,4 +1,4 @@
1
- import type { FC } from "react";
1
+ import { type FC } from "react";
2
2
  import type { WidgetConfig, WidgetOptions } from '../../types/config';
3
3
  interface WidgetProps {
4
4
  config?: WidgetConfig;
@@ -6,4 +6,4 @@ export declare const usePaletteUpdateWatcher: (palette: Nullable<Palette>) => vo
6
6
  export declare const useButtonRadiusUpdateWatcher: (radius: Nullable<number>) => void;
7
7
  export declare const useFontUpdateWatcher: (font: Nullable<string>) => void;
8
8
  export declare const useStartScreenUpdateWatcher: (startScreen: Nullable<StartScreenType>) => void;
9
- export declare const useSetCityByCoordinates: (center: Coordinates, locale: Locale, zoom: number) => void;
9
+ export declare const useSetCityByCoordinates: (center: Coordinates, zoom: number, loaded: boolean) => void;