@movmo/express-checkout-button 0.1.1 → 0.1.3

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.
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { DataSource } from './api';
3
2
  interface MovmoCheckoutButtonProps {
4
3
  customerId: string;
5
4
  apiKey: string;
6
- dataSource: DataSource;
5
+ dataSource: "amadeus" | "sabre";
7
6
  flightOffer: object;
8
7
  isProd?: boolean;
9
8
  }
package/dist/dts/api.d.ts CHANGED
@@ -1,10 +1,7 @@
1
1
  import { AxiosInstance } from "axios";
2
2
  export declare const createAxiosClient: (apiKey: string, isProd?: boolean) => AxiosInstance;
3
- export declare enum DataSource {
4
- AMADEUS = "amadeus"
5
- }
6
3
  export interface FlightOfferRequest {
7
- dataSource: DataSource;
4
+ dataSource: string;
8
5
  rawOffer: object;
9
6
  }
10
7
  export declare const saveFlightOffer: (payload: FlightOfferRequest, client: AxiosInstance) => Promise<string | null>;
@@ -1,2 +1 @@
1
1
  export { MovmoCheckoutButton } from './MovmoCheckoutButton';
2
- export { DataSource } from './api';
package/dist/index.cjs.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @movmo/express-checkout-button v0.1.1
2
+ * @movmo/express-checkout-button v0.1.3
3
3
  * React component plugin for embedding Movmo Express Checkout on airline websites.
4
4
  * (c) 2025 Movmo
5
5
  * @license MIT
6
6
  */
7
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("axios");exports.DataSource=void 0,(exports.DataSource||(exports.DataSource={})).AMADEUS="amadeus";function o(e){if(document.getElementById("movmo-checkout"))return;const t=document.createElement("div");t.id="movmo-checkout",t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background: white;\n z-index: 9999;\n ",t.innerHTML=`\n <iframe \n src="https://booking.e2e.movmo.io/booking?${e}"\n width="100%" \n height="100%" \n style="border: none;">\n </iframe>\n `,document.body.appendChild(t)}window.addEventListener("popstate",(()=>{const e=document.getElementById("movmo-checkout");!window.history.state?.checkoutOpen&&e&&e.remove()})),window.addEventListener("DOMContentLoaded",(()=>{if(window.location.pathname.startsWith("/movmo/checkout")){const e=window.location.search.substring(1);window.history.replaceState({checkoutOpen:!0},"",window.location.href),o(e)}}));!function(){if("undefined"!=typeof document){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",e.rel="stylesheet",document.head.appendChild(e)}}(),exports.MovmoCheckoutButton=({customerId:i,apiKey:r,dataSource:a,flightOffer:s,isProd:c=!1})=>{const[d,u]=t.useState(!1),h=((e,t=!1)=>{const o=t?"https://api.movmo.io":"https://e2e.api.movmo.io";return n.create({baseURL:o,headers:{Accept:"application/json","Content-Type":"application/json","x-api-key":e},withCredentials:!0,timeout:3e4})})(r,c),m=`\n px-7 py-5 \n font-inter font-semibold text-lg \n rounded-xl \n text-white \n border-none\n cursor-pointer\n transition-all duration-200\n outline-none focus:ring-2 focus:ring-[#F63D68] focus:ring-opacity-50\n ${d?"bg-gradient-hover":"bg-gradient-normal"}\n `.trim(),p="\n ml-2 px-2 py-1\n bg-white \n text-[#171412] \n rounded-md \n text-lg\n ".trim();return e.jsxs("button",{onClick:async()=>{const e={dataSource:a,rawOffer:s},t=await(async(e,t)=>await t.post("/v1/flight_offers",e).then((e=>e.data.id)).catch((e=>null)))(e,h);if(!t)return;const n=new URLSearchParams({offerId:t,airlineRef:i}).toString();window.history.pushState({checkoutOpen:!0},"",`/movmo/checkout?${n}`),o(n)},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:m,children:["Express Checkout",e.jsx("span",{className:p,children:"Movmo"})]})};
7
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("axios");function o(e){if(document.getElementById("movmo-checkout"))return;const t=document.createElement("div");t.id="movmo-checkout",t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background: white;\n z-index: 9999;\n ",t.innerHTML=`\n <iframe \n src="https://booking.e2e.movmo.io/booking?${e}"\n width="100%" \n height="100%" \n style="border: none;">\n </iframe>\n `,document.body.appendChild(t)}window.addEventListener("popstate",(()=>{const e=document.getElementById("movmo-checkout");!window.history.state?.checkoutOpen&&e&&e.remove()})),window.addEventListener("DOMContentLoaded",(()=>{if(window.location.pathname.startsWith("/movmo/checkout")){const e=window.location.search.substring(1);window.history.replaceState({checkoutOpen:!0},"",window.location.href),o(e)}}));!function(){if("undefined"!=typeof document){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",e.rel="stylesheet",document.head.appendChild(e)}}(),exports.MovmoCheckoutButton=({customerId:i,apiKey:r,dataSource:a,flightOffer:s,isProd:c=!1})=>{const[d,u]=t.useState(!1),h=((e,t=!1)=>{const o=t?"https://api.movmo.io":"https://e2e.api.movmo.io";return n.create({baseURL:o,headers:{Accept:"application/json","Content-Type":"application/json","x-api-key":e},withCredentials:!0,timeout:3e4})})(r,c),m=`\n px-7 py-5 \n font-inter font-semibold text-lg \n rounded-xl \n text-white \n border-none\n cursor-pointer\n transition-all duration-200\n outline-none focus:ring-2 focus:ring-[#F63D68] focus:ring-opacity-50\n ${d?"bg-gradient-hover":"bg-gradient-normal"}\n `.trim(),p="\n ml-2 px-2 py-1\n bg-white \n text-[#171412] \n rounded-md \n text-lg\n ".trim();return e.jsxs("button",{onClick:async()=>{const e={dataSource:a,rawOffer:s},t=await(async(e,t)=>await t.post("/v1/flight_offers",e).then((e=>e.data.id)).catch((e=>null)))(e,h);if(!t)return;const n=new URLSearchParams({offerId:t,airlineRef:i}).toString();window.history.pushState({checkoutOpen:!0},"",`/movmo/checkout?${n}`),o(n)},onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:m,children:["Express Checkout",e.jsx("span",{className:p,children:"Movmo"})]})};
8
8
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/api.ts","../src/MovmoCheckoutOverlay.tsx","../src/index.ts","../src/MovmoCheckoutButton.tsx"],"sourcesContent":[null,null,null,null],"names":["DataSource","showMovmoOverlay","queryParams","document","getElementById","container","createElement","id","style","cssText","innerHTML","body","appendChild","window","addEventListener","history","state","checkoutOpen","remove","location","pathname","startsWith","search","substring","replaceState","href","link","rel","head","loadInterFont","customerId","apiKey","dataSource","flightOffer","isProd","isHovered","setIsHovered","useState","client","baseUrl","axios","create","baseURL","headers","Accept","withCredentials","timeout","createAxiosClient","buttonClasses","trim","badgeClasses","_jsxs","onClick","async","payload","rawOffer","offerId","post","then","res","data","catch","err","saveFlightOffer","URLSearchParams","airlineRef","toString","pushState","onMouseEnter","onMouseLeave","className","children","_jsx"],"mappings":";;;;;;sFAqBYA,QAAAA,gBAAAA,GAAAA,QAAUA,aAAVA,mBAEX,CAAA,IADG,QAAA,UCtBE,SAAUC,EAAiBC,GAC7B,GAAIC,SAASC,eAAe,kBAAmB,OAE/C,MAAMC,EAAYF,SAASG,cAAc,OACzCD,EAAUE,GAAK,iBACfF,EAAUG,MAAMC,QAAU,yKAU1BJ,EAAUK,UAAY,6EAE8BR,yHAOpDC,SAASQ,KAAKC,YAAYP,EAC9B,CAGAQ,OAAOC,iBAAiB,YAAY,KAChC,MAAMT,EAAYF,SAASC,eAAe,mBACrCS,OAAOE,QAAQC,OAAOC,cAAgBZ,GACvCA,EAAUa,YAKlBL,OAAOC,iBAAiB,oBAAoB,KAExC,GADoBD,OAAOM,SAASC,SAASC,WAAW,mBACvC,CACb,MAAMnB,EAAcW,OAAOM,SAASG,OAAOC,UAAU,GACrDV,OAAOE,QAAQS,aAAa,CAAEP,cAAc,GAAQ,GAAIJ,OAAOM,SAASM,MACxExB,EAAiBC,QCzCzB,WACI,GAAwB,oBAAbC,SAA0B,CACjC,MAAMuB,EAAOvB,SAASG,cAAc,QACpCoB,EAAKD,KAAO,mFACZC,EAAKC,IAAM,aACXxB,SAASyB,KAAKhB,YAAYc,GAElC,CAEAG,+BCKuE,EACnEC,aACAC,SACAC,aACAC,cACAC,UAAS,MAET,MAAOC,EAAWC,GAAgBC,EAAAA,UAAS,GACrCC,EHnBuB,EAACP,EAAgBG,GAAkB,KAChE,MAAMK,EAAUL,EAAS,uBAAyB,2BAclD,OAZeM,EAAMC,OAAO,CACxBC,QAASH,EACTI,QAAS,CACLC,OAAQ,mBACR,eAAgB,mBAChB,YAAab,GAGjBc,iBAAiB,EACjBC,QAAS,KAGA,EGIEC,CAAkBhB,EAAQG,GAsBnCc,EAAgB,sRAShBb,EAAY,oBAAsB,6BACtCc,OAEIC,EAAe,mHAMnBD,OAEF,OACIE,OACI,SAAA,CAAAC,QA1CYC,UAChB,MAAMC,EAA8B,CAChCtB,aACAuB,SAAUtB,GAERuB,OHEiBH,OAAOC,EAA6BhB,UAClDA,EAAOmB,KAAK,oBAAqBH,GACzCI,MAAMC,GAAQA,EAAIC,KAAKrD,KACvBsD,OAAOC,GAEG,OGPWC,CAAgBT,EAAShB,GAC/C,IAAKkB,EAED,OAGJ,MAAMtD,EAAc,IAAI8D,gBAAgB,CACpCR,UACAS,WAAYnC,IACboC,WAEHrD,OAAOE,QAAQoD,UAAU,CAAElD,cAAc,GAAQ,GAAI,mBAAmBf,KACxED,EAAiBC,EAAY,EA0BzBkE,aAAc,IAAMhC,GAAa,GACjCiC,aAAc,IAAMjC,GAAa,GACjCkC,UAAWtB,EAAauB,SAAA,CAAA,mBAGxBC,cAAMF,UAAWpB,EAEVqB,SAAA,YACF"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../src/MovmoCheckoutOverlay.tsx","../src/index.ts","../src/MovmoCheckoutButton.tsx","../src/api.ts"],"sourcesContent":[null,null,null,null],"names":["showMovmoOverlay","queryParams","document","getElementById","container","createElement","id","style","cssText","innerHTML","body","appendChild","window","addEventListener","history","state","checkoutOpen","remove","location","pathname","startsWith","search","substring","replaceState","href","link","rel","head","loadInterFont","customerId","apiKey","dataSource","flightOffer","isProd","isHovered","setIsHovered","useState","client","baseUrl","axios","create","baseURL","headers","Accept","withCredentials","timeout","createAxiosClient","buttonClasses","trim","badgeClasses","_jsxs","onClick","async","payload","rawOffer","offerId","post","then","res","data","catch","err","saveFlightOffer","URLSearchParams","airlineRef","toString","pushState","onMouseEnter","onMouseLeave","className","children","_jsx"],"mappings":";;;;;;sFAAM,SAAUA,EAAiBC,GAC7B,GAAIC,SAASC,eAAe,kBAAmB,OAE/C,MAAMC,EAAYF,SAASG,cAAc,OACzCD,EAAUE,GAAK,iBACfF,EAAUG,MAAMC,QAAU,yKAU1BJ,EAAUK,UAAY,6EAE8BR,yHAOpDC,SAASQ,KAAKC,YAAYP,EAC9B,CAGAQ,OAAOC,iBAAiB,YAAY,KAChC,MAAMT,EAAYF,SAASC,eAAe,mBACrCS,OAAOE,QAAQC,OAAOC,cAAgBZ,GACvCA,EAAUa,YAKlBL,OAAOC,iBAAiB,oBAAoB,KAExC,GADoBD,OAAOM,SAASC,SAASC,WAAW,mBACvC,CACb,MAAMnB,EAAcW,OAAOM,SAASG,OAAOC,UAAU,GACrDV,OAAOE,QAAQS,aAAa,CAAEP,cAAc,GAAQ,GAAIJ,OAAOM,SAASM,MACxExB,EAAiBC,QCzCzB,WACI,GAAwB,oBAAbC,SAA0B,CACjC,MAAMuB,EAAOvB,SAASG,cAAc,QACpCoB,EAAKD,KAAO,mFACZC,EAAKC,IAAM,aACXxB,SAASyB,KAAKhB,YAAYc,GAElC,CAEAG,+BCKuE,EACnEC,aACAC,SACAC,aACAC,cACAC,UAAS,MAET,MAAOC,EAAWC,GAAgBC,EAAAA,UAAS,GACrCC,ECnBuB,EAACP,EAAgBG,GAAkB,KAChE,MAAMK,EAAUL,EAAS,uBAAyB,2BAclD,OAZeM,EAAMC,OAAO,CACxBC,QAASH,EACTI,QAAS,CACLC,OAAQ,mBACR,eAAgB,mBAChB,YAAab,GAGjBc,iBAAiB,EACjBC,QAAS,KAGA,EDIEC,CAAkBhB,EAAQG,GAsBnCc,EAAgB,sRAShBb,EAAY,oBAAsB,6BACtCc,OAEIC,EAAe,mHAMnBD,OAEF,OACIE,OACI,SAAA,CAAAC,QA1CYC,UAChB,MAAMC,EAA8B,CAChCtB,aACAuB,SAAUtB,GAERuB,OCFiBH,OAAOC,EAA6BhB,UAClDA,EAAOmB,KAAK,oBAAqBH,GACzCI,MAAMC,GAAQA,EAAIC,KAAKrD,KACvBsD,OAAOC,GAEG,ODHWC,CAAgBT,EAAShB,GAC/C,IAAKkB,EAED,OAGJ,MAAMtD,EAAc,IAAI8D,gBAAgB,CACpCR,UACAS,WAAYnC,IACboC,WAEHrD,OAAOE,QAAQoD,UAAU,CAAElD,cAAc,GAAQ,GAAI,mBAAmBf,KACxED,EAAiBC,EAAY,EA0BzBkE,aAAc,IAAMhC,GAAa,GACjCiC,aAAc,IAAMjC,GAAa,GACjCkC,UAAWtB,EAAauB,SAAA,CAAA,mBAGxBC,cAAMF,UAAWpB,EAEVqB,SAAA,YACF"}
package/dist/index.d.ts CHANGED
@@ -1,22 +1,18 @@
1
1
  /**
2
- * @movmo/express-checkout-button v0.1.1
2
+ * @movmo/express-checkout-button v0.1.3
3
3
  * React component plugin for embedding Movmo Express Checkout on airline websites.
4
4
  * (c) 2025 Movmo
5
5
  * @license MIT
6
6
  */
7
7
  import React from 'react';
8
8
 
9
- declare enum DataSource {
10
- AMADEUS = "amadeus"
11
- }
12
-
13
9
  interface MovmoCheckoutButtonProps {
14
10
  customerId: string;
15
11
  apiKey: string;
16
- dataSource: DataSource;
12
+ dataSource: "amadeus" | "sabre";
17
13
  flightOffer: object;
18
14
  isProd?: boolean;
19
15
  }
20
16
  declare const MovmoCheckoutButton: React.FC<MovmoCheckoutButtonProps>;
21
17
 
22
- export { DataSource, MovmoCheckoutButton };
18
+ export { MovmoCheckoutButton };
package/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @movmo/express-checkout-button v0.1.1
2
+ * @movmo/express-checkout-button v0.1.3
3
3
  * React component plugin for embedding Movmo Express Checkout on airline websites.
4
4
  * (c) 2025 Movmo
5
5
  * @license MIT
6
6
  */
7
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import o from"axios";var i;!function(e){e.AMADEUS="amadeus"}(i||(i={}));function r(e){if(document.getElementById("movmo-checkout"))return;const t=document.createElement("div");t.id="movmo-checkout",t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background: white;\n z-index: 9999;\n ",t.innerHTML=`\n <iframe \n src="https://booking.e2e.movmo.io/booking?${e}"\n width="100%" \n height="100%" \n style="border: none;">\n </iframe>\n `,document.body.appendChild(t)}window.addEventListener("popstate",(()=>{const e=document.getElementById("movmo-checkout");!window.history.state?.checkoutOpen&&e&&e.remove()})),window.addEventListener("DOMContentLoaded",(()=>{if(window.location.pathname.startsWith("/movmo/checkout")){const e=window.location.search.substring(1);window.history.replaceState({checkoutOpen:!0},"",window.location.href),r(e)}}));const a=({customerId:i,apiKey:a,dataSource:c,flightOffer:s,isProd:d=!1})=>{const[m,h]=n(!1),p=((e,t=!1)=>{const n=t?"https://api.movmo.io":"https://e2e.api.movmo.io";return o.create({baseURL:n,headers:{Accept:"application/json","Content-Type":"application/json","x-api-key":e},withCredentials:!0,timeout:3e4})})(a,d),u=`\n px-7 py-5 \n font-inter font-semibold text-lg \n rounded-xl \n text-white \n border-none\n cursor-pointer\n transition-all duration-200\n outline-none focus:ring-2 focus:ring-[#F63D68] focus:ring-opacity-50\n ${m?"bg-gradient-hover":"bg-gradient-normal"}\n `.trim(),l="\n ml-2 px-2 py-1\n bg-white \n text-[#171412] \n rounded-md \n text-lg\n ".trim();return e("button",{onClick:async()=>{const e={dataSource:c,rawOffer:s},t=await(async(e,t)=>await t.post("/v1/flight_offers",e).then((e=>e.data.id)).catch((e=>null)))(e,p);if(!t)return;const n=new URLSearchParams({offerId:t,airlineRef:i}).toString();window.history.pushState({checkoutOpen:!0},"",`/movmo/checkout?${n}`),r(n)},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),className:u,children:["Express Checkout",t("span",{className:l,children:"Movmo"})]})};!function(){if("undefined"!=typeof document){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",e.rel="stylesheet",document.head.appendChild(e)}}();export{i as DataSource,a as MovmoCheckoutButton};
7
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import o from"axios";function i(e){if(document.getElementById("movmo-checkout"))return;const t=document.createElement("div");t.id="movmo-checkout",t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background: white;\n z-index: 9999;\n ",t.innerHTML=`\n <iframe \n src="https://booking.e2e.movmo.io/booking?${e}"\n width="100%" \n height="100%" \n style="border: none;">\n </iframe>\n `,document.body.appendChild(t)}window.addEventListener("popstate",(()=>{const e=document.getElementById("movmo-checkout");!window.history.state?.checkoutOpen&&e&&e.remove()})),window.addEventListener("DOMContentLoaded",(()=>{if(window.location.pathname.startsWith("/movmo/checkout")){const e=window.location.search.substring(1);window.history.replaceState({checkoutOpen:!0},"",window.location.href),i(e)}}));const r=({customerId:r,apiKey:a,dataSource:c,flightOffer:s,isProd:d=!1})=>{const[m,h]=n(!1),p=((e,t=!1)=>{const n=t?"https://api.movmo.io":"https://e2e.api.movmo.io";return o.create({baseURL:n,headers:{Accept:"application/json","Content-Type":"application/json","x-api-key":e},withCredentials:!0,timeout:3e4})})(a,d),u=`\n px-7 py-5 \n font-inter font-semibold text-lg \n rounded-xl \n text-white \n border-none\n cursor-pointer\n transition-all duration-200\n outline-none focus:ring-2 focus:ring-[#F63D68] focus:ring-opacity-50\n ${m?"bg-gradient-hover":"bg-gradient-normal"}\n `.trim(),l="\n ml-2 px-2 py-1\n bg-white \n text-[#171412] \n rounded-md \n text-lg\n ".trim();return e("button",{onClick:async()=>{const e={dataSource:c,rawOffer:s},t=await(async(e,t)=>await t.post("/v1/flight_offers",e).then((e=>e.data.id)).catch((e=>null)))(e,p);if(!t)return;const n=new URLSearchParams({offerId:t,airlineRef:r}).toString();window.history.pushState({checkoutOpen:!0},"",`/movmo/checkout?${n}`),i(n)},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),className:u,children:["Express Checkout",t("span",{className:l,children:"Movmo"})]})};!function(){if("undefined"!=typeof document){const e=document.createElement("link");e.href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap",e.rel="stylesheet",document.head.appendChild(e)}}();export{r as MovmoCheckoutButton};
8
8
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/api.ts","../src/MovmoCheckoutOverlay.tsx","../src/MovmoCheckoutButton.tsx","../src/index.ts"],"sourcesContent":[null,null,null,null],"names":["DataSource","showMovmoOverlay","queryParams","document","getElementById","container","createElement","id","style","cssText","innerHTML","body","appendChild","window","addEventListener","history","state","checkoutOpen","remove","location","pathname","startsWith","search","substring","replaceState","href","MovmoCheckoutButton","customerId","apiKey","dataSource","flightOffer","isProd","isHovered","setIsHovered","useState","client","baseUrl","axios","create","baseURL","headers","Accept","withCredentials","timeout","createAxiosClient","buttonClasses","trim","badgeClasses","_jsxs","onClick","async","payload","rawOffer","offerId","post","then","res","data","catch","err","saveFlightOffer","URLSearchParams","airlineRef","toString","pushState","onMouseEnter","onMouseLeave","className","children","_jsx","link","rel","head","loadInterFont"],"mappings":";;;;;;4GAqBYA,GAAZ,SAAYA,GACRA,EAAA,QAAA,SACH,CAFD,CAAYA,IAAAA,EAEX,CAAA,ICvBK,SAAUC,EAAiBC,GAC7B,GAAIC,SAASC,eAAe,kBAAmB,OAE/C,MAAMC,EAAYF,SAASG,cAAc,OACzCD,EAAUE,GAAK,iBACfF,EAAUG,MAAMC,QAAU,yKAU1BJ,EAAUK,UAAY,6EAE8BR,yHAOpDC,SAASQ,KAAKC,YAAYP,EAC9B,CAGAQ,OAAOC,iBAAiB,YAAY,KAChC,MAAMT,EAAYF,SAASC,eAAe,mBACrCS,OAAOE,QAAQC,OAAOC,cAAgBZ,GACvCA,EAAUa,YAKlBL,OAAOC,iBAAiB,oBAAoB,KAExC,GADoBD,OAAOM,SAASC,SAASC,WAAW,mBACvC,CACb,MAAMnB,EAAcW,OAAOM,SAASG,OAAOC,UAAU,GACrDV,OAAOE,QAAQS,aAAa,CAAEP,cAAc,GAAQ,GAAIJ,OAAOM,SAASM,MACxExB,EAAiBC,OC3BZ,MAAAwB,EAA0D,EACnEC,aACAC,SACAC,aACAC,cACAC,UAAS,MAET,MAAOC,EAAWC,GAAgBC,GAAS,GACrCC,EFnBuB,EAACP,EAAgBG,GAAkB,KAChE,MAAMK,EAAUL,EAAS,uBAAyB,2BAclD,OAZeM,EAAMC,OAAO,CACxBC,QAASH,EACTI,QAAS,CACLC,OAAQ,mBACR,eAAgB,mBAChB,YAAab,GAGjBc,iBAAiB,EACjBC,QAAS,KAGA,EEIEC,CAAkBhB,EAAQG,GAsBnCc,EAAgB,sRAShBb,EAAY,oBAAsB,6BACtCc,OAEIC,EAAe,mHAMnBD,OAEF,OACIE,EACI,SAAA,CAAAC,QA1CYC,UAChB,MAAMC,EAA8B,CAChCtB,aACAuB,SAAUtB,GAERuB,OFEiBH,OAAOC,EAA6BhB,UAClDA,EAAOmB,KAAK,oBAAqBH,GACzCI,MAAMC,GAAQA,EAAIC,KAAKlD,KACvBmD,OAAOC,GAEG,OEPWC,CAAgBT,EAAShB,GAC/C,IAAKkB,EAED,OAGJ,MAAMnD,EAAc,IAAI2D,gBAAgB,CACpCR,UACAS,WAAYnC,IACboC,WAEHlD,OAAOE,QAAQiD,UAAU,CAAE/C,cAAc,GAAQ,GAAI,mBAAmBf,KACxED,EAAiBC,EAAY,EA0BzB+D,aAAc,IAAMhC,GAAa,GACjCiC,aAAc,IAAMjC,GAAa,GACjCkC,UAAWtB,EAAauB,SAAA,CAAA,mBAGxBC,UAAMF,UAAWpB,EAEVqB,SAAA,YACF,GC3EjB,WACI,GAAwB,oBAAbjE,SAA0B,CACjC,MAAMmE,EAAOnE,SAASG,cAAc,QACpCgE,EAAK7C,KAAO,mFACZ6C,EAAKC,IAAM,aACXpE,SAASqE,KAAK5D,YAAY0D,GAElC,CAEAG"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/MovmoCheckoutOverlay.tsx","../src/MovmoCheckoutButton.tsx","../src/api.ts","../src/index.ts"],"sourcesContent":[null,null,null,null],"names":["showMovmoOverlay","queryParams","document","getElementById","container","createElement","id","style","cssText","innerHTML","body","appendChild","window","addEventListener","history","state","checkoutOpen","remove","location","pathname","startsWith","search","substring","replaceState","href","MovmoCheckoutButton","customerId","apiKey","dataSource","flightOffer","isProd","isHovered","setIsHovered","useState","client","baseUrl","axios","create","baseURL","headers","Accept","withCredentials","timeout","createAxiosClient","buttonClasses","trim","badgeClasses","_jsxs","onClick","async","payload","rawOffer","offerId","post","then","res","data","catch","err","saveFlightOffer","URLSearchParams","airlineRef","toString","pushState","onMouseEnter","onMouseLeave","className","children","_jsx","link","rel","head","loadInterFont"],"mappings":";;;;;;wGAAM,SAAUA,EAAiBC,GAC7B,GAAIC,SAASC,eAAe,kBAAmB,OAE/C,MAAMC,EAAYF,SAASG,cAAc,OACzCD,EAAUE,GAAK,iBACfF,EAAUG,MAAMC,QAAU,yKAU1BJ,EAAUK,UAAY,6EAE8BR,yHAOpDC,SAASQ,KAAKC,YAAYP,EAC9B,CAGAQ,OAAOC,iBAAiB,YAAY,KAChC,MAAMT,EAAYF,SAASC,eAAe,mBACrCS,OAAOE,QAAQC,OAAOC,cAAgBZ,GACvCA,EAAUa,YAKlBL,OAAOC,iBAAiB,oBAAoB,KAExC,GADoBD,OAAOM,SAASC,SAASC,WAAW,mBACvC,CACb,MAAMnB,EAAcW,OAAOM,SAASG,OAAOC,UAAU,GACrDV,OAAOE,QAAQS,aAAa,CAAEP,cAAc,GAAQ,GAAIJ,OAAOM,SAASM,MACxExB,EAAiBC,OC3BZ,MAAAwB,EAA0D,EACnEC,aACAC,SACAC,aACAC,cACAC,UAAS,MAET,MAAOC,EAAWC,GAAgBC,GAAS,GACrCC,ECnBuB,EAACP,EAAgBG,GAAkB,KAChE,MAAMK,EAAUL,EAAS,uBAAyB,2BAclD,OAZeM,EAAMC,OAAO,CACxBC,QAASH,EACTI,QAAS,CACLC,OAAQ,mBACR,eAAgB,mBAChB,YAAab,GAGjBc,iBAAiB,EACjBC,QAAS,KAGA,EDIEC,CAAkBhB,EAAQG,GAsBnCc,EAAgB,sRAShBb,EAAY,oBAAsB,6BACtCc,OAEIC,EAAe,mHAMnBD,OAEF,OACIE,EACI,SAAA,CAAAC,QA1CYC,UAChB,MAAMC,EAA8B,CAChCtB,aACAuB,SAAUtB,GAERuB,OCFiBH,OAAOC,EAA6BhB,UAClDA,EAAOmB,KAAK,oBAAqBH,GACzCI,MAAMC,GAAQA,EAAIC,KAAKlD,KACvBmD,OAAOC,GAEG,ODHWC,CAAgBT,EAAShB,GAC/C,IAAKkB,EAED,OAGJ,MAAMnD,EAAc,IAAI2D,gBAAgB,CACpCR,UACAS,WAAYnC,IACboC,WAEHlD,OAAOE,QAAQiD,UAAU,CAAE/C,cAAc,GAAQ,GAAI,mBAAmBf,KACxED,EAAiBC,EAAY,EA0BzB+D,aAAc,IAAMhC,GAAa,GACjCiC,aAAc,IAAMjC,GAAa,GACjCkC,UAAWtB,EAAauB,SAAA,CAAA,mBAGxBC,UAAMF,UAAWpB,EAEVqB,SAAA,YACF,GE3EjB,WACI,GAAwB,oBAAbjE,SAA0B,CACjC,MAAMmE,EAAOnE,SAASG,cAAc,QACpCgE,EAAK7C,KAAO,mFACZ6C,EAAKC,IAAM,aACXpE,SAASqE,KAAK5D,YAAY0D,GAElC,CAEAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movmo/express-checkout-button",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "React component plugin for embedding Movmo Express Checkout on airline websites.",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -79,4 +79,4 @@
79
79
  "url": "https://github.com/movmo-app/react-js-packages/issues"
80
80
  },
81
81
  "homepage": "https://github.com/movmo-app/react-js-packages/blob/main/packages/@movmo/express-checkout-button/README.md"
82
- }
82
+ }