@omnic/widget-locations 1.0.98 → 1.1.0

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 (72) hide show
  1. package/README.md +8 -7
  2. package/dist/lib/app/App.d.ts +7 -0
  3. package/dist/lib/app/index.d.ts +1 -0
  4. package/dist/lib/components/ConfigWatcherProvider/ConfigWatcherProvider.d.ts +5 -0
  5. package/dist/lib/components/ConfigWatcherProvider/index.d.ts +1 -0
  6. package/dist/lib/components/CurrentLocation/CurrentLocation.utils.d.ts +1 -0
  7. package/dist/lib/components/{CourierBalloon/CourierBalloon.d.ts → DeliveryBalloon/DeliveryBalloon.d.ts} +3 -3
  8. package/dist/lib/components/DeliveryBalloon/index.d.ts +1 -0
  9. package/dist/lib/components/DeliveryDetailsModal/DeliveryDetailsModal.d.ts +10 -0
  10. package/dist/lib/components/DeliveryDetailsModal/index.d.ts +1 -0
  11. package/dist/lib/components/DeliveryDetailsView/DeliveryDetailsView.d.ts +20 -0
  12. package/dist/lib/components/DeliveryDetailsView/DeliveryDetailsView.utils.d.ts +24 -0
  13. package/dist/lib/components/DeliveryDetailsView/index.d.ts +2 -0
  14. package/dist/lib/components/GeoCenterProvider/GeoCenterProvider.d.ts +5 -0
  15. package/dist/lib/components/GeoCenterProvider/index.d.ts +1 -0
  16. package/dist/lib/components/LoaderOverlayProvider/LoaderOverlayProvider.d.ts +5 -0
  17. package/dist/lib/components/LoaderOverlayProvider/index.d.ts +1 -0
  18. package/dist/lib/components/LocationSelector/DeliverySelectorContainer.d.ts +6 -0
  19. package/dist/lib/components/MapApiProvider/MapApiProvider.d.ts +5 -0
  20. package/dist/lib/components/MapApiProvider/index.d.ts +1 -0
  21. package/dist/lib/components/MapGoogle/DeliveryPoint.d.ts +11 -0
  22. package/dist/lib/components/PreloaderOverlay/index.d.ts +1 -0
  23. package/dist/lib/components/Separator/Separator.d.ts +4 -0
  24. package/dist/lib/components/Separator/index.d.ts +1 -0
  25. package/dist/lib/hooks/index.d.ts +6 -0
  26. package/dist/lib/hooks/useButtonRadiusWatcher.d.ts +1 -0
  27. package/dist/lib/hooks/useFontWatcher.d.ts +1 -0
  28. package/dist/lib/hooks/useGeoCenter.d.ts +4 -0
  29. package/dist/lib/hooks/useLocaleWatcher.d.ts +2 -0
  30. package/dist/lib/hooks/usePaletteWatcher.d.ts +2 -0
  31. package/dist/lib/hooks/useStartScreenWatcher.d.ts +2 -0
  32. package/dist/lib/index.d.ts +3 -1
  33. package/dist/lib/logo.svg +1 -0
  34. package/dist/lib/stores/deliveryAddress.d.ts +11 -0
  35. package/dist/lib/stores/deliveryPoint.d.ts +10 -0
  36. package/dist/lib/stores/locationFilters.d.ts +22 -0
  37. package/dist/lib/stores/locationPoints.d.ts +20 -0
  38. package/dist/lib/stores/locationSelectorWindow.d.ts +9 -0
  39. package/dist/lib/stores/map.d.ts +7 -0
  40. package/dist/lib/stores/selectedLocation.d.ts +11 -0
  41. package/dist/lib/style.css +1 -1
  42. package/dist/lib/types/config.d.ts +3 -3
  43. package/dist/lib/types/map.d.ts +3 -3
  44. package/dist/lib/types/points.d.ts +10 -2
  45. package/dist/lib/utils/index.d.ts +2 -0
  46. package/dist/lib/utils/isDeliveryPoint.d.ts +2 -0
  47. package/dist/lib/utils/isLocationPoint.d.ts +2 -0
  48. package/dist/lib/widget.cjs.js +54 -54
  49. package/dist/lib/widget.esm.js +14452 -14417
  50. package/package.json +45 -45
  51. package/dist/lib/components/CourierBalloon/index.d.ts +0 -1
  52. package/dist/lib/components/CourierDetailsModal/CourierDetailsModal.d.ts +0 -10
  53. package/dist/lib/components/CourierDetailsModal/index.d.ts +0 -1
  54. package/dist/lib/components/CourierDetailsView/CourierDetailsView.d.ts +0 -20
  55. package/dist/lib/components/CourierDetailsView/CourierDetailsView.utils.d.ts +0 -24
  56. package/dist/lib/components/CourierDetailsView/index.d.ts +0 -2
  57. package/dist/lib/components/Hr/Hr.d.ts +0 -4
  58. package/dist/lib/components/Hr/index.d.ts +0 -1
  59. package/dist/lib/components/LocationSelector/CourierDeliverySelectorContainer.d.ts +0 -6
  60. package/dist/lib/components/MapGoogle/CourierPoint.d.ts +0 -11
  61. package/dist/lib/stores/courierPoint.d.ts +0 -9
  62. package/dist/lib/stores/filters.d.ts +0 -8
  63. package/dist/lib/stores/locationAside.d.ts +0 -8
  64. package/dist/lib/stores/points.d.ts +0 -15
  65. package/dist/lib/stores/selectedPlace.d.ts +0 -9
  66. package/dist/lib/stores/selectedPoint.d.ts +0 -10
  67. package/dist/lib/views/Widget/LocaleProvider.d.ts +0 -8
  68. package/dist/lib/views/Widget/Widget.d.ts +0 -8
  69. package/dist/lib/views/Widget/Widget.hooks.d.ts +0 -9
  70. package/dist/lib/views/Widget/WidgetContainer.d.ts +0 -6
  71. package/dist/lib/views/Widget/index.d.ts +0 -1
  72. /package/dist/lib/{views/Widget → components/PreloaderOverlay}/PreloaderOverlay.d.ts +0 -0
package/package.json CHANGED
@@ -1,49 +1,7 @@
1
1
  {
2
- "name": "@omnic/widget-locations",
3
- "description": "Simple map widget for Omnic Delivery applications",
4
- "version": "1.0.98",
5
- "type": "module",
6
- "main": "./dist/lib/widget.cjs.js",
7
- "module": "./dist/lib/widget.esm.js",
8
- "types": "./dist/lib/index.d.ts",
9
- "files": [
10
- "@types",
11
- "dist/lib"
12
- ],
13
2
  "author": {
14
- "name": "David Arutiunian",
15
- "email": "arutiunian666@gmail.com"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "https://git.omnic.solutions/omnic.delivery/widget-locations.git"
20
- },
21
- "scripts": {
22
- "dev": "cross-env BUILD_TYPE=app vite",
23
- "build:lib": "tsc && cross-env BUILD_TYPE=lib vite build",
24
- "build:app": "tsc && cross-env BUILD_TYPE=app vite build",
25
- "lint": "eslint src --ext ts,tsx --report-unused-disable-directives",
26
- "lint:fix": "eslint src --ext ts,tsx --fix --report-unused-disable-directives",
27
- "format": "prettier --write {src,@types}/**/*.{ts,tsx,css,scss,md,json}",
28
- "link:app": "rm -rf examples/vanilla/lib && npm run build:app && cp -R dist/app examples/vanilla/lib",
29
- "type-check": "tsc --noEmit",
30
- "i18n:check": "tolgee extract check './src/**/*.ts?(x)'",
31
- "i18n:sync": "tolgee sync './src/**/*.ts?(x)'",
32
- "i18n:pull": "tolgee pull ./i18n",
33
- "i18n:push": "tolgee push --force-mode ./i18n",
34
- "release": "cross-env NODE_ENV=production turbo run changeset:publish",
35
- "release:dev": "cross-env NODE_ENV=development turbo run changeset:publish",
36
- "changeset:publish": "changeset publish"
37
- },
38
- "peerDependencies": {
39
- "react": "^18.2.0",
40
- "react-dom": "^18.2.0"
41
- },
42
- "devDependencies": {
43
- "@changesets/cli": "^2.26.2",
44
- "@omnic/widget-config": "0.1.25",
45
- "@types/node": "^20.8.10",
46
- "sass": "^1.69.5"
3
+ "email": "arutiunian666@gmail.com",
4
+ "name": "David Arutiunian"
47
5
  },
48
6
  "dependencies": {
49
7
  "@pbe/react-yandex-maps": "^1.2.5",
@@ -65,5 +23,47 @@
65
23
  "uuid": "^9.0.1",
66
24
  "yandex-maps": "^0.0.1",
67
25
  "zustand": "^4.4.6"
68
- }
26
+ },
27
+ "description": "Simple map widget for Omnic Delivery applications",
28
+ "devDependencies": {
29
+ "@changesets/cli": "^2.26.2",
30
+ "@omnic/widget-config": "0.1.26",
31
+ "@types/node": "^20.8.10",
32
+ "sass": "^1.69.5"
33
+ },
34
+ "files": [
35
+ "@types",
36
+ "dist/lib"
37
+ ],
38
+ "main": "./dist/lib/widget.cjs.js",
39
+ "module": "./dist/lib/widget.esm.js",
40
+ "name": "@omnic/widget-locations",
41
+ "peerDependencies": {
42
+ "react": "^18.2.0",
43
+ "react-dom": "^18.2.0"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://git.omnic.solutions/omnic.delivery/widget-locations.git"
48
+ },
49
+ "scripts": {
50
+ "build:app": "tsc && cross-env BUILD_TYPE=app vite build",
51
+ "build:lib": "tsc && cross-env BUILD_TYPE=lib vite build",
52
+ "changeset:publish": "changeset publish",
53
+ "dev": "cross-env BUILD_TYPE=app vite",
54
+ "format": "prettier --write {src,@types}/**/*.{ts,tsx,css,scss,md,json}",
55
+ "i18n:check": "tolgee extract check './src/**/*.ts?(x)'",
56
+ "i18n:pull": "tolgee pull ./i18n",
57
+ "i18n:push": "tolgee push --force-mode ./i18n",
58
+ "i18n:sync": "tolgee sync './src/**/*.ts?(x)'",
59
+ "link:app": "rm -rf examples/vanilla/lib && npm run build:app && cp -R dist/app examples/vanilla/lib",
60
+ "lint": "eslint src --ext ts,tsx --report-unused-disable-directives",
61
+ "lint:fix": "eslint src --ext ts,tsx --fix --report-unused-disable-directives",
62
+ "release": "cross-env NODE_ENV=production turbo run changeset:publish",
63
+ "release:dev": "cross-env NODE_ENV=development turbo run changeset:publish",
64
+ "type-check": "tsc --noEmit"
65
+ },
66
+ "type": "module",
67
+ "types": "./dist/lib/index.d.ts",
68
+ "version": "1.1.0"
69
69
  }
@@ -1 +0,0 @@
1
- export * from "./CourierBalloon";
@@ -1,10 +0,0 @@
1
- import type { FC } from "react";
2
- import type { CourierDeliveryPoint, CourierPoint } from '../../types/points';
3
- interface CourierDetailsModalProps {
4
- className?: string;
5
- onClose?: () => void;
6
- location: CourierPoint;
7
- onSubmit?: (point: CourierDeliveryPoint) => void;
8
- }
9
- export declare const CourierDetailsModal: FC<CourierDetailsModalProps>;
10
- export {};
@@ -1 +0,0 @@
1
- export * from "./CourierDetailsModal";
@@ -1,20 +0,0 @@
1
- /// <reference types="react" />
2
- import type { CourierDeliveryPoint, CourierPoint } from '../../types/points';
3
- import type { CourierDetailsModalState } from "./CourierDetailsView.utils";
4
- export interface CourierDetailsViewClasses {
5
- header?: string;
6
- content?: string;
7
- }
8
- export interface CourierDetailsViewMethods {
9
- submit(): Promise<Nullable<CourierDeliveryPoint>>;
10
- }
11
- export interface CourierDetailsViewProps {
12
- location: CourierPoint;
13
- hideActions?: boolean;
14
- classes?: CourierDetailsViewClasses;
15
- onClose?: () => void;
16
- onChange?: (location: CourierDetailsModalState) => void;
17
- onSubmit?: (location: CourierDeliveryPoint) => void;
18
- }
19
- declare const MemoizedCourierDetailsView: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<CourierDetailsViewProps & import("react").RefAttributes<CourierDetailsViewMethods>>>;
20
- export { MemoizedCourierDetailsView as CourierDetailsView };
@@ -1,24 +0,0 @@
1
- import type { Reducer } from "react";
2
- import type { CourierPoint } from '../../types/points';
3
- export type CourierDetailsModalState = CourierPoint & {
4
- comment: string;
5
- delivery_time: string;
6
- apartment_number: string;
7
- };
8
- type ChangeHandler = (location: CourierDetailsModalState) => void;
9
- interface ReducerParams {
10
- set?: ChangeHandler;
11
- }
12
- export type CourierDetailsModalAction = {
13
- type: "SET_COMMENT";
14
- payload: string;
15
- } | {
16
- type: "SET_DELIVERY_TIME";
17
- payload: string;
18
- } | {
19
- type: "SET_APARTMENT_NUMBER";
20
- payload: string;
21
- };
22
- export declare const createReducer: ({ set }: ReducerParams) => Reducer<CourierDetailsModalState, CourierDetailsModalAction>;
23
- export declare const getStateValid: (state: Pick<CourierDetailsModalState, "apartment_number" | "delivery_time">) => boolean;
24
- export {};
@@ -1,2 +0,0 @@
1
- export * from "./CourierDetailsView";
2
- export * from "./CourierDetailsView.utils";
@@ -1,4 +0,0 @@
1
- import type { FC, HTMLAttributes } from "react";
2
- type HrProps = HTMLAttributes<HTMLElement>;
3
- export declare const Hr: FC<HrProps>;
4
- export {};
@@ -1 +0,0 @@
1
- export * from "./Hr";
@@ -1,6 +0,0 @@
1
- import type { FC } from "react";
2
- interface CourierDeliverySelectorContainerProps {
3
- className?: string;
4
- }
5
- export declare const CourierDeliverySelectorContainer: FC<CourierDeliverySelectorContainerProps>;
6
- export {};
@@ -1,11 +0,0 @@
1
- import type { FC } from "react";
2
- import type { CourierDeliveryPoint, CourierPoint } from '../../types/points';
3
- interface CourierPointProps {
4
- point: CourierPoint;
5
- hideDetails?: boolean;
6
- setOpenDetails?: (open: boolean) => void;
7
- setCourierPoint?: (point: null | CourierPoint) => void;
8
- onPointClick?: (point: CourierDeliveryPoint) => void;
9
- }
10
- export declare const CourierPointMarker: FC<CourierPointProps>;
11
- export {};
@@ -1,9 +0,0 @@
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 {};
@@ -1,8 +0,0 @@
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 {};
@@ -1,8 +0,0 @@
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 {};
@@ -1,15 +0,0 @@
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 {};
@@ -1,9 +0,0 @@
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 {};
@@ -1,10 +0,0 @@
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 {};
@@ -1,8 +0,0 @@
1
- import type { FC, ReactNode } from "react";
2
- import type { Locale } from '../../types/i18n';
3
- interface LocaleProviderProps {
4
- locale: Nullable<Locale>;
5
- children: ReactNode;
6
- }
7
- export declare const LocaleProvider: FC<LocaleProviderProps>;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { type FC } from "react";
2
- import type { WidgetConfig, WidgetOptions } from '../../types/config';
3
- interface WidgetProps {
4
- config?: WidgetConfig;
5
- options?: WidgetOptions;
6
- }
7
- export declare const Widget: FC<WidgetProps>;
8
- export {};
@@ -1,9 +0,0 @@
1
- import type { Locale } from '../../types/i18n';
2
- import type { Palette } from '../../types/config';
3
- import type { StartScreenType } from '../../types/map';
4
- export declare const useLocaleUpdateWatcher: (locale: Nullable<Locale>) => void;
5
- export declare const usePaletteUpdateWatcher: (palette: Nullable<Palette>) => void;
6
- export declare const useButtonRadiusUpdateWatcher: (radius: Nullable<number>) => void;
7
- export declare const useFontUpdateWatcher: (font: Nullable<string>) => void;
8
- export declare const useStartScreenUpdateWatcher: (startScreen: Nullable<StartScreenType>) => void;
9
- export declare const useSetCityByCoordinates: (center: Coordinates, zoom: number, loaded: boolean, disableGeolocation?: boolean) => void;
@@ -1,6 +0,0 @@
1
- import type { FC, ReactNode } from "react";
2
- interface WidgetContainerProps {
3
- children: ReactNode;
4
- }
5
- export declare const WidgetContainer: FC<WidgetContainerProps>;
6
- export {};
@@ -1 +0,0 @@
1
- export * from "./Widget";