@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.
Files changed (151) hide show
  1. package/@types/global.d.ts +35 -0
  2. package/@types/react-range-slider-input.d.ts +1 -0
  3. package/@types/svg.d.ts +4 -0
  4. package/README.md +287 -0
  5. package/dist/lib/api/client.d.ts +1 -0
  6. package/dist/lib/components/Aside/Aside.d.ts +8 -0
  7. package/dist/lib/components/Aside/index.d.ts +1 -0
  8. package/dist/lib/components/AsyncSelect/AsyncSelect.d.ts +10 -0
  9. package/dist/lib/components/AsyncSelect/index.d.ts +1 -0
  10. package/dist/lib/components/Button/Button.d.ts +13 -0
  11. package/dist/lib/components/Button/index.d.ts +1 -0
  12. package/dist/lib/components/Checkbox/Checkbox.d.ts +2 -0
  13. package/dist/lib/components/Checkbox/index.d.ts +1 -0
  14. package/dist/lib/components/CheckboxGroup/CheckboxGroup.d.ts +10 -0
  15. package/dist/lib/components/CheckboxGroup/index.d.ts +1 -0
  16. package/dist/lib/components/Chip/Chip.d.ts +8 -0
  17. package/dist/lib/components/Chip/index.d.ts +1 -0
  18. package/dist/lib/components/CloseButton/CloseButton.d.ts +6 -0
  19. package/dist/lib/components/CloseButton/index.d.ts +1 -0
  20. package/dist/lib/components/CourierBalloon/CourierBalloon.d.ts +12 -0
  21. package/dist/lib/components/CourierBalloon/index.d.ts +1 -0
  22. package/dist/lib/components/CourierDetailsModal/CourierDetailsModal.d.ts +10 -0
  23. package/dist/lib/components/CourierDetailsModal/index.d.ts +1 -0
  24. package/dist/lib/components/CourierDetailsView/CourierDetailsView.d.ts +16 -0
  25. package/dist/lib/components/CourierDetailsView/CourierDetailsView.utils.d.ts +20 -0
  26. package/dist/lib/components/CourierDetailsView/index.d.ts +2 -0
  27. package/dist/lib/components/CurrentLocation/CurrentLocation.d.ts +6 -0
  28. package/dist/lib/components/CurrentLocation/index.d.ts +1 -0
  29. package/dist/lib/components/Header/Header.d.ts +6 -0
  30. package/dist/lib/components/Header/LogoContainer.d.ts +2 -0
  31. package/dist/lib/components/Header/index.d.ts +1 -0
  32. package/dist/lib/components/Hr/Hr.d.ts +4 -0
  33. package/dist/lib/components/Hr/index.d.ts +1 -0
  34. package/dist/lib/components/Input/Input.d.ts +11 -0
  35. package/dist/lib/components/Input/index.d.ts +1 -0
  36. package/dist/lib/components/Layout/Layout.d.ts +6 -0
  37. package/dist/lib/components/Layout/index.d.ts +1 -0
  38. package/dist/lib/components/LocationAside/LocationAside.d.ts +4 -0
  39. package/dist/lib/components/LocationAside/index.d.ts +1 -0
  40. package/dist/lib/components/LocationBalloon/LocationBalloon.d.ts +10 -0
  41. package/dist/lib/components/LocationBalloon/index.d.ts +1 -0
  42. package/dist/lib/components/LocationDetailsModal/LocationDetailsModal.d.ts +10 -0
  43. package/dist/lib/components/LocationDetailsModal/index.d.ts +1 -0
  44. package/dist/lib/components/LocationSelector/CourierDeliverySelectorContainer.d.ts +6 -0
  45. package/dist/lib/components/LocationSelector/LocationSelector.d.ts +6 -0
  46. package/dist/lib/components/LocationSelector/LocationSelector.utils.d.ts +1 -0
  47. package/dist/lib/components/LocationSelector/SelfPickupSelectorContainer.d.ts +9 -0
  48. package/dist/lib/components/LocationSelector/index.d.ts +1 -0
  49. package/dist/lib/components/LocationView/LocationView.d.ts +15 -0
  50. package/dist/lib/components/LocationView/index.d.ts +1 -0
  51. package/dist/lib/components/MapContainer/DetailsModalContainer.d.ts +2 -0
  52. package/dist/lib/components/MapContainer/FilterButton.d.ts +2 -0
  53. package/dist/lib/components/MapContainer/MapContainer.d.ts +7 -0
  54. package/dist/lib/components/MapContainer/index.d.ts +1 -0
  55. package/dist/lib/components/MapGoogle/Clusters.d.ts +13 -0
  56. package/dist/lib/components/MapGoogle/ClustersContainer.d.ts +10 -0
  57. package/dist/lib/components/MapGoogle/CourierPoint.d.ts +10 -0
  58. package/dist/lib/components/MapGoogle/MapContainer.d.ts +11 -0
  59. package/dist/lib/components/MapGoogle/MapGoogle.constants.d.ts +4 -0
  60. package/dist/lib/components/MapGoogle/MapGoogle.d.ts +4 -0
  61. package/dist/lib/components/MapGoogle/MapGoogle.hooks.d.ts +5 -0
  62. package/dist/lib/components/MapGoogle/MapGoogle.utils.d.ts +2 -0
  63. package/dist/lib/components/MapGoogle/Point.d.ts +13 -0
  64. package/dist/lib/components/MapGoogle/PointSheet.d.ts +11 -0
  65. package/dist/lib/components/MapGoogle/index.d.ts +1 -0
  66. package/dist/lib/components/MapYandex/MapYandex.constants.d.ts +17 -0
  67. package/dist/lib/components/MapYandex/MapYandex.d.ts +4 -0
  68. package/dist/lib/components/MapYandex/MapYandex.utils.d.ts +25 -0
  69. package/dist/lib/components/MapYandex/index.d.ts +1 -0
  70. package/dist/lib/components/Overlay/Overlay.d.ts +7 -0
  71. package/dist/lib/components/Overlay/index.d.ts +1 -0
  72. package/dist/lib/components/Radio/Radio.d.ts +8 -0
  73. package/dist/lib/components/Radio/index.d.ts +1 -0
  74. package/dist/lib/components/RadioGroup/RadioGroup.d.ts +10 -0
  75. package/dist/lib/components/RadioGroup/index.d.ts +1 -0
  76. package/dist/lib/components/RangeSlider/RangeSlider.d.ts +7 -0
  77. package/dist/lib/components/RangeSlider/index.d.ts +1 -0
  78. package/dist/lib/components/Sidebar/HeaderContainer.d.ts +2 -0
  79. package/dist/lib/components/Sidebar/ReceiveFilterContainer.d.ts +8 -0
  80. package/dist/lib/components/Sidebar/SendFilterContainer.d.ts +8 -0
  81. package/dist/lib/components/Sidebar/Sidebar.d.ts +6 -0
  82. package/dist/lib/components/Sidebar/TypeFilterContainer.d.ts +8 -0
  83. package/dist/lib/components/Sidebar/index.d.ts +1 -0
  84. package/dist/lib/components/Spinner/Spinner.d.ts +1 -0
  85. package/dist/lib/components/Spinner/index.d.ts +1 -0
  86. package/dist/lib/components/TextArea/TextArea.d.ts +7 -0
  87. package/dist/lib/components/TextArea/index.d.ts +1 -0
  88. package/dist/lib/components/TimeRangeSlider/TimeRangeSlider.d.ts +9 -0
  89. package/dist/lib/components/TimeRangeSlider/index.d.ts +1 -0
  90. package/dist/lib/components/TypeFilter/TypeFilter.d.ts +9 -0
  91. package/dist/lib/components/TypeFilter/index.d.ts +1 -0
  92. package/dist/lib/components/WorkingHoursFilter/WorkingHoursFilter.d.ts +9 -0
  93. package/dist/lib/components/WorkingHoursFilter/index.d.ts +1 -0
  94. package/dist/lib/constants/config.d.ts +2 -0
  95. package/dist/lib/constants/http.d.ts +8 -0
  96. package/dist/lib/constants/limits.d.ts +1 -0
  97. package/dist/lib/constants/map.d.ts +11 -0
  98. package/dist/lib/constants/ui.d.ts +1 -0
  99. package/dist/lib/constants/widget.d.ts +1 -0
  100. package/dist/lib/context/config.d.ts +4 -0
  101. package/dist/lib/geocode.d.ts +1 -0
  102. package/dist/lib/hooks/index.d.ts +9 -0
  103. package/dist/lib/hooks/useInitializeAxios.d.ts +2 -0
  104. package/dist/lib/hooks/useInputProps.d.ts +6 -0
  105. package/dist/lib/hooks/useMapRenderer.d.ts +3 -0
  106. package/dist/lib/hooks/useMediaQuery.d.ts +1 -0
  107. package/dist/lib/hooks/useMediaWidthDown.d.ts +3 -0
  108. package/dist/lib/hooks/useMergedRef.d.ts +2 -0
  109. package/dist/lib/hooks/usePointsLoader.d.ts +1 -0
  110. package/dist/lib/hooks/useWidgetConfig.d.ts +2 -0
  111. package/dist/lib/i18n.d.ts +1 -0
  112. package/dist/lib/index.d.ts +11 -0
  113. package/dist/lib/main.d.ts +0 -0
  114. package/dist/lib/services/address.d.ts +36 -0
  115. package/dist/lib/services/points.d.ts +12 -0
  116. package/dist/lib/stores/courierPoint.d.ts +9 -0
  117. package/dist/lib/stores/filters.d.ts +8 -0
  118. package/dist/lib/stores/locationAside.d.ts +8 -0
  119. package/dist/lib/stores/map.d.ts +21 -0
  120. package/dist/lib/stores/points.d.ts +15 -0
  121. package/dist/lib/stores/selectedPlace.d.ts +9 -0
  122. package/dist/lib/stores/selectedPoint.d.ts +10 -0
  123. package/dist/lib/stores/sidebar.d.ts +8 -0
  124. package/dist/lib/style.css +1 -0
  125. package/dist/lib/types/cities.d.ts +11 -0
  126. package/dist/lib/types/config.d.ts +69 -0
  127. package/dist/lib/types/countries.d.ts +5 -0
  128. package/dist/lib/types/filters.d.ts +34 -0
  129. package/dist/lib/types/i18n.d.ts +1 -0
  130. package/dist/lib/types/map.d.ts +10 -0
  131. package/dist/lib/types/points.d.ts +59 -0
  132. package/dist/lib/types/regions.d.ts +5 -0
  133. package/dist/lib/utils/createPointsIterator.d.ts +3 -0
  134. package/dist/lib/utils/fromHoursMinutesToMinutes.d.ts +2 -0
  135. package/dist/lib/utils/fromMinutesToHoursMinutes.d.ts +2 -0
  136. package/dist/lib/utils/getAddressFromLatLng.d.ts +13 -0
  137. package/dist/lib/utils/getBoundsFromPoint.d.ts +1 -0
  138. package/dist/lib/utils/getCurrentPosition.d.ts +1 -0
  139. package/dist/lib/utils/index.d.ts +9 -0
  140. package/dist/lib/utils/isHttpSuccess.d.ts +2 -0
  141. package/dist/lib/utils/setWidgetCSSProperty.d.ts +1 -0
  142. package/dist/lib/utils/stopImmediatePropagation.d.ts +1 -0
  143. package/dist/lib/views/Widget/LocaleProvider.d.ts +8 -0
  144. package/dist/lib/views/Widget/PreloaderOverlay.d.ts +2 -0
  145. package/dist/lib/views/Widget/Widget.d.ts +8 -0
  146. package/dist/lib/views/Widget/Widget.hooks.d.ts +9 -0
  147. package/dist/lib/views/Widget/WidgetContainer.d.ts +6 -0
  148. package/dist/lib/views/Widget/index.d.ts +1 -0
  149. package/dist/lib/widget.es.js +17013 -0
  150. package/dist/lib/widget.umd.js +102 -0
  151. package/package.json +88 -0
@@ -0,0 +1 @@
1
+ export * from "./LocationView";
@@ -0,0 +1,2 @@
1
+ import type { FC } from "react";
2
+ export declare const DetailsModalContainer: FC;
@@ -0,0 +1,2 @@
1
+ import type { FC } from "react";
2
+ export declare const FilterButton: FC;
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ interface MapContainerProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }
6
+ declare const MemoizedMapContainer: import("react").NamedExoticComponent<MapContainerProps>;
7
+ export { MemoizedMapContainer as MapContainer };
@@ -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,4 @@
1
+ /// <reference types="google.maps" />
2
+ export declare const mapOptions: google.maps.MapOptions;
3
+ export declare const markerOptions: google.maps.MarkerOptions;
4
+ export declare const mountTimeout = 1000;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { MapProps } from '../../types/map';
3
+ declare const MemoMap: import("react").NamedExoticComponent<MapProps>;
4
+ export { MemoMap as MapGoogle };
@@ -0,0 +1,5 @@
1
+ interface UsePointInfoOpenParams {
2
+ isSelectedPoint: boolean;
3
+ }
4
+ export declare const usePointInfoOpen: ({ isSelectedPoint }: UsePointInfoOpenParams) => boolean;
5
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const createZoomControls: (map: google.maps.Map) => void;
2
+ export declare const createCurrentLocationControl: (map: google.maps.Map) => void;
@@ -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,4 @@
1
+ /// <reference types="react" />
2
+ import type { MapProps } from '../../types/map';
3
+ declare const MemoMap: import("react").NamedExoticComponent<MapProps>;
4
+ export { MemoMap as MapYandex };
@@ -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,7 @@
1
+ import type { FC } from "react";
2
+ interface OverlayProps {
3
+ className?: string;
4
+ children: React.ReactNode;
5
+ }
6
+ export declare const Overlay: FC<OverlayProps>;
7
+ export {};
@@ -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,7 @@
1
+ import type { FC } from "react";
2
+ interface RangeSliderProps extends Dictionary<any> {
3
+ className?: string;
4
+ formatLabels?: (value: number) => string;
5
+ }
6
+ export declare const RangeSlider: FC<RangeSliderProps>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./RangeSlider";
@@ -0,0 +1,2 @@
1
+ import type { FC } from "react";
2
+ export declare const HeaderContainer: FC;
@@ -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,6 @@
1
+ import type { FC } from "react";
2
+ interface SidebarProps {
3
+ className?: string;
4
+ }
5
+ export declare const Sidebar: FC<SidebarProps>;
6
+ export {};
@@ -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,2 @@
1
+ import type { WidgetConfig } from '../types/config';
2
+ export declare const DEFAULT_CONFIG: Partial<WidgetConfig>;
@@ -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,4 @@
1
+ /// <reference types="react" />
2
+ import type { WidgetConfig } from '../types/config';
3
+ export declare const ConfigContext: import("react").Context<WidgetConfig>;
4
+ export declare const useConfigContext: () => WidgetConfig;
@@ -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,2 @@
1
+ import type { INNType, WidgetOptions } from '../types/config';
2
+ export declare const useInitializeAxios: (INN: INNType, options?: WidgetOptions) => void;
@@ -0,0 +1,6 @@
1
+ import type { InputConfig } from '../types/config';
2
+ export declare const useInputProps: <T extends InputConfig>(input: Nullable<T>) => {
3
+ readonly ref: T["ref"];
4
+ readonly name: string | undefined;
5
+ readonly onClick: () => void;
6
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { MapProvider } from '../types/map';
3
+ export declare const useMapRenderer: (provider: MapProvider) => import("react").NamedExoticComponent<import('../types/map').MapProps>;
@@ -0,0 +1 @@
1
+ export declare function useMediaQuery(query: string): boolean;
@@ -0,0 +1,3 @@
1
+ type Size = "screenSm" | "screenMd" | "screenLg" | "screenXl" | "screen2Xl";
2
+ export declare function useMediaWidthDown(size: Size): boolean;
3
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function useMergedRef<T>(...references: Array<Nullable<React.Ref<T>>>): React.RefCallback<T>;
@@ -0,0 +1 @@
1
+ export declare const usePointsLoader: () => void;
@@ -0,0 +1,2 @@
1
+ import type { WidgetConfig } from '../types/config';
2
+ export declare const useWidgetConfig: (initialConfig?: WidgetConfig) => WidgetConfig;
@@ -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,8 @@
1
+ interface State {
2
+ open: boolean;
3
+ }
4
+ interface Action {
5
+ toggle(value?: boolean): void;
6
+ }
7
+ export declare const useLocationAsideStore: 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 {};
@@ -0,0 +1,8 @@
1
+ interface State {
2
+ open: boolean;
3
+ }
4
+ interface Action {
5
+ toggle(value?: boolean): void;
6
+ }
7
+ export declare const useSidebarStore: import("zustand").UseBoundStore<import("zustand").StoreApi<State & Action>>;
8
+ export {};