@omnic/widget-locations 1.0.86 → 1.0.88

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
@@ -152,6 +152,7 @@ Then `OMNIC_WIDGET_LOCATIONS_CONFIG` has the following structure:
152
152
  | hideHeader | boolean | Whether to hide header |
153
153
  | hideFilters | boolean | Whether to hide filters |
154
154
  | hideSearchInput | boolean | Whether to hide search input |
155
+ | hideMapControls | boolean | Whether to hide map controls |
155
156
  | hideCloseButtonOnLocationScreen | boolean | Whether to hide close button on location screen |
156
157
  | onPointClick | function | Callback that will be called when user clicks on a point on the map. |
157
158
  | onLocationSelect | function | Callback that will be called when user selects a location Callback will be called with `google.maps.places.PlaceResult` argument |
@@ -58,6 +58,7 @@ export interface WidgetConfig {
58
58
  hideHeader?: boolean;
59
59
  hideFilters?: boolean;
60
60
  hideSearchInput?: boolean;
61
+ hideMapControls?: boolean;
61
62
  inputs?: WidgetInputs;
62
63
  handlers?: WidgetHandlers;
63
64
  startScreen?: StartScreenType;
@@ -55813,14 +55813,16 @@ const MapGoogle = ({ className }) => {
55813
55813
  const courierPoint = useCourierPointStore((state) => state.courierPoint);
55814
55814
  const setCourierPoint = useCourierPointStore((state) => state.setCourierPoint);
55815
55815
  const setSelectedPoint = useSelectedPointStore((state) => state.setSelectedPoint);
55816
- const { onPointClick } = useConfigContext();
55816
+ const { hideMapControls, onPointClick } = useConfigContext();
55817
55817
  const handleMapLoad = useCallback(
55818
55818
  (map22) => {
55819
55819
  setMap(map22);
55820
- createZoomControls(map22);
55821
- createCurrentLocationControl(map22);
55820
+ if (!hideMapControls) {
55821
+ createZoomControls(map22);
55822
+ createCurrentLocationControl(map22);
55823
+ }
55822
55824
  },
55823
- [setMap]
55825
+ [hideMapControls, setMap]
55824
55826
  );
55825
55827
  const handleUnmount = useCallback(() => {
55826
55828
  setMap(null);
@@ -55869,7 +55871,7 @@ const MapGoogle = ({ className }) => {
55869
55871
  false,
55870
55872
  {
55871
55873
  fileName: "/Users/david_arutiunian/Development/omnic/widget-locations/src/components/MapGoogle/MapGoogle.tsx",
55872
- lineNumber: 99,
55874
+ lineNumber: 102,
55873
55875
  columnNumber: 11
55874
55876
  },
55875
55877
  globalThis
@@ -55885,28 +55887,28 @@ const MapGoogle = ({ className }) => {
55885
55887
  false,
55886
55888
  {
55887
55889
  fileName: "/Users/david_arutiunian/Development/omnic/widget-locations/src/components/MapGoogle/MapGoogle.tsx",
55888
- lineNumber: 107,
55890
+ lineNumber: 110,
55889
55891
  columnNumber: 9
55890
55892
  },
55891
55893
  globalThis
55892
55894
  )
55893
55895
  ] }, void 0, true, {
55894
55896
  fileName: "/Users/david_arutiunian/Development/omnic/widget-locations/src/components/MapGoogle/MapGoogle.tsx",
55895
- lineNumber: 97,
55897
+ lineNumber: 100,
55896
55898
  columnNumber: 7
55897
55899
  }, globalThis),
55898
55900
  (loading2 || mapLoading) && /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Overlay, { className: styles$k.overlay, children: /* @__PURE__ */ jsxDevRuntimeExports.jsxDEV(Spinner, {}, void 0, false, {
55899
55901
  fileName: "/Users/david_arutiunian/Development/omnic/widget-locations/src/components/MapGoogle/MapGoogle.tsx",
55900
- lineNumber: 116,
55902
+ lineNumber: 119,
55901
55903
  columnNumber: 11
55902
55904
  }, globalThis) }, void 0, false, {
55903
55905
  fileName: "/Users/david_arutiunian/Development/omnic/widget-locations/src/components/MapGoogle/MapGoogle.tsx",
55904
- lineNumber: 115,
55906
+ lineNumber: 118,
55905
55907
  columnNumber: 9
55906
55908
  }, globalThis)
55907
55909
  ] }, void 0, true, {
55908
55910
  fileName: "/Users/david_arutiunian/Development/omnic/widget-locations/src/components/MapGoogle/MapGoogle.tsx",
55909
- lineNumber: 96,
55911
+ lineNumber: 99,
55910
55912
  columnNumber: 5
55911
55913
  }, globalThis);
55912
55914
  };