@omnic/widget-locations 1.1.80 → 1.1.81

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 +1,3 @@
1
- export declare const MapPlaceholder: () => import("react/jsx-runtime").JSX.Element;
1
+ import type { FC } from "react";
2
+ import type { MapPlaceholderProps } from "./types";
3
+ export declare const MapPlaceholder: FC<MapPlaceholderProps>;
@@ -1 +1,2 @@
1
1
  export { MapPlaceholder } from "./MapPlaceholder";
2
+ export type { MapPlaceholderProps } from "./types";
@@ -0,0 +1,4 @@
1
+ import type { MapPlaceholderConfig } from "../../type";
2
+ export interface MapPlaceholderProps {
3
+ config?: MapPlaceholderConfig;
4
+ }
@@ -1,17 +1,19 @@
1
1
  /// <reference types="react" />
2
2
  import type { WidgetConfig, WidgetOptions } from '../../types/config';
3
+ import type { Locale } from '../../types/i18n';
3
4
  import type { LocationPoint } from '../../types/points';
4
5
  export type OnSamePointsClick = (data: LocationPoint[]) => void;
5
6
  export interface LaunchConfig {
6
7
  options: WidgetOptions;
7
8
  config: WidgetConfig;
8
9
  }
9
- export type DynamicConfig = Omit<WidgetConfig, "INN" | "gMapKey" | "map">;
10
+ export type MapPlaceholderConfig = Pick<WidgetConfig, "cityName" | "country" | "countryAbbreviation" | "disableDelivery" | "disableGeolocation" | "globalSearch" | "handlers" | "hideCloseButtonOnLocationScreen" | "hideDeliveryTime" | "hideDetails" | "hideFilters" | "hideHeader" | "hideLogo" | "hideMapControls" | "hideSearchInput" | "onCloseLocationSelector" | "onLocationSelect" | "onPointClick" | "onSamePointsClusterClick" | "onWarehouseSelect" | "warehouseSelection" | "skipPointInfo" | "regionName" | "inputs" | "startScreen">;
10
11
  export interface WidgetLocationsContextValue {
11
12
  widgetOutHolderRef: React.RefObject<HTMLDivElement>;
12
13
  widgetLocationsRef: React.RefObject<HTMLDivElement>;
13
14
  launchWidget: (params: LaunchConfig) => void;
14
- setDynamicConfig: (params: DynamicConfig) => void;
15
+ setLocale: (locale: Locale) => void;
16
+ setMapPlaceholderConfig: (config: MapPlaceholderConfig | undefined) => void;
15
17
  }
16
18
  export interface WidgetLocationsContextProps {
17
19
  children: React.ReactNode;