@chayns-components/maps 5.0.0-beta.489 → 5.0.0-beta.491

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.
@@ -16,15 +16,15 @@ export type PositionInputProps = {
16
16
  /**
17
17
  * Function to be executed when a marker is added.
18
18
  */
19
- onMarkerAdd: (marker: IMarker) => void;
19
+ onMarkerAdd?: (marker: IMarker) => void;
20
20
  /**
21
21
  * Function to be executed when a marker position is changed.
22
22
  */
23
- onMarkerChange: (markers: IMarker[]) => void;
23
+ onMarkerChange?: (markers: IMarker[]) => void;
24
24
  /**
25
25
  * Function to be executed when a marker is removed.
26
26
  */
27
- onMarkerRemove: (id: number) => void;
27
+ onMarkerRemove?: (id: number) => void;
28
28
  /**
29
29
  * Options to style the polygon.
30
30
  */
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { StyledPositionInput, StyledPositionInputSearch } from './PositionInput.styles';
3
1
  import { Input } from '@chayns-components/core';
4
- import MapWrapper from './map-wrapper/MapWrapper';
2
+ import React from 'react';
5
3
  import { DEFAULT_POLYGON_OPTIONS, DEFAULT_POSITION } from '../../constants/positionInput';
4
+ import MapWrapper from './map-wrapper/MapWrapper';
5
+ import { StyledPositionInput, StyledPositionInputSearch } from './PositionInput.styles';
6
6
  const PositionInput = _ref => {
7
7
  let {
8
8
  searchPlaceholder,
@@ -1 +1 @@
1
- {"version":3,"file":"PositionInput.js","names":["React","StyledPositionInput","StyledPositionInputSearch","Input","MapWrapper","DEFAULT_POLYGON_OPTIONS","DEFAULT_POSITION","PositionInput","_ref","searchPlaceholder","apiToken","polygonOptions","initialPosition","zoom","markers","onMarkerRemove","onMarkerChange","onMarkerAdd","createElement","id","placeholder","initialZoom","displayName"],"sources":["../../../src/components/position-input/PositionInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyledPositionInput, StyledPositionInputSearch } from './PositionInput.styles';\nimport { Input } from '@chayns-components/core';\nimport MapWrapper from './map-wrapper/MapWrapper';\nimport type { IMarker, PolygonOptions, Position } from '../../types/positionInput';\nimport { DEFAULT_POLYGON_OPTIONS, DEFAULT_POSITION } from '../../constants/positionInput';\n\nexport type PositionInputProps = {\n /**\n * The api token for google maps.\n */\n apiToken: string;\n /**\n * The position of the center of the map on the initial render.\n */\n initialPosition?: Position;\n /**\n * Markers that should be displayed.\n */\n markers?: IMarker[];\n /**\n * Function to be executed when a marker is added.\n */\n onMarkerAdd: (marker: IMarker) => void;\n /**\n * Function to be executed when a marker position is changed.\n */\n onMarkerChange: (markers: IMarker[]) => void;\n /**\n * Function to be executed when a marker is removed.\n */\n onMarkerRemove: (id: number) => void;\n /**\n * Options to style the polygon.\n */\n polygonOptions?: PolygonOptions;\n /**\n * The placeholder of the search input.\n */\n searchPlaceholder?: string;\n /**\n * The zoom of the map.\n */\n zoom?: number;\n};\n\nconst PositionInput: FC<PositionInputProps> = ({\n searchPlaceholder,\n apiToken,\n polygonOptions = DEFAULT_POLYGON_OPTIONS,\n initialPosition = DEFAULT_POSITION,\n zoom = 13,\n markers,\n onMarkerRemove,\n onMarkerChange,\n onMarkerAdd,\n}) => (\n <StyledPositionInput>\n <StyledPositionInputSearch>\n <Input id=\"auto-complete-input\" placeholder={searchPlaceholder} />\n </StyledPositionInputSearch>\n <MapWrapper\n apiToken={apiToken}\n polygonOptions={polygonOptions}\n initialPosition={initialPosition}\n initialZoom={zoom}\n markers={markers}\n onMarkerAdd={onMarkerAdd}\n onMarkerChange={onMarkerChange}\n onMarkerRemove={onMarkerRemove}\n />\n </StyledPositionInput>\n);\n\nPositionInput.displayName = 'PositionInput';\n\nexport default PositionInput;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SAASC,mBAAmB,EAAEC,yBAAyB,QAAQ,wBAAwB;AACvF,SAASC,KAAK,QAAQ,yBAAyB;AAC/C,OAAOC,UAAU,MAAM,0BAA0B;AAEjD,SAASC,uBAAuB,EAAEC,gBAAgB,QAAQ,+BAA+B;AAyCzF,MAAMC,aAAqC,GAAGC,IAAA;EAAA,IAAC;IAC3CC,iBAAiB;IACjBC,QAAQ;IACRC,cAAc,GAAGN,uBAAuB;IACxCO,eAAe,GAAGN,gBAAgB;IAClCO,IAAI,GAAG,EAAE;IACTC,OAAO;IACPC,cAAc;IACdC,cAAc;IACdC;EACJ,CAAC,GAAAT,IAAA;EAAA,oBACGR,KAAA,CAAAkB,aAAA,CAACjB,mBAAmB,qBAChBD,KAAA,CAAAkB,aAAA,CAAChB,yBAAyB,qBACtBF,KAAA,CAAAkB,aAAA,CAACf,KAAK;IAACgB,EAAE,EAAC,qBAAqB;IAACC,WAAW,EAAEX;EAAkB,CAAE,CAC1C,CAAC,eAC5BT,KAAA,CAAAkB,aAAA,CAACd,UAAU;IACPM,QAAQ,EAAEA,QAAS;IACnBC,cAAc,EAAEA,cAAe;IAC/BC,eAAe,EAAEA,eAAgB;IACjCS,WAAW,EAAER,IAAK;IAClBC,OAAO,EAAEA,OAAQ;IACjBG,WAAW,EAAEA,WAAY;IACzBD,cAAc,EAAEA,cAAe;IAC/BD,cAAc,EAAEA;EAAe,CAClC,CACgB,CAAC;AAAA,CACzB;AAEDR,aAAa,CAACe,WAAW,GAAG,eAAe;AAE3C,eAAef,aAAa"}
1
+ {"version":3,"file":"PositionInput.js","names":["Input","React","DEFAULT_POLYGON_OPTIONS","DEFAULT_POSITION","MapWrapper","StyledPositionInput","StyledPositionInputSearch","PositionInput","_ref","searchPlaceholder","apiToken","polygonOptions","initialPosition","zoom","markers","onMarkerRemove","onMarkerChange","onMarkerAdd","createElement","id","placeholder","initialZoom","displayName"],"sources":["../../../src/components/position-input/PositionInput.tsx"],"sourcesContent":["import { Input } from '@chayns-components/core';\nimport React, { FC } from 'react';\nimport { DEFAULT_POLYGON_OPTIONS, DEFAULT_POSITION } from '../../constants/positionInput';\nimport type { IMarker, PolygonOptions, Position } from '../../types/positionInput';\nimport MapWrapper from './map-wrapper/MapWrapper';\nimport { StyledPositionInput, StyledPositionInputSearch } from './PositionInput.styles';\n\nexport type PositionInputProps = {\n /**\n * The api token for google maps.\n */\n apiToken: string;\n /**\n * The position of the center of the map on the initial render.\n */\n initialPosition?: Position;\n /**\n * Markers that should be displayed.\n */\n markers?: IMarker[];\n /**\n * Function to be executed when a marker is added.\n */\n onMarkerAdd?: (marker: IMarker) => void;\n /**\n * Function to be executed when a marker position is changed.\n */\n onMarkerChange?: (markers: IMarker[]) => void;\n /**\n * Function to be executed when a marker is removed.\n */\n onMarkerRemove?: (id: number) => void;\n /**\n * Options to style the polygon.\n */\n polygonOptions?: PolygonOptions;\n /**\n * The placeholder of the search input.\n */\n searchPlaceholder?: string;\n /**\n * The zoom of the map.\n */\n zoom?: number;\n};\n\nconst PositionInput: FC<PositionInputProps> = ({\n searchPlaceholder,\n apiToken,\n polygonOptions = DEFAULT_POLYGON_OPTIONS,\n initialPosition = DEFAULT_POSITION,\n zoom = 13,\n markers,\n onMarkerRemove,\n onMarkerChange,\n onMarkerAdd,\n}) => (\n <StyledPositionInput>\n <StyledPositionInputSearch>\n <Input id=\"auto-complete-input\" placeholder={searchPlaceholder} />\n </StyledPositionInputSearch>\n <MapWrapper\n apiToken={apiToken}\n polygonOptions={polygonOptions}\n initialPosition={initialPosition}\n initialZoom={zoom}\n markers={markers}\n onMarkerAdd={onMarkerAdd}\n onMarkerChange={onMarkerChange}\n onMarkerRemove={onMarkerRemove}\n />\n </StyledPositionInput>\n);\n\nPositionInput.displayName = 'PositionInput';\n\nexport default PositionInput;\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,yBAAyB;AAC/C,OAAOC,KAAK,MAAc,OAAO;AACjC,SAASC,uBAAuB,EAAEC,gBAAgB,QAAQ,+BAA+B;AAEzF,OAAOC,UAAU,MAAM,0BAA0B;AACjD,SAASC,mBAAmB,EAAEC,yBAAyB,QAAQ,wBAAwB;AAyCvF,MAAMC,aAAqC,GAAGC,IAAA;EAAA,IAAC;IAC3CC,iBAAiB;IACjBC,QAAQ;IACRC,cAAc,GAAGT,uBAAuB;IACxCU,eAAe,GAAGT,gBAAgB;IAClCU,IAAI,GAAG,EAAE;IACTC,OAAO;IACPC,cAAc;IACdC,cAAc;IACdC;EACJ,CAAC,GAAAT,IAAA;EAAA,oBACGP,KAAA,CAAAiB,aAAA,CAACb,mBAAmB,qBAChBJ,KAAA,CAAAiB,aAAA,CAACZ,yBAAyB,qBACtBL,KAAA,CAAAiB,aAAA,CAAClB,KAAK;IAACmB,EAAE,EAAC,qBAAqB;IAACC,WAAW,EAAEX;EAAkB,CAAE,CAC1C,CAAC,eAC5BR,KAAA,CAAAiB,aAAA,CAACd,UAAU;IACPM,QAAQ,EAAEA,QAAS;IACnBC,cAAc,EAAEA,cAAe;IAC/BC,eAAe,EAAEA,eAAgB;IACjCS,WAAW,EAAER,IAAK;IAClBC,OAAO,EAAEA,OAAQ;IACjBG,WAAW,EAAEA,WAAY;IACzBD,cAAc,EAAEA,cAAe;IAC/BD,cAAc,EAAEA;EAAe,CAClC,CACgB,CAAC;AAAA,CACzB;AAEDR,aAAa,CAACe,WAAW,GAAG,eAAe;AAE3C,eAAef,aAAa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/maps",
3
- "version": "5.0.0-beta.489",
3
+ "version": "5.0.0-beta.491",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -46,7 +46,7 @@
46
46
  "@babel/preset-react": "^7.23.3",
47
47
  "@babel/preset-typescript": "^7.23.3",
48
48
  "@types/google.maps": "^3.55.3",
49
- "@types/react": "^18.2.60",
49
+ "@types/react": "^18.2.57",
50
50
  "@types/react-dom": "^18.2.19",
51
51
  "@types/styled-components": "^5.1.34",
52
52
  "@types/uuid": "^9.0.8",
@@ -58,7 +58,7 @@
58
58
  "typescript": "^5.3.3"
59
59
  },
60
60
  "dependencies": {
61
- "@chayns-components/core": "^5.0.0-beta.489",
61
+ "@chayns-components/core": "^5.0.0-beta.490",
62
62
  "@googlemaps/react-wrapper": "^1.1.35",
63
63
  "@googlemaps/typescript-guards": "^2.0.3",
64
64
  "@react-google-maps/api": "^2.19.3",
@@ -74,5 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "0cb3163ed12d79932c78379215e410074fe4a040"
77
+ "gitHead": "ebd021bb71d20307f005b0935b008c0eb1200a69"
78
78
  }