@webjet/react 3.0.3 → 3.1.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/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/split-test.js +1 -0
- 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-modal.js +1 -0
- 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 +8 -8
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={6361:(e,t,o)=>{var n=o(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(o(580)),i=function(e){var t=e.condition,o=e.children;return!0===t?o:null};i.propTypes={condition:r.default.bool},i.defaultProps={condition:!1};var a=i;t.default=a},7350:(e,t,o)=>{var n=o(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(o(6361)).default;t.default=r},3206:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={dateFormatExtraShort:"d MMM",dateFormatShort:"E d MMM",dateFormat:"E d MMM yyyy",dateFormatLong:"E d MMMM yyyy",timeFormat:"h:mm a",dayLabelFormat:"E MMM dd yyyy",weekStartsOn:1,weekFormat:"E",scrollToViewOptions:{behavior:"smooth",block:"end",scrollMode:"if-needed"}}},5799:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={notification:{success:{color:"#149000",backgroundColor:"#EEF7EB"},error:{color:"#BE0000",backgroundColor:"#F2DEDE"},warning:{color:"#FF5C00",backgroundColor:"#F6EDE6"},info:{color:"#3D9AF2",backgroundColor:"#ECF5FE"},notice:{color:"#FEB42B",backgroundColor:"#FFF3CD"}},textLink:{color:"#0060BB",hoverColor:"#00509C"}}},9193:(e,t,o)=>{var n=o(7880);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"identifiers",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"mixins",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"theme",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"themeV2",{enumerable:!0,get:function(){return i.default}});var r=n(o(2594)),i=n(o(6932)),a=n(o(2098)),l=n(o(3206)),d=n(o(5799))},2098:(e,t,o)=>{var n=o(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(7518),i=n(o(2594)),a={globalStyles:(0,r.css)(["font-family:",";font-size:",";color:",";&,> *,> *:before,> *:after{box-sizing:border-box;}"],i.default.fontFamily.primary,i.default.fontSize,i.default.fontColor)};t.default=a},6932:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],n={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:o[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:o[5],hoverColor:o[6],hoverDarkColor:o[7],textHighlight:o[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:o[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:o[5],inputIcon:o[9],inputIconBackground:o[2],inputIconHoverBackground:o[5],inputCrossBtn:"#a8a8a8",btnStandard:o[2],btnStandardHover:o[5],btnAction:o[17],btnActionHover:"#259400",btnActive:o[13],btnActiveHover:o[19],btnSelection:o[16],btnSelectionHover:o[20],successBackground:o[22],successText:o[21],errorBackground:o[26],errorText:o[27],sliderPrimary:o[13],color:o,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:o[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=n},2594:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],n={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:o[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:o[5],hoverColor:o[6],hoverDarkColor:o[7],textHighlight:o[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:o[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:o[5],inputIcon:o[9],inputIconBackground:o[2],inputIconHoverBackground:o[5],inputCrossBtn:"#a8a8a8",btnStandard:o[2],btnStandardHover:o[5],btnAction:o[17],btnActionHover:"#259400",btnActive:o[13],btnActiveHover:o[19],btnSelection:o[16],btnSelectionHover:o[20],successBackground:o[22],successText:o[21],errorBackground:o[26],errorText:o[27],sliderPrimary:o[13],color:o,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:o[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=n},8140:(e,t,o)=>{var n=o(7880);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(o(8213)),i=n(o(3838)),a=n(o(6689)),l=(n(o(580)),n(o(7350))),d=o(2433),s=o(9941),c=["value","maxRatingValue","variant","quality","reviews","onClick"],u=function(e){var t=e.value,o=e.maxRatingValue,n=e.variant,u=e.quality,p=e.reviews,f=e.onClick,m=(0,i.default)(e,c),g=Math.min(parseFloat(t)||0,o).toFixed(1),v=Boolean(f),y=(0,s.formatNumber)(p,0),h="".concat(v&&"details"===n?"View ":"").concat(y," reviews");return a.default.createElement(d.StyledUserReviewSummary,(0,r.default)({},m,{onClick:f,clickable:v,variant:n,"data-testid":"user-review-container"}),a.default.createElement(l.default,{condition:"details"===n},a.default.createElement(d.StyledUserReviewDetails,null,a.default.createElement(d.StyledUserRatingValue,{role:"review-value","data-testid":"user-review-value"},g),a.default.createElement(d.StyledQualityLabel,{role:"review-quality-label","data-testid":"user-review-quality"},u),a.default.createElement(d.StyledUserReviewTotal,{role:"total-reviews","data-testid":"user-review-total",clickable:v},h))),a.default.createElement(l.default,{condition:"compact"===n},a.default.createElement(d.StyledUserReviewCompact,null,a.default.createElement(d.StyledUserRatingQuality,{role:"review-value-quality-label","data-testid":"user-review-rating-quality"},"".concat(g," ").concat(u)),a.default.createElement(d.StyledUserReviewTotal,{role:"total-reviews","data-testid":"user-review-total",clickable:v},h))),a.default.createElement(l.default,{condition:"small"===n},a.default.createElement(d.StyledUserRatingValue,{role:"review-value","data-testid":"user-review-value",variant:n},g),a.default.createElement(d.StyledQualityAndReviewTotal,null,a.default.createElement(d.StyledQualityLabel,{role:"review-quality-label","data-testid":"user-review-quality",variant:n},u),a.default.createElement(d.StyledUserReviewTotal,{role:"total-reviews","data-testid":"user-review-total",variant:n,clickable:v},h))))};u.defaultProps={value:0,maxRatingValue:5,variant:"compact"},u.component={name:"UserReview"};var p=u;t.default=p},2433:(e,t,o)=>{var n=o(9293);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledUserReviewTotal=t.StyledUserReviewSummary=t.StyledUserReviewDetails=t.StyledUserReviewCompact=t.StyledUserRatingValue=t.StyledUserRatingQuality=t.StyledQualityLabel=t.StyledQualityAndReviewTotal=void 0;var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var d=i?Object.getOwnPropertyDescriptor(e,l):null;d&&(d.get||d.set)?Object.defineProperty(r,l,d):r[l]=e[l]}return r.default=e,o&&o.set(e,r),r}(o(7518)),i=o(9193);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}var l=r.default.div.withConfig({displayName:"UserReviewstyle__StyledUserReviewSummary",componentId:"sc-1fjzoio-0"})([""," display:",";cursor:",";text-align:initial;align-items:center;gap:8px;"],i.mixins.globalStyles,(function(e){return"small"===e.variant?"inline-flex":"inline-block"}),(function(e){return e.clickable?"pointer":"initial"}));t.StyledUserReviewSummary=l;var d=r.default.div.withConfig({displayName:"UserReviewstyle__StyledUserReviewDetails",componentId:"sc-1fjzoio-1"})(["display:flex;flex-flow:column;background-color:",";border-radius:",";padding:12px 20px;min-width:187px;@media ","{padding:12px;}"],i.theme.color[3],i.theme.borderRadius,i.theme.media.mobile);t.StyledUserReviewDetails=d;var s=r.default.span.withConfig({displayName:"UserReviewstyle__StyledUserRatingValue",componentId:"sc-1fjzoio-2"})(["color:",";font-size:24px;font-weight:700;line-height:28px;margin-bottom:8px;@media ","{font-size:20px;line-height:20px;margin-bottom:10px;}",""],i.theme.color[10],i.theme.media.mobile,(function(e){return"small"===e.variant&&(0,r.css)(["background:",";font-size:12px;font-weight:500;line-height:18px;margin-bottom:0;border-radius:12px;padding:6px 8px;max-height:30px;@media ","{font-size:12px;line-height:18px;margin-bottom:0;}"],i.theme.color[3],i.theme.media.mobile)}));t.StyledUserRatingValue=s;var c=r.default.span.withConfig({displayName:"UserReviewstyle__StyledQualityLabel",componentId:"sc-1fjzoio-3"})(["color:",";font-size:16px;font-weight:500;line-height:22px;@media ","{font-size:14px;line-height:20px;}",""],i.theme.color[10],i.theme.media.mobile,(function(e){return"small"===e.variant&&(0,r.css)(["font-size:10px;line-height:14px;@media ","{font-size:10px;line-height:14px;}"],i.theme.media.mobile)}));t.StyledQualityLabel=c;var u=r.default.span.withConfig({displayName:"UserReviewstyle__StyledUserReviewTotal",componentId:"sc-1fjzoio-4"})(["color:",";font-size:12px;line-height:18px;white-space:nowrap;color:",";text-decoration:",";",""],i.theme.color[14],i.theme.color[6],(function(e){return e.clickable?"underline":"initial"}),(function(e){return"small"===e.variant&&(0,r.css)(["font-size:10px;line-height:14px;"])}));t.StyledUserReviewTotal=u;var p=r.default.div.withConfig({displayName:"UserReviewstyle__StyledUserReviewCompact",componentId:"sc-1fjzoio-5"})([""]);t.StyledUserReviewCompact=p;var f=r.default.span.withConfig({displayName:"UserReviewstyle__StyledUserRatingQuality",componentId:"sc-1fjzoio-6"})(["height:34px;padding:8px 16px;background:",";border-radius:12px;display:inline-flex;align-items:center;font-size:12px;font-weight:500;line-height:18px;color:",";margin-right:12px;"],i.theme.color[3],i.theme.color[10]);t.StyledUserRatingQuality=f;var m=r.default.span.withConfig({displayName:"UserReviewstyle__StyledQualityAndReviewTotal",componentId:"sc-1fjzoio-7"})(["display:flex;flex-direction:column;"]);t.StyledQualityAndReviewTotal=m},9941:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escapeRegExp=t.detectOS=t.BREAKPOINTS=void 0,t.fetchDateInMilliseconds=function(){return(new Date).getTime()},t.getBoundingClientInfo=t.formatNumber=void 0,t.getDurationInMiliSeconds=function(e,t){return t-e},t.withScroll=t.setTwoDirectionStickyPanelById=t.setTwoDirectionStickyPanel=t.scrollTo=t.sanitiseInputText=t.removeHtmlTags=t.isValidIconName=t.isValidIconElement=t.isUserLoggedIn=t.isTouchDevice=t.isMobileTablet=t.isMobilePortrait=t.isMobile=t.isMatchMedia=t.hasScrollReachedBottom=t.getMonthName=t.getFormattedDate=void 0;var n=o(3322),r={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199};t.BREAKPOINTS=r;var i=function(e){return window.matchMedia(e).matches};t.isMatchMedia=i,t.isMobile=function(){return i("(max-width: ".concat(r.MOBILE,"px)"))},t.isMobileTablet=function(){return i("(max-width: ".concat(r.TABLET,"px)"))},t.isMobilePortrait=function(){return i("(max-width: ".concat(r.MOBILE_PORTRAIT,"px)"))},t.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},t.detectOS=function(e){var t=e||navigator.userAgent,o=/(iPad).*OS\s([\d_]+)/.test(t);return{ios:!o&&/(iPhone\sOS)\s([\d_]+)/.test(t)||o,android:/(Android);?[\s/]+([\d.]+)?/.test(t)}},t.isUserLoggedIn=function(){var e,t=null===(e=(0,n.getCookieStorage)("customer-soft-id"))||void 0===e?void 0:e.split(".");if(t&&t.length>1){var o=window.atob(t[1]).toString("ascii");if(JSON.parse(o).firstName)return!0}return!1};var a=function(e){if(e){var t=window.innerHeight-e.offsetHeight,o=window.scrollY,n=window.innerHeight,r=e.offsetHeight;e.style.top="0px",window.addEventListener("resize",(function(){n=window.innerHeight,r=e.offsetHeight})),document.addEventListener("scroll",(function(){r=e.offsetHeight,t=window.innerHeight-e.offsetHeight;var i=parseInt(e.style.top.replace("px;",""));0===window.scrollY||r<=n?e.style.top="0px":window.scrollY<o?i<0?e.style.top=i+o-window.scrollY+"px":i>=0&&0!==i&&(e.style.top="0px"):i>t?e.style.top=i+o-window.scrollY+"px":i<t&&i!==t&&(e.style.top=t+"px"),o=window.scrollY}),{capture:!0,passive:!0})}};t.setTwoDirectionStickyPanel=a,t.setTwoDirectionStickyPanelById=function(e){a(document.getElementById(e))},t.hasScrollReachedBottom=function(e){if(!e)return!1;var t=e.scrollHeight,o=e.scrollTop,n=e.clientHeight,r=t-o;return r>=n-1&&r<=n+1},t.withScroll=function(e){if(!e)return!1;var t=e.scrollHeight,o=e.clientHeight;return!(t>=o-1&&t<=o+1)},t.escapeRegExp=function(e){return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},t.sanitiseInputText=function(e){return"string"==typeof e?e.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},t.removeHtmlTags=function(e){return"string"==typeof e?String(e).replace(/(<([^>]+)>)/gi,""):e},t.isValidIconElement=function(e){var t;return"function"==typeof e&&"svg"===(null===(t=e())||void 0===t?void 0:t.type)},t.isValidIconName=function(e){return!!e&&"string"==typeof e},t.formatNumber=function(e,t){return e.toLocaleString("en-AU",{minimumFractionDigits:t,maximumFractionDigits:t})||0},t.scrollTo=function(e,t){"function"==typeof(null==e?void 0:e.scrollTo)&&e.scrollTo({behavior:"smooth",top:t.top,left:t.left})},t.getBoundingClientInfo=function(e){return{height:Math.round(e.getBoundingClientRect().height),top:Math.round(e.getBoundingClientRect().top),bottom:Math.round(e.getBoundingClientRect().bottom),left:Math.round(e.getBoundingClientRect().left),right:Math.round(e.getBoundingClientRect().right)}},t.getMonthName=function(e){return null==e?void 0:e.toLocaleDateString(void 0,{month:"long"})},t.getFormattedDate=function(e){return"".concat(e.getDate(),"/").concat(e.getMonth()+1,"/").concat(e.getFullYear())}},3322:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSessionStorageJson=t.setSessionStorage=t.setCookieStorage=t.getSessionStorageJson=t.getSessionStorage=t.getCookieStorage=void 0;var o=function(){var e="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(e,1),window.sessionStorage.removeItem(e),!0)}catch(e){return!1}};t.getSessionStorage=function(e){if(e&&o())try{return window.sessionStorage.getItem(e)}catch(e){return}},t.setSessionStorage=function(e,t){if(e&&o())try{return window.sessionStorage.setItem(e,t)}catch(e){return}},t.getSessionStorageJson=function(e){if(e&&o())try{return JSON.parse(window.sessionStorage.getItem(e))}catch(e){return}},t.setSessionStorageJson=function(e,t){if(e&&o())try{return window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){return}},t.getCookieStorage=function(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var r=o[n];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},t.setCookieStorage=function(e,t,o){var n=window.location.hostname,r="localhost"===n?n:n.match(/(\.\w+){3}$/g);document.cookie="".concat(e,"=").concat(t,"; Domain=").concat(r,"; Path=/; Max-Age=").concat(o||86400)}},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},7880:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},9293:e=>{e.exports=require("@babel/runtime/helpers/typeof")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")},7518:e=>{e.exports=require("styled-components")}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}var n={};(()=>{var e=n,t=o(7880);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(o(8140)).default;e.default=r})(),module.exports=n})();
|
|
1
|
+
(()=>{"use strict";var e={9473:(e,t,o)=>{var n=o(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(o(9825)),i=function(e){var t=e.condition,o=e.children;return!0===t?o:null};i.propTypes={condition:r.default.bool},i.defaultProps={condition:!1};var a=i;t.default=a},3080:(e,t,o)=>{var n=o(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(o(9473)).default;t.default=r},9090:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={dateFormatExtraShort:"d MMM",dateFormatShort:"E d MMM",dateFormat:"E d MMM yyyy",dateFormatLong:"E d MMMM yyyy",timeFormat:"h:mm a",dayLabelFormat:"E MMM dd yyyy",weekStartsOn:1,weekFormat:"E",scrollToViewOptions:{behavior:"smooth",block:"end",scrollMode:"if-needed"}}},5050:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={notification:{success:{color:"#149000",backgroundColor:"#EEF7EB"},error:{color:"#BE0000",backgroundColor:"#F2DEDE"},warning:{color:"#FF5C00",backgroundColor:"#F6EDE6"},info:{color:"#3D9AF2",backgroundColor:"#ECF5FE"},notice:{color:"#FEB42B",backgroundColor:"#FFF3CD"}},textLink:{color:"#0060BB",hoverColor:"#00509C"}}},3290:(e,t,o)=>{var n=o(3751);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"identifiers",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"mixins",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"theme",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"themeV2",{enumerable:!0,get:function(){return i.default}});var r=n(o(1267)),i=n(o(492)),a=n(o(9098)),l=n(o(9090)),d=n(o(5050))},9098:(e,t,o)=>{var n=o(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(2770),i=n(o(1267)),a={globalStyles:(0,r.css)(["font-family:",";font-size:",";color:",";&,> *,> *:before,> *:after{box-sizing:border-box;}"],i.default.fontFamily.primary,i.default.fontSize,i.default.fontColor)};t.default=a},492:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],n={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:o[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:o[5],hoverColor:o[6],hoverDarkColor:o[7],textHighlight:o[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:o[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:o[5],inputIcon:o[9],inputIconBackground:o[2],inputIconHoverBackground:o[5],inputCrossBtn:"#a8a8a8",btnStandard:o[2],btnStandardHover:o[5],btnAction:o[17],btnActionHover:"#259400",btnActive:o[13],btnActiveHover:o[19],btnSelection:o[16],btnSelectionHover:o[20],successBackground:o[22],successText:o[21],errorBackground:o[26],errorText:o[27],sliderPrimary:o[13],color:o,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:o[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=n},1267:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],n={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:o[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:o[5],hoverColor:o[6],hoverDarkColor:o[7],textHighlight:o[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:o[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:o[5],inputIcon:o[9],inputIconBackground:o[2],inputIconHoverBackground:o[5],inputCrossBtn:"#a8a8a8",btnStandard:o[2],btnStandardHover:o[5],btnAction:o[17],btnActionHover:"#259400",btnActive:o[13],btnActiveHover:o[19],btnSelection:o[16],btnSelectionHover:o[20],successBackground:o[22],successText:o[21],errorBackground:o[26],errorText:o[27],sliderPrimary:o[13],color:o,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:o[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=n},2608:(e,t,o)=>{var n=o(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(o(6031)),i=n(o(2462)),a=n(o(2015)),l=(n(o(9825)),n(o(3080))),d=o(8175),s=o(3465),c=["value","maxRatingValue","variant","quality","reviews","onClick"],u=function(e){var t=e.value,o=e.maxRatingValue,n=e.variant,u=e.quality,p=e.reviews,f=e.onClick,m=(0,i.default)(e,c),g=Math.min(parseFloat(t)||0,o).toFixed(1),v=Boolean(f),y=(0,s.formatNumber)(p,0),h="".concat(v&&"details"===n?"View ":"").concat(y," reviews");return a.default.createElement(d.StyledUserReviewSummary,(0,r.default)({},m,{onClick:f,clickable:v,variant:n,"data-testid":"user-review-container"}),a.default.createElement(l.default,{condition:"details"===n},a.default.createElement(d.StyledUserReviewDetails,null,a.default.createElement(d.StyledUserRatingValue,{role:"review-value","data-testid":"user-review-value"},g),a.default.createElement(d.StyledQualityLabel,{role:"review-quality-label","data-testid":"user-review-quality"},u),a.default.createElement(d.StyledUserReviewTotal,{role:"total-reviews","data-testid":"user-review-total",clickable:v},h))),a.default.createElement(l.default,{condition:"compact"===n},a.default.createElement(d.StyledUserReviewCompact,null,a.default.createElement(d.StyledUserRatingQuality,{role:"review-value-quality-label","data-testid":"user-review-rating-quality"},"".concat(g," ").concat(u)),a.default.createElement(d.StyledUserReviewTotal,{role:"total-reviews","data-testid":"user-review-total",clickable:v},h))),a.default.createElement(l.default,{condition:"small"===n},a.default.createElement(d.StyledUserRatingValue,{role:"review-value","data-testid":"user-review-value",variant:n},g),a.default.createElement(d.StyledQualityAndReviewTotal,null,a.default.createElement(d.StyledQualityLabel,{role:"review-quality-label","data-testid":"user-review-quality",variant:n},u),a.default.createElement(d.StyledUserReviewTotal,{role:"total-reviews","data-testid":"user-review-total",variant:n,clickable:v},h))))};u.defaultProps={value:0,maxRatingValue:5,variant:"compact"},u.component={name:"UserReview"};var p=u;t.default=p},8175:(e,t,o)=>{var n=o(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledUserReviewTotal=t.StyledUserReviewSummary=t.StyledUserReviewDetails=t.StyledUserReviewCompact=t.StyledUserRatingValue=t.StyledUserRatingQuality=t.StyledQualityLabel=t.StyledQualityAndReviewTotal=void 0;var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var d=i?Object.getOwnPropertyDescriptor(e,l):null;d&&(d.get||d.set)?Object.defineProperty(r,l,d):r[l]=e[l]}return r.default=e,o&&o.set(e,r),r}(o(2770)),i=o(3290);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}var l=r.default.div.withConfig({displayName:"UserReviewstyle__StyledUserReviewSummary",componentId:"sc-1fjzoio-0"})([""," display:",";cursor:",";text-align:initial;align-items:center;gap:8px;"],i.mixins.globalStyles,(function(e){return"small"===e.variant?"inline-flex":"inline-block"}),(function(e){return e.clickable?"pointer":"initial"}));t.StyledUserReviewSummary=l;var d=r.default.div.withConfig({displayName:"UserReviewstyle__StyledUserReviewDetails",componentId:"sc-1fjzoio-1"})(["display:flex;flex-flow:column;background-color:",";border-radius:",";padding:12px 20px;min-width:187px;@media ","{padding:12px;}"],i.theme.color[3],i.theme.borderRadius,i.theme.media.mobile);t.StyledUserReviewDetails=d;var s=r.default.span.withConfig({displayName:"UserReviewstyle__StyledUserRatingValue",componentId:"sc-1fjzoio-2"})(["color:",";font-size:24px;font-weight:700;line-height:28px;margin-bottom:8px;@media ","{font-size:20px;line-height:20px;margin-bottom:10px;}",""],i.theme.color[10],i.theme.media.mobile,(function(e){return"small"===e.variant&&(0,r.css)(["background:",";font-size:12px;font-weight:500;line-height:18px;margin-bottom:0;border-radius:12px;padding:6px 8px;max-height:30px;@media ","{font-size:12px;line-height:18px;margin-bottom:0;}"],i.theme.color[3],i.theme.media.mobile)}));t.StyledUserRatingValue=s;var c=r.default.span.withConfig({displayName:"UserReviewstyle__StyledQualityLabel",componentId:"sc-1fjzoio-3"})(["color:",";font-size:16px;font-weight:500;line-height:22px;@media ","{font-size:14px;line-height:20px;}",""],i.theme.color[10],i.theme.media.mobile,(function(e){return"small"===e.variant&&(0,r.css)(["font-size:10px;line-height:14px;@media ","{font-size:10px;line-height:14px;}"],i.theme.media.mobile)}));t.StyledQualityLabel=c;var u=r.default.span.withConfig({displayName:"UserReviewstyle__StyledUserReviewTotal",componentId:"sc-1fjzoio-4"})(["color:",";font-size:12px;line-height:18px;white-space:nowrap;color:",";text-decoration:",";",""],i.theme.color[14],i.theme.color[6],(function(e){return e.clickable?"underline":"initial"}),(function(e){return"small"===e.variant&&(0,r.css)(["font-size:10px;line-height:14px;"])}));t.StyledUserReviewTotal=u;var p=r.default.div.withConfig({displayName:"UserReviewstyle__StyledUserReviewCompact",componentId:"sc-1fjzoio-5"})([""]);t.StyledUserReviewCompact=p;var f=r.default.span.withConfig({displayName:"UserReviewstyle__StyledUserRatingQuality",componentId:"sc-1fjzoio-6"})(["height:34px;padding:8px 16px;background:",";border-radius:12px;display:inline-flex;align-items:center;font-size:12px;font-weight:500;line-height:18px;color:",";margin-right:12px;"],i.theme.color[3],i.theme.color[10]);t.StyledUserRatingQuality=f;var m=r.default.span.withConfig({displayName:"UserReviewstyle__StyledQualityAndReviewTotal",componentId:"sc-1fjzoio-7"})(["display:flex;flex-direction:column;"]);t.StyledQualityAndReviewTotal=m},3465:(e,t,o)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escapeRegExp=t.detectOS=t.BREAKPOINTS=void 0,t.fetchDateInMilliseconds=function(){return(new Date).getTime()},t.getBoundingClientInfo=t.formatNumber=void 0,t.getDurationInMiliSeconds=function(e,t){return t-e},t.withScroll=t.setTwoDirectionStickyPanelById=t.setTwoDirectionStickyPanel=t.scrollTo=t.sanitiseInputText=t.removeHtmlTags=t.isValidIconName=t.isValidIconElement=t.isUserLoggedIn=t.isTouchDevice=t.isMobileTablet=t.isMobilePortrait=t.isMobile=t.isMatchMedia=t.hasScrollReachedBottom=t.getMonthName=t.getFormattedDate=void 0;var n=o(4513),r={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199};t.BREAKPOINTS=r;var i=function(e){return window.matchMedia(e).matches};t.isMatchMedia=i,t.isMobile=function(){return i("(max-width: ".concat(r.MOBILE,"px)"))},t.isMobileTablet=function(){return i("(max-width: ".concat(r.TABLET,"px)"))},t.isMobilePortrait=function(){return i("(max-width: ".concat(r.MOBILE_PORTRAIT,"px)"))},t.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},t.detectOS=function(e){var t=e||navigator.userAgent,o=/(iPad).*OS\s([\d_]+)/.test(t);return{ios:!o&&/(iPhone\sOS)\s([\d_]+)/.test(t)||o,android:/(Android);?[\s/]+([\d.]+)?/.test(t)}},t.isUserLoggedIn=function(){var e,t=null===(e=(0,n.getCookieStorage)("customer-soft-id"))||void 0===e?void 0:e.split(".");if(t&&t.length>1){var o=window.atob(t[1]).toString("ascii");if(JSON.parse(o).firstName)return!0}return!1};var a=function(e){if(e){var t=window.innerHeight-e.offsetHeight,o=window.scrollY,n=window.innerHeight,r=e.offsetHeight;e.style.top="0px",window.addEventListener("resize",(function(){n=window.innerHeight,r=e.offsetHeight})),document.addEventListener("scroll",(function(){r=e.offsetHeight,t=window.innerHeight-e.offsetHeight;var i=parseInt(e.style.top.replace("px;",""));0===window.scrollY||r<=n?e.style.top="0px":window.scrollY<o?i<0?e.style.top=i+o-window.scrollY+"px":i>=0&&0!==i&&(e.style.top="0px"):i>t?e.style.top=i+o-window.scrollY+"px":i<t&&i!==t&&(e.style.top=t+"px"),o=window.scrollY}),{capture:!0,passive:!0})}};t.setTwoDirectionStickyPanel=a,t.setTwoDirectionStickyPanelById=function(e){a(document.getElementById(e))},t.hasScrollReachedBottom=function(e){if(!e)return!1;var t=e.scrollHeight,o=e.scrollTop,n=e.clientHeight,r=t-o;return r>=n-1&&r<=n+1},t.withScroll=function(e){if(!e)return!1;var t=e.scrollHeight,o=e.clientHeight;return!(t>=o-1&&t<=o+1)},t.escapeRegExp=function(e){return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},t.sanitiseInputText=function(e){return"string"==typeof e?e.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},t.removeHtmlTags=function(e){return"string"==typeof e?String(e).replace(/(<([^>]+)>)/gi,""):e},t.isValidIconElement=function(e){var t;return"function"==typeof e&&"svg"===(null===(t=e())||void 0===t?void 0:t.type)},t.isValidIconName=function(e){return!!e&&"string"==typeof e},t.formatNumber=function(e,t){return e.toLocaleString("en-AU",{minimumFractionDigits:t,maximumFractionDigits:t})||0},t.scrollTo=function(e,t){"function"==typeof(null==e?void 0:e.scrollTo)&&e.scrollTo({behavior:"smooth",top:t.top,left:t.left})},t.getBoundingClientInfo=function(e){return{height:Math.round(e.getBoundingClientRect().height),top:Math.round(e.getBoundingClientRect().top),bottom:Math.round(e.getBoundingClientRect().bottom),left:Math.round(e.getBoundingClientRect().left),right:Math.round(e.getBoundingClientRect().right)}},t.getMonthName=function(e){return null==e?void 0:e.toLocaleDateString(void 0,{month:"long"})},t.getFormattedDate=function(e){return"".concat(e.getDate(),"/").concat(e.getMonth()+1,"/").concat(e.getFullYear())}},4513:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSessionStorageJson=t.setSessionStorage=t.setCookieStorage=t.getSessionStorageJson=t.getSessionStorage=t.getCookieStorage=void 0;var o=function(){var e="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(e,1),window.sessionStorage.removeItem(e),!0)}catch(e){return!1}};t.getSessionStorage=function(e){if(e&&o())try{return window.sessionStorage.getItem(e)}catch(e){return}},t.setSessionStorage=function(e,t){if(e&&o())try{return window.sessionStorage.setItem(e,t)}catch(e){return}},t.getSessionStorageJson=function(e){if(e&&o())try{return JSON.parse(window.sessionStorage.getItem(e))}catch(e){return}},t.setSessionStorageJson=function(e,t){if(e&&o())try{return window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){return}},t.getCookieStorage=function(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var r=o[n];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},t.setCookieStorage=function(e,t,o){var n=window.location.hostname,r="localhost"===n?n:n.match(/(\.\w+){3}$/g);document.cookie="".concat(e,"=").concat(t,"; Domain=").concat(r,"; Path=/; Max-Age=").concat(o||86400)}},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},3751:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},8063:e=>{e.exports=require("@babel/runtime/helpers/typeof")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},2770:e=>{e.exports=require("styled-components")}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}var n={};(()=>{var e=n,t=o(3751);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=t(o(2608)).default;e.default=r})(),module.exports=n})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={9473:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9825)),i=function(e){var t=e.condition,r=e.children;return!0===t?r:null};i.propTypes={condition:n.default.bool},i.defaultProps={condition:!1};var a=i;t.default=a},3080:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9473)).default;t.default=n},9090:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={dateFormatExtraShort:"d MMM",dateFormatShort:"E d MMM",dateFormat:"E d MMM yyyy",dateFormatLong:"E d MMMM yyyy",timeFormat:"h:mm a",dayLabelFormat:"E MMM dd yyyy",weekStartsOn:1,weekFormat:"E",scrollToViewOptions:{behavior:"smooth",block:"end",scrollMode:"if-needed"}}},5050:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={notification:{success:{color:"#149000",backgroundColor:"#EEF7EB"},error:{color:"#BE0000",backgroundColor:"#F2DEDE"},warning:{color:"#FF5C00",backgroundColor:"#F6EDE6"},info:{color:"#3D9AF2",backgroundColor:"#ECF5FE"},notice:{color:"#FEB42B",backgroundColor:"#FFF3CD"}},textLink:{color:"#0060BB",hoverColor:"#00509C"}}},3290:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"identifiers",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"mixins",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"theme",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"themeV2",{enumerable:!0,get:function(){return i.default}});var n=o(r(1267)),i=o(r(492)),a=o(r(9098)),d=o(r(9090)),l=o(r(5050))},9098:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2770),i=o(r(1267)),a={globalStyles:(0,n.css)(["font-family:",";font-size:",";color:",";&,> *,> *:before,> *:after{box-sizing:border-box;}"],i.default.fontFamily.primary,i.default.fontSize,i.default.fontColor)};t.default=a},492:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],o={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},1267:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962"],o={fontFamily:{primary:"Roboto, Arial, sans-serif",icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},8254:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(6031)),i=o(r(2462)),a=o(r(2015)),d=(o(r(9825)),o(r(3080))),l=r(6925),c=["data"];t.default=function(e){var t=e.data,r=(0,i.default)(e,c),o=null==t?void 0:t.map((function(e){var t=e.onClick,r=e.name,o=e.label,n=e.icon;return a.default.createElement("a",{onClick:t,key:r,"data-testid":"".concat(r,"-btn")},a.default.createElement(d.default,{condition:!!n},a.default.createElement(n,null)),o)}));return a.default.createElement(l.StyledUtilityPanel,(0,n.default)({"data-testid":"utility-panel"},r),o)}},6925:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.StyledUtilityPanel=void 0;var n=o(r(2770)),i=r(3290),a=n.default.div.withConfig({displayName:"UtilityPanelstyle__StyledUtilityPanel",componentId:"sc-dck735-0"})(["display:inline-flex;flex-direction:row;justify-content:center;align-items:center;padding:12px 0;height:48px;background-color:",";box-shadow:0px 5px 8px rgba(0,0,0,0.15);border-radius:24px;a{display:flex;align-items:center;color:",";font-size:14px;line-height:17px;text-align:center;padding:4px 16px;margin:0;border-right:1px solid rgba(255,255,255,0.4);-webkit-background-clip:padding-box;background-clip:padding-box;white-space:nowrap;font-weight:500;&:hover{text-decoration:none;}&:last-child{border-right:0;}svg{fill:",";font-size:16px;margin-right:4px;}}"],i.theme.color[8],i.theme.color[11],i.theme.color[11]);t.StyledUtilityPanel=a},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},3751:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},2770:e=>{e.exports=require("styled-components")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}var o={};(()=>{var e=o,t=r(3751);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(8254)).default;e.default=n})(),module.exports=o})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={3751:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},7826:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var u=t[n]={exports:{}};return e[n](u,u.exports,r),u.exports}var n={};(()=>{var e=n,t=r(3751);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(7826)),u=r(2015),i=t(r(9825)),s=function(e){var t=e.isClicked,r=e.onClickOutside,n=e.children,i=(0,u.useState)(t),s=(0,o.default)(i,2),a=s[0],d=s[1],c=[],l=["modal"];(0,u.useEffect)((function(){return document.addEventListener("mousedown",f),document.addEventListener("touchstart",f),document.addEventListener("focusin",f),function(){document.removeEventListener("mousedown",f),document.removeEventListener("touchstart",f),document.removeEventListener("focusin",f)}}),[]);var f=function(e){l.includes(e.target.className)||p(e.target)},p=function(e){c&&Array.isArray(c)&&c.every((function(t){return!t.contains(e)}))?(d(!0),"function"==typeof r&&r()):d(!1)};return n((function(e){e&&c.push(e)}),a)};s.defaultProps={isClicked:!1},s.propTypes={isClicked:i.default.bool,children:i.default.func.isRequired};var a=s;e.default=a})(),module.exports=n})();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webjet/react",
|
|
3
3
|
"side-effects": false,
|
|
4
|
-
"version": "3.0
|
|
4
|
+
"version": "3.1.0",
|
|
5
5
|
"description": "Common react components",
|
|
6
6
|
"main": "components/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"standard-fix": "standard --fix",
|
|
13
13
|
"build": "rimraf styleguide && npm run build:styleguidist",
|
|
14
14
|
"build:styleguidist": "styleguidist build --config styleguide.config.js",
|
|
15
|
-
"dev": "webpack
|
|
15
|
+
"dev": "webpack server --env app --open",
|
|
16
16
|
"clean": "rimraf components && rimraf utils",
|
|
17
17
|
"pre-commit": "npm run standard-check && npm run test",
|
|
18
18
|
"publish:build": "npm run clean && cross-env NODE_ENV=production webpack --env production",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"marked": "^4.0.12",
|
|
38
38
|
"ncp": "^2.0.0",
|
|
39
39
|
"polished": "^4.1.4",
|
|
40
|
-
"rc-input-number": "
|
|
40
|
+
"rc-input-number": "4.6.3",
|
|
41
41
|
"rc-slider": "^9.7.5",
|
|
42
42
|
"react-countdown-circle-timer": "^3.0.9",
|
|
43
43
|
"react-day-picker": "8.6.0",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
"less-loader": "^11.1.3",
|
|
73
73
|
"react": "^18.2.0",
|
|
74
74
|
"react-dom": "^18.2.0",
|
|
75
|
-
"react-styleguidist": "^13.1.
|
|
75
|
+
"react-styleguidist": "^13.1.2",
|
|
76
76
|
"rimraf": "^3.0.2",
|
|
77
|
-
"standard": "
|
|
77
|
+
"standard": "17.1.0",
|
|
78
78
|
"style-loader": "^3.3.3",
|
|
79
|
-
"webpack": "
|
|
80
|
-
"webpack-cli": "
|
|
81
|
-
"webpack-dev-server": "
|
|
79
|
+
"webpack": "5.91.0",
|
|
80
|
+
"webpack-cli": "5.1.4",
|
|
81
|
+
"webpack-dev-server": "5.0.4",
|
|
82
82
|
"webpack-merge": "^5.8.0",
|
|
83
83
|
"webpack-node-externals": "^3.0.0"
|
|
84
84
|
},
|
package/utils/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={
|
|
1
|
+
(()=>{"use strict";var t={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)}}},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.escapeRegExp=t.detectOS=t.BREAKPOINTS=void 0,t.fetchDateInMilliseconds=function(){return(new Date).getTime()},t.getBoundingClientInfo=t.formatNumber=void 0,t.getDurationInMiliSeconds=function(t,e){return e-t},t.withScroll=t.setTwoDirectionStickyPanelById=t.setTwoDirectionStickyPanel=t.scrollTo=t.sanitiseInputText=t.removeHtmlTags=t.isValidIconName=t.isValidIconElement=t.isUserLoggedIn=t.isTouchDevice=t.isMobileTablet=t.isMobilePortrait=t.isMobile=t.isMatchMedia=t.hasScrollReachedBottom=t.getMonthName=t.getFormattedDate=void 0;var e=o(4513),i={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199};t.BREAKPOINTS=i;var r=function(t){return window.matchMedia(t).matches};t.isMatchMedia=r,t.isMobile=function(){return r("(max-width: ".concat(i.MOBILE,"px)"))},t.isMobileTablet=function(){return r("(max-width: ".concat(i.TABLET,"px)"))},t.isMobilePortrait=function(){return r("(max-width: ".concat(i.MOBILE_PORTRAIT,"px)"))},t.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},t.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)}},t.isUserLoggedIn=function(){var t,o=null===(t=(0,e.getCookieStorage)("customer-soft-id"))||void 0===t?void 0:t.split(".");if(o&&o.length>1){var n=window.atob(o[1]).toString("ascii");if(JSON.parse(n).firstName)return!0}return!1};var s=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})}};t.setTwoDirectionStickyPanel=s,t.setTwoDirectionStickyPanelById=function(t){s(document.getElementById(t))},t.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},t.withScroll=function(t){if(!t)return!1;var e=t.scrollHeight,o=t.clientHeight;return!(e>=o-1&&e<=o+1)},t.escapeRegExp=function(t){return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},t.sanitiseInputText=function(t){return"string"==typeof t?t.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},t.removeHtmlTags=function(t){return"string"==typeof t?String(t).replace(/(<([^>]+)>)/gi,""):t},t.isValidIconElement=function(t){var e;return"function"==typeof t&&"svg"===(null===(e=t())||void 0===e?void 0:e.type)},t.isValidIconName=function(t){return!!t&&"string"==typeof t},t.formatNumber=function(t,e){return t.toLocaleString("en-AU",{minimumFractionDigits:e,maximumFractionDigits:e})||0},t.scrollTo=function(t,e){"function"==typeof(null==t?void 0:t.scrollTo)&&t.scrollTo({behavior:"smooth",top:e.top,left:e.left})},t.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)}},t.getMonthName=function(t){return null==t?void 0:t.toLocaleDateString(void 0,{month:"long"})},t.getFormattedDate=function(t){return"".concat(t.getDate(),"/").concat(t.getMonth()+1,"/").concat(t.getFullYear())}})(),module.exports=n})();
|
package/utils/ga.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={
|
|
1
|
+
(()=>{"use strict";var e={1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},3751:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},7826:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var u=r[n]={exports:{}};return e[n](u,u.exports,t),u.exports}var n={};(()=>{var e=n,r=t(3751);Object.defineProperty(e,"__esModule",{value:!0}),e.pushGAEvent=e.gaAttributes=void 0;var o=r(t(1116)),u=r(t(7826));function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}e.gaAttributes=function(e){var r={};return Object.entries(e).forEach((function(e){var t=(0,u.default)(e,2),n=t[0],o=t[1];null!=o&&(r["data-ga-".concat(n)]=String(o))})),r},e.pushGAEvent=function(e,r){var t=window.dataLayer;e&&t&&t.push(a(e,r))};var a=function(e,r){return function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){(0,o.default)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}({event:e},r)}})(),module.exports=n})();
|
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})();
|