@omnic/widget-locations 0.0.0-dev-20230929004158
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/@types/global.d.ts +35 -0
- package/@types/react-range-slider-input.d.ts +1 -0
- package/@types/svg.d.ts +4 -0
- package/README.md +287 -0
- package/dist/lib/api/client.d.ts +1 -0
- package/dist/lib/components/Aside/Aside.d.ts +8 -0
- package/dist/lib/components/Aside/index.d.ts +1 -0
- package/dist/lib/components/AsyncSelect/AsyncSelect.d.ts +10 -0
- package/dist/lib/components/AsyncSelect/index.d.ts +1 -0
- package/dist/lib/components/Button/Button.d.ts +13 -0
- package/dist/lib/components/Button/index.d.ts +1 -0
- package/dist/lib/components/Checkbox/Checkbox.d.ts +2 -0
- package/dist/lib/components/Checkbox/index.d.ts +1 -0
- package/dist/lib/components/CheckboxGroup/CheckboxGroup.d.ts +10 -0
- package/dist/lib/components/CheckboxGroup/index.d.ts +1 -0
- package/dist/lib/components/Chip/Chip.d.ts +8 -0
- package/dist/lib/components/Chip/index.d.ts +1 -0
- package/dist/lib/components/CloseButton/CloseButton.d.ts +6 -0
- package/dist/lib/components/CloseButton/index.d.ts +1 -0
- package/dist/lib/components/CourierBalloon/CourierBalloon.d.ts +12 -0
- package/dist/lib/components/CourierBalloon/index.d.ts +1 -0
- package/dist/lib/components/CourierDetailsModal/CourierDetailsModal.d.ts +10 -0
- package/dist/lib/components/CourierDetailsModal/index.d.ts +1 -0
- package/dist/lib/components/CourierDetailsView/CourierDetailsView.d.ts +16 -0
- package/dist/lib/components/CourierDetailsView/CourierDetailsView.utils.d.ts +20 -0
- package/dist/lib/components/CourierDetailsView/index.d.ts +2 -0
- package/dist/lib/components/CurrentLocation/CurrentLocation.d.ts +6 -0
- package/dist/lib/components/CurrentLocation/index.d.ts +1 -0
- package/dist/lib/components/Header/Header.d.ts +6 -0
- package/dist/lib/components/Header/LogoContainer.d.ts +2 -0
- package/dist/lib/components/Header/index.d.ts +1 -0
- package/dist/lib/components/Hr/Hr.d.ts +4 -0
- package/dist/lib/components/Hr/index.d.ts +1 -0
- package/dist/lib/components/Input/Input.d.ts +11 -0
- package/dist/lib/components/Input/index.d.ts +1 -0
- package/dist/lib/components/Layout/Layout.d.ts +6 -0
- package/dist/lib/components/Layout/index.d.ts +1 -0
- package/dist/lib/components/LocationAside/LocationAside.d.ts +4 -0
- package/dist/lib/components/LocationAside/index.d.ts +1 -0
- package/dist/lib/components/LocationBalloon/LocationBalloon.d.ts +10 -0
- package/dist/lib/components/LocationBalloon/index.d.ts +1 -0
- package/dist/lib/components/LocationDetailsModal/LocationDetailsModal.d.ts +10 -0
- package/dist/lib/components/LocationDetailsModal/index.d.ts +1 -0
- package/dist/lib/components/LocationSelector/CourierDeliverySelectorContainer.d.ts +6 -0
- package/dist/lib/components/LocationSelector/LocationSelector.d.ts +6 -0
- package/dist/lib/components/LocationSelector/LocationSelector.utils.d.ts +1 -0
- package/dist/lib/components/LocationSelector/SelfPickupSelectorContainer.d.ts +9 -0
- package/dist/lib/components/LocationSelector/index.d.ts +1 -0
- package/dist/lib/components/LocationView/LocationView.d.ts +15 -0
- package/dist/lib/components/LocationView/index.d.ts +1 -0
- package/dist/lib/components/MapContainer/DetailsModalContainer.d.ts +2 -0
- package/dist/lib/components/MapContainer/FilterButton.d.ts +2 -0
- package/dist/lib/components/MapContainer/MapContainer.d.ts +7 -0
- package/dist/lib/components/MapContainer/index.d.ts +1 -0
- package/dist/lib/components/MapGoogle/Clusters.d.ts +13 -0
- package/dist/lib/components/MapGoogle/ClustersContainer.d.ts +10 -0
- package/dist/lib/components/MapGoogle/CourierPoint.d.ts +10 -0
- package/dist/lib/components/MapGoogle/MapContainer.d.ts +11 -0
- package/dist/lib/components/MapGoogle/MapGoogle.constants.d.ts +4 -0
- package/dist/lib/components/MapGoogle/MapGoogle.d.ts +4 -0
- package/dist/lib/components/MapGoogle/MapGoogle.hooks.d.ts +5 -0
- package/dist/lib/components/MapGoogle/MapGoogle.utils.d.ts +2 -0
- package/dist/lib/components/MapGoogle/Point.d.ts +13 -0
- package/dist/lib/components/MapGoogle/PointSheet.d.ts +11 -0
- package/dist/lib/components/MapGoogle/index.d.ts +1 -0
- package/dist/lib/components/MapYandex/MapYandex.constants.d.ts +17 -0
- package/dist/lib/components/MapYandex/MapYandex.d.ts +4 -0
- package/dist/lib/components/MapYandex/MapYandex.utils.d.ts +25 -0
- package/dist/lib/components/MapYandex/index.d.ts +1 -0
- package/dist/lib/components/Overlay/Overlay.d.ts +7 -0
- package/dist/lib/components/Overlay/index.d.ts +1 -0
- package/dist/lib/components/Radio/Radio.d.ts +8 -0
- package/dist/lib/components/Radio/index.d.ts +1 -0
- package/dist/lib/components/RadioGroup/RadioGroup.d.ts +10 -0
- package/dist/lib/components/RadioGroup/index.d.ts +1 -0
- package/dist/lib/components/RangeSlider/RangeSlider.d.ts +7 -0
- package/dist/lib/components/RangeSlider/index.d.ts +1 -0
- package/dist/lib/components/Sidebar/HeaderContainer.d.ts +2 -0
- package/dist/lib/components/Sidebar/ReceiveFilterContainer.d.ts +8 -0
- package/dist/lib/components/Sidebar/SendFilterContainer.d.ts +8 -0
- package/dist/lib/components/Sidebar/Sidebar.d.ts +6 -0
- package/dist/lib/components/Sidebar/TypeFilterContainer.d.ts +8 -0
- package/dist/lib/components/Sidebar/index.d.ts +1 -0
- package/dist/lib/components/Spinner/Spinner.d.ts +1 -0
- package/dist/lib/components/Spinner/index.d.ts +1 -0
- package/dist/lib/components/TextArea/TextArea.d.ts +7 -0
- package/dist/lib/components/TextArea/index.d.ts +1 -0
- package/dist/lib/components/TimeRangeSlider/TimeRangeSlider.d.ts +9 -0
- package/dist/lib/components/TimeRangeSlider/index.d.ts +1 -0
- package/dist/lib/components/TypeFilter/TypeFilter.d.ts +9 -0
- package/dist/lib/components/TypeFilter/index.d.ts +1 -0
- package/dist/lib/components/WorkingHoursFilter/WorkingHoursFilter.d.ts +9 -0
- package/dist/lib/components/WorkingHoursFilter/index.d.ts +1 -0
- package/dist/lib/constants/config.d.ts +2 -0
- package/dist/lib/constants/http.d.ts +8 -0
- package/dist/lib/constants/limits.d.ts +1 -0
- package/dist/lib/constants/map.d.ts +11 -0
- package/dist/lib/constants/ui.d.ts +1 -0
- package/dist/lib/constants/widget.d.ts +1 -0
- package/dist/lib/context/config.d.ts +4 -0
- package/dist/lib/geocode.d.ts +1 -0
- package/dist/lib/hooks/index.d.ts +9 -0
- package/dist/lib/hooks/useInitializeAxios.d.ts +2 -0
- package/dist/lib/hooks/useInputProps.d.ts +6 -0
- package/dist/lib/hooks/useMapRenderer.d.ts +3 -0
- package/dist/lib/hooks/useMediaQuery.d.ts +1 -0
- package/dist/lib/hooks/useMediaWidthDown.d.ts +3 -0
- package/dist/lib/hooks/useMergedRef.d.ts +2 -0
- package/dist/lib/hooks/usePointsLoader.d.ts +1 -0
- package/dist/lib/hooks/useWidgetConfig.d.ts +2 -0
- package/dist/lib/i18n.d.ts +1 -0
- package/dist/lib/index.d.ts +11 -0
- package/dist/lib/main.d.ts +0 -0
- package/dist/lib/services/address.d.ts +36 -0
- package/dist/lib/services/points.d.ts +12 -0
- package/dist/lib/stores/courierPoint.d.ts +9 -0
- package/dist/lib/stores/filters.d.ts +8 -0
- package/dist/lib/stores/locationAside.d.ts +8 -0
- package/dist/lib/stores/map.d.ts +21 -0
- package/dist/lib/stores/points.d.ts +15 -0
- package/dist/lib/stores/selectedPlace.d.ts +9 -0
- package/dist/lib/stores/selectedPoint.d.ts +10 -0
- package/dist/lib/stores/sidebar.d.ts +8 -0
- package/dist/lib/style.css +1 -0
- package/dist/lib/types/cities.d.ts +11 -0
- package/dist/lib/types/config.d.ts +69 -0
- package/dist/lib/types/countries.d.ts +5 -0
- package/dist/lib/types/filters.d.ts +34 -0
- package/dist/lib/types/i18n.d.ts +1 -0
- package/dist/lib/types/map.d.ts +10 -0
- package/dist/lib/types/points.d.ts +59 -0
- package/dist/lib/types/regions.d.ts +5 -0
- package/dist/lib/utils/createPointsIterator.d.ts +3 -0
- package/dist/lib/utils/fromHoursMinutesToMinutes.d.ts +2 -0
- package/dist/lib/utils/fromMinutesToHoursMinutes.d.ts +2 -0
- package/dist/lib/utils/getAddressFromLatLng.d.ts +13 -0
- package/dist/lib/utils/getBoundsFromPoint.d.ts +1 -0
- package/dist/lib/utils/getCurrentPosition.d.ts +1 -0
- package/dist/lib/utils/index.d.ts +9 -0
- package/dist/lib/utils/isHttpSuccess.d.ts +2 -0
- package/dist/lib/utils/setWidgetCSSProperty.d.ts +1 -0
- package/dist/lib/utils/stopImmediatePropagation.d.ts +1 -0
- package/dist/lib/views/Widget/LocaleProvider.d.ts +8 -0
- package/dist/lib/views/Widget/PreloaderOverlay.d.ts +2 -0
- package/dist/lib/views/Widget/Widget.d.ts +8 -0
- package/dist/lib/views/Widget/Widget.hooks.d.ts +9 -0
- package/dist/lib/views/Widget/WidgetContainer.d.ts +6 -0
- package/dist/lib/views/Widget/index.d.ts +1 -0
- package/dist/lib/widget.es.js +17013 -0
- package/dist/lib/widget.umd.js +102 -0
- package/package.json +88 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LocationView";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MapContainer";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import type { LocationPoint } from '../../types/points';
|
|
3
|
+
import { Point } from "./Point";
|
|
4
|
+
type PointProps = ComponentProps<typeof Point>;
|
|
5
|
+
interface ClustersProps {
|
|
6
|
+
points: LocationPoint[];
|
|
7
|
+
selectedPoint: Nullable<LocationPoint>;
|
|
8
|
+
onOpenDetails?: (open: boolean) => void;
|
|
9
|
+
onPointClick?: PointProps["onPointClick"];
|
|
10
|
+
onPointSelected?: PointProps["onPointSelected"];
|
|
11
|
+
}
|
|
12
|
+
declare const MemoizedClusters: import("react").NamedExoticComponent<ClustersProps>;
|
|
13
|
+
export { MemoizedClusters as Clusters };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import type { Point } from "./Point";
|
|
3
|
+
type PointProps = ComponentProps<typeof Point>;
|
|
4
|
+
interface ClustersContainerProps {
|
|
5
|
+
onOpenDetails?: (open: boolean) => void;
|
|
6
|
+
onPointClick?: PointProps["onPointClick"];
|
|
7
|
+
onPointSelected?: PointProps["onPointSelected"];
|
|
8
|
+
}
|
|
9
|
+
declare const MemoizedClustersContainer: import("react").NamedExoticComponent<ClustersContainerProps>;
|
|
10
|
+
export { MemoizedClustersContainer as ClustersContainer };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import type { CourierDeliveryPoint, CourierPoint } from '../../types/points';
|
|
3
|
+
interface CourierPointProps {
|
|
4
|
+
point: CourierPoint;
|
|
5
|
+
setOpenDetails?: (open: boolean) => void;
|
|
6
|
+
setCourierPoint?: (point: null | CourierPoint) => void;
|
|
7
|
+
onPointClick?: (point: CourierDeliveryPoint) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const CourierPointMarker: FC<CourierPointProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GoogleMapProps } from "@react-google-maps/api";
|
|
2
|
+
import type { FC, ReactNode } from "react";
|
|
3
|
+
interface MapContainerProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
onLoad?: GoogleMapProps["onLoad"];
|
|
7
|
+
onIdle?: GoogleMapProps["onIdle"];
|
|
8
|
+
onUnmount?: GoogleMapProps["onUnmount"];
|
|
9
|
+
}
|
|
10
|
+
export declare const MapContainer: FC<MapContainerProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MarkerProps } from "@react-google-maps/api";
|
|
2
|
+
import type { FC } from "react";
|
|
3
|
+
import type { LocationPoint } from '../../types/points';
|
|
4
|
+
interface PointProps {
|
|
5
|
+
point: LocationPoint;
|
|
6
|
+
selectedPoint: Nullable<LocationPoint>;
|
|
7
|
+
clusterer: MarkerProps["clusterer"];
|
|
8
|
+
setOpenDetails?: (open: boolean) => void;
|
|
9
|
+
onPointClick?: (point: LocationPoint) => void;
|
|
10
|
+
onPointSelected?: (point: Nullable<LocationPoint>) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const Point: FC<PointProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BottomSheetProps } from "react-spring-bottom-sheet";
|
|
2
|
+
import type { FC, ReactNode } from "react";
|
|
3
|
+
interface PointSheetProps extends BottomSheetProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
minSnapHeight?: number;
|
|
6
|
+
hideFooter?: boolean;
|
|
7
|
+
submitDisabled?: boolean;
|
|
8
|
+
onSubmitClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const PointSheet: FC<PointSheetProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MapGoogle";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { YMaps } from "@pbe/react-yandex-maps";
|
|
3
|
+
import type { IPlacemarkOptions } from "yandex-maps";
|
|
4
|
+
import type { YMapsModules } from "@pbe/react-yandex-maps/typings/util/typing";
|
|
5
|
+
import type { Locale } from '../../types/i18n';
|
|
6
|
+
type YMapsQuery = NonNullable<React.ComponentProps<typeof YMaps>["query"]>;
|
|
7
|
+
export declare const localesMap: Record<Locale, YMapsQuery["lang"]>;
|
|
8
|
+
export declare const query: YMapsQuery;
|
|
9
|
+
export declare const mapModules: YMapsModules;
|
|
10
|
+
export declare const objectManagerModules: YMapsModules;
|
|
11
|
+
export declare const placemarkModules: YMapsModules;
|
|
12
|
+
export declare const mapOptions: ymaps.IMapOptions;
|
|
13
|
+
export declare const objectManagerOptions: {
|
|
14
|
+
clusterize: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const placemarkOptions: IPlacemarkOptions;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { YMapsApi } from "@pbe/react-yandex-maps/typings/util/typing";
|
|
2
|
+
import type { LocationPoint } from '../../types/points';
|
|
3
|
+
export type Feature = ReturnType<typeof getMapFeatures>[number];
|
|
4
|
+
/**
|
|
5
|
+
* @see {@link https://yandex.ru/dev/maps/jsapi/doc/2.1/ref/reference/ObjectManager.html}
|
|
6
|
+
*/
|
|
7
|
+
export declare const getMapFeatures: (points: LocationPoint[], api: YMapsApi, template: string) => {
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
properties: {
|
|
11
|
+
point: LocationPoint;
|
|
12
|
+
};
|
|
13
|
+
geometry: {
|
|
14
|
+
type: string;
|
|
15
|
+
coordinates: number[];
|
|
16
|
+
};
|
|
17
|
+
options: {
|
|
18
|
+
hideIconOnBalloonOpen: boolean;
|
|
19
|
+
preset: string;
|
|
20
|
+
balloonOffset: number[];
|
|
21
|
+
balloonContentLayout: ymaps.IClassConstructor<ymaps.layout.templateBased.Base>;
|
|
22
|
+
};
|
|
23
|
+
}[];
|
|
24
|
+
export declare const getPresetByType: (type: number, suffix?: string) => string;
|
|
25
|
+
export declare const getMarkerImageOffset: (size: Size) => number[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MapYandex";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Overlay';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, LabelHTMLAttributes } from "react";
|
|
2
|
+
export type RadioProps<T> = InputHTMLAttributes<HTMLInputElement> & {
|
|
3
|
+
value?: T;
|
|
4
|
+
defaultValue?: T;
|
|
5
|
+
label?: string;
|
|
6
|
+
labelProps?: LabelHTMLAttributes<HTMLLabelElement>;
|
|
7
|
+
};
|
|
8
|
+
export declare const Radio: <T>({ label, className, labelProps, ...props }: RadioProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Radio";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { HTMLAttributes } from "react";
|
|
3
|
+
import type { RadioProps } from "../Radio";
|
|
4
|
+
export type RadioGroupProps<T> = Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
5
|
+
value?: T;
|
|
6
|
+
label?: string;
|
|
7
|
+
children: React.ReactElement<RadioProps<T>>[];
|
|
8
|
+
onChange?: (value: T) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const RadioGroup: <T>({ label, value, onChange, children, className, ...props }: RadioGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RadioGroup";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./RangeSlider";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Filter } from '../../types/filters';
|
|
3
|
+
interface ReceiveFilterContainerProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
onChange: (value: Filter["receive"]) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const MemoizedReceiveFilterContainer: import("react").NamedExoticComponent<ReceiveFilterContainerProps>;
|
|
8
|
+
export { MemoizedReceiveFilterContainer as ReceiveFilterContainer };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Filter } from '../../types/filters';
|
|
3
|
+
interface SendFilterContainerProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
onChange: (value: Filter["send"]) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const MemoizedSendFilterContainer: import("react").NamedExoticComponent<SendFilterContainerProps>;
|
|
8
|
+
export { MemoizedSendFilterContainer as SendFilterContainer };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ETypeFilter } from '../../types/filters';
|
|
3
|
+
interface TypeFilterContainerProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
onChange: (value: ETypeFilter) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const MemoizedTypeFilterContainer: import("react").NamedExoticComponent<TypeFilterContainerProps>;
|
|
8
|
+
export { MemoizedTypeFilterContainer as TypeFilterContainer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Sidebar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Spinner: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Spinner';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
import type { ForwardedInputElement } from '../../types/config';
|
|
3
|
+
interface TextAreaProps extends React.ComponentProps<"textarea"> {
|
|
4
|
+
inputRef?: RefObject<HTMLTextAreaElement>;
|
|
5
|
+
}
|
|
6
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<TextAreaProps, "ref"> & import("react").RefAttributes<ForwardedInputElement>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./TextArea";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import type { WorkingHours } from '../../types/filters';
|
|
3
|
+
interface TimeRangeSliderProps extends Dictionary<any> {
|
|
4
|
+
className?: string;
|
|
5
|
+
value: WorkingHours;
|
|
6
|
+
onChange?: (value: WorkingHours) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const TimeRangeSlider: FC<TimeRangeSliderProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./TimeRangeSlider";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import { ETypeFilter } from '../../types/filters';
|
|
3
|
+
interface TypeFilterProps {
|
|
4
|
+
value: ETypeFilter;
|
|
5
|
+
className?: string;
|
|
6
|
+
onChange?: (value: ETypeFilter) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const TypeFilter: FC<TypeFilterProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./TypeFilter";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import type { WorkingHours } from '../../types/filters';
|
|
3
|
+
interface WorkingHoursFilterProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
value: WorkingHours;
|
|
6
|
+
onChange?: (value: WorkingHours) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const WorkingHoursFilter: FC<WorkingHoursFilterProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./WorkingHoursFilter";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const STATUS_OK = 200;
|
|
2
|
+
export declare const STATUS_BAD_REQUEST = 400;
|
|
3
|
+
export declare const STATUS_UNAUTHORIZED = 401;
|
|
4
|
+
export declare const STATUS_FORBIDDEN = 403;
|
|
5
|
+
export declare const STATUS_NOT_FOUND = 404;
|
|
6
|
+
export declare const STATUS_INTERNAL_SERVER_ERROR = 500;
|
|
7
|
+
export declare const STATUS_SERVICE_UNAVAILABLE = 503;
|
|
8
|
+
export declare const STATUS_GATEWAY_TIMEOUT = 504;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MAX_LOAD_SIZE = 512;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LoadScriptProps } from "@react-google-maps/api";
|
|
2
|
+
import type { Locale } from '../types/i18n';
|
|
3
|
+
export declare const BALLOON_SUBMIT_ID: string;
|
|
4
|
+
export declare const BALLOON_DETAILS_ID: string;
|
|
5
|
+
export declare const MARKER_SIZE: Size;
|
|
6
|
+
export declare const SCALED_MARKER_SIZE: Size;
|
|
7
|
+
export declare const FALLBACK_ZOOM = 6;
|
|
8
|
+
export declare const SELECTED_PLACE_ZOOM = 10;
|
|
9
|
+
export declare const FALLBACK_CENTER: Coordinates;
|
|
10
|
+
export declare const FALLBACK_LOCALE: Locale;
|
|
11
|
+
export declare const GOOGLE_MAP_LIBRARIES: LoadScriptProps["libraries"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MOBILE_HEADER_HEIGHT = 28;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WIDGET_ID = "@omnic/widget-locations";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./usePointsLoader";
|
|
2
|
+
export * from "./useWidgetConfig";
|
|
3
|
+
export * from "./useInitializeAxios";
|
|
4
|
+
export * from "./useMapRenderer";
|
|
5
|
+
export * from "./useMergedRef";
|
|
6
|
+
export * from "./useInputProps";
|
|
7
|
+
export * from "./useMediaQuery";
|
|
8
|
+
export * from "./useMediaWidthDown";
|
|
9
|
+
export * from "./useMediaQuery";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useMediaQuery(query: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const usePointsLoader: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tolgee: import("@tolgee/react").TolgeeInstance;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./views/Widget";
|
|
2
|
+
export * from "./services/address";
|
|
3
|
+
export * from "./services/points";
|
|
4
|
+
export * from "./types/cities";
|
|
5
|
+
export * from "./types/config";
|
|
6
|
+
export * from "./types/countries";
|
|
7
|
+
export * from "./types/filters";
|
|
8
|
+
export * from "./types/i18n";
|
|
9
|
+
export * from "./types/map";
|
|
10
|
+
export * from "./types/points";
|
|
11
|
+
export * from "./types/regions";
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { AxiosResponse } from "axios";
|
|
2
|
+
import type { Locale } from '../types/i18n';
|
|
3
|
+
interface NormalizeAddressRequestParams {
|
|
4
|
+
language: Locale;
|
|
5
|
+
address: string;
|
|
6
|
+
service: number;
|
|
7
|
+
algorithm: number;
|
|
8
|
+
}
|
|
9
|
+
export interface NormalizeAddressResponseData {
|
|
10
|
+
country_name: string;
|
|
11
|
+
country_code: string;
|
|
12
|
+
region: string;
|
|
13
|
+
city: string;
|
|
14
|
+
latitude: number;
|
|
15
|
+
longitude: number;
|
|
16
|
+
street: string;
|
|
17
|
+
house: string;
|
|
18
|
+
block: string;
|
|
19
|
+
office: string;
|
|
20
|
+
postal_index: string;
|
|
21
|
+
address: string;
|
|
22
|
+
address_full: string;
|
|
23
|
+
city_place_id: string;
|
|
24
|
+
region_place_id: string;
|
|
25
|
+
place_id: string;
|
|
26
|
+
}
|
|
27
|
+
export interface NormalizeAddressResponse {
|
|
28
|
+
success: boolean;
|
|
29
|
+
status: number;
|
|
30
|
+
message: Nullable<unknown>;
|
|
31
|
+
ids: Nullable<unknown[]>;
|
|
32
|
+
extra: unknown;
|
|
33
|
+
data: NormalizeAddressResponseData;
|
|
34
|
+
}
|
|
35
|
+
export declare const getNormalizedAddress: (params: NormalizeAddressRequestParams) => Promise<AxiosResponse<NormalizeAddressResponse, NormalizeAddressRequestParams>>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Filter } from '../types/filters';
|
|
2
|
+
import type { PointsList } from '../types/points';
|
|
3
|
+
interface FetchPointsRequestParams {
|
|
4
|
+
q?: string;
|
|
5
|
+
bounds?: Nullable<Bounds>;
|
|
6
|
+
filter?: Nullable<Filter>;
|
|
7
|
+
}
|
|
8
|
+
interface FetchPointsRequestOptions {
|
|
9
|
+
controller?: AbortController;
|
|
10
|
+
}
|
|
11
|
+
export declare function fetchPointsRequest({ q, filter, bounds }?: FetchPointsRequestParams, { controller }?: FetchPointsRequestOptions): AsyncGenerator<import("axios").AxiosResponse<HttpResponse<PointsList>, any>, import("axios").AxiosResponse<HttpResponse<PointsList>, any>, unknown>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CourierPoint } from '../types/points';
|
|
2
|
+
interface State {
|
|
3
|
+
courierPoint: Nullable<CourierPoint>;
|
|
4
|
+
}
|
|
5
|
+
interface Action {
|
|
6
|
+
setCourierPoint(point: Nullable<CourierPoint>): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useCourierPointStore: import("zustand").UseBoundStore<import("zustand").StoreApi<State & Action>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Filter } from '../types/filters';
|
|
2
|
+
interface State extends Filter {
|
|
3
|
+
}
|
|
4
|
+
interface Action {
|
|
5
|
+
setFilter(filter: Partial<Filter>): void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useFilterStore: import("zustand").UseBoundStore<import("zustand").StoreApi<State & Action>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
|
+
import type { MapMode } from '../types/map';
|
|
3
|
+
interface State {
|
|
4
|
+
map: Nullable<google.maps.Map>;
|
|
5
|
+
mode: MapMode;
|
|
6
|
+
blurred: boolean;
|
|
7
|
+
loaded: boolean;
|
|
8
|
+
loading: boolean;
|
|
9
|
+
bounds: Nullable<Bounds>;
|
|
10
|
+
detailsOpen: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface Action {
|
|
13
|
+
setMap(map: Nullable<google.maps.Map>): void;
|
|
14
|
+
setLoaded(): void;
|
|
15
|
+
setMode(mode: MapMode): void;
|
|
16
|
+
setBounds(bounds: Nullable<Bounds>): void;
|
|
17
|
+
setDetailsOpen(open: boolean): void;
|
|
18
|
+
setBlurred(blurred: boolean): void;
|
|
19
|
+
}
|
|
20
|
+
export declare const useMapStore: import("zustand").UseBoundStore<import("zustand").StoreApi<State & Action>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Filter } from '../types/filters';
|
|
2
|
+
import type { LocationPoint } from '../types/points';
|
|
3
|
+
interface State {
|
|
4
|
+
error: boolean;
|
|
5
|
+
loaded: boolean;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
reloading: boolean;
|
|
8
|
+
points: LocationPoint[];
|
|
9
|
+
}
|
|
10
|
+
interface Action {
|
|
11
|
+
loadFirst(filter?: Filter): Promise<void>;
|
|
12
|
+
loadNext(bounds: Bounds, filter?: Filter): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare const usePointsStore: import("zustand").UseBoundStore<import("zustand").StoreApi<State & Action>>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
|
+
interface State {
|
|
3
|
+
place: Nullable<google.maps.places.PlaceResult>;
|
|
4
|
+
}
|
|
5
|
+
interface Action {
|
|
6
|
+
setPlace(place: Nullable<google.maps.places.PlaceResult>, zoom?: number): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const useSelectedPlaceStore: import("zustand").UseBoundStore<import("zustand").StoreApi<State & Action>>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LocationPoint } from '../types/points';
|
|
2
|
+
export type SelectPointHook = (point: Nullable<LocationPoint>) => void;
|
|
3
|
+
interface State {
|
|
4
|
+
location: Nullable<LocationPoint>;
|
|
5
|
+
}
|
|
6
|
+
interface Action {
|
|
7
|
+
setSelectedPoint(point: Nullable<LocationPoint>): void;
|
|
8
|
+
}
|
|
9
|
+
export declare const useSelectedPointStore: import("zustand").UseBoundStore<import("zustand").StoreApi<State & Action>>;
|
|
10
|
+
export {};
|