@aws-amplify/ui-react 2.17.1 → 2.18.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.
- package/dist/esm/components/Authenticator/hooks/useAuthenticator/index.js +1 -1
- package/dist/esm/components/Geo/Geocoder/index.js +1 -1
- package/dist/esm/components/Geo/MapView/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/primitives/Menu/MenuButton.js +1 -1
- package/dist/esm/primitives/PhoneNumberField/CountryCodeSelect.js +1 -1
- package/dist/esm/primitives/PhoneNumberField/PhoneNumberField.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles.css +3 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/primitives/PhoneNumberField/CountryCodeSelect.d.ts +1 -1
- package/dist/types/primitives/types/phoneNumberField.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{getSendEventAliases as r,createAuthenticatorMachine as s,listenToAuthHub as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{getSendEventAliases as r,createAuthenticatorMachine as s,listenToAuthHub as o,getServiceContextFacade as n}from"@aws-amplify/ui";import{useSelector as i,useInterpret as c}from"@xstate/react";import a from"lodash/isEmpty";import{areArrayValuesEqual as u}from"../../../../helpers/utils.js";const m=t.createContext({}),p=({children:r})=>{const n=t.useContext(m),i={service:c(s)},u=a(n)?i:n,{service:p}=u,f=t.useRef(!1);return t.useEffect((()=>{if(!f.current)return f.current=!0,o(p)}),[p]),e(m.Provider,Object.assign({value:u},{children:r}))},f=e=>{const s=(()=>{const{service:e}=t.useContext(m);if(!e)throw new Error("Please ensure you wrap your App with `Authenticator.Provider`.\nSee the `useAuthenticator` section on https://ui.docs.amplify.aws/components/authenticator.");return e})(),{send:o}=s,c=t.useMemo((()=>r(o)),[o]),a=i(s,(e=>(e=>Object.assign(Object.assign({},c),n(e)))(e)),((t,r)=>{if(!e)return!1;const s=e(t),o=e(r);return u(s,o)}));return Object.assign(Object.assign({},a),{_state:s.getSnapshot(),_send:o})};export{m as AuthenticatorContext,p as Provider,f as useAuthenticator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as r}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import t from"maplibre-gl";import{createAmplifyGeocoder as e}from"maplibre-gl-js-amplify";import{useRef as i,useEffect as
|
|
1
|
+
import{__rest as r}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as o}from"react/jsx-runtime";import t from"maplibre-gl";import{createAmplifyGeocoder as e}from"maplibre-gl-js-amplify";import{useRef as i,useEffect as n}from"react";import{useMap as s,useControl as m}from"react-map-gl";const p={maplibregl:t,marker:{color:"#3FB1CE"},popup:!0,showResultMarkers:{color:"#3FB1CE"},showResultsWhileTyping:!0},l=r=>{const{current:t}=s();return o(t?c:a,Object.assign({},p,r))},c=o=>{var{position:t="top-right"}=o,i=r(o,["position"]);return m((()=>e(i)),{position:t}),null},a=r=>{const t=i(!1);return n((()=>{t.current||(e(r).addTo("#geocoder-container"),t.current=!0)}),[r]),o("div",{id:"geocoder-container"})};export{l as Geocoder};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o,__awaiter as i}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as e}from"react/jsx-runtime";import{Amplify as t,Auth as r}from"aws-amplify";import l from"maplibre-gl";import{AmplifyMapLibreRequest as m}from"maplibre-gl-js-amplify";import{forwardRef as n,useMemo as a,useState as s,useEffect as p}from"react";import
|
|
1
|
+
import{__rest as o,__awaiter as i}from"../../../node_modules/tslib/tslib.es6.js";import{jsx as e}from"react/jsx-runtime";import{Amplify as t,Auth as r}from"aws-amplify";import l from"maplibre-gl";import{AmplifyMapLibreRequest as m}from"maplibre-gl-js-amplify";import{forwardRef as n,useMemo as a,useState as s,useEffect as p}from"react";import u from"react-map-gl";const v=n(((n,v)=>{var d,{mapLib:c,mapStyle:f,style:g}=n,b=o(n,["mapLib","mapStyle","style"]);const y=t.configure(),j=a((()=>{var o,i,e,t;return null!==(t=null!==(i=null===(o=y.geo)||void 0===o?void 0:o.amazon_location_service)&&void 0!==i?i:null===(e=y.geo)||void 0===e?void 0:e.AmazonLocationService)&&void 0!==t?t:{}}),[y]),[h,w]=s(),L=a((()=>Object.assign({height:"100vh",position:"relative",width:"100vw"},g)),[g]);return p((()=>{i(void 0,void 0,void 0,(function*(){const o=yield r.currentUserCredentials();if(o){const{region:i}=j,{transformRequest:e}=new m(o,i);w((()=>e))}}))}),[j]),h?e(u,Object.assign({},b,{mapLib:null!=c?c:l,mapStyle:null!=f?f:null===(d=j.maps)||void 0===d?void 0:d.default,ref:v,style:L,transformRequest:h})):null}));export{v as MapView};
|