@sunrise-upc/mobile-prod-card 12.2.0-beta.2 → 12.2.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoverCheckWrapper.js","sources":["../../../../src/components/NewLineCheck/CoverCheckWrapper.tsx"],"sourcesContent":["import React, { FC, useEffect, useState } from 'react';\nimport CheckCoverageComponent from './CheckCoverage';\nimport Styles from './CoverCheckWrapper.module.scss';\nimport { viewport } from '../../utils/utils';\n\
|
|
1
|
+
{"version":3,"file":"CoverCheckWrapper.js","sources":["../../../../src/components/NewLineCheck/CoverCheckWrapper.tsx"],"sourcesContent":["import React, { FC, useEffect, useState } from 'react';\nimport CheckCoverageComponent from './CheckCoverage';\nimport Styles from './CoverCheckWrapper.module.scss';\nimport { viewport } from '../../utils/utils';\n\nconst CheckCoverage: FC<any> = ({\n content,\n isFetchingLineCheck,\n overlayIsOpen,\n externalHandleModal,\n productName,\n onSuccess,\n lineCheckOnClear,\n onCreateCart\n}) => {\n const openInOverlay = overlayIsOpen ? overlayIsOpen : content?.openInOverlay;\n content['openInOverlay'] = true;\n const [openModal, setOpenModal] = useState(overlayIsOpen);\n\n const handleModal = () => {\n setOpenModal(!openModal);\n externalHandleModal && externalHandleModal(!openModal);\n };\n const viewPort = viewport();\n const isMobile = viewPort === 'mobile' ? true : false;\n\n useEffect(() => {\n setOpenModal(overlayIsOpen);\n }, [overlayIsOpen]);\n\n return (\n <div>\n {isMobile && openModal && openInOverlay ? (\n <div className={Styles['overlay']}>\n <div className={Styles['modal-content']}>\n <CheckCoverageComponent\n content={content}\n handleModal={handleModal}\n openModal={openModal}\n isFetchingLineCheck={isFetchingLineCheck}\n productName={productName}\n onSuccess={onSuccess}\n lineCheckOnClear={lineCheckOnClear}\n onCreateCart={onCreateCart}\n />\n </div>\n </div>\n ) : (\n <CheckCoverageComponent\n content={content}\n isFetchingLineCheck={isFetchingLineCheck}\n onSuccess={onSuccess}\n lineCheckOnClear={lineCheckOnClear}\n />\n )}\n </div>\n );\n};\n\nexport default CheckCoverage;\n"],"names":["CheckCoverage","content","isFetchingLineCheck","overlayIsOpen","externalHandleModal","productName","onSuccess","lineCheckOnClear","onCreateCart","openInOverlay","openModal","setOpenModal","useState","isMobile","viewport","useEffect","React","createElement","className","Styles","CheckCoverageComponent","handleModal"],"mappings":"uLAKA,MAAMA,EAAyB,EAC7BC,UACAC,sBACAC,gBACAC,sBACAC,cACAC,YACAC,mBACAC,mBAEA,MAAMC,EAAgBN,IAAgCF,eAAAA,EAASQ,eAC/DR,EAAuB,eAAI,EAC3B,MAAOS,EAAWC,GAAgBC,EAAST,GAOrCU,EAAwB,WADbC,IAOjB,OAJAC,EAAU,KACRJ,EAAaR,IACZ,CAACA,IAGFa,EAAAC,cAAA,MAAA,KACGJ,GAAYH,GAAaD,EACxBO,EAAAC,cAAA,MAAA,CAAKC,UAAWC,EAAgB,SAC9BH,EAAAC,cAAA,MAAA,CAAKC,UAAWC,EAAO,kBACrBH,EAAAC,cAACG,EAAsB,CACrBnB,QAASA,EACToB,YAlBQ,KAClBV,GAAcD,GACdN,GAAuBA,GAAqBM,IAiBlCA,UAAWA,EACXR,oBAAqBA,EACrBG,YAAaA,EACbC,UAAWA,EACXC,iBAAkBA,EAClBC,aAAcA,MAKpBQ,EAAAC,cAACG,EAAsB,CACrBnB,QAASA,EACTC,oBAAqBA,EACrBI,UAAWA,EACXC,iBAAkBA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{useState as l,useContext as o,useRef as n,useEffect as i}from"react";import t from"./StaticLineTable.module.scss.js";import d from"../sharedCarousel/CarouselComponent.js";import{viewport as r,getElementMaximumHeight as u,setLocalStoreWithExpiry as s}from"../../utils/utils.js";import v from"./StaticProduct.js";import{getVocherPromotion as a,fetchOttServiceOptions as c,fetchOfferingDataLineTableV2 as p}from"../../services/LineTableService.js";import{LineTableBasicPropConfig as g}from"../../services/LineTableBasicPropConfig.js";import{filterShogunProducts as m,getTimeUntilNextTimerEvent as f,fetchStaticProductIds as w,fetchFilteredProducts as h,isShogunOfferResolved as b,getShogunSharedOffer as L,fetchPegaProducts as C}from"./Product.utils.js";import y from"js-cookie";import{LINETABLE as T}from"../../Analytics/AnalyticsConstants.js";import{trackEligibleItem as P}from"../../models/Analytics/items.js";import{ONE_ECOMMERCE_HARDWARE_SUMMARY as S,VOUCHER as O,VCTYPE as I,NEW as k}from"../../utils/constants.js";import{AppContext as E,actionTypes as j}from"./StaticLineTableStore/StaticLineTableProvider.js";const B=({content:B,setGenericErrorModalDetails:x,metadata:A,tabIndex:F,constants:D,loginSuccess:N,activeIndex:U,mainContent:V,address:$,eligibleBundle:R,linecheckSuccessCallBack:J,selectedOption:q,basicConfigUrl:M,selectedExistingOption:z,setLoginSuccess:_,lineCheckCallBack:G,setToggleState:K,toggleState:H,noTabs:Q,deviceFlow:W,deviceFlowCallBack:X,ubRatePlanObj:Y,lineCheckOnClear:Z,pegaIntegration:ee,pegaCustomerInterest:le,useStoryblokOrder:oe,isFetching:ne,setIsFetching:ie,isProdEnv:te,toggleContent:de,localCacheDuration:re,apiCache:ue})=>{var se,ve;const ae=r(),ce=null==B?void 0:B._uid,[pe,ge]=l(),[me,fe]=l(),[we,he]=l(),be=null===(se=null==g?void 0:g.getInstance())||void 0===se?void 0:se.getBaseUrl();let Le=void 0!==typeof window&&y.get("sunriseAuth");Le=Le&&JSON.parse(Le);const Ce=o(E),ye="MOBILE"===(null==B?void 0:B.pageType),Te=void 0!==ue&&ue,Pe=(()=>{var e;if("undefined"==typeof window)return null;const l=new URLSearchParams(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.search);return null==l?void 0:l.get("gloxtoken")})(),Se=Boolean(null==V?void 0:V.isRewardsFlow)&&Boolean(Pe),[Oe,Ie]=l(()=>{var e;if(!de||!de.enableLoggedInPrice)return null;const l=localStorage.getItem("userLoggedPricesToggle");if("true"===l)return!0;if("false"===l)return!1;const o=(null===(e=null==de?void 0:de.customers)||void 0===e?void 0:e.toLowerCase())===k;return!(!o||!(null==de?void 0:de.newUserToggleEnabled))||(!(o||!(null==de?void 0:de.loggedUserToggleEnabled))||null)}),[ke,Ee]=l(!0),je=n(null),Be=n(""),xe=n({});i(()=>(setTimeout(()=>{Ae()},100),null===window||void 0===window||window.addEventListener("resize",Ae),null===window||void 0===window||window.addEventListener("load",Ae),()=>{window.removeEventListener("resize",Ae),window.removeEventListener("load",Ae)}),[null==B?void 0:B.productList,me,we]);const Ae=()=>{var e;if(Q){const e=[null==H?void 0:H.TV,null==H?void 0:H.Netflix,null==H?void 0:H.gigaSpeed].filter(Boolean).length,l=null==H?void 0:H.TV,o=null==H?void 0:H.Netflix,n=null==H?void 0:H.gigaSpeed;u(`productCardV3${l&&o&&n?3:l&&o||e>=2&&(!n||l||o)?2:1===e||2===e?1:0}`,null==me?void 0:me.length)}else u(`productCardV3${U}`,null===(e=null==B?void 0:B.productList)||void 0===e?void 0:e.length)},Fe=sessionStorage.getItem(S);Fe&&JSON.parse(Fe);const De=null==B?void 0:B.enableFPB;i(()=>{var e,l,o,n,i,t,d,r,u;if(pe&&(null===(e=Object.keys(pe))||void 0===e?void 0:e.length)>0&&P("view",pe[ce],"",T,null,ee),ee&&pe&&(null===(l=Object.keys(pe))||void 0===l?void 0:l.length)>0){const e=(null===(o=null==B?void 0:B.productList)||void 0===o?void 0:o.length)&&(null==B?void 0:B.productList)||new Array((null===(n=null==B?void 0:B.productList)||void 0===n?void 0:n.length)||3).fill(1),l=null===(i=pe[ce])||void 0===i?void 0:i.map(e=>null==e?void 0:e.id),t=e.filter(e=>null==l?void 0:l.includes(e.products[0].reference.name));oe?t.sort((l,o)=>e.indexOf(l)-e.indexOf(o)):t.sort((e,o)=>l.indexOf(e.products[0].reference.name)-l.indexOf(o.products[0].reference.name)),he(t),ie(!1)}if(Se&&pe&&(null===(t=Object.keys(pe))||void 0===t?void 0:t.length)>0){const e=(null!==(d=pe[ce])&&void 0!==d?d:[]).map(e=>null==e?void 0:e.id),l=(null===(r=null==B?void 0:B.productList)||void 0===r?void 0:r.length)&&(null==B?void 0:B.productList)||new Array((null===(u=null==B?void 0:B.productList)||void 0===u?void 0:u.length)||3).fill(1);he(m(l,e)),ie(!1)}},[pe]),i(()=>{var e;pe&&(null===(e=Object.keys(pe))||void 0===e?void 0:e.length)>0&&!ye&&(null==R?void 0:R.eligibleBundle)&&P("available",pe[ce],"",T,null==R?void 0:R.eligibleBundle,ee)},[R,pe]),i(()=>{if("undefined"==typeof window)return;const e=e=>{Ie(e.detail.value)};return window.addEventListener("user-logged-prices-toggle-all",e),()=>{window.removeEventListener("user-logged-prices-toggle-all",e)}},[]);const Ne=(e=!1)=>{var l,o;const n=[];let i={atlOffers:[]},t=null==V?void 0:V.enableExistingCustomer,d=null==V?void 0:V.subscriptionType,r="4P"==(null==V?void 0:V.pageType);const u=null==B?void 0:B.isReturnPromo,s=(null==z?void 0:z.length)>0,v=null==z?void 0:z.join(",");d=t||Oe?d:v,t=(t||s)&&Le||Oe||!de,(null==Le?void 0:Le.siteId)&&(null==de?void 0:de.enableLoggedInPrice)&&de.customers!==k&&(0==Oe?d="none":!0===Oe&&(d=void 0)),(null==de?void 0:de.enableLoggedInPrice)&&!1===Oe&&(t=!1);const a=!!(null==B?void 0:B.enableP2P),c=`tab-${F}`;if(e||!((e,l)=>{const o=xe.current[e];return!!o&&(0!==l&&(void 0===l||(l<0||(Date.now()-o.timestamp)/6e4<l)))})(c,null!=re?re:1)){if(Se){const e=Pe;if(e)return b(e)||ie(!0),void L(e,ce,be).then(e=>{xe.current[c]={results:e,timestamp:Date.now()},ge({[ce]:e}),x({showPopup:!1})}).catch(()=>{var e;x({showPopup:!0,content:null===(e=null==V?void 0:V.telesalesBlok)||void 0===e?void 0:e[0]})}).finally(()=>{ie(!1)})}if(ie(!0),ee)i=C(B,le,"LineItem");else{w(null==B?void 0:B.productList,n,r,null==V?void 0:V.optionId,Oe);const e=JSON.stringify(n.map(e=>({id:null==e?void 0:e.id,promoIds:(null==e?void 0:e.promoIds)||[]})));Be.current=e}if(e||F===U&&!(null==pe?void 0:pe[ce])||F===U&&N||z)try{null===(l=p(ee?i:n,null==B?void 0:B._uid,be,t,d,u,a,ee,Te,De))||void 0===l||l.then(e=>{var l;const o=null!==(l=null==e?void 0:e[ce])&&void 0!==l?l:[];xe.current[c]={results:o,timestamp:Date.now()},ge(e),x({showPopup:!1})}).catch(e=>{var l;x({showPopup:!0,content:null===(l=null==V?void 0:V.telesalesBlok)||void 0===l?void 0:l[0]})}).finally(()=>{ie(!1)})}catch(e){x({showPopup:!0,content:null===(o=null==V?void 0:V.telesalesBlok)||void 0===o?void 0:o[0]})}else pe&&ie(!1)}else ge({[ce]:xe.current[c].results})};i(()=>{je.current&&(clearTimeout(je.current),je.current=null);if(!(U===F||null==U))return;const e=((null==B?void 0:B.productList)||[]).reduce((e,l)=>{var o;const n=null===(o=null==l?void 0:l.timer)||void 0===o?void 0:o[0];if(!(null==n?void 0:n.enableCounter)||!(null==n?void 0:n.startTime)||!(null==n?void 0:n.endTime))return e;const i=f(n.startTime,n.endTime);return i<=0?e:0===e||i<e?i:e},0);return e<=0?void 0:(je.current=setTimeout(()=>{const e=[];w(null==B?void 0:B.productList,e,"4P"==(null==V?void 0:V.pageType),null==V?void 0:V.optionId,Oe);if(JSON.stringify(e.map(e=>({id:null==e?void 0:e.id,promoIds:(null==e?void 0:e.promoIds)||[]})))===Be.current)return;const l=`tab-${F}`;delete xe.current[l],ge(e=>e&&"object"==typeof e?Object.assign(Object.assign({},e),{[ce]:null}):e),Ne(!0)},e),()=>{je.current&&(clearTimeout(je.current),je.current=null)})},[U,F,null==B?void 0:B.productList,ce,pe]),i(()=>{Ee(!0),U!=F&&null!=U||(void 0!==Oe&&(null==pe?void 0:pe[ce])&&(pe[ce]=null),Ne(),Ee(!1))},[U]),i(()=>{if((null==Le?void 0:Le.siteId)&&N){const e=`tab-${F}`;delete xe.current[e],Ne(),sessionStorage.removeItem("vasPopUp")}},[N]),i(()=>{if(null!=q&&null!=z){const e=`tab-${F}`;delete xe.current[e],Ne()}},[q,z]),i(()=>{if(void 0===Oe||ke)return;const e=`tab-${F}`;delete xe.current[e],(null==pe?void 0:pe[ce])&&(pe[ce]=null),Ne()},[Oe]),i(()=>{var e,l,o,n,i,t,d,r,u,v,p,g,m,f,w,h,b,L,C;const y=window&&new URLSearchParams(null===window||void 0===window?void 0:window.location.search),T=null==y?void 0:y.get(O);if(T&&(null===(r=null===(d=null===(t=null===(i=null===(n=null===(o=null===(l=null===(e=null==B?void 0:B.productList)||void 0===e?void 0:e[0])||void 0===l?void 0:l.products)||void 0===o?void 0:o[0])||void 0===n?void 0:n.reference)||void 0===i?void 0:i.content)||void 0===t?void 0:t.product)||void 0===d?void 0:d[0])||void 0===r?void 0:r.productId))try{a(null===(h=null===(w=null===(f=null===(m=null===(g=null===(p=null===(v=null===(u=null==B?void 0:B.productList)||void 0===u?void 0:u[0])||void 0===v?void 0:v.products)||void 0===p?void 0:p[0])||void 0===g?void 0:g.reference)||void 0===m?void 0:m.content)||void 0===f?void 0:f.product)||void 0===w?void 0:w[0])||void 0===h?void 0:h.productId,T).then(e=>{e&&s(I,{voucher:T,voucherType:"qoqa"})})}catch(e){}if(Ce&&F===U){const{store:e,dispatch:l}=Ce;let o=!1,n=!1;null===(b=(null==B?void 0:B.productList)||[])||void 0===b||b.forEach(e=>{(null==e?void 0:e.enableTVStreamingOptionsPopUp)&&(n=!0),(null==e?void 0:e.enableTVStreamingOptions)&&(o=!0)}),0===(null===(L=null==e?void 0:e.ottOptionsApi)||void 0===L?void 0:L.length)&&(o||n)&&(null===(C=c())||void 0===C||C.then(e=>{(null==e?void 0:e.length)>0&&l({type:null==j?void 0:j.ottOptionsApi,payload:e})}).catch(()=>{}))}},[]);let Ue=[];return i(()=>{Q&&(Ue=h(null==B?void 0:B.productList,H),fe(Ue))},[H]),i(()=>{(null==W?void 0:W.isDeviceFlow)&&pe&&(null==W||W.prodcardcallbackOfferApiData(pe))},[pe]),i(()=>{var e,l;Q&&!(null==W?void 0:W.isDeviceFlow)?he(me):he((null===(e=null==B?void 0:B.productList)||void 0===e?void 0:e.length)&&(null==B?void 0:B.productList)||new Array((null===(l=null==B?void 0:B.productList)||void 0===l?void 0:l.length)||3).fill(1))},[me]),e.createElement("div",null,e.createElement("div",{className:t.titlecontainer},(null==B?void 0:B.title)&&e.createElement("div",{className:t.title},null==B?void 0:B.title),(null==B?void 0:B.subTitle)&&e.createElement("div",{className:t.description},null==B?void 0:B.subTitle)),e.createElement("div",{className:"linetableV3"},ae&&we&&(null==we?void 0:we.length)>0&&e.createElement(d,{carouselIndex:0,key:U,arrow:null==V?void 0:V.enableMobileArrows},we&&(null==we?void 0:we.length)>0&&(null===(ve=we||[])||void 0===ve?void 0:ve.map((l,o)=>{var n;return e.createElement("div",{id:`productCardV3${U}`,style:{textAlign:"center"},key:o},e.createElement(v,{content:ee&&ne&&!pe?{}:l,offeringData:pe,uniqueId:ce,storyContent:B,metadata:A,tabIndex:F,cardsLength:null===(n=null==B?void 0:B.productList)||void 0===n?void 0:n.length,indexKey:o,constants:D,mainContent:V,linecheckSuccessCallBack:J,lineCheckCallBack:G,address:$,eligibleBundle:R,selectedOption:q,fetchOfferData:Ne,basicConfigUrl:M,selectedExistingOption:z,setLoginSuccess:_,enableP2P:null==B?void 0:B.enableP2P,loginSuccess:N,setToggleState:K,toggleState:H,noTabs:Q,deviceFlow:W,deviceFlowCallBack:X,selectedRP:null==Y?void 0:Y.selectedRP,continueCart:null==Y?void 0:Y.continueCart,lineCheckOnClear:Z,pegaIntegration:ee,isProdEnv:te,deviceUltimateBundle:De,toggleContent:de,pricesToggleState:Oe,isShogunFlow:Se,shogunToken:Pe}))})))))};export{B as default};
|
|
1
|
+
import e,{useState as l,useContext as o,useRef as n,useEffect as i}from"react";import t from"./StaticLineTable.module.scss.js";import d from"../sharedCarousel/CarouselComponent.js";import{viewport as r,getElementMaximumHeight as u,setLocalStoreWithExpiry as s}from"../../utils/utils.js";import v from"./StaticProduct.js";import{getVocherPromotion as a,fetchOttServiceOptions as c,fetchOfferingDataLineTableV2 as p}from"../../services/LineTableService.js";import{LineTableBasicPropConfig as g}from"../../services/LineTableBasicPropConfig.js";import{filterShogunProducts as m,getTimeUntilNextTimerEvent as f,fetchStaticProductIds as w,fetchFilteredProducts as h,isShogunOfferResolved as b,getShogunSharedOffer as L,fetchPegaProducts as C}from"./Product.utils.js";import y from"js-cookie";import{LINETABLE as T}from"../../Analytics/AnalyticsConstants.js";import{trackEligibleItem as P}from"../../models/Analytics/items.js";import{ONE_ECOMMERCE_HARDWARE_SUMMARY as S,VOUCHER as O,VCTYPE as I,NEW as k}from"../../utils/constants.js";import{AppContext as E,actionTypes as j}from"./StaticLineTableStore/StaticLineTableProvider.js";const B=({content:B,setGenericErrorModalDetails:x,metadata:A,tabIndex:F,constants:D,loginSuccess:N,activeIndex:U,mainContent:V,address:$,eligibleBundle:R,linecheckSuccessCallBack:J,selectedOption:q,basicConfigUrl:M,selectedExistingOption:z,setLoginSuccess:_,lineCheckCallBack:G,setToggleState:K,toggleState:H,noTabs:Q,deviceFlow:W,deviceFlowCallBack:X,ubRatePlanObj:Y,lineCheckOnClear:Z,pegaIntegration:ee,pegaCustomerInterest:le,useStoryblokOrder:oe,isFetching:ne,setIsFetching:ie,isProdEnv:te,toggleContent:de,localCacheDuration:re,apiCache:ue})=>{var se,ve;const ae=r(),ce=null==B?void 0:B._uid,[pe,ge]=l(),[me,fe]=l(),[we,he]=l(),be=null===(se=null==g?void 0:g.getInstance())||void 0===se?void 0:se.getBaseUrl();let Le=void 0!==typeof window&&y.get("sunriseAuth");Le=Le&&JSON.parse(Le);const Ce=o(E),ye="MOBILE"===(null==B?void 0:B.pageType),Te=(()=>{var e;if("undefined"==typeof window)return null;const l=new URLSearchParams(null===(e=null===window||void 0===window?void 0:window.location)||void 0===e?void 0:e.search);return null==l?void 0:l.get("gloxtoken")})(),Pe=Boolean(null==V?void 0:V.isRewardsFlow)&&Boolean(Te),Se=void 0!==ue&&ue,[Oe,Ie]=l(()=>{var e;if(!de||!de.enableLoggedInPrice)return null;const l=localStorage.getItem("userLoggedPricesToggle");if("true"===l)return!0;if("false"===l)return!1;const o=(null===(e=null==de?void 0:de.customers)||void 0===e?void 0:e.toLowerCase())===k;return!(!o||!(null==de?void 0:de.newUserToggleEnabled))||(!(o||!(null==de?void 0:de.loggedUserToggleEnabled))||null)}),[ke,Ee]=l(!0),je=n(null),Be=n(""),xe=n({});i(()=>(setTimeout(()=>{Ae()},100),null===window||void 0===window||window.addEventListener("resize",Ae),null===window||void 0===window||window.addEventListener("load",Ae),()=>{window.removeEventListener("resize",Ae),window.removeEventListener("load",Ae)}),[null==B?void 0:B.productList,me,we]);const Ae=()=>{var e;if(Q){const e=[null==H?void 0:H.TV,null==H?void 0:H.Netflix,null==H?void 0:H.gigaSpeed].filter(Boolean).length,l=null==H?void 0:H.TV,o=null==H?void 0:H.Netflix,n=null==H?void 0:H.gigaSpeed;u(`productCardV3${l&&o&&n?3:l&&o||e>=2&&(!n||l||o)?2:1===e||2===e?1:0}`,null==me?void 0:me.length)}else u(`productCardV3${U}`,null===(e=null==B?void 0:B.productList)||void 0===e?void 0:e.length)},Fe=sessionStorage.getItem(S);Fe&&JSON.parse(Fe);const De=null==B?void 0:B.enableFPB;i(()=>{var e,l,o,n,i,t,d,r,u;if(pe&&(null===(e=Object.keys(pe))||void 0===e?void 0:e.length)>0&&P("view",pe[ce],"",T,null,ee),ee&&pe&&(null===(l=Object.keys(pe))||void 0===l?void 0:l.length)>0){const e=(null===(o=null==B?void 0:B.productList)||void 0===o?void 0:o.length)&&(null==B?void 0:B.productList)||new Array((null===(n=null==B?void 0:B.productList)||void 0===n?void 0:n.length)||3).fill(1),l=null===(i=pe[ce])||void 0===i?void 0:i.map(e=>null==e?void 0:e.id),t=e.filter(e=>null==l?void 0:l.includes(e.products[0].reference.name));oe?t.sort((l,o)=>e.indexOf(l)-e.indexOf(o)):t.sort((e,o)=>l.indexOf(e.products[0].reference.name)-l.indexOf(o.products[0].reference.name)),he(t),ie(!1)}if(Pe&&pe&&(null===(t=Object.keys(pe))||void 0===t?void 0:t.length)>0){const e=(null!==(d=pe[ce])&&void 0!==d?d:[]).map(e=>null==e?void 0:e.id),l=(null===(r=null==B?void 0:B.productList)||void 0===r?void 0:r.length)&&(null==B?void 0:B.productList)||new Array((null===(u=null==B?void 0:B.productList)||void 0===u?void 0:u.length)||3).fill(1);he(m(l,e)),ie(!1)}},[pe]),i(()=>{var e;pe&&(null===(e=Object.keys(pe))||void 0===e?void 0:e.length)>0&&!ye&&(null==R?void 0:R.eligibleBundle)&&P("available",pe[ce],"",T,null==R?void 0:R.eligibleBundle,ee)},[R,pe]),i(()=>{if("undefined"==typeof window)return;const e=e=>{Ie(e.detail.value)};return window.addEventListener("user-logged-prices-toggle-all",e),()=>{window.removeEventListener("user-logged-prices-toggle-all",e)}},[]);const Ne=(e=!1)=>{var l,o;const n=[];let i={atlOffers:[]},t=null==V?void 0:V.enableExistingCustomer,d=null==V?void 0:V.subscriptionType,r="4P"==(null==V?void 0:V.pageType);const u=null==B?void 0:B.isReturnPromo,s=(null==z?void 0:z.length)>0,v=null==z?void 0:z.join(",");d=t||Oe?d:v,t=(t||s)&&Le||Oe||!de,(null==Le?void 0:Le.siteId)&&(null==de?void 0:de.enableLoggedInPrice)&&de.customers!==k&&(0==Oe?d="none":!0===Oe&&(d=void 0)),(null==de?void 0:de.enableLoggedInPrice)&&!1===Oe&&(t=!1);const a=!!(null==B?void 0:B.enableP2P),c=`tab-${F}`;if(e||!((e,l)=>{const o=xe.current[e];return!!o&&(0!==l&&(void 0===l||(l<0||(Date.now()-o.timestamp)/6e4<l)))})(c,null!=re?re:1)){if(Pe){const e=Te;if(e)return b(e)||ie(!0),void L(e,ce,be).then(e=>{xe.current[c]={results:e,timestamp:Date.now()},ge({[ce]:e}),x({showPopup:!1})}).catch(()=>{var e;x({showPopup:!0,content:null===(e=null==V?void 0:V.telesalesBlok)||void 0===e?void 0:e[0]})}).finally(()=>{ie(!1)})}if(ie(!0),ee)i=C(B,le,"LineItem");else{w(null==B?void 0:B.productList,n,r,null==V?void 0:V.optionId,Oe);const e=JSON.stringify(n.map(e=>({id:null==e?void 0:e.id,promoIds:(null==e?void 0:e.promoIds)||[]})));Be.current=e}if(e||F===U&&!(null==pe?void 0:pe[ce])||F===U&&N||z)try{null===(l=p(ee?i:n,null==B?void 0:B._uid,be,t,d,u,a,ee,Se,De))||void 0===l||l.then(e=>{var l;const o=null!==(l=null==e?void 0:e[ce])&&void 0!==l?l:[];xe.current[c]={results:o,timestamp:Date.now()},ge(e),x({showPopup:!1})}).catch(e=>{var l;x({showPopup:!0,content:null===(l=null==V?void 0:V.telesalesBlok)||void 0===l?void 0:l[0]})}).finally(()=>{ie(!1)})}catch(e){x({showPopup:!0,content:null===(o=null==V?void 0:V.telesalesBlok)||void 0===o?void 0:o[0]})}else pe&&ie(!1)}else ge({[ce]:xe.current[c].results})};i(()=>{je.current&&(clearTimeout(je.current),je.current=null);if(!(U===F||null==U))return;const e=((null==B?void 0:B.productList)||[]).reduce((e,l)=>{var o;const n=null===(o=null==l?void 0:l.timer)||void 0===o?void 0:o[0];if(!(null==n?void 0:n.enableCounter)||!(null==n?void 0:n.startTime)||!(null==n?void 0:n.endTime))return e;const i=f(n.startTime,n.endTime);return i<=0?e:0===e||i<e?i:e},0);return e<=0?void 0:(je.current=setTimeout(()=>{const e=[];w(null==B?void 0:B.productList,e,"4P"==(null==V?void 0:V.pageType),null==V?void 0:V.optionId,Oe);if(JSON.stringify(e.map(e=>({id:null==e?void 0:e.id,promoIds:(null==e?void 0:e.promoIds)||[]})))===Be.current)return;const l=`tab-${F}`;delete xe.current[l],ge(e=>e&&"object"==typeof e?Object.assign(Object.assign({},e),{[ce]:null}):e),Ne(!0)},e),()=>{je.current&&(clearTimeout(je.current),je.current=null)})},[U,F,null==B?void 0:B.productList,ce,pe]),i(()=>{Ee(!0),U!=F&&null!=U||(void 0!==Oe&&(null==pe?void 0:pe[ce])&&(pe[ce]=null),Ne(),Ee(!1))},[U]),i(()=>{if((null==Le?void 0:Le.siteId)&&N){const e=`tab-${F}`;delete xe.current[e],Ne(),sessionStorage.removeItem("vasPopUp")}},[N]),i(()=>{if(null!=q&&null!=z){const e=`tab-${F}`;delete xe.current[e],Ne()}},[q,z]),i(()=>{if(void 0===Oe||ke)return;const e=`tab-${F}`;delete xe.current[e],(null==pe?void 0:pe[ce])&&(pe[ce]=null),Ne()},[Oe]),i(()=>{var e,l,o,n,i,t,d,r,u,v,p,g,m,f,w,h,b,L,C;const y=window&&new URLSearchParams(null===window||void 0===window?void 0:window.location.search),T=null==y?void 0:y.get(O);if(T&&(null===(r=null===(d=null===(t=null===(i=null===(n=null===(o=null===(l=null===(e=null==B?void 0:B.productList)||void 0===e?void 0:e[0])||void 0===l?void 0:l.products)||void 0===o?void 0:o[0])||void 0===n?void 0:n.reference)||void 0===i?void 0:i.content)||void 0===t?void 0:t.product)||void 0===d?void 0:d[0])||void 0===r?void 0:r.productId))try{a(null===(h=null===(w=null===(f=null===(m=null===(g=null===(p=null===(v=null===(u=null==B?void 0:B.productList)||void 0===u?void 0:u[0])||void 0===v?void 0:v.products)||void 0===p?void 0:p[0])||void 0===g?void 0:g.reference)||void 0===m?void 0:m.content)||void 0===f?void 0:f.product)||void 0===w?void 0:w[0])||void 0===h?void 0:h.productId,T).then(e=>{e&&s(I,{voucher:T,voucherType:"qoqa"})})}catch(e){}if(Ce&&F===U){const{store:e,dispatch:l}=Ce;let o=!1,n=!1;null===(b=(null==B?void 0:B.productList)||[])||void 0===b||b.forEach(e=>{(null==e?void 0:e.enableTVStreamingOptionsPopUp)&&(n=!0),(null==e?void 0:e.enableTVStreamingOptions)&&(o=!0)}),0===(null===(L=null==e?void 0:e.ottOptionsApi)||void 0===L?void 0:L.length)&&(o||n)&&(null===(C=c())||void 0===C||C.then(e=>{(null==e?void 0:e.length)>0&&l({type:null==j?void 0:j.ottOptionsApi,payload:e})}).catch(()=>{}))}},[]);let Ue=[];return i(()=>{Q&&(Ue=h(null==B?void 0:B.productList,H),fe(Ue))},[H]),i(()=>{(null==W?void 0:W.isDeviceFlow)&&pe&&(null==W||W.prodcardcallbackOfferApiData(pe))},[pe]),i(()=>{var e,l;Q&&!(null==W?void 0:W.isDeviceFlow)?he(me):he((null===(e=null==B?void 0:B.productList)||void 0===e?void 0:e.length)&&(null==B?void 0:B.productList)||new Array((null===(l=null==B?void 0:B.productList)||void 0===l?void 0:l.length)||3).fill(1))},[me]),e.createElement("div",null,e.createElement("div",{className:t.titlecontainer},(null==B?void 0:B.title)&&e.createElement("div",{className:t.title},null==B?void 0:B.title),(null==B?void 0:B.subTitle)&&e.createElement("div",{className:t.description},null==B?void 0:B.subTitle)),e.createElement("div",{className:"linetableV3"},ae&&we&&(null==we?void 0:we.length)>0&&e.createElement(d,{carouselIndex:0,key:U,arrow:null==V?void 0:V.enableMobileArrows},we&&(null==we?void 0:we.length)>0&&(null===(ve=we||[])||void 0===ve?void 0:ve.map((l,o)=>{var n;return e.createElement("div",{id:`productCardV3${U}`,style:{textAlign:"center"},key:o},e.createElement(v,{content:ee&&ne&&!pe?{}:l,offeringData:pe,uniqueId:ce,storyContent:B,metadata:A,tabIndex:F,cardsLength:null===(n=null==B?void 0:B.productList)||void 0===n?void 0:n.length,indexKey:o,constants:D,mainContent:V,linecheckSuccessCallBack:J,lineCheckCallBack:G,address:$,eligibleBundle:R,selectedOption:q,fetchOfferData:Ne,basicConfigUrl:M,selectedExistingOption:z,setLoginSuccess:_,enableP2P:null==B?void 0:B.enableP2P,loginSuccess:N,setToggleState:K,toggleState:H,noTabs:Q,deviceFlow:W,deviceFlowCallBack:X,selectedRP:null==Y?void 0:Y.selectedRP,continueCart:null==Y?void 0:Y.continueCart,lineCheckOnClear:Z,pegaIntegration:ee,isProdEnv:te,deviceUltimateBundle:De,toggleContent:de,pricesToggleState:Oe,isShogunFlow:Pe,shogunToken:Te}))})))))};export{B as default};
|
|
2
2
|
//# sourceMappingURL=StaticProductContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticProductContainer.js","sources":["../../../../src/components/StaticLineTable/StaticProductContainer.tsx"],"sourcesContent":["import React, { FC, useContext, useEffect, useRef, useState } from 'react';\nimport Styles from './StaticLineTable.module.scss';\nimport CarouselComponent from '../sharedCarousel/CarouselComponent';\nimport {\n getElementMaximumHeight,\n getNoteValues,\n setLocalStoreWithExpiry,\n viewport\n} from '../../utils/utils';\nimport StaticProduct from './StaticProduct';\nimport { PegaProductRequestBase, ProductRequestBase } from '../lineTable/lineTable.types';\nimport {\n fetchOfferingDataLineTableV2,\n fetchOttServiceOptions,\n getVocherPromotion\n} from '../../services/LineTableService';\nimport { LineTableBasicPropConfig } from '../../services/LineTableBasicPropConfig';\nimport {\n fetchFilteredProducts,\n fetchPegaProducts,\n fetchStaticProductIds,\n filterShogunProducts,\n getShogunSharedOffer,\n getTimeUntilNextTimerEvent,\n isShogunOfferResolved\n} from './Product.utils';\nimport { StaticProductContainerSchema, StaticProductSchema } from './StaticProductDatatypes';\nimport Cookies from 'js-cookie';\nimport { LINETABLE } from '../../Analytics/AnalyticsConstants';\nimport { trackEligibleItem } from '../../models/Analytics/items';\nimport {\n NEW,\n ONE_ECOMMERCE_HARDWARE_SUMMARY,\n ULTIMATEBUNDLE,\n VCTYPE,\n VOUCHER\n} from '../../utils/constants';\nimport { actionTypes, AppContext } from './StaticLineTableStore/StaticLineTableProvider';\n\n/**\n * Query-string parameter name used to trigger the Shogun/rewards (loyalty) flow.\n * The value is passed to the real offer API.\n */\nconst SHOGUN_QUERY_PARAM = 'gloxtoken';\n\n/**\n * Reads the Shogun/rewards token from the URL query-string. Returns null when\n * running outside the browser or when the parameter is not present.\n */\nconst getShogunTokenFromUrl = (): string | null => {\n if (typeof window === 'undefined') return null;\n const params = new URLSearchParams(window?.location?.search);\n return params?.get(SHOGUN_QUERY_PARAM);\n};\n\nconst StaticProductContainer: FC<StaticProductContainerSchema> = ({\n content,\n setGenericErrorModalDetails,\n metadata,\n tabIndex,\n constants,\n loginSuccess,\n activeIndex,\n mainContent,\n address,\n eligibleBundle,\n linecheckSuccessCallBack,\n selectedOption,\n basicConfigUrl,\n selectedExistingOption,\n setLoginSuccess,\n lineCheckCallBack,\n setToggleState,\n toggleState,\n noTabs,\n deviceFlow,\n deviceFlowCallBack,\n ubRatePlanObj,\n lineCheckOnClear,\n pegaIntegration,\n pegaCustomerInterest,\n useStoryblokOrder,\n isFetching,\n setIsFetching,\n isProdEnv,\n //US_31295\n toggleContent,\n localCacheDuration,\n apiCache\n}) => {\n const viewPort = viewport();\n const uniqueId: keyof typeof offeringData = content?._uid;\n const [offeringData, setOfferingData] = useState<any>();\n const [filteredProducts, setFilteredProducts] = useState<any>();\n const [newDisplayContent, setNewDisplayContent] = useState<any>();\n const offerEndpoint = LineTableBasicPropConfig?.getInstance()?.getBaseUrl();\n let AuthData: any = typeof window !== undefined && Cookies.get('sunriseAuth');\n AuthData = AuthData && JSON.parse(AuthData);\n const storeContext = useContext(AppContext);\n const isMobileFlow = content?.pageType === 'MOBILE';\n // Default apiCache to false if not explicitly set\n const resolvedApiCache = apiCache !== undefined ? apiCache : false;\n\n /**\n * Loyalty (Shogun) flow is active only when BOTH conditions are met:\n * 1. The Storyblok parent-level attribute `isRewardsFlow` is enabled.\n * 2. The URL query-string carries a non-empty `gloxtoken` parameter.\n * Any other combination falls back to the standard offer flow.\n */\n const shogunTokenFromUrl = getShogunTokenFromUrl();\n const isShogunFlow = Boolean(mainContent?.isRewardsFlow) && Boolean(shogunTokenFromUrl);\n //US_31295\n const getPriceToggle = () => {\n if (!toggleContent || !toggleContent.enableLoggedInPrice) return null;\n const stored = localStorage.getItem('userLoggedPricesToggle');\n if (stored === 'true') return true;\n if (stored === 'false') return false;\n const isNewCustomer = toggleContent?.customers?.toLowerCase() === NEW;\n if (isNewCustomer && toggleContent?.newUserToggleEnabled) {\n return true;\n }\n if (!isNewCustomer && toggleContent?.loggedUserToggleEnabled) {\n return true;\n }\n return null;\n };\n const [pricesToggleState, setPricesToggleState] = useState<any>(getPriceToggle);\n const [runOnLoad, setRunOnLoad] = useState<boolean>(true);\n const timerRefreshTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const promoPayloadSignatureRef = useRef<string>('');\n const offerDataCacheRef = useRef<Record<string, { results: any[]; timestamp: number }>>({});\n\n useEffect(() => {\n setTimeout(() => {\n findHeight();\n }, 100);\n window?.addEventListener('resize', findHeight);\n window?.addEventListener('load', findHeight);\n return () => {\n window.removeEventListener('resize', findHeight);\n window.removeEventListener('load', findHeight);\n };\n }, [content?.productList, filteredProducts, newDisplayContent]);\n\n const findHeight = () => {\n if (noTabs) {\n const activeToggles = [toggleState?.TV, toggleState?.Netflix, toggleState?.gigaSpeed].filter(\n Boolean\n ).length;\n const hasTV = toggleState?.TV;\n const hasNetflix = toggleState?.Netflix;\n const hasGigaSpeed = toggleState?.gigaSpeed;\n\n const tabbIndex =\n hasTV && hasNetflix && hasGigaSpeed\n ? 3\n : (hasTV && hasNetflix) ||\n (activeToggles >= 2 && !(hasGigaSpeed && !hasTV && !hasNetflix))\n ? 2\n : activeToggles === 1 || activeToggles === 2\n ? 1\n : 0;\n\n getElementMaximumHeight('productCardV3' + `${tabbIndex}`, filteredProducts?.length);\n } else {\n getElementMaximumHeight('productCardV3' + `${activeIndex}`, content?.productList?.length);\n }\n };\n\n const hardwareSessionObj = sessionStorage.getItem(ONE_ECOMMERCE_HARDWARE_SUMMARY);\n const sessionData = hardwareSessionObj && JSON.parse(hardwareSessionObj);\n const deviceUltimateBundle = content?.enableFPB;\n\n useEffect(() => {\n if (offeringData && Object.keys(offeringData)?.length > 0) {\n trackEligibleItem('view', offeringData[uniqueId], '', LINETABLE, null, pegaIntegration);\n }\n //filter products by pega response\n if (pegaIntegration && offeringData && Object.keys(offeringData)?.length > 0) {\n const availableProducts =\n (content?.productList?.length && content?.productList) ||\n new Array(content?.productList?.length || 3).fill(1);\n\n const pegaProductsIds = offeringData[uniqueId]?.map((item: any) => item?.id);\n\n const onlyPegaProducts = availableProducts.filter((product: any) =>\n pegaProductsIds?.includes(product.products[0].reference.name)\n );\n\n //sort products by storyblok vs pega\n if (useStoryblokOrder) {\n onlyPegaProducts.sort((a: any, b: any) => {\n return availableProducts.indexOf(a) - availableProducts.indexOf(b);\n });\n } else {\n onlyPegaProducts.sort((a: any, b: any) => {\n return (\n pegaProductsIds.indexOf(a.products[0].reference.name) -\n pegaProductsIds.indexOf(b.products[0].reference.name)\n );\n });\n }\n\n setNewDisplayContent(onlyPegaProducts);\n setIsFetching(false);\n }\n\n // Shogun flow: filter storyblok product list to only the products returned by the\n // Shogun offer API (matched by productId). Logic lives in filterShogunProducts (Product.utils).\n if (isShogunFlow && offeringData && Object.keys(offeringData)?.length > 0) {\n const shogunProductIds = (offeringData[uniqueId] ?? []).map((item: any) => item?.id);\n const availableProducts =\n (content?.productList?.length && content?.productList) ||\n new Array(content?.productList?.length || 3).fill(1);\n\n setNewDisplayContent(filterShogunProducts(availableProducts, shogunProductIds));\n setIsFetching(false);\n }\n }, [offeringData]);\n\n useEffect(() => {\n if (\n offeringData &&\n Object.keys(offeringData)?.length > 0 &&\n !isMobileFlow &&\n eligibleBundle?.eligibleBundle\n ) {\n trackEligibleItem(\n 'available',\n offeringData[uniqueId],\n '',\n LINETABLE,\n eligibleBundle?.eligibleBundle,\n pegaIntegration\n );\n }\n }, [eligibleBundle, offeringData]);\n\n //US_31295\n useEffect(() => {\n if (typeof window === 'undefined') return;\n // window.dispatchEvent(\n // new CustomEvent('user-logged-prices-toggle-all', {\n // detail: {\n // auth: AuthData?.siteId ? true : false },\n // })\n // );\n const handleGlobalToggle = (e: any) => {\n setPricesToggleState(e.detail.value);\n };\n window.addEventListener('user-logged-prices-toggle-all', handleGlobalToggle);\n return () => {\n window.removeEventListener('user-logged-prices-toggle-all', handleGlobalToggle);\n };\n }, []);\n\n /**\n * Check if cached offer data is still valid based on localCacheDuration\n */\n const isCacheValid = (cacheKey: string, durationMinutes: number | undefined): boolean => {\n const cached = offerDataCacheRef.current[cacheKey];\n if (!cached) return false;\n\n // A duration of 0 explicitly disables cache reads and always forces a fresh request.\n if (durationMinutes === 0) return false;\n\n // If no duration is specified, cache never expires (until manually cleared).\n if (durationMinutes === undefined) return true;\n\n if (durationMinutes < 0) return true;\n\n const elapsedMinutes = (Date.now() - cached.timestamp) / (1000 * 60);\n return elapsedMinutes < durationMinutes;\n };\n\n /**\n * fetching offer response\n */\n const fetchOfferData = (forceRefresh: boolean = false) => {\n const ProductIds: ProductRequestBase[] = [];\n let pegaPayload: PegaProductRequestBase = { atlOffers: [] };\n // for getting product offer api call request and promo id list\n //existingCustomerBenefit without login\n let existingCustomer = mainContent?.enableExistingCustomer;\n let subscriptionType = mainContent?.subscriptionType;\n let bundle4PProduct = mainContent?.pageType == '4P' ? true : false;\n const enableReturnPromo = content?.isReturnPromo;\n const benefitExistingCustomer = selectedExistingOption?.length > 0 ? true : false;\n const benefitSubscriptionType = selectedExistingOption?.join(',');\n //US_31295\n subscriptionType =\n existingCustomer || pricesToggleState ? subscriptionType : benefitSubscriptionType;\n existingCustomer =\n ((existingCustomer || benefitExistingCustomer) && AuthData) ||\n pricesToggleState ||\n !toggleContent;\n\n if (AuthData?.siteId && toggleContent?.enableLoggedInPrice && toggleContent.customers !== NEW) {\n if (pricesToggleState == false) {\n subscriptionType = 'none';\n } else if (pricesToggleState === true) {\n subscriptionType = undefined;\n }\n }\n\n if (toggleContent?.enableLoggedInPrice && pricesToggleState === false) {\n existingCustomer = false;\n }\n const P2PEnabled = content?.enableP2P ? true : false;\n const cacheDuration = localCacheDuration ?? 1;\n const cacheKey = `tab-${tabIndex}`;\n\n // Serve from cache without triggering loading state\n if (!forceRefresh && isCacheValid(cacheKey, cacheDuration)) {\n setOfferingData({ [uniqueId]: offerDataCacheRef.current[cacheKey].results });\n return;\n }\n\n // Shogun flow: triggered when `gloxtoken` is present in the URL AND the\n // storyblok parent-level `isRewardsFlow` flag is enabled (see isShogunFlow).\n // All containers share a single API call via getShogunSharedOffer (Product.utils).\n if (isShogunFlow) {\n const gloxTokenId = shogunTokenFromUrl;\n\n if (gloxTokenId) {\n // Skip loading state when results are already in the shared cache.\n if (!isShogunOfferResolved(gloxTokenId)) {\n setIsFetching(true);\n }\n\n getShogunSharedOffer(gloxTokenId, uniqueId as string, offerEndpoint)\n .then((shogunResults: any[]) => {\n offerDataCacheRef.current[cacheKey] = { results: shogunResults, timestamp: Date.now() };\n setOfferingData({ [uniqueId]: shogunResults });\n setGenericErrorModalDetails({ showPopup: false });\n })\n .catch(() => {\n setGenericErrorModalDetails({\n showPopup: true,\n content: mainContent?.telesalesBlok?.[0]\n });\n })\n .finally(() => {\n setIsFetching(false);\n });\n return;\n }\n }\n\n setIsFetching(true);\n\n if (pegaIntegration) {\n pegaPayload = fetchPegaProducts(content, pegaCustomerInterest, 'LineItem');\n } else {\n fetchStaticProductIds(\n content?.productList,\n ProductIds,\n bundle4PProduct,\n mainContent?.optionId,\n //US_31295\n pricesToggleState\n );\n const newSignature = JSON.stringify(\n ProductIds.map((item: any) => ({ id: item?.id, promoIds: item?.promoIds || [] }))\n );\n promoPayloadSignatureRef.current = newSignature;\n }\n if (\n forceRefresh ||\n (tabIndex === activeIndex && !offeringData?.[uniqueId]) ||\n (tabIndex === activeIndex && loginSuccess) ||\n selectedExistingOption\n ) {\n try {\n fetchOfferingDataLineTableV2(\n pegaIntegration ? pegaPayload : ProductIds,\n content?._uid,\n offerEndpoint,\n existingCustomer,\n subscriptionType,\n enableReturnPromo,\n P2PEnabled,\n pegaIntegration,\n resolvedApiCache,\n deviceUltimateBundle\n )\n ?.then((resp: any) => {\n const results = resp?.[uniqueId as string] ?? [];\n offerDataCacheRef.current[cacheKey] = { results, timestamp: Date.now() };\n setOfferingData(resp);\n setGenericErrorModalDetails({ showPopup: false });\n })\n .catch((error: any) => {\n setGenericErrorModalDetails({\n showPopup: true,\n content: mainContent?.telesalesBlok?.[0]\n });\n })\n .finally(() => {\n setIsFetching(false);\n });\n } catch (err: any) {\n setGenericErrorModalDetails({\n showPopup: true,\n content: mainContent?.telesalesBlok?.[0]\n });\n }\n } else if (offeringData) {\n setIsFetching(false);\n }\n };\n\n useEffect(() => {\n if (timerRefreshTimeoutRef.current) {\n clearTimeout(timerRefreshTimeoutRef.current);\n timerRefreshTimeoutRef.current = null;\n }\n\n const isCurrentTab =\n activeIndex === tabIndex || activeIndex === undefined || activeIndex === null;\n\n if (!isCurrentTab) {\n return;\n }\n\n const nextTimerEventDelay = (content?.productList || []).reduce(\n (minimumDelay: number, product: any) => {\n const timer = product?.timer?.[0];\n const isCounterEnabled = timer?.enableCounter;\n\n if (!isCounterEnabled || !timer?.startTime || !timer?.endTime) {\n return minimumDelay;\n }\n\n const delay = getTimeUntilNextTimerEvent(timer.startTime, timer.endTime);\n\n if (delay <= 0) {\n return minimumDelay;\n }\n\n if (minimumDelay === 0 || delay < minimumDelay) {\n return delay;\n }\n\n return minimumDelay;\n },\n 0\n );\n\n if (nextTimerEventDelay <= 0) {\n return;\n }\n timerRefreshTimeoutRef.current = setTimeout(() => {\n const refreshProductIds: ProductRequestBase[] = [];\n fetchStaticProductIds(\n content?.productList,\n refreshProductIds,\n mainContent?.pageType == '4P',\n mainContent?.optionId,\n pricesToggleState\n );\n const nextSignature = JSON.stringify(\n refreshProductIds.map((item: any) => ({ id: item?.id, promoIds: item?.promoIds || [] }))\n );\n\n if (nextSignature === promoPayloadSignatureRef.current) {\n return;\n }\n\n // Clear cache before forcing refresh on timer expiry\n const cacheKey = `tab-${tabIndex}`;\n delete offerDataCacheRef.current[cacheKey];\n\n setOfferingData((prev: any) => {\n if (!prev || typeof prev !== 'object') {\n return prev;\n }\n\n return {\n ...prev,\n [uniqueId]: null\n };\n });\n fetchOfferData(true);\n }, nextTimerEventDelay);\n\n return () => {\n if (timerRefreshTimeoutRef.current) {\n clearTimeout(timerRefreshTimeoutRef.current);\n timerRefreshTimeoutRef.current = null;\n }\n };\n }, [activeIndex, tabIndex, content?.productList, uniqueId, offeringData]);\n\n /**\n * triggering offer api based for the selected tab\n */\n useEffect(() => {\n setRunOnLoad(true);\n if (activeIndex == tabIndex || activeIndex == null) {\n if (pricesToggleState !== undefined && offeringData?.[uniqueId]) {\n offeringData[uniqueId] = null;\n }\n fetchOfferData();\n setRunOnLoad(false);\n }\n }, [activeIndex]);\n\n useEffect(() => {\n if (AuthData?.siteId && loginSuccess) {\n // Clear cache on login to fetch fresh data\n const cacheKey = `tab-${tabIndex}`;\n delete offerDataCacheRef.current[cacheKey];\n fetchOfferData();\n sessionStorage.removeItem('vasPopUp');\n }\n }, [loginSuccess]);\n\n useEffect(() => {\n if (selectedOption != undefined && selectedExistingOption != undefined) {\n // Clear cache when selection options change to fetch fresh data\n const cacheKey = `tab-${tabIndex}`;\n delete offerDataCacheRef.current[cacheKey];\n fetchOfferData();\n }\n }, [selectedOption, selectedExistingOption]);\n\n //US_31295\n useEffect(() => {\n if (pricesToggleState === undefined || runOnLoad) return;\n // Clear cache when price toggle changes to fetch fresh data\n const cacheKey = `tab-${tabIndex}`;\n delete offerDataCacheRef.current[cacheKey];\n if (offeringData?.[uniqueId]) {\n offeringData[uniqueId] = null;\n }\n fetchOfferData();\n }, [pricesToggleState]);\n\n useEffect(() => {\n //For QoQa flow\n const queryParams = window && new URLSearchParams(window?.location.search);\n const voucher: string | null = queryParams?.get(VOUCHER);\n if (\n voucher &&\n content?.productList?.[0]?.products?.[0]?.reference?.content?.product?.[0]?.productId\n ) {\n try {\n getVocherPromotion(\n content?.productList?.[0]?.products?.[0]?.reference?.content?.product?.[0]?.productId,\n voucher\n ).then((res: any) => {\n res && setLocalStoreWithExpiry(VCTYPE, { voucher: voucher, voucherType: 'qoqa' });\n });\n } catch (err: any) {}\n }\n\n //To trigger serviceOptions APi by category and updating it in context\n if (storeContext && tabIndex === activeIndex) {\n const { store, dispatch } = storeContext;\n let enableTvOptions = false;\n let enableTvOptionsPopUp = false;\n (content?.productList || [])?.forEach((prod: any) => {\n if (prod?.enableTVStreamingOptionsPopUp) {\n enableTvOptionsPopUp = true;\n }\n if (prod?.enableTVStreamingOptions) {\n enableTvOptions = true;\n }\n });\n if (store?.ottOptionsApi?.length === 0 && (enableTvOptions || enableTvOptionsPopUp)) {\n fetchOttServiceOptions()\n ?.then((res: any) => {\n if (res?.length > 0) {\n dispatch({ type: actionTypes?.ottOptionsApi, payload: res });\n }\n })\n .catch(() => {});\n }\n }\n }, []);\n\n //No Tabs content set\n let displayContent: any = [];\n useEffect(() => {\n if (noTabs) {\n displayContent = fetchFilteredProducts(content?.productList, toggleState);\n setFilteredProducts(displayContent);\n }\n }, [toggleState]);\n\n // sending offer api data as callback in device Flow to identify Multimobile/fmc\n useEffect(() => {\n if (deviceFlow?.isDeviceFlow && offeringData) {\n deviceFlow?.prodcardcallbackOfferApiData(offeringData);\n }\n }, [offeringData]);\n\n const getProductId = (content: any) => {\n const productData = content?.products?.[0]?.reference?.content?.product?.[0];\n return productData?.productId;\n };\n\n useEffect(() => {\n if (noTabs && !deviceFlow?.isDeviceFlow) {\n setNewDisplayContent(filteredProducts);\n } else {\n setNewDisplayContent(\n (content?.productList?.length && content?.productList) ||\n new Array(content?.productList?.length || 3).fill(1)\n );\n }\n }, [filteredProducts]);\n\n return (\n <div>\n <div className={Styles['titlecontainer']}>\n {content?.title && <div className={Styles['title']}>{content?.title}</div>}\n {content?.subTitle && <div className={Styles['description']}>{content?.subTitle}</div>}\n </div>\n <div className={`linetableV3`}>\n {viewPort && newDisplayContent && newDisplayContent?.length > 0 && (\n <CarouselComponent\n carouselIndex={0}\n key={activeIndex}\n arrow={mainContent?.enableMobileArrows}\n >\n {newDisplayContent &&\n newDisplayContent?.length > 0 &&\n (newDisplayContent || [])?.map((data: StaticProductSchema, indexx: number) => {\n return (\n <div\n id={`productCardV3${activeIndex}`}\n style={{ textAlign: 'center' }}\n key={indexx}\n >\n <StaticProduct\n content={pegaIntegration && isFetching && !offeringData ? {} : data}\n offeringData={offeringData}\n uniqueId={uniqueId}\n storyContent={content}\n metadata={metadata}\n tabIndex={tabIndex}\n cardsLength={content?.productList?.length}\n indexKey={indexx}\n constants={constants}\n mainContent={mainContent}\n linecheckSuccessCallBack={linecheckSuccessCallBack}\n lineCheckCallBack={lineCheckCallBack}\n address={address}\n eligibleBundle={eligibleBundle}\n selectedOption={selectedOption}\n fetchOfferData={fetchOfferData}\n basicConfigUrl={basicConfigUrl}\n selectedExistingOption={selectedExistingOption}\n setLoginSuccess={setLoginSuccess}\n enableP2P={content?.enableP2P}\n loginSuccess={loginSuccess}\n setToggleState={setToggleState}\n toggleState={toggleState}\n noTabs={noTabs}\n deviceFlow={deviceFlow}\n deviceFlowCallBack={deviceFlowCallBack}\n selectedRP={ubRatePlanObj?.selectedRP}\n continueCart={ubRatePlanObj?.continueCart}\n lineCheckOnClear={lineCheckOnClear}\n pegaIntegration={pegaIntegration}\n isProdEnv={isProdEnv}\n deviceUltimateBundle={deviceUltimateBundle}\n //US_31295\n toggleContent={toggleContent}\n pricesToggleState={pricesToggleState}\n isShogunFlow={isShogunFlow}\n shogunToken={shogunTokenFromUrl}\n />\n </div>\n );\n })}\n </CarouselComponent>\n )}\n </div>\n </div>\n );\n};\n\nexport default StaticProductContainer;\n"],"names":["StaticProductContainer","content","setGenericErrorModalDetails","metadata","tabIndex","constants","loginSuccess","activeIndex","mainContent","address","eligibleBundle","linecheckSuccessCallBack","selectedOption","basicConfigUrl","selectedExistingOption","setLoginSuccess","lineCheckCallBack","setToggleState","toggleState","noTabs","deviceFlow","deviceFlowCallBack","ubRatePlanObj","lineCheckOnClear","pegaIntegration","pegaCustomerInterest","useStoryblokOrder","isFetching","setIsFetching","isProdEnv","toggleContent","localCacheDuration","apiCache","viewPort","viewport","uniqueId","_uid","offeringData","setOfferingData","useState","filteredProducts","setFilteredProducts","newDisplayContent","setNewDisplayContent","offerEndpoint","_a","LineTableBasicPropConfig","getInstance","getBaseUrl","AuthData","undefined","window","Cookies","get","JSON","parse","storeContext","useContext","AppContext","isMobileFlow","pageType","resolvedApiCache","shogunTokenFromUrl","params","URLSearchParams","location","search","getShogunTokenFromUrl","isShogunFlow","Boolean","isRewardsFlow","pricesToggleState","setPricesToggleState","enableLoggedInPrice","stored","localStorage","getItem","isNewCustomer","customers","toLowerCase","NEW","newUserToggleEnabled","loggedUserToggleEnabled","runOnLoad","setRunOnLoad","timerRefreshTimeoutRef","useRef","promoPayloadSignatureRef","offerDataCacheRef","useEffect","setTimeout","findHeight","addEventListener","removeEventListener","productList","activeToggles","TV","Netflix","gigaSpeed","filter","length","hasTV","hasNetflix","hasGigaSpeed","getElementMaximumHeight","hardwareSessionObj","sessionStorage","ONE_ECOMMERCE_HARDWARE_SUMMARY","deviceUltimateBundle","enableFPB","Object","keys","trackEligibleItem","LINETABLE","_b","availableProducts","_c","Array","_d","fill","pegaProductsIds","_e","map","item","id","onlyPegaProducts","product","includes","products","reference","name","sort","a","b","indexOf","_f","shogunProductIds","_g","_h","_j","filterShogunProducts","handleGlobalToggle","e","detail","value","fetchOfferData","forceRefresh","ProductIds","pegaPayload","atlOffers","existingCustomer","enableExistingCustomer","subscriptionType","bundle4PProduct","enableReturnPromo","isReturnPromo","benefitExistingCustomer","benefitSubscriptionType","join","siteId","P2PEnabled","enableP2P","cacheKey","durationMinutes","cached","current","Date","now","timestamp","isCacheValid","gloxTokenId","isShogunOfferResolved","getShogunSharedOffer","then","shogunResults","results","showPopup","catch","telesalesBlok","finally","fetchPegaProducts","fetchStaticProductIds","optionId","newSignature","stringify","promoIds","fetchOfferingDataLineTableV2","resp","error","err","clearTimeout","nextTimerEventDelay","reduce","minimumDelay","timer","enableCounter","startTime","endTime","delay","getTimeUntilNextTimerEvent","refreshProductIds","prev","assign","removeItem","queryParams","voucher","VOUCHER","productId","getVocherPromotion","_q","_p","_m","_l","_o","_r","res","setLocalStoreWithExpiry","VCTYPE","voucherType","store","dispatch","enableTvOptions","enableTvOptionsPopUp","_s","forEach","prod","enableTVStreamingOptionsPopUp","enableTVStreamingOptions","ottOptionsApi","_t","_u","fetchOttServiceOptions","type","actionTypes","payload","displayContent","fetchFilteredProducts","isDeviceFlow","prodcardcallbackOfferApiData","React","createElement","className","Styles","title","subTitle","CarouselComponent","carouselIndex","key","arrow","enableMobileArrows","data","indexx","style","textAlign","StaticProduct","storyContent","cardsLength","indexKey","selectedRP","continueCart","shogunToken"],"mappings":"omCA2CA,MAYMA,EAA2D,EAC/DC,UACAC,8BACAC,WACAC,WACAC,YACAC,eACAC,cACAC,cACAC,UACAC,iBACAC,2BACAC,iBACAC,iBACAC,yBACAC,kBACAC,oBACAC,iBACAC,cACAC,SACAC,aACAC,qBACAC,gBACAC,mBACAC,mBACAC,wBACAC,qBACAC,cACAC,iBACAC,aAEAC,iBACAC,sBACAC,0BAEA,MAAMC,GAAWC,IACXC,GAAsClC,aAAO,EAAPA,EAASmC,MAC9CC,GAAcC,IAAmBC,KACjCC,GAAkBC,IAAuBF,KACzCG,GAAmBC,IAAwBJ,IAC5CK,GAAuD,QAAvCC,GAAAC,aAAwB,EAAxBA,EAA0BC,qBAAa,IAAAF,QAAA,EAAAA,GAAEG,aAC/D,IAAIC,QAAkCC,WAAXC,QAAwBC,EAAQC,IAAI,eAC/DJ,GAAWA,IAAYK,KAAKC,MAAMN,IAClC,MAAMO,GAAeC,EAAWC,GAC1BC,GAAqC,YAAtB1D,aAAO,EAAPA,EAAS2D,UAExBC,QAAgCX,IAAblB,IAAyBA,GAQ5C8B,GA5DsB,YAC5B,GAAsB,oBAAXX,OAAwB,OAAO,KAC1C,MAAMY,EAAS,IAAIC,gBAAgC,UAAV,OAANb,aAAM,IAANA,YAAM,EAANA,OAAQc,gBAAQ,IAAApB,OAAA,EAAAA,EAAEqB,QACrD,OAAOH,aAAM,EAANA,EAAQV,IATU,cAkEEc,GACrBC,GAAeC,QAAQ7D,aAAW,EAAXA,EAAa8D,g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C,gBAAiBA,GACjBK,UAAWA,GACX+E,qBAAsBA,GAEtB9E,cAAeA,GACfyC,kBAAmBA,GACnBH,aAAcA,GACdgM,YAAatM"}
|
|
1
|
+
{"version":3,"file":"StaticProductContainer.js","sources":["../../../../src/components/StaticLineTable/StaticProductContainer.tsx"],"sourcesContent":["import React, { FC, useContext, useEffect, useRef, useState } from 'react';\nimport Styles from './StaticLineTable.module.scss';\nimport CarouselComponent from '../sharedCarousel/CarouselComponent';\nimport {\n getElementMaximumHeight,\n getNoteValues,\n setLocalStoreWithExpiry,\n viewport\n} from '../../utils/utils';\nimport StaticProduct from './StaticProduct';\nimport { PegaProductRequestBase, ProductRequestBase } from '../lineTable/lineTable.types';\nimport {\n fetchOfferingDataLineTableV2,\n fetchOttServiceOptions,\n getVocherPromotion\n} from '../../services/LineTableService';\nimport { LineTableBasicPropConfig } from '../../services/LineTableBasicPropConfig';\nimport {\n fetchFilteredProducts,\n fetchPegaProducts,\n fetchStaticProductIds,\n filterShogunProducts,\n getShogunSharedOffer,\n getTimeUntilNextTimerEvent,\n isShogunOfferResolved\n} from './Product.utils';\nimport { StaticProductContainerSchema, StaticProductSchema } from './StaticProductDatatypes';\nimport Cookies from 'js-cookie';\nimport { LINETABLE } from '../../Analytics/AnalyticsConstants';\nimport { trackEligibleItem } from '../../models/Analytics/items';\nimport {\n NEW,\n ONE_ECOMMERCE_HARDWARE_SUMMARY,\n ULTIMATEBUNDLE,\n VCTYPE,\n VOUCHER\n} from '../../utils/constants';\nimport { actionTypes, AppContext } from './StaticLineTableStore/StaticLineTableProvider';\n\n/**\n * Query-string parameter name used to trigger the Shogun/rewards (loyalty) flow.\n * The value is passed to the real offer API.\n */\nconst SHOGUN_QUERY_PARAM = 'gloxtoken';\n\n/**\n * Reads the Shogun/rewards token from the URL query-string. Returns null when\n * running outside the browser or when the parameter is not present.\n */\nconst getShogunTokenFromUrl = (): string | null => {\n if (typeof window === 'undefined') return null;\n const params = new URLSearchParams(window?.location?.search);\n return params?.get(SHOGUN_QUERY_PARAM);\n};\n\nconst StaticProductContainer: FC<StaticProductContainerSchema> = ({\n content,\n setGenericErrorModalDetails,\n metadata,\n tabIndex,\n constants,\n loginSuccess,\n activeIndex,\n mainContent,\n address,\n eligibleBundle,\n linecheckSuccessCallBack,\n selectedOption,\n basicConfigUrl,\n selectedExistingOption,\n setLoginSuccess,\n lineCheckCallBack,\n setToggleState,\n toggleState,\n noTabs,\n deviceFlow,\n deviceFlowCallBack,\n ubRatePlanObj,\n lineCheckOnClear,\n pegaIntegration,\n pegaCustomerInterest,\n useStoryblokOrder,\n isFetching,\n setIsFetching,\n isProdEnv,\n //US_31295\n toggleContent,\n localCacheDuration,\n apiCache\n}) => {\n const viewPort = viewport();\n const uniqueId: keyof typeof offeringData = content?._uid;\n const [offeringData, setOfferingData] = useState<any>();\n const [filteredProducts, setFilteredProducts] = useState<any>();\n const [newDisplayContent, setNewDisplayContent] = useState<any>();\n const offerEndpoint = LineTableBasicPropConfig?.getInstance()?.getBaseUrl();\n let AuthData: any = typeof window !== undefined && Cookies.get('sunriseAuth');\n AuthData = AuthData && JSON.parse(AuthData);\n const storeContext = useContext(AppContext);\n const isMobileFlow = content?.pageType === 'MOBILE';\n /**\n * Loyalty (Shogun) flow is active only when BOTH conditions are met:\n * 1. The Storyblok parent-level attribute `isRewardsFlow` is enabled.\n * 2. The URL query-string carries a non-empty `gloxtoken` parameter.\n * Any other combination falls back to the standard offer flow.\n */\n const shogunTokenFromUrl = getShogunTokenFromUrl();\n const isShogunFlow = Boolean(mainContent?.isRewardsFlow) && Boolean(shogunTokenFromUrl);\n // Default apiCache to false if not explicitly set\n const resolvedApiCache = apiCache !== undefined ? apiCache : false;\n //US_31295\n const getPriceToggle = () => {\n if (!toggleContent || !toggleContent.enableLoggedInPrice) return null;\n const stored = localStorage.getItem('userLoggedPricesToggle');\n if (stored === 'true') return true;\n if (stored === 'false') return false;\n const isNewCustomer = toggleContent?.customers?.toLowerCase() === NEW;\n if (isNewCustomer && toggleContent?.newUserToggleEnabled) {\n return true;\n }\n if (!isNewCustomer && toggleContent?.loggedUserToggleEnabled) {\n return true;\n }\n return null;\n };\n const [pricesToggleState, setPricesToggleState] = useState<any>(getPriceToggle);\n const [runOnLoad, setRunOnLoad] = useState<boolean>(true);\n const timerRefreshTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const promoPayloadSignatureRef = useRef<string>('');\n const offerDataCacheRef = useRef<Record<string, { results: any[]; timestamp: number }>>({});\n\n useEffect(() => {\n setTimeout(() => {\n findHeight();\n }, 100);\n window?.addEventListener('resize', findHeight);\n window?.addEventListener('load', findHeight);\n return () => {\n window.removeEventListener('resize', findHeight);\n window.removeEventListener('load', findHeight);\n };\n }, [content?.productList, filteredProducts, newDisplayContent]);\n\n const findHeight = () => {\n if (noTabs) {\n const activeToggles = [toggleState?.TV, toggleState?.Netflix, toggleState?.gigaSpeed].filter(\n Boolean\n ).length;\n const hasTV = toggleState?.TV;\n const hasNetflix = toggleState?.Netflix;\n const hasGigaSpeed = toggleState?.gigaSpeed;\n\n const tabbIndex =\n hasTV && hasNetflix && hasGigaSpeed\n ? 3\n : (hasTV && hasNetflix) ||\n (activeToggles >= 2 && !(hasGigaSpeed && !hasTV && !hasNetflix))\n ? 2\n : activeToggles === 1 || activeToggles === 2\n ? 1\n : 0;\n\n getElementMaximumHeight('productCardV3' + `${tabbIndex}`, filteredProducts?.length);\n } else {\n getElementMaximumHeight('productCardV3' + `${activeIndex}`, content?.productList?.length);\n }\n };\n\n const hardwareSessionObj = sessionStorage.getItem(ONE_ECOMMERCE_HARDWARE_SUMMARY);\n const sessionData = hardwareSessionObj && JSON.parse(hardwareSessionObj);\n const deviceUltimateBundle = content?.enableFPB;\n\n useEffect(() => {\n if (offeringData && Object.keys(offeringData)?.length > 0) {\n trackEligibleItem('view', offeringData[uniqueId], '', LINETABLE, null, pegaIntegration);\n }\n //filter products by pega response\n if (pegaIntegration && offeringData && Object.keys(offeringData)?.length > 0) {\n const availableProducts =\n (content?.productList?.length && content?.productList) ||\n new Array(content?.productList?.length || 3).fill(1);\n\n const pegaProductsIds = offeringData[uniqueId]?.map((item: any) => item?.id);\n\n const onlyPegaProducts = availableProducts.filter((product: any) =>\n pegaProductsIds?.includes(product.products[0].reference.name)\n );\n\n //sort products by storyblok vs pega\n if (useStoryblokOrder) {\n onlyPegaProducts.sort((a: any, b: any) => {\n return availableProducts.indexOf(a) - availableProducts.indexOf(b);\n });\n } else {\n onlyPegaProducts.sort((a: any, b: any) => {\n return (\n pegaProductsIds.indexOf(a.products[0].reference.name) -\n pegaProductsIds.indexOf(b.products[0].reference.name)\n );\n });\n }\n\n setNewDisplayContent(onlyPegaProducts);\n setIsFetching(false);\n }\n\n // Shogun flow: filter storyblok product list to only the products returned by the\n // Shogun offer API (matched by productId). Logic lives in filterShogunProducts (Product.utils).\n if (isShogunFlow && offeringData && Object.keys(offeringData)?.length > 0) {\n const shogunProductIds = (offeringData[uniqueId] ?? []).map((item: any) => item?.id);\n const availableProducts =\n (content?.productList?.length && content?.productList) ||\n new Array(content?.productList?.length || 3).fill(1);\n\n setNewDisplayContent(filterShogunProducts(availableProducts, shogunProductIds));\n setIsFetching(false);\n }\n }, [offeringData]);\n\n useEffect(() => {\n if (\n offeringData &&\n Object.keys(offeringData)?.length > 0 &&\n !isMobileFlow &&\n eligibleBundle?.eligibleBundle\n ) {\n trackEligibleItem(\n 'available',\n offeringData[uniqueId],\n '',\n LINETABLE,\n eligibleBundle?.eligibleBundle,\n pegaIntegration\n );\n }\n }, [eligibleBundle, offeringData]);\n\n //US_31295\n useEffect(() => {\n if (typeof window === 'undefined') return;\n // window.dispatchEvent(\n // new CustomEvent('user-logged-prices-toggle-all', {\n // detail: {\n // auth: AuthData?.siteId ? true : false },\n // })\n // );\n const handleGlobalToggle = (e: any) => {\n setPricesToggleState(e.detail.value);\n };\n window.addEventListener('user-logged-prices-toggle-all', handleGlobalToggle);\n return () => {\n window.removeEventListener('user-logged-prices-toggle-all', handleGlobalToggle);\n };\n }, []);\n\n /**\n * Check if cached offer data is still valid based on localCacheDuration\n */\n const isCacheValid = (cacheKey: string, durationMinutes: number | undefined): boolean => {\n const cached = offerDataCacheRef.current[cacheKey];\n if (!cached) return false;\n\n // A duration of 0 explicitly disables cache reads and always forces a fresh request.\n if (durationMinutes === 0) return false;\n\n // If no duration is specified, cache never expires (until manually cleared).\n if (durationMinutes === undefined) return true;\n\n if (durationMinutes < 0) return true;\n\n const elapsedMinutes = (Date.now() - cached.timestamp) / (1000 * 60);\n return elapsedMinutes < durationMinutes;\n };\n\n /**\n * fetching offer response\n */\n const fetchOfferData = (forceRefresh: boolean = false) => {\n const ProductIds: ProductRequestBase[] = [];\n let pegaPayload: PegaProductRequestBase = { atlOffers: [] };\n // for getting product offer api call request and promo id list\n //existingCustomerBenefit without login\n let existingCustomer = mainContent?.enableExistingCustomer;\n let subscriptionType = mainContent?.subscriptionType;\n let bundle4PProduct = mainContent?.pageType == '4P' ? true : false;\n const enableReturnPromo = content?.isReturnPromo;\n const benefitExistingCustomer = selectedExistingOption?.length > 0 ? true : false;\n const benefitSubscriptionType = selectedExistingOption?.join(',');\n //US_31295\n subscriptionType =\n existingCustomer || pricesToggleState ? subscriptionType : benefitSubscriptionType;\n existingCustomer =\n ((existingCustomer || benefitExistingCustomer) && AuthData) ||\n pricesToggleState ||\n !toggleContent;\n\n if (AuthData?.siteId && toggleContent?.enableLoggedInPrice && toggleContent.customers !== NEW) {\n if (pricesToggleState == false) {\n subscriptionType = 'none';\n } else if (pricesToggleState === true) {\n subscriptionType = undefined;\n }\n }\n\n if (toggleContent?.enableLoggedInPrice && pricesToggleState === false) {\n existingCustomer = false;\n }\n const P2PEnabled = content?.enableP2P ? true : false;\n const cacheDuration = localCacheDuration ?? 1;\n const cacheKey = `tab-${tabIndex}`;\n\n // Serve from cache without triggering loading state\n if (!forceRefresh && isCacheValid(cacheKey, cacheDuration)) {\n setOfferingData({ [uniqueId]: offerDataCacheRef.current[cacheKey].results });\n return;\n }\n\n // Shogun flow: triggered when `gloxtoken` is present in the URL AND the\n // storyblok parent-level `isRewardsFlow` flag is enabled (see isShogunFlow).\n // All containers share a single API call via getShogunSharedOffer (Product.utils).\n if (isShogunFlow) {\n const gloxTokenId = shogunTokenFromUrl;\n\n if (gloxTokenId) {\n // Skip loading state when results are already in the shared cache.\n if (!isShogunOfferResolved(gloxTokenId)) {\n setIsFetching(true);\n }\n\n getShogunSharedOffer(gloxTokenId, uniqueId as string, offerEndpoint)\n .then((shogunResults: any[]) => {\n offerDataCacheRef.current[cacheKey] = { results: shogunResults, timestamp: Date.now() };\n setOfferingData({ [uniqueId]: shogunResults });\n setGenericErrorModalDetails({ showPopup: false });\n })\n .catch(() => {\n setGenericErrorModalDetails({\n showPopup: true,\n content: mainContent?.telesalesBlok?.[0]\n });\n })\n .finally(() => {\n setIsFetching(false);\n });\n return;\n }\n }\n\n setIsFetching(true);\n\n if (pegaIntegration) {\n pegaPayload = fetchPegaProducts(content, pegaCustomerInterest, 'LineItem');\n } else {\n fetchStaticProductIds(\n content?.productList,\n ProductIds,\n bundle4PProduct,\n mainContent?.optionId,\n //US_31295\n pricesToggleState\n );\n const newSignature = JSON.stringify(\n ProductIds.map((item: any) => ({ id: item?.id, promoIds: item?.promoIds || [] }))\n );\n promoPayloadSignatureRef.current = newSignature;\n }\n if (\n forceRefresh ||\n (tabIndex === activeIndex && !offeringData?.[uniqueId]) ||\n (tabIndex === activeIndex && loginSuccess) ||\n selectedExistingOption\n ) {\n try {\n fetchOfferingDataLineTableV2(\n pegaIntegration ? pegaPayload : ProductIds,\n content?._uid,\n offerEndpoint,\n existingCustomer,\n subscriptionType,\n enableReturnPromo,\n P2PEnabled,\n pegaIntegration,\n resolvedApiCache,\n deviceUltimateBundle,\n )\n ?.then((resp: any) => {\n const results = resp?.[uniqueId as string] ?? [];\n offerDataCacheRef.current[cacheKey] = { results, timestamp: Date.now() };\n setOfferingData(resp);\n setGenericErrorModalDetails({ showPopup: false });\n })\n .catch((error: any) => {\n setGenericErrorModalDetails({\n showPopup: true,\n content: mainContent?.telesalesBlok?.[0]\n });\n })\n .finally(() => {\n setIsFetching(false);\n });\n } catch (err: any) {\n setGenericErrorModalDetails({\n showPopup: true,\n content: mainContent?.telesalesBlok?.[0]\n });\n }\n } else if (offeringData) {\n setIsFetching(false);\n }\n };\n\n useEffect(() => {\n if (timerRefreshTimeoutRef.current) {\n clearTimeout(timerRefreshTimeoutRef.current);\n timerRefreshTimeoutRef.current = null;\n }\n\n const isCurrentTab =\n activeIndex === tabIndex || activeIndex === undefined || activeIndex === null;\n\n if (!isCurrentTab) {\n return;\n }\n\n const nextTimerEventDelay = (content?.productList || []).reduce(\n (minimumDelay: number, product: any) => {\n const timer = product?.timer?.[0];\n const isCounterEnabled = timer?.enableCounter;\n\n if (!isCounterEnabled || !timer?.startTime || !timer?.endTime) {\n return minimumDelay;\n }\n\n const delay = getTimeUntilNextTimerEvent(timer.startTime, timer.endTime);\n\n if (delay <= 0) {\n return minimumDelay;\n }\n\n if (minimumDelay === 0 || delay < minimumDelay) {\n return delay;\n }\n\n return minimumDelay;\n },\n 0\n );\n\n if (nextTimerEventDelay <= 0) {\n return;\n }\n timerRefreshTimeoutRef.current = setTimeout(() => {\n const refreshProductIds: ProductRequestBase[] = [];\n fetchStaticProductIds(\n content?.productList,\n refreshProductIds,\n mainContent?.pageType == '4P',\n mainContent?.optionId,\n pricesToggleState\n );\n const nextSignature = JSON.stringify(\n refreshProductIds.map((item: any) => ({ id: item?.id, promoIds: item?.promoIds || [] }))\n );\n\n if (nextSignature === promoPayloadSignatureRef.current) {\n return;\n }\n\n // Clear cache before forcing refresh on timer expiry\n const cacheKey = `tab-${tabIndex}`;\n delete offerDataCacheRef.current[cacheKey];\n\n setOfferingData((prev: any) => {\n if (!prev || typeof prev !== 'object') {\n return prev;\n }\n\n return {\n ...prev,\n [uniqueId]: null\n };\n });\n fetchOfferData(true);\n }, nextTimerEventDelay);\n\n return () => {\n if (timerRefreshTimeoutRef.current) {\n clearTimeout(timerRefreshTimeoutRef.current);\n timerRefreshTimeoutRef.current = null;\n }\n };\n }, [activeIndex, tabIndex, content?.productList, uniqueId, offeringData]);\n\n /**\n * triggering offer api based for the selected tab\n */\n useEffect(() => {\n setRunOnLoad(true);\n if (activeIndex == tabIndex || activeIndex == null) {\n if (pricesToggleState !== undefined && offeringData?.[uniqueId]) {\n offeringData[uniqueId] = null;\n }\n fetchOfferData();\n setRunOnLoad(false);\n }\n }, [activeIndex]);\n\n useEffect(() => {\n if (AuthData?.siteId && loginSuccess) {\n // Clear cache on login to fetch fresh data\n const cacheKey = `tab-${tabIndex}`;\n delete offerDataCacheRef.current[cacheKey];\n fetchOfferData();\n sessionStorage.removeItem('vasPopUp');\n }\n }, [loginSuccess]);\n\n useEffect(() => {\n if (selectedOption != undefined && selectedExistingOption != undefined) {\n // Clear cache when selection options change to fetch fresh data\n const cacheKey = `tab-${tabIndex}`;\n delete offerDataCacheRef.current[cacheKey];\n fetchOfferData();\n }\n }, [selectedOption, selectedExistingOption]);\n\n //US_31295\n useEffect(() => {\n if (pricesToggleState === undefined || runOnLoad) return;\n // Clear cache when price toggle changes to fetch fresh data\n const cacheKey = `tab-${tabIndex}`;\n delete offerDataCacheRef.current[cacheKey];\n if (offeringData?.[uniqueId]) {\n offeringData[uniqueId] = null;\n }\n fetchOfferData();\n }, [pricesToggleState]);\n\n useEffect(() => {\n //For QoQa flow\n const queryParams = window && new URLSearchParams(window?.location.search);\n const voucher: string | null = queryParams?.get(VOUCHER);\n if (\n voucher &&\n content?.productList?.[0]?.products?.[0]?.reference?.content?.product?.[0]?.productId\n ) {\n try {\n getVocherPromotion(\n content?.productList?.[0]?.products?.[0]?.reference?.content?.product?.[0]?.productId,\n voucher\n ).then((res: any) => {\n res && setLocalStoreWithExpiry(VCTYPE, { voucher: voucher, voucherType: 'qoqa' });\n });\n } catch (err: any) {}\n }\n\n //To trigger serviceOptions APi by category and updating it in context\n if (storeContext && tabIndex === activeIndex) {\n const { store, dispatch } = storeContext;\n let enableTvOptions = false;\n let enableTvOptionsPopUp = false;\n (content?.productList || [])?.forEach((prod: any) => {\n if (prod?.enableTVStreamingOptionsPopUp) {\n enableTvOptionsPopUp = true;\n }\n if (prod?.enableTVStreamingOptions) {\n enableTvOptions = true;\n }\n });\n if (store?.ottOptionsApi?.length === 0 && (enableTvOptions || enableTvOptionsPopUp)) {\n fetchOttServiceOptions()\n ?.then((res: any) => {\n if (res?.length > 0) {\n dispatch({ type: actionTypes?.ottOptionsApi, payload: res });\n }\n })\n .catch(() => {});\n }\n }\n }, []);\n\n //No Tabs content set\n let displayContent: any = [];\n useEffect(() => {\n if (noTabs) {\n displayContent = fetchFilteredProducts(content?.productList, toggleState);\n setFilteredProducts(displayContent);\n }\n }, [toggleState]);\n\n // sending offer api data as callback in device Flow to identify Multimobile/fmc\n useEffect(() => {\n if (deviceFlow?.isDeviceFlow && offeringData) {\n deviceFlow?.prodcardcallbackOfferApiData(offeringData);\n }\n }, [offeringData]);\n\n const getProductId = (content: any) => {\n const productData = content?.products?.[0]?.reference?.content?.product?.[0];\n return productData?.productId;\n };\n\n useEffect(() => {\n if (noTabs && !deviceFlow?.isDeviceFlow) {\n setNewDisplayContent(filteredProducts);\n } else {\n setNewDisplayContent(\n (content?.productList?.length && content?.productList) ||\n new Array(content?.productList?.length || 3).fill(1)\n );\n }\n }, [filteredProducts]);\n\n return (\n <div>\n <div className={Styles['titlecontainer']}>\n {content?.title && <div className={Styles['title']}>{content?.title}</div>}\n {content?.subTitle && <div className={Styles['description']}>{content?.subTitle}</div>}\n </div>\n <div className={`linetableV3`}>\n {viewPort && newDisplayContent && newDisplayContent?.length > 0 && (\n <CarouselComponent\n carouselIndex={0}\n key={activeIndex}\n arrow={mainContent?.enableMobileArrows}\n >\n {newDisplayContent &&\n newDisplayContent?.length > 0 &&\n (newDisplayContent || [])?.map((data: StaticProductSchema, indexx: number) => {\n return (\n <div\n id={`productCardV3${activeIndex}`}\n style={{ textAlign: 'center' }}\n key={indexx}\n >\n <StaticProduct\n content={pegaIntegration && isFetching && !offeringData ? {} : data}\n offeringData={offeringData}\n uniqueId={uniqueId}\n storyContent={content}\n metadata={metadata}\n tabIndex={tabIndex}\n cardsLength={content?.productList?.length}\n indexKey={indexx}\n constants={constants}\n mainContent={mainContent}\n linecheckSuccessCallBack={linecheckSuccessCallBack}\n lineCheckCallBack={lineCheckCallBack}\n address={address}\n eligibleBundle={eligibleBundle}\n selectedOption={selectedOption}\n fetchOfferData={fetchOfferData}\n basicConfigUrl={basicConfigUrl}\n selectedExistingOption={selectedExistingOption}\n setLoginSuccess={setLoginSuccess}\n enableP2P={content?.enableP2P}\n loginSuccess={loginSuccess}\n setToggleState={setToggleState}\n toggleState={toggleState}\n noTabs={noTabs}\n deviceFlow={deviceFlow}\n deviceFlowCallBack={deviceFlowCallBack}\n selectedRP={ubRatePlanObj?.selectedRP}\n continueCart={ubRatePlanObj?.continueCart}\n lineCheckOnClear={lineCheckOnClear}\n pegaIntegration={pegaIntegration}\n isProdEnv={isProdEnv}\n deviceUltimateBundle={deviceUltimateBundle}\n //US_31295\n toggleContent={toggleContent}\n pricesToggleState={pricesToggleState}\n isShogunFlow={isShogunFlow}\n shogunToken={shogunTokenFromUrl}\n />\n </div>\n );\n })}\n </CarouselComponent>\n )}\n </div>\n </div>\n );\n};\n\nexport default StaticProductContainer;\n"],"names":["StaticProductContainer","content","setGenericErrorModalDetails","metadata","tabIndex","constants","loginSuccess","activeIndex","mainContent","address","eligibleBundle","linecheckSuccessCallBack","selectedOption","basicConfigUrl","selectedExistingOption","setLoginSuccess","lineCheckCallBack","setToggleState","toggleState","noTabs","deviceFlow","deviceFlowCallBack","ubRatePlanObj","lineCheckOnClear","pegaIntegration","pegaCustomerInterest","useStoryblokOrder","isFetching","setIsFetching","isProdEnv","toggleContent","localCacheDuration","apiCache","viewPort","viewport","uniqueId","_uid","offeringData","setOfferingData","useState","filteredProducts","setFilteredProducts","newDisplayContent","setNewDisplayContent","offerEndpoint","_a","LineTableBasicPropConfig","getInstance","getBaseUrl","AuthData","undefined","window","Cookies","get","JSON","parse","storeContext","useContext","AppContext","isMobileFlow","pageType","shogunTokenFromUrl","params","URLSearchParams","location","search","getShogunTokenFromUrl","isShogunFlow","Boolean","isRewardsFlow","resolvedApiCache","pricesToggleState","setPricesToggleState","enableLoggedInPrice","stored","localStorage","getItem","isNewCustomer","customers","toLowerCase","NEW","newUserToggleEnabled","loggedUserToggleEnabled","runOnLoad","setRunOnLoad","timerRefreshTimeoutRef","useRef","promoPayloadSignatureRef","offerDataCacheRef","useEffect","setTimeout","findHeight","addEventListener","removeEventListener","productList","activeToggles","TV","Netflix","gigaSpeed","filter","length","hasTV","hasNetflix","hasGigaSpeed","getElementMaximumHeight","hardwareSessionObj","sessionStorage","ONE_ECOMMERCE_HARDWARE_SUMMARY","deviceUltimateBundle","enableFPB","Object","keys","trackEligibleItem","LINETABLE","_b","availableProducts","_c","Array","_d","fill","pegaProductsIds","_e","map","item","id","onlyPegaProducts","product","includes","products","reference","name","sort","a","b","indexOf","_f","shogunProductIds","_g","_h","_j","filterShogunProducts","handleGlobalToggle","e","detail","value","fetchOfferData","forceRefresh","ProductIds","pegaPayload","atlOffers","existingCustomer","enableExistingCustomer","subscriptionType","bundle4PProduct","enableReturnPromo","isReturnPromo","benefitExistingCustomer","benefitSubscriptionType","join","siteId","P2PEnabled","enableP2P","cacheKey","durationMinutes","cached","current","Date","now","timestamp","isCacheValid","gloxTokenId","isShogunOfferResolved","getShogunSharedOffer","then","shogunResults","results","showPopup","catch","telesalesBlok","finally","fetchPegaProducts","fetchStaticProductIds","optionId","newSignature","stringify","promoIds","fetchOfferingDataLineTableV2","resp","error","err","clearTimeout","nextTimerEventDelay","reduce","minimumDelay","timer","enableCounter","startTime","endTime","delay","getTimeUntilNextTimerEvent","refreshProductIds","prev","assign","removeItem","queryParams","voucher","VOUCHER","productId","getVocherPromotion","_q","_p","_m","_l","_o","_r","res","setLocalStoreWithExpiry","VCTYPE","voucherType","store","dispatch","enableTvOptions","enableTvOptionsPopUp","_s","forEach","prod","enableTVStreamingOptionsPopUp","enableTVStreamingOptions","ottOptionsApi","_t","_u","fetchOttServiceOptions","type","actionTypes","payload","displayContent","fetchFilteredProducts","isDeviceFlow","prodcardcallbackOfferApiData","React","createElement","className","Styles","title","subTitle","CarouselComponent","carouselIndex","key","arrow","enableMobileArrows","data","indexx","style","textAlign","StaticProduct","storyContent","cardsLength","indexKey","selectedRP","continueCart","shogunToken"],"mappings":"omCA2CA,MAYMA,EAA2D,EAC/DC,UACAC,8BACAC,WACAC,WACAC,YACAC,eACAC,cACAC,cACAC,UACAC,iBACAC,2BACAC,iBACAC,iBACAC,yBACAC,kBACAC,oBACAC,iBACAC,cACAC,SACAC,aACAC,qBACAC,gBACAC,mBACAC,mBACAC,wBACAC,qBACAC,cACAC,iBACAC,aAEAC,iBACAC,sBACAC,0BAEA,MAAMC,GAAWC,IACXC,GAAsClC,aAAO,EAAPA,EAASmC,MAC9CC,GAAcC,IAAmBC,KACjCC,GAAkBC,IAAuBF,KACzCG,GAAmBC,IAAwBJ,IAC5CK,GAAuD,QAAvCC,GAAAC,aAAwB,EAAxBA,EAA0BC,qBAAa,IAAAF,QAAA,EAAAA,GAAEG,aAC/D,IAAIC,QAAkCC,WAAXC,QAAwBC,EAAQC,IAAI,eAC/DJ,GAAWA,IAAYK,KAAKC,MAAMN,IAClC,MAAMO,GAAeC,EAAWC,GAC1BC,GAAqC,YAAtB1D,aAAO,EAAPA,EAAS2D,UAOxBC,GAzDsB,YAC5B,GAAsB,oBAAXV,OAAwB,OAAO,KAC1C,MAAMW,EAAS,IAAIC,gBAAgC,UAAV,OAANZ,aAAM,IAANA,YAAM,EAANA,OAAQa,gBAAQ,IAAAnB,OAAA,EAAAA,EAAEoB,QACrD,OAAOH,aAAM,EAANA,EAAQT,IATU,cA+DEa,GACrBC,GAAeC,QAAQ5D,aAAW,EAAXA,EAAa6D,gBAAkBD,QAAQP,IAE9DS,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AAkBA,EAClBC,gBAAiBA,GACjBK,UAAWA,GACX+E,qBAAsBA,GAEtB9E,cAAeA,GACfyC,kBAAmBA,GACnBJ,aAAcA,GACdiM,YAAavM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sunrise-upc/mobile-prod-card",
|
|
3
|
-
"version": "12.2.0
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "Starter project to create reusable functional component",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
"release:minor": "npm version minor && npm publish --access public --tag latest",
|
|
32
32
|
"release:patch": "npm version patch && npm publish --access public --tag latest",
|
|
33
33
|
"release:prepatch": "npm version prepatch --preid=beta && npm publish --access public --tag latest",
|
|
34
|
-
"release:prerelease": "npm version prerelease --preid=beta && npm publish --access public --tag latest"
|
|
35
|
-
"release:beta:minor": "npm version preminor --preid=beta && npm publish --access public --tag beta"
|
|
34
|
+
"release:prerelease": "npm version prerelease --preid=beta && npm publish --access public --tag latest"
|
|
36
35
|
},
|
|
37
36
|
"repository": {
|
|
38
37
|
"type": "git",
|
|
@@ -81,7 +80,6 @@
|
|
|
81
80
|
"react-multi-carousel": "^2.8.5",
|
|
82
81
|
"react-select": "^5.10.2",
|
|
83
82
|
"storyblok-rich-text-react-renderer": "^3.0.1",
|
|
84
|
-
"uuid": "^13.0.0"
|
|
85
|
-
"@sunrise-upc/sales-static-components": "^4.1.0"
|
|
83
|
+
"uuid": "^13.0.0"
|
|
86
84
|
}
|
|
87
85
|
}
|