@revolugo/elements 6.9.3-rc.0 → 6.9.4-rc.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/index.min.js CHANGED
@@ -16,5 +16,5 @@ You may use any valid ISO Alpha-2 country code, e.g. JP`,name:"source-market",op
16
16
  <p>**HotelOfferSearchMenu**: Display the search menu at the top of the component,</p>
17
17
  <p>**TermsAndConditionsFooter**: Display the terms and conditions footer at the bottom of the component,</p>
18
18
  <p><ins>**HotelOfferItem**:</ins></p>
19
- <div style="padding-left: 20px">${zi}</div>`,em={...Pi,features:{control:{type:"object"},description:`<p>This object controls which features are enabled/disabled within the component. Set to true to enable a feature, false to disable it.</p> <p>***Available features***:</p> <div>${Qg}</div>`,name:"features",table:{defaultValue:{summary:JSON.stringify(cn,null,4)}}},height:{control:{type:"text"},description:"Height of the hotel offer list component expressed in any valid CSS unit (px, %, em, rem, vh, vw, etc.)",name:"height",table:{defaultValue:{summary:"600px"}}},hotelOfferRequestId:{control:{type:"text"},description:"id of a previously created **Hotel Offer Request**.<br />When provided, the combination of **adult-count/check-in-date/check-out-date/latitude/longitude** props takes precedence over any provided **hotel-offer-request-id** and a new **hotel-offer-request-id** will be created.",name:"hotel-offer-request-id",table:{defaultValue:{summary:"undefined"}}},limit:{control:{type:"number"},description:"Limit the number of Hotel Offers returned. Limit can range between 1 and 100.",table:{defaultValue:{summary:_e.toString()}}}},aa={LocationInput:!0,SearchAreaButton:!0,HotelOfferItem:{...ea,[de.HotelDescriptionViewDialog]:!1,[de.HotelRoomOffersViewDialog]:!1,[de.RoomsDetails]:!0}},am={...Mi,features:aa,height:"500px",isLoadingBarEnabled:!0,limit:_e,markers:[{icon:"tower-cell",latitude:48.8584,longitude:2.2945,pulse:!1,size:80,tooltip:"La tour Eiffel"},{imgUrl:"https://via.placeholder.com/500",latitude:48.8606,longitude:2.3376},{latitude:48.8421,longitude:2.322}],venue:{imgUrl:"https://via.placeholder.com/500",latitude:48.8508305,longitude:2.2844643,size:70,tooltip:"Venue tooltip"}},nm=`<p>**FiltersMenu**: Display the filters bar at the top of the component,</p> <p>**LocationInput**: Display the location input at the top of the component,</p> <p>**SearchAreaButton**: Display the search area button at the top of the component,</p> <p><ins> **HotelOfferItem**:</ins></p> <div style="margin-left: 20px;">${zi}</div>`,rm={...Pi,features:{control:{type:"object"},description:`<p>This object controls which features are enabled/disabled within the component. Set to true to enable a feature, false to disable it.</p> <p>***Available features***:</p> <div>${nm}</div>`,name:"features",table:{defaultValue:{summary:JSON.stringify(aa,null,2)}}},height:{control:{type:"text"},description:"Height of the map component. Can be any valid css size, e.g. `500px` or `100%`. If not specified, the map will take the full height of its container, if specified.",name:"height",table:{defaultValue:{summary:"undefined"}}},limit:{control:{type:"number"},description:"Limit the number of Hotel Offers returned. Limit can range between 1 and 100.",table:{defaultValue:{summary:_e.toString()}}},markers:{control:{type:"object"},description:"Array of markers if you want to highlight special places around the event. Required prop: <b>lat, lng</b>",table:{defaultValue:{summary:"[]"}}},venue:{control:{type:"object"},description:"Venue object to display a marker for the venue. Required prop: <b>lat, lng</b>",name:"venue",table:{defaultValue:{summary:"undefined"}}}},Ni={HotelSearchBar:!0,PreferencesMenu:!0,HotelOfferList:cn,HotelOffersMap:aa};({...ue(qg,["rounded"]),...ue(am,["height"])},{...ue(em,["limit","rounded"]),...ue(rm,["height","withFilters"]),features:JSON.stringify(Ni,null,2)});const Ke={BookingDetails:!0},wi={adultCount:2,bookingPolicyId:"df6f894b-201a-4dc2-b39e-5c8cc31068a0",checkInDate:W().subtract(-4,"days").format("YYYY-MM-DD"),checkOutDate:W().subtract(-5,"days").format("YYYY-MM-DD"),emailAddress:"john.doe@example.com",features:Ke,firstName:"John",hotelRoomOffer:void 0,lastName:"Doe",metadata:{},nationality:"FR",paymentMethods:Ze.CreditCard,phoneCountry:"FR",phoneNumber:"0102030405",roomCount:1,salutation:$n.Mr,specialRequests:""},im="<p>**BookingDetails**: Display the booking details in the sidebar.</p>",Ri={adultCount:{control:{type:"number"},description:'<span style="color: red;">Required.</span> Number of adults',name:"adult-count",table:{defaultValue:{summary:"undefined"}}},bookingPolicyId:{control:{type:"text"},description:'<span style="color: red;">Required.</span> Booking policy id',name:"booking-policy-id",table:{defaultValue:{summary:"undefined"}}},emailAddress:{control:{type:"text"},description:'<span style="color: red;">Required.</span> Email address',name:"email-address",table:{defaultValue:{summary:"undefined"}}},features:{control:{type:"object"},description:`This object controls which features are enabled/disabled within the component. Set to true to enable a feature, false to disable it. <br /> ***Available features***: <br /> ${im}`,name:"features",table:{defaultValue:{summary:JSON.stringify(Ke,null,2)}}},firstName:{control:{type:"text"},description:'<span style="color: red;">Required.</span> First name',name:"first-name",table:{defaultValue:{summary:"undefined"}}},lastName:{control:{type:"text"},description:'<span style="color: red;">Required.</span> Last name',name:"last-name",table:{defaultValue:{summary:"undefined"}}},metadata:{control:{type:"object"},description:'If you want to attach some metadata of your choice to the booking (e.g.: a customer id or an order id from your system), you need to pass them as attributes of the component with the name starting with "metadata-". The component will build a "metadata" object based on those attributes that will be sent to the API.',table:{defaultValue:{summary:"undefined"}}},nationality:{control:{type:"select"},description:'<span style="color: red;">Required.</span> The status of being a legal citizen of a country',options:Object.keys(ra),table:{defaultValue:{summary:"undefined"}}},paymentMethods:{control:{type:"select"},description:`Specific payment methods used to setup the booking. If not provided, deposit account will be used. <br />**Available payment methods**:<pre>${Object.values(Ze).map(e=>`<code><b>${e}</b></code>`).join(" ")}</pre>`,name:"payment-methods",options:Object.values(Ze),table:{defaultValue:{summary:"undefined"}}},phoneCountry:{control:{type:"select"},description:'<span style="color: red;">Required.</span> Phone country',name:"phone-country",options:Object.keys(ra),table:{defaultValue:{summary:"undefined"}}},phoneNumber:{control:{type:"text"},description:'<span style="color: red;">Required.</span> Phone number',name:"phone-number",table:{defaultValue:{summary:"undefined"}}},salutation:{control:{type:"select"},description:"Salutation",options:Object.values($n),table:{defaultValue:{summary:"undefined"}}},specialRequests:{control:{type:"text"},description:"Special requests",name:"special-requests",table:{defaultValue:{summary:"undefined"}}}},om={CreditCardPayment:Ai,HotelOffersView:ti(Ni,{HotelOfferList:{HotelOfferItem:{...ea,[de.HotelRoomOfferList]:!0,[de.HotelRoomOffersViewDialog]:!0,[de.RoomsDetails]:!0}},HotelOffersMap:ti(aa,{HotelOfferItem:{...ea,[de.HotelRoomOffersViewDialog]:!0,[de.RoomsDetails]:!0}})}),PrebookForm:Ke};({...wi},{...Ri,features:JSON.stringify(om,null,2)});const Ti={PreferencesMenu:!1};JSON.stringify(Ti,null,2);const Bi=vi()?W("2050-01-01"):W();Bi.subtract(-4,"days").format("YYYY-MM-DD"),Bi.subtract(-5,"days").format("YYYY-MM-DD"),Array.from({length:30},(e,a)=>a+1),Array.from({length:30},(e,a)=>a+1);const un={OnlyMatchingRoomCount:!1};JSON.stringify(un,null,2);const Ei={HotelDescriptionView:Ti,HotelRoomOfferList:un};JSON.stringify(Ei,null,2);const tm={HotelRoomOffersView:Ei,PrebookForm:Ke};({...ue(wi,["bookingId","bookingPolicyId","hotelRoomOffer"])},{...ue(Ri,["bookingId","bookingPolicyId","hotelRoomOffer"]),features:JSON.stringify(tm,null,2)});var Li=(e=>(e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e))(Li||{});Li.Bottom;const Gi={adultCount:{required:!0,type:Number},bookingId:{type:String},bookingPolicyId:{required:!0,type:String},checkInDate:{required:!0,type:String},checkOutDate:{required:!0,type:String},emailAddress:{default:"",type:String},features:{default:()=>Ke,type:[Object,String]},firstName:{default:"",type:String},hotelRoomOffer:{type:Object},lastName:{default:"",type:String},nationality:{default:"",type:String},organizationAddress:{default:"",type:String},organizationCity:{default:"",type:String},organizationCountry:{default:"",type:String},organizationName:{default:"",type:String},organizationState:{default:"",type:String},organizationVatNumber:{default:"",type:String},organizationZipCode:{default:"",type:String},paymentMethods:{default:Ze.CreditCard,type:String},phoneCountry:{default:"FR",type:String},phoneNumber:{default:"",type:String},roomCount:{required:!0,type:Number},salutation:{default:"",type:String},specialRequests:{default:"",type:String}};({...ue(Gi,["bookingId"])});const sm={adultCount:{required:!0,type:Number},checkInDate:{required:!0,type:String},checkOutDate:{required:!0,type:String},children:{default:null,type:String},hotelId:{required:!0,type:String},hotelRoomOfferRequestId:{type:String},roomCount:{required:!0,type:Number},sourceMarket:{required:!0,type:String}},lm={...sm,features:{default:()=>un,type:[Object,String]},limit:{default:()=>0,type:Number}};({...ue(lm,"features")},{...ue(Gi,["bookingId","bookingPolicyId","hotelRoomOffer"])});var Ue=(e=>(e.Price="price",e.Rating="rating",e.ReviewRating="review_rating",e.SortBy="sort_by",e))(Ue||{});Array.from({length:40}).map(()=>Math.floor(Math.random()*11)),Ue.Rating+"",Ue.ReviewRating+"",Ue.Price+"",Ue.SortBy+"";const cm=e=>{window.RevolugoElements={...window.RevolugoElements,ready:r=>{const u=window.RevolugoElements?._ready;window.RevolugoElements._ready=()=>{u&&u(),r()}}};const a=document.createElement("script");a.src=e,a.type="module",a.async=!1;const[n]=document.querySelectorAll("script");return n?n?.parentNode?.insertBefore(a,n):document.head.append(a),a};(e=>{const a="https://cdn.jsdelivr.net/npm/@revolugo/elements@rc/dist/revolugo.min.js".replace("%V","6.9.3"),n=[...document.querySelectorAll("script")].find(r=>r.src.includes(a));return new Promise(r=>{if(n){r(!0);return}cm(a).addEventListener("load",()=>{r(!0)})})})().catch(e=>console.error(e))});
19
+ <div style="padding-left: 20px">${zi}</div>`,em={...Pi,features:{control:{type:"object"},description:`<p>This object controls which features are enabled/disabled within the component. Set to true to enable a feature, false to disable it.</p> <p>***Available features***:</p> <div>${Qg}</div>`,name:"features",table:{defaultValue:{summary:JSON.stringify(cn,null,4)}}},height:{control:{type:"text"},description:"Height of the hotel offer list component expressed in any valid CSS unit (px, %, em, rem, vh, vw, etc.)",name:"height",table:{defaultValue:{summary:"600px"}}},hotelOfferRequestId:{control:{type:"text"},description:"id of a previously created **Hotel Offer Request**.<br />When provided, the combination of **adult-count/check-in-date/check-out-date/latitude/longitude** props takes precedence over any provided **hotel-offer-request-id** and a new **hotel-offer-request-id** will be created.",name:"hotel-offer-request-id",table:{defaultValue:{summary:"undefined"}}},limit:{control:{type:"number"},description:"Limit the number of Hotel Offers returned. Limit can range between 1 and 100.",table:{defaultValue:{summary:_e.toString()}}}},aa={LocationInput:!0,SearchAreaButton:!0,HotelOfferItem:{...ea,[de.HotelDescriptionViewDialog]:!1,[de.HotelRoomOffersViewDialog]:!1,[de.RoomsDetails]:!0}},am={...Mi,features:aa,height:"500px",isLoadingBarEnabled:!0,limit:_e,markers:[{icon:"tower-cell",latitude:48.8584,longitude:2.2945,pulse:!1,size:80,tooltip:"La tour Eiffel"},{imgUrl:"https://via.placeholder.com/500",latitude:48.8606,longitude:2.3376},{latitude:48.8421,longitude:2.322}],venue:{imgUrl:"https://via.placeholder.com/500",latitude:48.8508305,longitude:2.2844643,size:70,tooltip:"Venue tooltip"}},nm=`<p>**FiltersMenu**: Display the filters bar at the top of the component,</p> <p>**LocationInput**: Display the location input at the top of the component,</p> <p>**SearchAreaButton**: Display the search area button at the top of the component,</p> <p><ins> **HotelOfferItem**:</ins></p> <div style="margin-left: 20px;">${zi}</div>`,rm={...Pi,features:{control:{type:"object"},description:`<p>This object controls which features are enabled/disabled within the component. Set to true to enable a feature, false to disable it.</p> <p>***Available features***:</p> <div>${nm}</div>`,name:"features",table:{defaultValue:{summary:JSON.stringify(aa,null,2)}}},height:{control:{type:"text"},description:"Height of the map component. Can be any valid css size, e.g. `500px` or `100%`. If not specified, the map will take the full height of its container, if specified.",name:"height",table:{defaultValue:{summary:"undefined"}}},limit:{control:{type:"number"},description:"Limit the number of Hotel Offers returned. Limit can range between 1 and 100.",table:{defaultValue:{summary:_e.toString()}}},markers:{control:{type:"object"},description:"Array of markers if you want to highlight special places around the event. Required prop: <b>lat, lng</b>",table:{defaultValue:{summary:"[]"}}},venue:{control:{type:"object"},description:"Venue object to display a marker for the venue. Required prop: <b>lat, lng</b>",name:"venue",table:{defaultValue:{summary:"undefined"}}}},Ni={HotelSearchBar:!0,PreferencesMenu:!0,HotelOfferList:cn,HotelOffersMap:aa};({...ue(qg,["rounded"]),...ue(am,["height"])},{...ue(em,["limit","rounded"]),...ue(rm,["height","withFilters"]),features:JSON.stringify(Ni,null,2)});const Ke={BookingDetails:!0},wi={adultCount:2,bookingPolicyId:"df6f894b-201a-4dc2-b39e-5c8cc31068a0",checkInDate:W().subtract(-4,"days").format("YYYY-MM-DD"),checkOutDate:W().subtract(-5,"days").format("YYYY-MM-DD"),emailAddress:"john.doe@example.com",features:Ke,firstName:"John",hotelRoomOffer:void 0,lastName:"Doe",metadata:{},nationality:"FR",paymentMethods:Ze.CreditCard,phoneCountry:"FR",phoneNumber:"0102030405",roomCount:1,salutation:$n.Mr,specialRequests:""},im="<p>**BookingDetails**: Display the booking details in the sidebar.</p>",Ri={adultCount:{control:{type:"number"},description:'<span style="color: red;">Required.</span> Number of adults',name:"adult-count",table:{defaultValue:{summary:"undefined"}}},bookingPolicyId:{control:{type:"text"},description:'<span style="color: red;">Required.</span> Booking policy id',name:"booking-policy-id",table:{defaultValue:{summary:"undefined"}}},emailAddress:{control:{type:"text"},description:'<span style="color: red;">Required.</span> Email address',name:"email-address",table:{defaultValue:{summary:"undefined"}}},features:{control:{type:"object"},description:`This object controls which features are enabled/disabled within the component. Set to true to enable a feature, false to disable it. <br /> ***Available features***: <br /> ${im}`,name:"features",table:{defaultValue:{summary:JSON.stringify(Ke,null,2)}}},firstName:{control:{type:"text"},description:'<span style="color: red;">Required.</span> First name',name:"first-name",table:{defaultValue:{summary:"undefined"}}},lastName:{control:{type:"text"},description:'<span style="color: red;">Required.</span> Last name',name:"last-name",table:{defaultValue:{summary:"undefined"}}},metadata:{control:{type:"object"},description:'If you want to attach some metadata of your choice to the booking (e.g.: a customer id or an order id from your system), you need to pass them as attributes of the component with the name starting with "metadata-". The component will build a "metadata" object based on those attributes that will be sent to the API.',table:{defaultValue:{summary:"undefined"}}},nationality:{control:{type:"select"},description:'<span style="color: red;">Required.</span> The status of being a legal citizen of a country',options:Object.keys(ra),table:{defaultValue:{summary:"undefined"}}},paymentMethods:{control:{type:"select"},description:`Specific payment methods used to setup the booking. If not provided, deposit account will be used. <br />**Available payment methods**:<pre>${Object.values(Ze).map(e=>`<code><b>${e}</b></code>`).join(" ")}</pre>`,name:"payment-methods",options:Object.values(Ze),table:{defaultValue:{summary:"undefined"}}},phoneCountry:{control:{type:"select"},description:'<span style="color: red;">Required.</span> Phone country',name:"phone-country",options:Object.keys(ra),table:{defaultValue:{summary:"undefined"}}},phoneNumber:{control:{type:"text"},description:'<span style="color: red;">Required.</span> Phone number',name:"phone-number",table:{defaultValue:{summary:"undefined"}}},salutation:{control:{type:"select"},description:"Salutation",options:Object.values($n),table:{defaultValue:{summary:"undefined"}}},specialRequests:{control:{type:"text"},description:"Special requests",name:"special-requests",table:{defaultValue:{summary:"undefined"}}}},om={CreditCardPayment:Ai,HotelOffersView:ti(Ni,{HotelOfferList:{HotelOfferItem:{...ea,[de.HotelRoomOfferList]:!0,[de.HotelRoomOffersViewDialog]:!0,[de.RoomsDetails]:!0}},HotelOffersMap:ti(aa,{HotelOfferItem:{...ea,[de.HotelRoomOffersViewDialog]:!0,[de.RoomsDetails]:!0}})}),PrebookForm:Ke};({...wi},{...Ri,features:JSON.stringify(om,null,2)});const Ti={PreferencesMenu:!1};JSON.stringify(Ti,null,2);const Bi=vi()?W("2050-01-01"):W();Bi.subtract(-4,"days").format("YYYY-MM-DD"),Bi.subtract(-5,"days").format("YYYY-MM-DD"),Array.from({length:30},(e,a)=>a+1),Array.from({length:30},(e,a)=>a+1);const un={OnlyMatchingRoomCount:!1};JSON.stringify(un,null,2);const Ei={HotelDescriptionView:Ti,HotelRoomOfferList:un};JSON.stringify(Ei,null,2);const tm={HotelRoomOffersView:Ei,PrebookForm:Ke};({...ue(wi,["bookingId","bookingPolicyId","hotelRoomOffer"])},{...ue(Ri,["bookingId","bookingPolicyId","hotelRoomOffer"]),features:JSON.stringify(tm,null,2)});var Li=(e=>(e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e))(Li||{});Li.Bottom;const Gi={adultCount:{required:!0,type:Number},bookingId:{type:String},bookingPolicyId:{required:!0,type:String},checkInDate:{required:!0,type:String},checkOutDate:{required:!0,type:String},emailAddress:{default:"",type:String},features:{default:()=>Ke,type:[Object,String]},firstName:{default:"",type:String},hotelRoomOffer:{type:Object},lastName:{default:"",type:String},nationality:{default:"",type:String},organizationAddress:{default:"",type:String},organizationCity:{default:"",type:String},organizationCountry:{default:"",type:String},organizationName:{default:"",type:String},organizationState:{default:"",type:String},organizationVatNumber:{default:"",type:String},organizationZipCode:{default:"",type:String},paymentMethods:{default:Ze.CreditCard,type:String},phoneCountry:{default:"FR",type:String},phoneNumber:{default:"",type:String},roomCount:{required:!0,type:Number},salutation:{default:"",type:String},specialRequests:{default:"",type:String}};({...ue(Gi,["bookingId"])});const sm={adultCount:{required:!0,type:Number},checkInDate:{required:!0,type:String},checkOutDate:{required:!0,type:String},children:{default:null,type:String},hotelId:{required:!0,type:String},hotelRoomOfferRequestId:{type:String},roomCount:{required:!0,type:Number},sourceMarket:{required:!0,type:String}},lm={...sm,features:{default:()=>un,type:[Object,String]},limit:{default:()=>0,type:Number}};({...ue(lm,"features")},{...ue(Gi,["bookingId","bookingPolicyId","hotelRoomOffer"])});var Ue=(e=>(e.Price="price",e.Rating="rating",e.ReviewRating="review_rating",e.SortBy="sort_by",e))(Ue||{});Array.from({length:40}).map(()=>Math.floor(Math.random()*11)),Ue.Rating+"",Ue.ReviewRating+"",Ue.Price+"",Ue.SortBy+"";const cm=e=>{window.RevolugoElements={...window.RevolugoElements,ready:r=>{const u=window.RevolugoElements?._ready;window.RevolugoElements._ready=()=>{u&&u(),r()}}};const a=document.createElement("script");a.src=e,a.type="module",a.async=!1;const[n]=document.querySelectorAll("script");return n?n?.parentNode?.insertBefore(a,n):document.head.append(a),a};(e=>{const a="https://cdn.jsdelivr.net/npm/@revolugo/elements@rc/dist/revolugo.min.js".replace("%V","6.9.4"),n=[...document.querySelectorAll("script")].find(r=>r.src.includes(a));return new Promise(r=>{if(n){r(!0);return}cm(a).addEventListener("load",()=>{r(!0)})})})().catch(e=>console.error(e))});
20
20
  //# sourceMappingURL=index.min.js.map