@omnic/widget-locations 1.1.78 → 1.1.80

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/README.md CHANGED
@@ -147,7 +147,7 @@ Then `OMNIC_WIDGET_LOCATIONS_CONFIG` has the following structure:
147
147
  | font | string | Font family to use |
148
148
  | radius | number | Border radius of buttons |
149
149
  | locale | string | Locale of the widget. Currently supported: `en`, `ru` |
150
- | country | string | Country code in ISO 3166-1 Alpha-2 format |
150
+ | country | string | Country code in ISO 3166-1 Alpha-2 format. Used to restrict address autocomplete to this country (unless `globalSearch` is true) |
151
151
  | palette | object | Palette config object |
152
152
  | palette.primary | string | Primary color of the widget. Example: `#ff0000` |
153
153
  | palette.primary-dark | string | Darker version of the primary color. Example: `#cc0000` |
@@ -169,19 +169,23 @@ Then `OMNIC_WIDGET_LOCATIONS_CONFIG` has the following structure:
169
169
  | hideDeliveryTime | boolean | Whether to hide delivery time |
170
170
  | hideCloseButtonOnLocationScreen | boolean | Whether to hide close button on location screen |
171
171
  | disableGeolocation | boolean | Whether to disable geolocation |
172
+ | globalSearch | boolean | If true, address autocomplete searches worldwide instead of restricting to `country` |
172
173
  | skipPointInfo | boolean | if true - open parcel-locker details window immediately |
173
174
  | cornersVariant | 'sharp', 'rounded' | components corners variant |
174
- | mapTheme | 'omnic', 'google', 'omnic-light' | Change map color scheme. 'google' by default |
175
+ | mapTheme | 'omnic', 'llama', 'chip' | Change map color scheme |
175
176
  | iconType | 'omnic', 'omni-llama', 'we-chip' | Change icon type |
176
177
  | onPointClick | function | Callback that will be called when user clicks on a point on the map. |
177
178
  | onLocationSelect | function | Callback that will be called when user selects a location Callback will be called with `google.maps.places.PlaceResult` argument |
178
179
  | onCloseLocationSelector | function | Callback that will be called when user closes location selector |
179
- | gMapKey | string | google map key |
180
+ | gMapKey | string | Google Maps API key |
181
+ | gMapId | string | Google Map ID (for map styling) |
180
182
  | countryAbbreviation | string | used for points loading |
181
183
  | regionName | string | used for points loading |
182
184
  | cityName | string | used for points loading |
183
185
  | warehouseSelection | boolean | enable/disable select a warehouse on the map |
186
+ | disableGoogleInit | boolean | If true, widget won't load Google Maps API (e.g. when maps are loaded elsewhere) |
184
187
  | onWarehouseSelect | function | Callback that will be called when user select on a warehouse on the map. |
188
+ | onSamePointsClusterClick | function | Callback that will be called when user clicks on a cluster of same-location points. Receives `LocationPoint[]` |
185
189
 
186
190
  `WidgetInputs` type has the following structure:
187
191
 
@@ -1,2 +1 @@
1
- import type { DynamicConfig } from "../../type";
2
- export declare const MapPlaceholder: (config: DynamicConfig) => import("react/jsx-runtime").JSX.Element;
1
+ export declare const MapPlaceholder: () => import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,6 @@ export interface PlaceSuggestion {
6
6
  description: string;
7
7
  }
8
8
  export interface UsePlaceAutocompleteOptions {
9
- country?: string;
10
9
  types?: string[];
11
10
  debounceMs?: number;
12
11
  onPlaceSelect?: (place: google.maps.places.PlaceResult) => void;
@@ -78,6 +78,7 @@ export interface WidgetConfig {
78
78
  countryAbbreviation?: string;
79
79
  regionName?: string;
80
80
  cityName?: string;
81
+ globalSearch?: boolean;
81
82
  warehouseSelection?: boolean;
82
83
  disableGoogleInit?: boolean;
83
84
  onPointClick?: PointClickHandler;