@webjet/react 3.0.3 → 3.0.4
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/components/accordion.js +1 -1
- package/components/anchor-link.js +1 -1
- package/components/autocomplete.js +1 -1
- package/components/banner.js +1 -1
- package/components/button.js +1 -1
- package/components/card.js +1 -1
- package/components/carousel-content.js +1 -1
- package/components/carousel.js +1 -1
- package/components/checkbox-list.js +1 -1
- package/components/checkbox.js +1 -1
- package/components/checklist.js +1 -1
- package/components/checkmark.js +1 -1
- package/components/countdown.js +1 -1
- package/components/currency-formatter.js +1 -1
- package/components/date-picker-input.js +1 -1
- package/components/date-picker.js +1 -1
- package/components/date-range-picker-input.js +1 -1
- package/components/date-range-picker.js +1 -1
- package/components/error-message-field.js +1 -1
- package/components/flight-card-footer.js +1 -1
- package/components/flight-card-header.js +1 -1
- package/components/flight-card-info.js +1 -1
- package/components/floating-panel.js +1 -1
- package/components/icon.js +1 -1
- package/components/if.js +1 -1
- package/components/iframe-link.js +1 -1
- package/components/image.js +1 -1
- package/components/info-modal.js +1 -1
- package/components/label.js +1 -1
- package/components/linear-loader.js +1 -1
- package/components/link.js +1 -1
- package/components/media-query.js +1 -1
- package/components/modal.js +1 -1
- package/components/notification.js +1 -1
- package/components/number-stepper.js +1 -1
- package/components/page-loader.js +1 -1
- package/components/pagination.js +1 -1
- package/components/panel-with-scroll-fade.js +1 -1
- package/components/payment-breakdown.js +1 -1
- package/components/pills.js +1 -1
- package/components/program-label.js +1 -1
- package/components/quality-rating-filter.js +1 -1
- package/components/quality-rating.js +1 -1
- package/components/radios.js +1 -1
- package/components/rating.js +1 -1
- package/components/react-container-query.js +1 -1
- package/components/render-count.js +1 -1
- package/components/select.js +1 -1
- package/components/selectable-card.js +1 -1
- package/components/settings.js +1 -1
- package/components/slider.js +1 -1
- package/components/spinner.js +1 -1
- package/components/tab.js +1 -1
- package/components/textarea.js +1 -1
- package/components/textfield-button.js +1 -1
- package/components/textfield.js +1 -1
- package/components/toggle.js +1 -1
- package/components/tooltip.js +1 -1
- package/components/two-direction-sticky-panel.js +1 -1
- package/components/user-review-details.js +1 -1
- package/components/user-review-filter.js +1 -1
- package/components/user-review-panel.js +1 -1
- package/components/user-review.js +1 -1
- package/components/utility-panel.js +1 -1
- package/components/with-click-outside.js +1 -1
- package/package.json +7 -7
- package/utils/common.js +1 -1
- package/utils/ga.js +1 -1
- package/utils/hooks.js +1 -1
- package/utils/scrollbar.js +1 -1
- package/utils/splitTest.js +1 -0
package/utils/hooks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={
|
|
1
|
+
(()=>{"use strict";var t={3465:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.escapeRegExp=e.detectOS=e.BREAKPOINTS=void 0,e.fetchDateInMilliseconds=function(){return(new Date).getTime()},e.getBoundingClientInfo=e.formatNumber=void 0,e.getDurationInMiliSeconds=function(t,e){return e-t},e.withScroll=e.setTwoDirectionStickyPanelById=e.setTwoDirectionStickyPanel=e.scrollTo=e.sanitiseInputText=e.removeHtmlTags=e.isValidIconName=e.isValidIconElement=e.isUserLoggedIn=e.isTouchDevice=e.isMobileTablet=e.isMobilePortrait=e.isMobile=e.isMatchMedia=e.hasScrollReachedBottom=e.getMonthName=e.getFormattedDate=void 0;var n=o(4513),i={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199};e.BREAKPOINTS=i;var r=function(t){return window.matchMedia(t).matches};e.isMatchMedia=r,e.isMobile=function(){return r("(max-width: ".concat(i.MOBILE,"px)"))},e.isMobileTablet=function(){return r("(max-width: ".concat(i.TABLET,"px)"))},e.isMobilePortrait=function(){return r("(max-width: ".concat(i.MOBILE_PORTRAIT,"px)"))},e.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},e.detectOS=function(t){var e=t||navigator.userAgent,o=/(iPad).*OS\s([\d_]+)/.test(e);return{ios:!o&&/(iPhone\sOS)\s([\d_]+)/.test(e)||o,android:/(Android);?[\s/]+([\d.]+)?/.test(e)}},e.isUserLoggedIn=function(){var t,e=null===(t=(0,n.getCookieStorage)("customer-soft-id"))||void 0===t?void 0:t.split(".");if(e&&e.length>1){var o=window.atob(e[1]).toString("ascii");if(JSON.parse(o).firstName)return!0}return!1};var c=function(t){if(t){var e=window.innerHeight-t.offsetHeight,o=window.scrollY,n=window.innerHeight,i=t.offsetHeight;t.style.top="0px",window.addEventListener("resize",(function(){n=window.innerHeight,i=t.offsetHeight})),document.addEventListener("scroll",(function(){i=t.offsetHeight,e=window.innerHeight-t.offsetHeight;var r=parseInt(t.style.top.replace("px;",""));0===window.scrollY||i<=n?t.style.top="0px":window.scrollY<o?r<0?t.style.top=r+o-window.scrollY+"px":r>=0&&0!==r&&(t.style.top="0px"):r>e?t.style.top=r+o-window.scrollY+"px":r<e&&r!==e&&(t.style.top=e+"px"),o=window.scrollY}),{capture:!0,passive:!0})}};e.setTwoDirectionStickyPanel=c,e.setTwoDirectionStickyPanelById=function(t){c(document.getElementById(t))},e.hasScrollReachedBottom=function(t){if(!t)return!1;var e=t.scrollHeight,o=t.scrollTop,n=t.clientHeight,i=e-o;return i>=n-1&&i<=n+1},e.withScroll=function(t){if(!t)return!1;var e=t.scrollHeight,o=t.clientHeight;return!(e>=o-1&&e<=o+1)},e.escapeRegExp=function(t){return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},e.sanitiseInputText=function(t){return"string"==typeof t?t.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},e.removeHtmlTags=function(t){return"string"==typeof t?String(t).replace(/(<([^>]+)>)/gi,""):t},e.isValidIconElement=function(t){var e;return"function"==typeof t&&"svg"===(null===(e=t())||void 0===e?void 0:e.type)},e.isValidIconName=function(t){return!!t&&"string"==typeof t},e.formatNumber=function(t,e){return t.toLocaleString("en-AU",{minimumFractionDigits:e,maximumFractionDigits:e})||0},e.scrollTo=function(t,e){"function"==typeof(null==t?void 0:t.scrollTo)&&t.scrollTo({behavior:"smooth",top:e.top,left:e.left})},e.getBoundingClientInfo=function(t){return{height:Math.round(t.getBoundingClientRect().height),top:Math.round(t.getBoundingClientRect().top),bottom:Math.round(t.getBoundingClientRect().bottom),left:Math.round(t.getBoundingClientRect().left),right:Math.round(t.getBoundingClientRect().right)}},e.getMonthName=function(t){return null==t?void 0:t.toLocaleDateString(void 0,{month:"long"})},e.getFormattedDate=function(t){return"".concat(t.getDate(),"/").concat(t.getMonth()+1,"/").concat(t.getFullYear())}},1554:(t,e,o)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.unlockScroll=e.lockScroll=void 0;var n=o(3465),i=function(){void 0===window.wjuipl&&(window.wjuipl={}),void 0===window.wjuipl.scrollLockCount&&(window.wjuipl.scrollLockCount=0),void 0===window.wjuipl.scrollOffset&&(window.wjuipl.scrollOffset=0)};e.lockScroll=function(){if(i(),0===window.wjuipl.scrollLockCount){var t=window.innerWidth-document.body.offsetWidth;document.body.style.overflow="hidden",document.body.style.paddingRight="".concat(t,"px"),(0,n.detectOS)().ios&&(window.wjuipl.scrollOffset=window.pageYOffset,document.body.style.position="fixed",document.body.style.top="-".concat(window.wjuipl.scrollOffset,"px"),document.body.style.width="100%")}window.wjuipl.scrollLockCount+=1},e.unlockScroll=function(){i(),window.wjuipl.scrollLockCount>0&&(window.wjuipl.scrollLockCount-=1),0===window.wjuipl.scrollLockCount&&(document.body.style.overflow="",document.body.style.paddingRight="",(0,n.detectOS)().ios&&(document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,window.wjuipl.scrollOffset)))}},4513:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.setSessionStorageJson=e.setSessionStorage=e.setCookieStorage=e.getSessionStorageJson=e.getSessionStorage=e.getCookieStorage=void 0;var o=function(){var t="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(t,1),window.sessionStorage.removeItem(t),!0)}catch(t){return!1}};e.getSessionStorage=function(t){if(t&&o())try{return window.sessionStorage.getItem(t)}catch(t){return}},e.setSessionStorage=function(t,e){if(t&&o())try{return window.sessionStorage.setItem(t,e)}catch(t){return}},e.getSessionStorageJson=function(t){if(t&&o())try{return JSON.parse(window.sessionStorage.getItem(t))}catch(t){return}},e.setSessionStorageJson=function(t,e){if(t&&o())try{return window.sessionStorage.setItem(t,JSON.stringify(e))}catch(t){return}},e.getCookieStorage=function(t){for(var e=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var i=o[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return i.substring(e.length,i.length)}return null},e.setCookieStorage=function(t,e,o){var n=window.location.hostname,i="localhost"===n?n:n.match(/(\.\w+){3}$/g);document.cookie="".concat(t,"=").concat(e,"; Domain=").concat(i,"; Path=/; Max-Age=").concat(o||86400)}},2015:t=>{t.exports=require("react")}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n](r,r.exports,o),r.exports}var n={};(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.useDisableBodyScroll=t.useCombinedRefs=void 0;var e=o(2015),i=o(1554);t.useDisableBodyScroll=function(t){(0,e.useEffect)((function(){if(t)return(0,i.lockScroll)(),function(){(0,i.unlockScroll)()}}),[t])},t.useCombinedRefs=function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];var i=(0,e.useRef)();return(0,e.useEffect)((function(){o.forEach((function(t){t&&("function"==typeof t?t(i.current):t.current=i.current)}))}),[o]),i}})(),module.exports=n})();
|
package/utils/scrollbar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={
|
|
1
|
+
(()=>{"use strict";var t={3465:(t,o,e)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.escapeRegExp=o.detectOS=o.BREAKPOINTS=void 0,o.fetchDateInMilliseconds=function(){return(new Date).getTime()},o.getBoundingClientInfo=o.formatNumber=void 0,o.getDurationInMiliSeconds=function(t,o){return o-t},o.withScroll=o.setTwoDirectionStickyPanelById=o.setTwoDirectionStickyPanel=o.scrollTo=o.sanitiseInputText=o.removeHtmlTags=o.isValidIconName=o.isValidIconElement=o.isUserLoggedIn=o.isTouchDevice=o.isMobileTablet=o.isMobilePortrait=o.isMobile=o.isMatchMedia=o.hasScrollReachedBottom=o.getMonthName=o.getFormattedDate=void 0;var n=e(4513),i={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199};o.BREAKPOINTS=i;var r=function(t){return window.matchMedia(t).matches};o.isMatchMedia=r,o.isMobile=function(){return r("(max-width: ".concat(i.MOBILE,"px)"))},o.isMobileTablet=function(){return r("(max-width: ".concat(i.TABLET,"px)"))},o.isMobilePortrait=function(){return r("(max-width: ".concat(i.MOBILE_PORTRAIT,"px)"))},o.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},o.detectOS=function(t){var o=t||navigator.userAgent,e=/(iPad).*OS\s([\d_]+)/.test(o);return{ios:!e&&/(iPhone\sOS)\s([\d_]+)/.test(o)||e,android:/(Android);?[\s/]+([\d.]+)?/.test(o)}},o.isUserLoggedIn=function(){var t,o=null===(t=(0,n.getCookieStorage)("customer-soft-id"))||void 0===t?void 0:t.split(".");if(o&&o.length>1){var e=window.atob(o[1]).toString("ascii");if(JSON.parse(e).firstName)return!0}return!1};var s=function(t){if(t){var o=window.innerHeight-t.offsetHeight,e=window.scrollY,n=window.innerHeight,i=t.offsetHeight;t.style.top="0px",window.addEventListener("resize",(function(){n=window.innerHeight,i=t.offsetHeight})),document.addEventListener("scroll",(function(){i=t.offsetHeight,o=window.innerHeight-t.offsetHeight;var r=parseInt(t.style.top.replace("px;",""));0===window.scrollY||i<=n?t.style.top="0px":window.scrollY<e?r<0?t.style.top=r+e-window.scrollY+"px":r>=0&&0!==r&&(t.style.top="0px"):r>o?t.style.top=r+e-window.scrollY+"px":r<o&&r!==o&&(t.style.top=o+"px"),e=window.scrollY}),{capture:!0,passive:!0})}};o.setTwoDirectionStickyPanel=s,o.setTwoDirectionStickyPanelById=function(t){s(document.getElementById(t))},o.hasScrollReachedBottom=function(t){if(!t)return!1;var o=t.scrollHeight,e=t.scrollTop,n=t.clientHeight,i=o-e;return i>=n-1&&i<=n+1},o.withScroll=function(t){if(!t)return!1;var o=t.scrollHeight,e=t.clientHeight;return!(o>=e-1&&o<=e+1)},o.escapeRegExp=function(t){return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},o.sanitiseInputText=function(t){return"string"==typeof t?t.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},o.removeHtmlTags=function(t){return"string"==typeof t?String(t).replace(/(<([^>]+)>)/gi,""):t},o.isValidIconElement=function(t){var o;return"function"==typeof t&&"svg"===(null===(o=t())||void 0===o?void 0:o.type)},o.isValidIconName=function(t){return!!t&&"string"==typeof t},o.formatNumber=function(t,o){return t.toLocaleString("en-AU",{minimumFractionDigits:o,maximumFractionDigits:o})||0},o.scrollTo=function(t,o){"function"==typeof(null==t?void 0:t.scrollTo)&&t.scrollTo({behavior:"smooth",top:o.top,left:o.left})},o.getBoundingClientInfo=function(t){return{height:Math.round(t.getBoundingClientRect().height),top:Math.round(t.getBoundingClientRect().top),bottom:Math.round(t.getBoundingClientRect().bottom),left:Math.round(t.getBoundingClientRect().left),right:Math.round(t.getBoundingClientRect().right)}},o.getMonthName=function(t){return null==t?void 0:t.toLocaleDateString(void 0,{month:"long"})},o.getFormattedDate=function(t){return"".concat(t.getDate(),"/").concat(t.getMonth()+1,"/").concat(t.getFullYear())}},4513:(t,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.setSessionStorageJson=o.setSessionStorage=o.setCookieStorage=o.getSessionStorageJson=o.getSessionStorage=o.getCookieStorage=void 0;var e=function(){var t="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(t,1),window.sessionStorage.removeItem(t),!0)}catch(t){return!1}};o.getSessionStorage=function(t){if(t&&e())try{return window.sessionStorage.getItem(t)}catch(t){return}},o.setSessionStorage=function(t,o){if(t&&e())try{return window.sessionStorage.setItem(t,o)}catch(t){return}},o.getSessionStorageJson=function(t){if(t&&e())try{return JSON.parse(window.sessionStorage.getItem(t))}catch(t){return}},o.setSessionStorageJson=function(t,o){if(t&&e())try{return window.sessionStorage.setItem(t,JSON.stringify(o))}catch(t){return}},o.getCookieStorage=function(t){for(var o=t+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var i=e[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(o))return i.substring(o.length,i.length)}return null},o.setCookieStorage=function(t,o,e){var n=window.location.hostname,i="localhost"===n?n:n.match(/(\.\w+){3}$/g);document.cookie="".concat(t,"=").concat(o,"; Domain=").concat(i,"; Path=/; Max-Age=").concat(e||86400)}}},o={};function e(n){var i=o[n];if(void 0!==i)return i.exports;var r=o[n]={exports:{}};return t[n](r,r.exports,e),r.exports}var n={};(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.unlockScroll=t.lockScroll=void 0;var o=e(3465),i=function(){void 0===window.wjuipl&&(window.wjuipl={}),void 0===window.wjuipl.scrollLockCount&&(window.wjuipl.scrollLockCount=0),void 0===window.wjuipl.scrollOffset&&(window.wjuipl.scrollOffset=0)};t.lockScroll=function(){if(i(),0===window.wjuipl.scrollLockCount){var t=window.innerWidth-document.body.offsetWidth;document.body.style.overflow="hidden",document.body.style.paddingRight="".concat(t,"px"),(0,o.detectOS)().ios&&(window.wjuipl.scrollOffset=window.pageYOffset,document.body.style.position="fixed",document.body.style.top="-".concat(window.wjuipl.scrollOffset,"px"),document.body.style.width="100%")}window.wjuipl.scrollLockCount+=1},t.unlockScroll=function(){i(),window.wjuipl.scrollLockCount>0&&(window.wjuipl.scrollLockCount-=1),0===window.wjuipl.scrollLockCount&&(document.body.style.overflow="",document.body.style.paddingRight="",(0,o.detectOS)().ios&&(document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,window.wjuipl.scrollOffset)))}})(),module.exports=n})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var t,e={};t=e,Object.defineProperty(t,"__esModule",{value:!0}),t.splitTest=t.SPLIT_TEST_GROUPS=void 0,t.SPLIT_TEST_GROUPS={CONTROL:"control",TEST_1:"test_1",TEST_2:"test_2"},t.splitTest=function(t,e){var s=(t||{}).splitTest,o=(void 0===s?{}:s)[e];if(o&&"function"==typeof window.split_test_group){var i=o.split(":").length;return window.split_test_group(e,2,i,o).test_group}},module.exports=e})();
|