@omnic/widget-locations 1.0.13 → 1.0.15

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,5 +1,4 @@
1
1
  /// <reference types="google.maps" />
2
- export declare const center: google.maps.LatLngLiteral;
3
2
  export declare const zoom = 10;
4
3
  export declare const mapOptions: google.maps.MapOptions;
5
4
  export declare const markerOptions: google.maps.MarkerOptions;
@@ -5,7 +5,6 @@ import { Locale } from '../../types/i18n';
5
5
  type YMapsQuery = NonNullable<React.ComponentProps<typeof YMaps>["query"]>;
6
6
  export declare const localesMap: Record<Locale, YMapsQuery["lang"]>;
7
7
  export declare const query: YMapsQuery;
8
- export declare const mapState: ymaps.IMapState;
9
8
  export declare const mapModules: YMapsModules;
10
9
  export declare const objectManagerModules: YMapsModules;
11
10
  export declare const placemarkModules: YMapsModules;
@@ -4,8 +4,9 @@ import { CourierPoint, LocationPoint } from '../types/points';
4
4
  interface UsePointsParams {
5
5
  city?: City;
6
6
  filter: Filter;
7
+ center?: Coordinates;
7
8
  }
8
- export declare const usePoints: ({ city, filter }: UsePointsParams) => {
9
+ export declare const usePoints: ({ city, filter, center }: UsePointsParams) => {
9
10
  error: boolean;
10
11
  points: LocationPoint[];
11
12
  loaded: boolean;
@@ -64,6 +64,8 @@ export declare const resources: {
64
64
  delivery_time: string;
65
65
  apartment_number: string;
66
66
  comment: string;
67
+ pay_by_cash: string;
68
+ pay_by_card: string;
67
69
  };
68
70
  courier_balloon: {
69
71
  title: string;
@@ -134,6 +136,8 @@ export declare const resources: {
134
136
  delivery_time: string;
135
137
  apartment_number: string;
136
138
  comment: string;
139
+ pay_by_cash: string;
140
+ pay_by_card: string;
137
141
  };
138
142
  courier_balloon: {
139
143
  title: string;
@@ -7,13 +7,14 @@ interface Palette {
7
7
  "primary-dark"?: HexColor;
8
8
  }
9
9
  interface MapConfig {
10
+ center?: Coordinates;
10
11
  provider?: MapProvider;
11
12
  }
12
13
  export interface WidgetConfig {
13
14
  font?: string;
14
- locale?: Locale;
15
- radius?: number;
16
15
  map?: MapConfig;
16
+ radius?: number;
17
+ locale?: Locale;
17
18
  palette?: Palette;
18
19
  INN: number | string;
19
20
  onPointClick: (point: LocationPoint | CourierDeliveryPoint) => void;
@@ -10,22 +10,22 @@ export interface PointsList {
10
10
  }
11
11
  export interface LocationPoint {
12
12
  uid: string;
13
- type: number;
14
- code: string;
15
13
  name: string;
14
+ code: string;
15
+ type: number;
16
16
  brand: string;
17
17
  status: number;
18
18
  images: string[];
19
- location: Location;
20
- is_pickup: boolean;
21
- max_weight: number;
19
+ schedule: string[];
22
20
  max_length: number;
21
+ max_weight: number;
22
+ is_pickup: boolean;
23
+ location: Location;
23
24
  description: string;
24
- schedule: Schedule[];
25
- is_delivery: boolean;
26
- pay_by_card: boolean;
27
- pay_by_cash: boolean;
28
25
  is_favorite: boolean;
26
+ pay_by_cash: boolean;
27
+ pay_by_card: boolean;
28
+ is_delivery: boolean;
29
29
  near_station?: string;
30
30
  location_name?: string;
31
31
  is_check_order: boolean;
@@ -44,13 +44,6 @@ export interface CourierDeliveryPoint extends CourierPoint {
44
44
  delivery_time: string;
45
45
  apartment_number: string;
46
46
  }
47
- export interface Schedule {
48
- end: string;
49
- day: number;
50
- start: string;
51
- time?: string;
52
- work_day?: boolean;
53
- }
54
47
  export interface Location {
55
48
  city: City;
56
49
  house: string;
@@ -0,0 +1,2 @@
1
+ import { HoursMinutes } from '../types/filters';
2
+ export declare const fromHoursMinutesToMinutes: (value: HoursMinutes) => number;
@@ -0,0 +1,2 @@
1
+ import { HoursMinutes } from '../types/filters';
2
+ export declare const fromMinutesToHoursMinutes: (value: number) => HoursMinutes;
@@ -0,0 +1 @@
1
+ export declare const getBoundsFromPoint: (point: Coordinates, offset: number) => Bounds;
@@ -0,0 +1,3 @@
1
+ export * from "./fromHoursMinutesToMinutes";
2
+ export * from "./fromMinutesToHoursMinutes";
3
+ export * from "./getBoundsFromPoint";