@roomstay/frontend 2.3.0 → 2.3.1

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.
Files changed (27) hide show
  1. package/dist/370.bundle.js +1 -1
  2. package/dist/main.bundle.js +1 -1
  3. package/dist/src/components/summary/BESummaryPrivacyPolicy.js +4 -5
  4. package/dist/src/components/summary/BESummaryPrivacyPolicy.js.map +1 -1
  5. package/dist/src/hooks/CurrentHotelHook.d.ts +5 -0
  6. package/dist/src/hooks/CurrentHotelHook.js +37 -30
  7. package/dist/src/hooks/CurrentHotelHook.js.map +1 -1
  8. package/dist/src/translations/languages/en-gb.js +1 -1
  9. package/dist/src/translations/languages/en-gb.js.map +1 -1
  10. package/dist/test.bundle.js +1 -1
  11. package/dist/tests/offline/entry/OfflineEngineDefaults.js +11 -6
  12. package/dist/tests/offline/entry/OfflineEngineDefaults.js.map +1 -1
  13. package/dist/tests/offline/entry/OfflineEngineWrapper.js +5 -60
  14. package/dist/tests/offline/entry/OfflineEngineWrapper.js.map +1 -1
  15. package/dist/tests/offline/entry/components/RoomstayDemoNavbar/index.d.ts +3 -0
  16. package/dist/tests/offline/entry/components/RoomstayDemoNavbar/index.js +17 -0
  17. package/dist/tests/offline/entry/components/RoomstayDemoNavbar/index.js.map +1 -0
  18. package/dist/tests/offline/entry/components/TestPicker.js +83 -57
  19. package/dist/tests/offline/entry/components/TestPicker.js.map +1 -1
  20. package/dist/tests/offline/entry/pages/{Inline → BookingWizard}/index.d.ts +1 -1
  21. package/dist/tests/offline/entry/pages/BookingWizard/index.js +73 -0
  22. package/dist/tests/offline/entry/pages/BookingWizard/index.js.map +1 -0
  23. package/dist/tests/offline/entry/pages/RoomRate/index.d.ts +4 -0
  24. package/dist/tests/offline/entry/pages/{Inline → RoomRate}/index.js +5 -8
  25. package/dist/tests/offline/entry/pages/RoomRate/index.js.map +1 -0
  26. package/package.json +1 -1
  27. package/dist/tests/offline/entry/pages/Inline/index.js.map +0 -1
@@ -1 +1 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[370],{370:function(e,t,l){l.r(t),l.d(t,{default:function(){return W}});var r=l(885),a=l(7294),n=l(584),o=l(7754),c=l(8886),m=l(3010),i=l(9605),s=l(858),u=l(6793),d=l(9478),p=l(292),y=l(4942),E=l(5128),f=l(9874),g=l(4394),v=l(195),b=l(783),h=l(6401),P=l(4826),Z=l(513),D=l(360),N=l(3261),S=l(4854),k=l(3727),C=l(1657),G=l(3933),O=l(7688);function x(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),l.push.apply(l,r)}return l}function w(e){var t,l,p,w,I=(0,a.useContext)(D.hy),M=(0,O.WP)().hotel,W=I.getAllValidRows(),A=I.basketAddonRows,j=(0,u.$)().t,R=(0,a.useState)({}),T=(0,r.Z)(R,2),z=T[0],B=T[1];(0,a.useEffect)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?x(Object(l),!0).forEach((function(t){(0,y.Z)(e,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):x(Object(l)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))}))}return e}({},G.B);e.TransportDistanceBlock.component=a.createElement("div",{className:"u-flex justify-content-center u-marg-top u-marg-bottom"},a.createElement("div",{className:"col-10 u-flex flex-row"},a.createElement(P.Z,{vertical:!0,hotel:M}))),e.PerksBlock.component=a.createElement(h.v,{size:"mobile"}),B(e)}),[]);var F=(0,O.Q$)(z).sortedComponents,$=I.endDate?I.endDate.diff(I.startDate,"day"):0,U=[null==M||null===(t=M.address)||void 0===t?void 0:t.line1,null==M||null===(l=M.address)||void 0===l?void 0:l.city],V=[null==M||null===(p=M.address)||void 0===p?void 0:p.postalCode,null==M||null===(w=M.address)||void 0===w?void 0:w.state],K=function(e){var t=e.filter((function(e){return!!e&&"0"!==e})).join(", ");return t?a.createElement(n.ZP,{type:n.yG.Small},t):null},L=function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)};return a.createElement(E.Z,{open:e.isOpen,title:j(d.W.Misc.Summary),onClose:function(){return e.onClose?e.onClose():null},mobileFooter:a.createElement("div",{className:"row align-items-center"},a.createElement("div",{className:"col-4"},a.createElement(n.ZP,{type:n.yG.Body},j(d.W.Misc.Total)),a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Accent},a.createElement("strong",null,N.Z.pluralWithDictAndCount($,d.W.Misc.Night,j)))),a.createElement("div",{className:"col-8 u-flex u-flex-direction-column align-items-end"},a.createElement(m.Z,{bold:!0,size:"normal",align:i.P.Right},a.createElement(s.Z,null,I.getTotalPrice())),a.createElement(n.ZP,{color:o.Il.DarkGrey,type:n.yG.Small,align:i.P.Right},a.createElement("span",{className:"u-nowrap"},j(d.W.Step.Room.RoomInfo.IncludesTaxes)))))},a.createElement(a.Fragment,null,a.createElement("div",{className:"container"},a.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},a.createElement("div",{className:"col-6"},a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Grey},a.createElement("strong",null,j(d.W.Misc.CheckIn))),a.createElement(n.ZP,{type:n.yG.Small},j(d.W.Misc.After)," ",null==M?void 0:M.checkInTime)),a.createElement("div",{className:"col-6"},a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Grey},a.createElement("strong",null,j(d.W.Misc.CheckOut))),a.createElement(n.ZP,{type:n.yG.Small},j(d.W.Misc.Before)," ",null==M?void 0:M.checkOutTime))),a.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},a.createElement("div",{className:"col-8"},a.createElement("div",{className:"u-flex u-flex-flex-start"},a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",I.startDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},I.startDate?I.startDate.format("ddd, MMM D"):j(d.W.Step.Date.Arrival))),a.createElement("span",{className:"u-marg-left-right--light"},a.createElement(c.ZP,{icon:c.Tu.ArrowRight2,size:"18px",color:o.Il.DarkGrey})),a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",I.endDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},I.endDate?I.endDate.format("ddd, MMM D"):j(d.W.Step.Date.Departure)))),a.createElement(n.ZP,{type:n.yG.Small},I.getNumberOfAdults(!0),", ",I.getNumberOfChildren(!0),", ",I.getNumberOfRooms(!0))),a.createElement("div",{className:"col-4 u-align-right"},a.createElement(k.rU,{to:(0,C.Z)().getStepUrl()},a.createElement(S.Z,{onClick:function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)},size:"tiny"},j(d.W.Misc.Edit).toUpperCase())))),W&&W.length?a.createElement(a.Fragment,null,W.map((function(t,l){if(t.isValid())return a.createElement(v.Z,{row:t,index:l,key:t.getID(),showImages:!!e.showImages,onEditPropertyClicked:L})})),A.length>0&&a.createElement(a.Fragment,null,a.createElement(f.Z,{noMargins:!0,darker:!0}),a.createElement("div",{className:"u-marg-top"},a.createElement(n.ZP,{type:n.yG.Label,color:o.Il.DarkGrey},a.createElement("strong",null,"Add-on Items"))),A.map((function(e,t){return a.createElement(b.Z,{row:e,key:e.getID(),onRemoveClick:function(){return I.removeBasketAddonRow(e)}})})))):a.createElement("div",{className:"u-marg-bottom--heavy u-marg-top--heavy"},a.createElement("div",{className:"u-marg-bottom--heavy"},a.createElement(n.ZP,{type:n.yG.Body},j(d.W.Step.General.YourCartIsEmpty))),a.createElement("div",{style:{height:"150px",position:"relative"}},a.createElement(g.Z,null)),a.createElement("div",{className:"u-marg-top"},a.createElement("div",{className:"u-marg-bottom"},a.createElement(n.ZP,{bold:!0},null==M?void 0:M.name)),K(U),K(V))),F,a.createElement("div",{className:"u-marg-top--heavy u-marg-bottom--heavy"},a.createElement(Z.Z,null)))))}var I=l(1069),M=l(6061);function W(){var e=(0,a.useContext)(D.g7).screenSize,t=(0,a.useContext)(D.aN).currentStep,l=a.useContext(D.hy),y=(0,u.$)().t,E=(0,a.useState)(!1),f=(0,r.Z)(E,2),g=f[0],v=f[1];return e<=p.Z.Medium?a.createElement(a.Fragment,null,a.createElement("div",{className:"be-mobile-summary row u-border-bottom u-pad-top-bottom u-marg-bottom",onClick:function(){v(!0)}},a.createElement("div",{className:"col-8"},a.createElement("div",{className:"u-flex u-flex-flex-start"},a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",l.startDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},l.startDate?l.startDate.format("ddd, MMM D"):y(d.W.Step.Date.Arrival))),a.createElement("span",{className:"u-marg-left-right--light"},a.createElement(c.ZP,{icon:c.Tu.ArrowRight2,size:"18px",color:o.Il.DarkGrey})),a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",l.endDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},l.endDate?l.endDate.format("ddd, MMM D"):y(d.W.Step.Date.Departure)))),a.createElement(n.ZP,{type:n.yG.Small},l.getNumberOfAdults(!0),", ",l.getNumberOfChildren(!0),", ",l.getNumberOfRooms(!0))),a.createElement("div",{className:"col-4 u-flex u-flex-flex-end u-flex-align-center"},a.createElement(m.Z,{bold:!0,size:"normal",align:i.P.Right},t===M.Z?a.createElement(I.Z,{isMobile:!0}):a.createElement(s.Z,null,l.getTotalPrice())),a.createElement(c.ZP,{icon:c.Tu.Dropdown,size:"18px",color:o.Il.DarkGrey}))),a.createElement(w,{isOpen:g,onClose:function(){v(!1)}})):a.createElement(a.Fragment,null)}},513:function(e,t,l){l.d(t,{Z:function(){return s}});var r=l(7294),a=l(7754),n=l(584),o=l(7688),c=l(6793),m=l(9116),i=l(9478);function s(){var e=(0,o.WP)().hotel,t=(0,c.$)().t;return r.createElement("div",{className:"summary-privacy-policy"},r.createElement(n.ZP,{type:n.yG.Body},r.createElement("strong",null,t(i.W.Step.Confirmation.PrivacyPolicy))),r.createElement(n.ZP,{className:"u-marg-top--light",type:n.yG.Small,color:a.Il.DarkGrey},r.createElement(m.c,{i18nKey:i.W.Step.Confirmation.PrivacyPolicyDetail,components:[r.createElement("a",{key:0,href:null==e?void 0:e.policies,target:"_blank",style:{color:"var(--rs-color-accent-1)"},rel:"noreferrer"})]})))}}}]);
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkroomstay=("undefined"!=typeof self?self:this).webpackChunkroomstay||[]).push([[370],{370:function(e,t,l){l.r(t),l.d(t,{default:function(){return W}});var r=l(885),a=l(7294),n=l(584),o=l(7754),c=l(8886),m=l(3010),s=l(9605),i=l(858),u=l(6793),d=l(9478),p=l(292),y=l(4942),E=l(5128),f=l(9874),g=l(4394),v=l(195),b=l(783),h=l(6401),P=l(4826),Z=l(513),D=l(360),N=l(3261),S=l(4854),k=l(3727),C=l(1657),G=l(3933),O=l(7688);function x(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),l.push.apply(l,r)}return l}function w(e){var t,l,p,w,I=(0,a.useContext)(D.hy),M=(0,O.WP)().hotel,W=I.getAllValidRows(),A=I.basketAddonRows,j=(0,u.$)().t,R=(0,a.useState)({}),T=(0,r.Z)(R,2),z=T[0],B=T[1];(0,a.useEffect)((function(){var e=function(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};t%2?x(Object(l),!0).forEach((function(t){(0,y.Z)(e,t,l[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):x(Object(l)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))}))}return e}({},G.B);e.TransportDistanceBlock.component=a.createElement("div",{className:"u-flex justify-content-center u-marg-top u-marg-bottom"},a.createElement("div",{className:"col-10 u-flex flex-row"},a.createElement(P.Z,{vertical:!0,hotel:M}))),e.PerksBlock.component=a.createElement(h.v,{size:"mobile"}),B(e)}),[]);var F=(0,O.Q$)(z).sortedComponents,$=I.endDate?I.endDate.diff(I.startDate,"day"):0,U=[null==M||null===(t=M.address)||void 0===t?void 0:t.line1,null==M||null===(l=M.address)||void 0===l?void 0:l.city],Q=[null==M||null===(p=M.address)||void 0===p?void 0:p.postalCode,null==M||null===(w=M.address)||void 0===w?void 0:w.state],V=function(e){var t=e.filter((function(e){return!!e&&"0"!==e})).join(", ");return t?a.createElement(n.ZP,{type:n.yG.Small},t):null},K=function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)};return a.createElement(E.Z,{open:e.isOpen,title:j(d.W.Misc.Summary),onClose:function(){return e.onClose?e.onClose():null},mobileFooter:a.createElement("div",{className:"row align-items-center"},a.createElement("div",{className:"col-4"},a.createElement(n.ZP,{type:n.yG.Body},j(d.W.Misc.Total)),a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Accent},a.createElement("strong",null,N.Z.pluralWithDictAndCount($,d.W.Misc.Night,j)))),a.createElement("div",{className:"col-8 u-flex u-flex-direction-column align-items-end"},a.createElement(m.Z,{bold:!0,size:"normal",align:s.P.Right},a.createElement(i.Z,null,I.getTotalPrice())),a.createElement(n.ZP,{color:o.Il.DarkGrey,type:n.yG.Small,align:s.P.Right},a.createElement("span",{className:"u-nowrap"},j(d.W.Step.Room.RoomInfo.IncludesTaxes)))))},a.createElement(a.Fragment,null,a.createElement("div",{className:"container"},a.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},a.createElement("div",{className:"col-6"},a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Grey},a.createElement("strong",null,j(d.W.Misc.CheckIn))),a.createElement(n.ZP,{type:n.yG.Small},j(d.W.Misc.After)," ",null==M?void 0:M.checkInTime)),a.createElement("div",{className:"col-6"},a.createElement(n.ZP,{type:n.yG.Small,color:o.Il.Grey},a.createElement("strong",null,j(d.W.Misc.CheckOut))),a.createElement(n.ZP,{type:n.yG.Small},j(d.W.Misc.Before)," ",null==M?void 0:M.checkOutTime))),a.createElement("div",{className:"row u-border-bottom u-pad-top-bottom"},a.createElement("div",{className:"col-8"},a.createElement("div",{className:"u-flex u-flex-flex-start"},a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",I.startDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},I.startDate?I.startDate.format("ddd, MMM D"):j(d.W.Step.Date.Arrival))),a.createElement("span",{className:"u-marg-left-right--light"},a.createElement(c.ZP,{icon:c.Tu.ArrowRight2,size:"18px",color:o.Il.DarkGrey})),a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",I.endDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},I.endDate?I.endDate.format("ddd, MMM D"):j(d.W.Step.Date.Departure)))),a.createElement(n.ZP,{type:n.yG.Small},I.getNumberOfAdults(!0),", ",I.getNumberOfChildren(!0),", ",I.getNumberOfRooms(!0))),a.createElement("div",{className:"col-4 u-align-right"},a.createElement(k.rU,{to:(0,C.Z)().getStepUrl()},a.createElement(S.Z,{onClick:function(){var t;null===(t=e.onClose)||void 0===t||t.call(e)},size:"tiny"},j(d.W.Misc.Edit).toUpperCase())))),W&&W.length?a.createElement(a.Fragment,null,W.map((function(t,l){if(t.isValid())return a.createElement(v.Z,{row:t,index:l,key:t.getID(),showImages:!!e.showImages,onEditPropertyClicked:K})})),A.length>0&&a.createElement(a.Fragment,null,a.createElement(f.Z,{noMargins:!0,darker:!0}),a.createElement("div",{className:"u-marg-top"},a.createElement(n.ZP,{type:n.yG.Label,color:o.Il.DarkGrey},a.createElement("strong",null,"Add-on Items"))),A.map((function(e,t){return a.createElement(b.Z,{row:e,key:e.getID(),onRemoveClick:function(){return I.removeBasketAddonRow(e)}})})))):a.createElement("div",{className:"u-marg-bottom--heavy u-marg-top--heavy"},a.createElement("div",{className:"u-marg-bottom--heavy"},a.createElement(n.ZP,{type:n.yG.Body},j(d.W.Step.General.YourCartIsEmpty))),a.createElement("div",{style:{height:"150px",position:"relative"}},a.createElement(g.Z,null)),a.createElement("div",{className:"u-marg-top"},a.createElement("div",{className:"u-marg-bottom"},a.createElement(n.ZP,{bold:!0},null==M?void 0:M.name)),V(U),V(Q))),F,a.createElement("div",{className:"u-marg-top--heavy u-marg-bottom--heavy"},a.createElement(Z.Z,null)))))}var I=l(1069),M=l(6061);function W(){var e=(0,a.useContext)(D.g7).screenSize,t=(0,a.useContext)(D.aN).currentStep,l=a.useContext(D.hy),y=(0,u.$)().t,E=(0,a.useState)(!1),f=(0,r.Z)(E,2),g=f[0],v=f[1];return e<=p.Z.Medium?a.createElement(a.Fragment,null,a.createElement("div",{className:"be-mobile-summary row u-border-bottom u-pad-top-bottom u-marg-bottom",onClick:function(){v(!0)}},a.createElement("div",{className:"col-8"},a.createElement("div",{className:"u-flex u-flex-flex-start"},a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",l.startDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},l.startDate?l.startDate.format("ddd, MMM D"):y(d.W.Step.Date.Arrival))),a.createElement("span",{className:"u-marg-left-right--light"},a.createElement(c.ZP,{icon:c.Tu.ArrowRight2,size:"18px",color:o.Il.DarkGrey})),a.createElement(n.ZP,{type:n.yG.Small},a.createElement("span",l.endDate?{style:{color:o.Il.Accent,fontWeight:"bold"}}:{},l.endDate?l.endDate.format("ddd, MMM D"):y(d.W.Step.Date.Departure)))),a.createElement(n.ZP,{type:n.yG.Small},l.getNumberOfAdults(!0),", ",l.getNumberOfChildren(!0),", ",l.getNumberOfRooms(!0))),a.createElement("div",{className:"col-4 u-flex u-flex-flex-end u-flex-align-center"},a.createElement(m.Z,{bold:!0,size:"normal",align:s.P.Right},t===M.Z?a.createElement(I.Z,{isMobile:!0}):a.createElement(i.Z,null,l.getTotalPrice())),a.createElement(c.ZP,{icon:c.Tu.Dropdown,size:"18px",color:o.Il.DarkGrey}))),a.createElement(w,{isOpen:g,onClose:function(){v(!1)}})):a.createElement(a.Fragment,null)}},513:function(e,t,l){l.d(t,{Z:function(){return u}});var r=l(7294),a=l(7754),n=l(584),o=l(7688),c=l(6793),m=l(9116),s=l(9478),i=l(360);function u(){var e=(0,o.WP)().hotel,t=(0,r.useContext)(i.Qm),l=(0,c.$)().t;return r.createElement("div",{className:"summary-privacy-policy"},r.createElement(n.ZP,{type:n.yG.Body},r.createElement("strong",null,l(s.W.Step.Confirmation.PrivacyPolicy))),r.createElement(n.ZP,{className:"u-marg-top--light",type:n.yG.Small,color:a.Il.DarkGrey},r.createElement(m.c,{i18nKey:s.W.Step.Confirmation.PrivacyPolicyDetail,values:{companyShort:t.companyShort},components:[r.createElement("a",{key:0,href:null==e?void 0:e.policies,target:"_blank",style:{color:"var(--rs-color-accent-1)"},rel:"noreferrer"})]})))}}}]);