@sunrise-upc/sales-static-components 3.8.7-beta.18 → 3.8.7-beta.19

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,2 +1,2 @@
1
- "use strict";exports.AFTER="after",exports.AUTHCOOKIE="sunriseAuth",exports.AUTHSTAMP="auth-stamp",exports.BEFORE="before",exports.CART_COOKIE="one-commerce-cartId",exports.CENTER="center",exports.COLLG3="col-lg-3",exports.COLLG4="col-lg-4",exports.COLLG6="col-lg-6",exports.COLORWHITE="#ffffff",exports.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE="NEW_CUSTOMER",exports.CUSTOMER_GROUP_STORAGE_KEY="customerGroup",exports.CUSTOMER_SEGMENT_REFRESH_EVENT="customerSegmentRefresh",exports.DEFAULTLOCALE="en",exports.DISMISSED_RIBBONS_STORAGE_KEY="dismissedRibbonsByUid",exports.EXTRA="extra",exports.FALCONBUTTONCLICKED="clicked",exports.FLEX_UPGRADE="FLEX_UPGRADE",exports.H1="h1",exports.H2="h2",exports.H3="h3",exports.H4="h4",exports.ICON="icon",exports.IMG="img",exports.LEFT="left",exports.LGDESKSTART=1440,exports.MDDESKEND=1439,exports.MDDESKSTART=1024,exports.MOBEND=767,exports.NONE="none",exports.PRE_TO_POST_PROMOTION_ID="PreToPost",exports.PRIMARYCOLORS="#da291c",exports.RIBBON_DISMISS_UPDATED_EVENT="ribbonDismissUpdated",exports.RIGHT="right",exports.SEMIEXTRA="semiextra",exports.SMART_UPGRADE="SMART_UPGRADE",exports.STACK="stack",exports.SVG="svg",exports.TABEND=1023,exports.TABSTART=768,exports.TRANSPARENT="transparent",exports.ZEROES="00";
1
+ "use strict";exports.AFTER="after",exports.AUTHCOOKIE="sunriseAuth",exports.AUTHSTAMP="auth-stamp",exports.BEFORE="before",exports.CART_COOKIE="one-commerce-cartId",exports.CENTER="center",exports.COLLG3="col-lg-3",exports.COLLG4="col-lg-4",exports.COLLG6="col-lg-6",exports.COLORWHITE="#ffffff",exports.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE="NEW_CUSTOMER",exports.CUSTOMER_GROUP_STORAGE_KEY="customerGroup",exports.CUSTOMER_SEGMENT_REFRESH_EVENT="customerSegmentRefresh",exports.CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY="customerSegmentRefreshStamp",exports.DEFAULTLOCALE="en",exports.DISMISSED_RIBBONS_STORAGE_KEY="dismissedRibbonsByUid",exports.EXTRA="extra",exports.FALCONBUTTONCLICKED="clicked",exports.FLEX_UPGRADE="FLEX_UPGRADE",exports.H1="h1",exports.H2="h2",exports.H3="h3",exports.H4="h4",exports.ICON="icon",exports.IMG="img",exports.LEFT="left",exports.LGDESKSTART=1440,exports.MDDESKEND=1439,exports.MDDESKSTART=1024,exports.MOBEND=767,exports.NONE="none",exports.PRE_TO_POST_PROMOTION_ID="PreToPost",exports.PRIMARYCOLORS="#da291c",exports.RIBBON_DISMISS_UPDATED_EVENT="ribbonDismissUpdated",exports.RIGHT="right",exports.SEMIEXTRA="semiextra",exports.SMART_UPGRADE="SMART_UPGRADE",exports.STACK="stack",exports.SVG="svg",exports.TABEND=1023,exports.TABSTART=768,exports.TRANSPARENT="transparent",exports.ZEROES="00";
2
2
  //# sourceMappingURL=Constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":[],"mappings":"2BAOqB,2BA8BK,gCA4GD,4BAzIH,6BA4JK,qCApKL,wBAyBA,0BADA,0BADA,8BAbI,oDAsJuB,kDADP,uDAII,+CA/HjB,2CA6HgB,sCAlJxB,oCATc,+BAgKP,0BA3JV,gBACA,gBACA,gBACA,kBAwEE,mBADD,mBApFC,2BAoDO,uBAlCF,yBAiCE,oBA/BL,iBAJH,wCA2IqB,kCAvJX,+CA6Je,qCAhKvB,0BAcI,kCAqJI,8BA/IR,oBAiEF,qBAnEG,sBA+BE,wBAhDG,6BACL"}
1
+ {"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":[],"mappings":"2BAOqB,2BA8BK,gCA4GD,4BAzIH,6BA6JK,qCArKL,wBAyBA,0BADA,0BADA,8BAbI,oDAsJuB,kDADP,uDAII,sEACM,oDAhIvB,2CA6HgB,sCAlJxB,oCATc,+BAiKP,0BA5JV,gBACA,gBACA,gBACA,kBAwEE,mBADD,mBApFC,2BAoDO,uBAlCF,yBAiCE,oBA/BL,iBAJH,wCA2IqB,kCAvJX,+CA6Je,qCAhKvB,0BAcI,kCAsJI,8BAhJR,oBAiEF,qBAnEG,sBA+BE,wBAhDG,6BACL"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("../components/Constants.js"),o=require("cookies-next"),r=require("./CustomerService.js");const n=e=>{if("undefined"==typeof window)return()=>{};const o=t=>{e(t)};return window.addEventListener(t.CUSTOMER_SEGMENT_REFRESH_EVENT,o),w({fetchCustomerGroup:E,isLoggedIn:f,onError:()=>{}}),()=>{window.removeEventListener(t.CUSTOMER_SEGMENT_REFRESH_EVENT,o)}},i=e=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(t.CUSTOMER_SEGMENT_REFRESH_EVENT,{detail:{customerGroup:e,refreshedAt:Date.now()}}))},s=e=>{if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null},u=e=>{var t,o;const r=s(null==e?void 0:e.customerGroup);if(r)return r;const n=s(null===(o=null===(t=null==e?void 0:e.relatedParty)||void 0===t?void 0:t[0])||void 0===o?void 0:o.segment);return n||null},d=t=>()=>e.__awaiter(void 0,void 0,void 0,function*(){const e=yield t.fetchCustomerProfile();return u(e||{})}),E=d({fetchCustomerProfile:r.customerGroup}),l=new Map,c=new Set(["MOBILE","FIXNET","FIXNET_MOBILE","DEFAULT"]),f=()=>Boolean(o.getCookie(t.AUTHCOOKIE)),_=e=>"undefined"==typeof window?null:s(window.localStorage.getItem(e)),a=(e,t)=>{"undefined"!=typeof window&&(t?window.localStorage.setItem(e,t):window.localStorage.removeItem(e))},m=o=>e.__awaiter(void 0,void 0,void 0,function*(){const r=t.CUSTOMER_GROUP_STORAGE_KEY,n=t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE;if("undefined"==typeof window)return null;if(!o.isLoggedIn())return a(r,n),n;if(!o.forceRefresh){const e=_(r);if((e=>{const t=(o=e)?o.trim().toUpperCase():null;var o;return Boolean(t&&c.has(t))})(e))return e}const i=l.get(r);if(i)return i;const u=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=s(yield o.fetchCustomerGroup());return a(r,e),e}catch(e){return o.onError&&o.onError(e),_(r)}finally{l.delete(r)}});return l.set(r,u),u}),w=t=>e.__awaiter(void 0,void 0,void 0,function*(){const e=yield m(t);return i(e),e});exports.createCustomerGroupFetcher=d,exports.createCustomerSegmentSync=o=>{const r=t.CUSTOMER_GROUP_STORAGE_KEY;let s=null,u=0;return{refreshCustomerSegmentAfterLogin:()=>e.__awaiter(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return null;var t;if(yield(t=o.isLoggedIn,e.__awaiter(void 0,void 0,void 0,function*(){if("undefined"==typeof window||t())return;const e=Date.now()+2e3;for(;!t()&&Date.now()<e;)yield new Promise(e=>window.setTimeout(e,100))})),s)return s;if(Date.now()-u<8e3){const e=_(r);return i(e),e}return s=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=yield w({fetchCustomerGroup:o.fetchCustomerGroup,isLoggedIn:o.isLoggedIn,forceRefresh:!0,onError:o.onError});return u=Date.now(),e}finally{s=null}}),s}),subscribeToCustomerSegmentRefresh:n,dispatchCustomerSegmentRefreshEvent:i}},exports.dispatchCustomerSegmentRefreshEvent=i,exports.extractCustomerGroupFromProfile=u,exports.getCurrentCustomerSegment=()=>{const e=_(t.CUSTOMER_GROUP_STORAGE_KEY);return null!=e?e:t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE},exports.resolveCustomerGroup=m,exports.setCustomerSegment=e=>{const o=e===t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE?t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE:s(e);return a(t.CUSTOMER_GROUP_STORAGE_KEY,o),i(o),o},exports.subscribeToCustomerSegmentRefresh=n,exports.syncCustomerSegment=w;
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("../components/Constants.js"),o=require("cookies-next"),r=require("./CustomerService.js");const n=()=>{const e=a(t.CUSTOMER_GROUP_STORAGE_KEY);return null!=e?e:t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE},i=e=>{if("undefined"==typeof window)return()=>{};const o=t=>{e(t)},r=e=>{var o;if(e.key===t.CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY&&e.newValue)try{const t=JSON.parse(e.newValue);s(null!==(o=t.customerGroup)&&void 0!==o?o:null)}catch(e){s(n())}};return window.addEventListener(t.CUSTOMER_SEGMENT_REFRESH_EVENT,o),window.addEventListener("storage",r),m({fetchCustomerGroup:l,isLoggedIn:_,onError:()=>{}}),()=>{window.removeEventListener(t.CUSTOMER_SEGMENT_REFRESH_EVENT,o),window.removeEventListener("storage",r)}},s=e=>{if("undefined"!=typeof window){try{window.localStorage.setItem(t.CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY,JSON.stringify({customerGroup:e,refreshedAt:Date.now()}))}catch(e){}window.dispatchEvent(new CustomEvent(t.CUSTOMER_SEGMENT_REFRESH_EVENT,{detail:{customerGroup:e,refreshedAt:Date.now()}}))}},u=e=>{if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null},d=e=>{var t,o;const r=u(null==e?void 0:e.customerGroup);if(r)return r;const n=u(null===(o=null===(t=null==e?void 0:e.relatedParty)||void 0===t?void 0:t[0])||void 0===o?void 0:o.segment);return n||null},E=t=>()=>e.__awaiter(void 0,void 0,void 0,function*(){const e=yield t.fetchCustomerProfile();return d(e||{})}),l=E({fetchCustomerProfile:r.customerGroup}),c=new Map,f=new Set(["MOBILE","FIXNET","FIXNET_MOBILE","DEFAULT"]),_=()=>Boolean(o.getCookie(t.AUTHCOOKIE)),a=e=>"undefined"==typeof window?null:u(window.localStorage.getItem(e)),w=(e,t)=>{"undefined"!=typeof window&&(t?window.localStorage.setItem(e,t):window.localStorage.removeItem(e))},S=o=>e.__awaiter(void 0,void 0,void 0,function*(){const r=t.CUSTOMER_GROUP_STORAGE_KEY,n=t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE;if("undefined"==typeof window)return null;if(!o.isLoggedIn())return w(r,n),n;if(!o.forceRefresh){const e=a(r);if((e=>{const t=(o=e)?o.trim().toUpperCase():null;var o;return Boolean(t&&f.has(t))})(e))return e}const i=c.get(r);if(i)return i;const s=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=u(yield o.fetchCustomerGroup());return w(r,e),e}catch(e){return o.onError&&o.onError(e),a(r)}finally{c.delete(r)}});return c.set(r,s),s}),m=t=>e.__awaiter(void 0,void 0,void 0,function*(){const e=yield S(t);return s(e),e});exports.createCustomerGroupFetcher=E,exports.createCustomerSegmentSync=o=>{const r=t.CUSTOMER_GROUP_STORAGE_KEY;let n=null,u=0;return{refreshCustomerSegmentAfterLogin:()=>e.__awaiter(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return null;var t;if(yield(t=o.isLoggedIn,e.__awaiter(void 0,void 0,void 0,function*(){if("undefined"==typeof window||t())return;const e=Date.now()+2e3;for(;!t()&&Date.now()<e;)yield new Promise(e=>window.setTimeout(e,100))})),n)return n;if(Date.now()-u<8e3){const e=a(r);return s(e),e}return n=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=yield m({fetchCustomerGroup:o.fetchCustomerGroup,isLoggedIn:o.isLoggedIn,forceRefresh:!0,onError:o.onError});return u=Date.now(),e}finally{n=null}}),n}),subscribeToCustomerSegmentRefresh:i,dispatchCustomerSegmentRefreshEvent:s}},exports.dispatchCustomerSegmentRefreshEvent=s,exports.extractCustomerGroupFromProfile=d,exports.getCurrentCustomerSegment=n,exports.resolveCustomerGroup=S,exports.setCustomerSegment=e=>{const o=e===t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE?t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE:u(e);return w(t.CUSTOMER_GROUP_STORAGE_KEY,o),s(o),o},exports.subscribeToCustomerSegmentRefresh=i,exports.syncCustomerSegment=m;
2
2
  //# sourceMappingURL=customerSegmentSync.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["subscribeToCustomerSegmentRefresh","handler","window","eventListener","event","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","syncCustomerSegment","fetchCustomerGroup","defaultFetchCustomerGroup","isLoggedIn","defaultIsLoggedIn","onError","removeEventListener","dispatchCustomerSegmentRefreshEvent","customerGroup","dispatchEvent","CustomEvent","detail","refreshedAt","Date","now","normalizeCustomerGroup","value","normalized","trim","length","extractCustomerGroupFromProfile","profile","directCustomerGroup","relatedPartySegment","_b","_a","relatedParty","segment","createCustomerGroupFetcher","options","__awaiter","customerProfile","fetchCustomerProfile","inFlightCustomerGroupByStorageKey","Map","ALLOWED_CUSTOMER_GROUP_VALUES","Set","Boolean","getCookie","AUTHCOOKIE","getCachedCustomerGroup","storageKey","localStorage","getItem","setCachedCustomerGroup","setItem","removeItem","resolveCustomerGroup","CUSTOMER_GROUP_STORAGE_KEY","newCustomerValue","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","forceRefresh","cachedCustomerGroup","customerGroupValue","normalizedCustomerGroup","toUpperCase","has","isAllowedCachedCustomerGroup","inFlightCustomerGroup","get","customerGroupPromise","resolvedCustomerGroup","error","delete","set","inFlightSync","lastSyncedAtMs","refreshCustomerSegmentAfterLogin","deadline","Promise","resolve","setTimeout"],"mappings":"qKA4CO,MAMMA,EACXC,IAEA,GAAsB,oBAAXC,OACT,MAAO,OAGT,MAAMC,EAAgCC,IACpCH,EAAQG,IAYV,OATAF,OAAOG,iBAAiBC,EA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,MAAQsD,SAC7B,IAAIC,QAASC,GAAY3E,OAAO4E,WAAWD,EA7BpB,KA+BjC,IA2GQL,EACF,OAAOA,EAIT,GADYpD,KAAKC,MACPoD,EAjJgC,IAiJI,CAC5C,MAAMd,EAAsBZ,EAAuBC,GAEnD,OADAlC,EAAoC6C,GAC7BA,CACT,CAiBA,OAfAa,EAA2BnC,EAAAA,eAAA,OAAA,OAAA,EAAA,YACzB,IACE,MAAM+B,QAA8B7D,EAAoB,CACtDC,mBAAoB4B,EAAQ5B,mBAC5BE,WAAY0B,EAAQ1B,WACpBgD,cAAc,EACd9C,QAASwB,EAAQxB,UAGnB,OADA6D,EAAiBrD,KAAKC,MACf+C,CACT,SACEI,EAAe,IACjB,CACF,GAEOA,CACT,GAIExE,oCACAc,kKA/PqC,KACvC,MAAM6C,EAAsBZ,EAAuBQ,8BAEnD,OAAOI,QAAAA,EAAuBF,EAAAA,6FAwIG1C,IACjC,MAAM8C,EACJ9C,IAAkB0C,EAAAA,kCACdA,EAAAA,kCACAnC,EAAuBP,GAK7B,OAHAoC,EAAuBI,EAAAA,2BAA4BM,GACnD/C,EAAoC+C,GAE7BA"}
1
+ {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["getCurrentCustomerSegment","cachedCustomerGroup","getCachedCustomerGroup","CUSTOMER_GROUP_STORAGE_KEY","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","subscribeToCustomerSegmentRefresh","handler","window","eventListener","event","storageListener","key","CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY","newValue","parsed","JSON","parse","dispatchCustomerSegmentRefreshEvent","customerGroup","_a","_b","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","syncCustomerSegment","fetchCustomerGroup","defaultFetchCustomerGroup","isLoggedIn","defaultIsLoggedIn","onError","removeEventListener","localStorage","setItem","stringify","refreshedAt","Date","now","dispatchEvent","CustomEvent","detail","normalizeCustomerGroup","value","normalized","trim","length","extractCustomerGroupFromProfile","profile","directCustomerGroup","relatedPartySegment","relatedParty","segment","createCustomerGroupFetcher","options","__awaiter","customerProfile","fetchCustomerProfile","inFlightCustomerGroupByStorageKey","Map","ALLOWED_CUSTOMER_GROUP_VALUES","Set","Boolean","getCookie","AUTHCOOKIE","storageKey","getItem","setCachedCustomerGroup","removeItem","resolveCustomerGroup","newCustomerValue","forceRefresh","customerGroupValue","normalizedCustomerGroup","toUpperCase","has","isAllowedCachedCustomerGroup","inFlightCustomerGroup","get","customerGroupPromise","resolvedCustomerGroup","error","delete","set","inFlightSync","lastSyncedAtMs","refreshCustomerSegmentAfterLogin","deadline","Promise","resolve","setTimeout"],"mappings":"qKA6CO,MAAMA,EAA4B,KACvC,MAAMC,EAAsBC,EAAuBC,8BAEnD,OAAOF,QAAAA,EAAuBG,EAAAA,mCAGnBC,EACXC,IAEA,GAAsB,oBAAXC,OACT,MAAO,OAGT,MAAMC,EAAgCC,IACpCH,EAAQG,IAGJC,EAAmBD,UACvB,GAAIA,EAAME,MAAQC,EAAAA,sCAAyCH,EAAMI,SAIjE,IACE,MAAMC,EAASC,KAAKC,MAAMP,EAAMI,UAChCI,EAAwD,UAApBH,EAAOI,qBAAa,IAAAC,EAAAA,EAAI,KAC9D,CAAE,MAAAC,GACAH,EAAoCjB,IACtC,GAaF,OAVAO,OAAOc,iBAAiBC,EAAAA,+BAAgCd,GACxDD,OAAOc,iBAAiB,UAAWX,GAG9Ba,EAAoB,CACvBC,mBAAoBC,EACpBC,WAAYC,EACZC,QAAS,SAGJ,KACLrB,OAAOsB,oBAAoBP,EAAAA,+BAAgCd,GAC3DD,OAAOsB,oBAAoB,UAAWnB,KAI7BO,EAAuCC,IAClD,GAAsB,oBAAXX,OAAX,CAIA,IACEA,OAAOuB,aAAaC,QAClBnB,EAAAA,qCACAG,KAAKiB,UAAU,CACbd,gBACAe,YAAaC,KAAKC,QAGxB,CAAE,MAAAhB,GAEF,CAEAZ,OAAO6B,cACL,IAAIC,YAA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GAEnD,OADA7C,EAAoChB,GAC7BA,CACT,CAiBA,OAfAgF,EAA2B7B,EAAAA,eAAA,OAAA,OAAA,EAAA,YACzB,IACE,MAAMyB,QAA8BtD,EAAoB,CACtDC,mBAAoB2B,EAAQ3B,mBAC5BE,WAAYyB,EAAQzB,WACpB0C,cAAc,EACdxC,QAASuB,EAAQvB,UAGnB,OADAsD,EAAiBhD,KAAKC,MACf0C,CACT,SACEI,EAAe,IACjB,CACF,GAEOA,CACT,GAIE5E,oCACAY,8NApH+BC,IACjC,MAAMoD,EACJpD,IAAkBd,EAAAA,kCACdA,EAAAA,kCACAmC,EAAuBrB,GAK7B,OAHA8C,EAAuB7D,EAAAA,2BAA4BmE,GACnDrD,EAAoCqD,GAE7BA"}
@@ -1,2 +1,2 @@
1
- const e="center",t="left",s="right",r="transparent",o="00",c="#da291c",i="clicked",n="after",a="before",f="#ffffff",m="h1",d="h2",h="h3",l="h4",g="extra",u="semiextra",R="none",b=1439,p=1023,E=767,U="stack",A="col-lg-6",P="col-lg-4",x="col-lg-3",D="en",G="sunriseAuth",S=768,T=1024,_=1440,k="img",M="icon",v="svg",y="auth-stamp",B="PreToPost",C="customerGroup",F="NEW_CUSTOMER",I="dismissedRibbonsByUid",L="ribbonDismissUpdated",N="customerSegmentRefresh",O="one-commerce-cartId",W="SMART_UPGRADE",X="FLEX_UPGRADE";export{n as AFTER,G as AUTHCOOKIE,y as AUTHSTAMP,a as BEFORE,O as CART_COOKIE,e as CENTER,x as COLLG3,P as COLLG4,A as COLLG6,f as COLORWHITE,F as CUSTOMER_GROUP_NEW_CUSTOMER_VALUE,C as CUSTOMER_GROUP_STORAGE_KEY,N as CUSTOMER_SEGMENT_REFRESH_EVENT,D as DEFAULTLOCALE,I as DISMISSED_RIBBONS_STORAGE_KEY,g as EXTRA,i as FALCONBUTTONCLICKED,X as FLEX_UPGRADE,m as H1,d as H2,h as H3,l as H4,M as ICON,k as IMG,t as LEFT,_ as LGDESKSTART,b as MDDESKEND,T as MDDESKSTART,E as MOBEND,R as NONE,B as PRE_TO_POST_PROMOTION_ID,c as PRIMARYCOLORS,L as RIBBON_DISMISS_UPDATED_EVENT,s as RIGHT,u as SEMIEXTRA,W as SMART_UPGRADE,U as STACK,v as SVG,p as TABEND,S as TABSTART,r as TRANSPARENT,o as ZEROES};
1
+ const e="center",t="left",s="right",r="transparent",o="00",c="#da291c",n="clicked",i="after",m="before",a="#ffffff",f="h1",h="h2",d="h3",g="h4",l="extra",u="semiextra",R="none",p=1439,b=1023,E=767,S="stack",U="col-lg-6",A="col-lg-4",P="col-lg-3",x="en",D="sunriseAuth",G=768,T=1024,_=1440,k="img",M="icon",v="svg",y="auth-stamp",B="PreToPost",C="customerGroup",F="NEW_CUSTOMER",I="dismissedRibbonsByUid",L="ribbonDismissUpdated",N="customerSegmentRefresh",O="customerSegmentRefreshStamp",W="one-commerce-cartId",X="SMART_UPGRADE",j="FLEX_UPGRADE";export{i as AFTER,D as AUTHCOOKIE,y as AUTHSTAMP,m as BEFORE,W as CART_COOKIE,e as CENTER,P as COLLG3,A as COLLG4,U as COLLG6,a as COLORWHITE,F as CUSTOMER_GROUP_NEW_CUSTOMER_VALUE,C as CUSTOMER_GROUP_STORAGE_KEY,N as CUSTOMER_SEGMENT_REFRESH_EVENT,O as CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY,x as DEFAULTLOCALE,I as DISMISSED_RIBBONS_STORAGE_KEY,l as EXTRA,n as FALCONBUTTONCLICKED,j as FLEX_UPGRADE,f as H1,h as H2,d as H3,g as H4,M as ICON,k as IMG,t as LEFT,_ as LGDESKSTART,p as MDDESKEND,T as MDDESKSTART,E as MOBEND,R as NONE,B as PRE_TO_POST_PROMOTION_ID,c as PRIMARYCOLORS,L as RIBBON_DISMISS_UPDATED_EVENT,s as RIGHT,u as SEMIEXTRA,X as SMART_UPGRADE,S as STACK,v as SVG,b as TABEND,G as TABSTART,r as TRANSPARENT,o as ZEROES};
2
2
  //# sourceMappingURL=Constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":["CENTER","LEFT","RIGHT","TRANSPARENT","ZEROES","PRIMARYCOLORS","FALCONBUTTONCLICKED","AFTER","BEFORE","COLORWHITE","H1","H2","H3","H4","EXTRA","SEMIEXTRA","NONE","MDDESKEND","TABEND","MOBEND","STACK","COLLG6","COLLG4","COLLG3","DEFAULTLOCALE","AUTHCOOKIE","TABSTART","MDDESKSTART","LGDESKSTART","IMG","ICON","SVG","AUTHSTAMP","PRE_TO_POST_PROMOTION_ID","CUSTOMER_GROUP_STORAGE_KEY","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","DISMISSED_RIBBONS_STORAGE_KEY","RIBBON_DISMISS_UPDATED_EVENT","CUSTOMER_SEGMENT_REFRESH_EVENT","CART_COOKIE","SMART_UPGRADE","FLEX_UPGRADE"],"mappings":"AAAO,MAAMA,EAAS,SACTC,EAAO,OACPC,EAAQ,QACRC,EAAc,cACdC,EAAS,KACTC,EAAgB,UAChBC,EAAsB,UACtBC,EAAQ,QACRC,EAAS,SAETC,EAAa,UACbC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAQ,QACRC,EAAY,YACZC,EAAM,OAENC,EAAY,KACZC,EAAS,KACTC,EAAS,IACTC,EAAQ,QACRC,EAAS,WACTC,EAAS,WACTC,EAAS,WAWTC,EAAgB,KAChBC,EAAa,cAcbC,EAAW,IACXC,EAAc,KACdC,EAAc,KAgCdC,EAAM,MACNC,EAAO,OACPC,EAAM,MA0DNC,EAAY,aAWZC,EAA2B,YAG3BC,EAA6B,gBAC7BC,EAAoC,eACpCC,EAAgC,wBAChCC,EAA+B,uBAC/BC,EAAiC,yBACjCC,EAAc,sBACdC,EAAgB,gBAChBC,EAAe"}
1
+ {"version":3,"file":"Constants.js","sources":["../../../../src/components/Constants.ts"],"sourcesContent":[null],"names":["CENTER","LEFT","RIGHT","TRANSPARENT","ZEROES","PRIMARYCOLORS","FALCONBUTTONCLICKED","AFTER","BEFORE","COLORWHITE","H1","H2","H3","H4","EXTRA","SEMIEXTRA","NONE","MDDESKEND","TABEND","MOBEND","STACK","COLLG6","COLLG4","COLLG3","DEFAULTLOCALE","AUTHCOOKIE","TABSTART","MDDESKSTART","LGDESKSTART","IMG","ICON","SVG","AUTHSTAMP","PRE_TO_POST_PROMOTION_ID","CUSTOMER_GROUP_STORAGE_KEY","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","DISMISSED_RIBBONS_STORAGE_KEY","RIBBON_DISMISS_UPDATED_EVENT","CUSTOMER_SEGMENT_REFRESH_EVENT","CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY","CART_COOKIE","SMART_UPGRADE","FLEX_UPGRADE"],"mappings":"AAAO,MAAMA,EAAS,SACTC,EAAO,OACPC,EAAQ,QACRC,EAAc,cACdC,EAAS,KACTC,EAAgB,UAChBC,EAAsB,UACtBC,EAAQ,QACRC,EAAS,SAETC,EAAa,UACbC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAK,KACLC,EAAQ,QACRC,EAAY,YACZC,EAAM,OAENC,EAAY,KACZC,EAAS,KACTC,EAAS,IACTC,EAAQ,QACRC,EAAS,WACTC,EAAS,WACTC,EAAS,WAWTC,EAAgB,KAChBC,EAAa,cAcbC,EAAW,IACXC,EAAc,KACdC,EAAc,KAgCdC,EAAM,MACNC,EAAO,OACPC,EAAM,MA0DNC,EAAY,aAWZC,EAA2B,YAG3BC,EAA6B,gBAC7BC,EAAoC,eACpCC,EAAgC,wBAChCC,EAA+B,uBAC/BC,EAAiC,yBACjCC,EAAuC,8BACvCC,EAAc,sBACdC,EAAgB,gBAChBC,EAAe"}
@@ -1,2 +1,2 @@
1
- import{__awaiter as e}from"../node_modules/tslib/tslib.es6.js";import{CUSTOMER_SEGMENT_REFRESH_EVENT as o,CUSTOMER_GROUP_NEW_CUSTOMER_VALUE as n,CUSTOMER_GROUP_STORAGE_KEY as t,AUTHCOOKIE as r}from"../components/Constants.js";import{getCookie as i}from"cookies-next";import{customerGroup as d}from"./CustomerService.js";const u=()=>{const e=g(t);return null!=e?e:n},s=e=>{if("undefined"==typeof window)return()=>{};const n=o=>{e(o)};return window.addEventListener(o,n),C({fetchCustomerGroup:w,isLoggedIn:p,onError:()=>{}}),()=>{window.removeEventListener(o,n)}},f=e=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(o,{detail:{customerGroup:e,refreshedAt:Date.now()}}))},l=e=>{if("string"!=typeof e)return null;const o=e.trim();return o.length>0?o:null},c=e=>{var o,n;const t=l(null==e?void 0:e.customerGroup);if(t)return t;const r=l(null===(n=null===(o=null==e?void 0:e.relatedParty)||void 0===o?void 0:o[0])||void 0===n?void 0:n.segment);return r||null},v=o=>()=>e(void 0,void 0,void 0,function*(){const e=yield o.fetchCustomerProfile();return c(e||{})}),w=v({fetchCustomerProfile:d}),m=new Map,a=new Set(["MOBILE","FIXNET","FIXNET_MOBILE","DEFAULT"]),p=()=>Boolean(i(r)),g=e=>"undefined"==typeof window?null:l(window.localStorage.getItem(e)),y=(e,o)=>{"undefined"!=typeof window&&(o?window.localStorage.setItem(e,o):window.localStorage.removeItem(e))},h=e=>{const o=e===n?n:l(e);return y(t,o),f(o),o},E=o=>e(void 0,void 0,void 0,function*(){const r=t,i=n;if("undefined"==typeof window)return null;if(!o.isLoggedIn())return y(r,i),i;if(!o.forceRefresh){const e=g(r);if((e=>{const o=(n=e)?n.trim().toUpperCase():null;var n;return Boolean(o&&a.has(o))})(e))return e}const d=m.get(r);if(d)return d;const u=e(void 0,void 0,void 0,function*(){try{const e=l(yield o.fetchCustomerGroup());return y(r,e),e}catch(e){return o.onError&&o.onError(e),g(r)}finally{m.delete(r)}});return m.set(r,u),u}),C=o=>e(void 0,void 0,void 0,function*(){const e=yield E(o);return f(e),e}),I=o=>{const n=t;let r=null,i=0;return{refreshCustomerSegmentAfterLogin:()=>e(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return null;var t;if(yield(t=o.isLoggedIn,e(void 0,void 0,void 0,function*(){if("undefined"==typeof window||t())return;const e=Date.now()+2e3;for(;!t()&&Date.now()<e;)yield new Promise(e=>window.setTimeout(e,100))})),r)return r;if(Date.now()-i<8e3){const e=g(n);return f(e),e}return r=e(void 0,void 0,void 0,function*(){try{const e=yield C({fetchCustomerGroup:o.fetchCustomerGroup,isLoggedIn:o.isLoggedIn,forceRefresh:!0,onError:o.onError});return i=Date.now(),e}finally{r=null}}),r}),subscribeToCustomerSegmentRefresh:s,dispatchCustomerSegmentRefreshEvent:f}};export{v as createCustomerGroupFetcher,I as createCustomerSegmentSync,f as dispatchCustomerSegmentRefreshEvent,c as extractCustomerGroupFromProfile,u as getCurrentCustomerSegment,E as resolveCustomerGroup,h as setCustomerSegment,s as subscribeToCustomerSegmentRefresh,C as syncCustomerSegment};
1
+ import{__awaiter as e}from"../node_modules/tslib/tslib.es6.js";import{CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY as o,CUSTOMER_SEGMENT_REFRESH_EVENT as n,CUSTOMER_GROUP_NEW_CUSTOMER_VALUE as t,CUSTOMER_GROUP_STORAGE_KEY as r,AUTHCOOKIE as i}from"../components/Constants.js";import{getCookie as d}from"cookies-next";import{customerGroup as u}from"./CustomerService.js";const s=()=>{const e=y(r);return null!=e?e:t},l=e=>{if("undefined"==typeof window)return()=>{};const t=o=>{e(o)},r=e=>{var n;if(e.key===o&&e.newValue)try{const o=JSON.parse(e.newValue);f(null!==(n=o.customerGroup)&&void 0!==n?n:null)}catch(e){f(s())}};return window.addEventListener(n,t),window.addEventListener("storage",r),I({fetchCustomerGroup:a,isLoggedIn:g,onError:()=>{}}),()=>{window.removeEventListener(n,t),window.removeEventListener("storage",r)}},f=e=>{if("undefined"!=typeof window){try{window.localStorage.setItem(o,JSON.stringify({customerGroup:e,refreshedAt:Date.now()}))}catch(e){}window.dispatchEvent(new CustomEvent(n,{detail:{customerGroup:e,refreshedAt:Date.now()}}))}},c=e=>{if("string"!=typeof e)return null;const o=e.trim();return o.length>0?o:null},w=e=>{var o,n;const t=c(null==e?void 0:e.customerGroup);if(t)return t;const r=c(null===(n=null===(o=null==e?void 0:e.relatedParty)||void 0===o?void 0:o[0])||void 0===n?void 0:n.segment);return r||null},v=o=>()=>e(void 0,void 0,void 0,function*(){const e=yield o.fetchCustomerProfile();return w(e||{})}),a=v({fetchCustomerProfile:u}),m=new Map,p=new Set(["MOBILE","FIXNET","FIXNET_MOBILE","DEFAULT"]),g=()=>Boolean(d(i)),y=e=>"undefined"==typeof window?null:c(window.localStorage.getItem(e)),h=(e,o)=>{"undefined"!=typeof window&&(o?window.localStorage.setItem(e,o):window.localStorage.removeItem(e))},E=e=>{const o=e===t?t:c(e);return h(r,o),f(o),o},C=o=>e(void 0,void 0,void 0,function*(){const n=r,i=t;if("undefined"==typeof window)return null;if(!o.isLoggedIn())return h(n,i),i;if(!o.forceRefresh){const e=y(n);if((e=>{const o=(n=e)?n.trim().toUpperCase():null;var n;return Boolean(o&&p.has(o))})(e))return e}const d=m.get(n);if(d)return d;const u=e(void 0,void 0,void 0,function*(){try{const e=c(yield o.fetchCustomerGroup());return h(n,e),e}catch(e){return o.onError&&o.onError(e),y(n)}finally{m.delete(n)}});return m.set(n,u),u}),I=o=>e(void 0,void 0,void 0,function*(){const e=yield C(o);return f(e),e}),L=o=>{const n=r;let t=null,i=0;return{refreshCustomerSegmentAfterLogin:()=>e(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return null;var r;if(yield(r=o.isLoggedIn,e(void 0,void 0,void 0,function*(){if("undefined"==typeof window||r())return;const e=Date.now()+2e3;for(;!r()&&Date.now()<e;)yield new Promise(e=>window.setTimeout(e,100))})),t)return t;if(Date.now()-i<8e3){const e=y(n);return f(e),e}return t=e(void 0,void 0,void 0,function*(){try{const e=yield I({fetchCustomerGroup:o.fetchCustomerGroup,isLoggedIn:o.isLoggedIn,forceRefresh:!0,onError:o.onError});return i=Date.now(),e}finally{t=null}}),t}),subscribeToCustomerSegmentRefresh:l,dispatchCustomerSegmentRefreshEvent:f}};export{v as createCustomerGroupFetcher,L as createCustomerSegmentSync,f as dispatchCustomerSegmentRefreshEvent,w as extractCustomerGroupFromProfile,s as getCurrentCustomerSegment,C as resolveCustomerGroup,E as setCustomerSegment,l as subscribeToCustomerSegmentRefresh,I as syncCustomerSegment};
2
2
  //# sourceMappingURL=customerSegmentSync.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["getCurrentCustomerSegment","cachedCustomerGroup","getCachedCustomerGroup","CUSTOMER_GROUP_STORAGE_KEY","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","subscribeToCustomerSegmentRefresh","handler","window","eventListener","event","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","syncCustomerSegment","fetchCustomerGroup","defaultFetchCustomerGroup","isLoggedIn","defaultIsLoggedIn","onError","removeEventListener","dispatchCustomerSegmentRefreshEvent","customerGroup","dispatchEvent","CustomEvent","detail","refreshedAt","Date","now","normalizeCustomerGroup","value","normalized","trim","length","extractCustomerGroupFromProfile","profile","directCustomerGroup","relatedPartySegment","_b","_a","relatedParty","segment","createCustomerGroupFetcher","options","__awaiter","customerProfile","fetchCustomerProfile","inFlightCustomerGroupByStorageKey","Map","ALLOWED_CUSTOMER_GROUP_VALUES","Set","Boolean","getCookie","AUTHCOOKIE","storageKey","localStorage","getItem","setCachedCustomerGroup","setItem","removeItem","setCustomerSegment","normalizedCustomerGroup","resolveCustomerGroup","newCustomerValue","forceRefresh","customerGroupValue","toUpperCase","has","isAllowedCachedCustomerGroup","inFlightCustomerGroup","get","customerGroupPromise","resolvedCustomerGroup","error","delete","set","createCustomerSegmentSync","inFlightSync","lastSyncedAtMs","refreshCustomerSegmentAfterLogin","deadline","Promise","resolve","setTimeout"],"mappings":"gUA4CO,MAAMA,EAA4B,KACvC,MAAMC,EAAsBC,EAAuBC,GAEnD,OAAOF,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,EAkHL0B,EAAQ1B,WAlHyC2B,OAAA,OAAA,OAAA,EAAA,YAC9E,GAAsB,oBAAXnC,QAA0BQ,IACnC,OAGF,MAAM+D,EAAWrD,KAAKC,MA5BY,IA6BlC,MAAQX,KAAgBU,KAAKC,MAAQoD,SAC7B,IAAIC,QAASC,GAAYzE,OAAO0E,WAAWD,EA7BpB,KA+BjC,IA2GQL,EACF,OAAOA,EAIT,GADYlD,KAAKC,MACPkD,EAjJgC,IAiJI,CAC5C,MAAM3E,EAAsBC,EAAuBkD,GAEnD,OADAjC,EAAoClB,GAC7BA,CACT,CAiBA,OAfA0E,EAA2BjC,OAAA,OAAA,OAAA,EAAA,YACzB,IACE,MAAM4B,QAA8B1D,EAAoB,CACtDC,mBAAoB4B,EAAQ5B,mBAC5BE,WAAY0B,EAAQ1B,WACpB+C,cAAc,EACd7C,QAASwB,EAAQxB,UAGnB,OADA2D,EAAiBnD,KAAKC,MACf4C,CACT,SACEK,EAAe,IACjB,CACF,GAEOA,CACT,GAIEtE,oCACAc"}
1
+ {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["getCurrentCustomerSegment","cachedCustomerGroup","getCachedCustomerGroup","CUSTOMER_GROUP_STORAGE_KEY","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","subscribeToCustomerSegmentRefresh","handler","window","eventListener","event","storageListener","key","CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY","newValue","parsed","JSON","parse","dispatchCustomerSegmentRefreshEvent","customerGroup","_a","_b","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","syncCustomerSegment","fetchCustomerGroup","defaultFetchCustomerGroup","isLoggedIn","defaultIsLoggedIn","onError","removeEventListener","localStorage","setItem","stringify","refreshedAt","Date","now","dispatchEvent","CustomEvent","detail","normalizeCustomerGroup","value","normalized","trim","length","extractCustomerGroupFromProfile","profile","directCustomerGroup","relatedPartySegment","relatedParty","segment","createCustomerGroupFetcher","options","__awaiter","customerProfile","fetchCustomerProfile","inFlightCustomerGroupByStorageKey","Map","ALLOWED_CUSTOMER_GROUP_VALUES","Set","Boolean","getCookie","AUTHCOOKIE","storageKey","getItem","setCachedCustomerGroup","removeItem","setCustomerSegment","normalizedCustomerGroup","resolveCustomerGroup","newCustomerValue","forceRefresh","customerGroupValue","toUpperCase","has","isAllowedCachedCustomerGroup","inFlightCustomerGroup","get","customerGroupPromise","resolvedCustomerGroup","error","delete","set","createCustomerSegmentSync","inFlightSync","lastSyncedAtMs","refreshCustomerSegmentAfterLogin","deadline","Promise","resolve","setTimeout"],"mappings":"0WA6CO,MAAMA,EAA4B,KACvC,MAAMC,EAAsBC,EAAuBC,GAEnD,OAAOF,QAAAA,EAAuBG,GAGnBC,EACXC,IAEA,GAAsB,oBAAXC,OACT,MAAO,OAGT,MAAMC,EAAgCC,IACpCH,EAAQG,IAGJC,EAAmBD,UACvB,GAAIA,EAAME,MAAQC,GAAyCH,EAAMI,SAIjE,IACE,MAAMC,EAASC,KAAKC,MAAMP,EAAMI,UAChCI,EAAwD,UAApBH,EAAOI,qBAAa,IAAAC,EAAAA,EAAI,KAC9D,CAAE,MAAAC,GACAH,EAAoCjB,IACtC,GAaF,OAVAO,OAAOc,iBAAiBC,EAAgCd,GACxDD,OAAOc,iBAAiB,UAAWX,GAG9Ba,EAAoB,CACvBC,mBAAoBC,EACpBC,WAAYC,EACZC,QAAS,SAGJ,KACLrB,OAAOsB,oBAAoBP,EAAgCd,GAC3DD,OAAOsB,oBAAoB,UAAWnB,KAI7BO,EAAuCC,IAClD,GAAsB,oBAAXX,OAAX,CAIA,IACEA,OAAOuB,aAAaC,QAClBnB,EACAG,KAAKiB,UAAU,CACbd,gBACAe,YAAaC,KAAKC,QAGxB,CAAE,MAAAhB,GAEF,CAEAZ,OAAO6B,cACL,IAAIC,YAA0Cf,EAAgC,CAC5EgB,OAAQ,CACNpB,gBACAe,YAAaC,KAAKC,SAlBxB,GAwBII,EAA0BC,IAC9B,G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AfAkF,EAA2B/B,OAAA,OAAA,OAAA,EAAA,YACzB,IACE,MAAM0B,QAA8BvD,EAAoB,CACtDC,mBAAoB2B,EAAQ3B,mBAC5BE,WAAYyB,EAAQzB,WACpB4C,cAAc,EACd1C,QAASuB,EAAQvB,UAGnB,OADAwD,EAAiBlD,KAAKC,MACf2C,CACT,SACEK,EAAe,IACjB,CACF,GAEOA,CACT,GAIE9E,oCACAY"}
@@ -1368,54 +1368,6 @@
1368
1368
  text-align: center;
1369
1369
  }
1370
1370
 
1371
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartHeader/CartHeader.module.scss */
1372
- /* center a block element */
1373
- /* use this to any of the pseudo elements as these are the mandatory properties */
1374
- /* setting styles in separate formats for cross browser support */
1375
- /* specify the max width for an element and apply ellipses and truncate the overflow */
1376
- /* vertically center alilgn any HTML element */
1377
- /* add basePath to assets */
1378
- .CartHeader-module__headerTitle___35F6g {
1379
- display: flex;
1380
- align-items: center;
1381
- gap: 8px;
1382
- }
1383
-
1384
- .CartHeader-module__headerItemCount___g1Ynd {
1385
- font-size: 24px;
1386
- line-height: 32px;
1387
- font-weight: 400;
1388
- color: #3d3935;
1389
- }
1390
- @media (max-width: 1023px) {
1391
- .CartHeader-module__headerItemCount___g1Ynd {
1392
- font-size: 20px;
1393
- line-height: 28px;
1394
- }
1395
- }
1396
-
1397
- .CartHeader-module__clearAllButton___B3bNF {
1398
- display: inline;
1399
- background: none;
1400
- border: none;
1401
- padding: 0;
1402
- cursor: pointer;
1403
- font-size: 14px;
1404
- line-height: 20px;
1405
- font-weight: 400;
1406
- color: #da291c;
1407
- text-decoration: underline;
1408
- text-underline-offset: 2px;
1409
- }
1410
- .CartHeader-module__clearAllButton___B3bNF:hover {
1411
- color: #961c13;
1412
- }
1413
- .CartHeader-module__clearAllButton___B3bNF:focus-visible {
1414
- outline: 2px solid #da291c;
1415
- outline-offset: 2px;
1416
- border-radius: 2px;
1417
- }
1418
-
1419
1371
  /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/MobileNavigation/MobileMenuItem/MobileMenuItem.module.scss */
1420
1372
  /* center a block element */
1421
1373
  /* use this to any of the pseudo elements as these are the mandatory properties */
@@ -1474,88 +1426,6 @@
1474
1426
  filter: brightness(0) invert(0.9);
1475
1427
  }
1476
1428
 
1477
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss */
1478
- /* center a block element */
1479
- /* use this to any of the pseudo elements as these are the mandatory properties */
1480
- /* setting styles in separate formats for cross browser support */
1481
- /* specify the max width for an element and apply ellipses and truncate the overflow */
1482
- /* vertically center alilgn any HTML element */
1483
- /* add basePath to assets */
1484
- .EmptyCart-module__emptyState___HtCXJ {
1485
- display: flex;
1486
- flex-direction: column;
1487
- align-items: center;
1488
- justify-content: center;
1489
- flex: 1;
1490
- padding: 32px 24px 24px;
1491
- text-align: center;
1492
- }
1493
-
1494
- .EmptyCart-module__emptyIcon___A7F8f {
1495
- margin-bottom: 8px;
1496
- }
1497
-
1498
- .EmptyCart-module__emptyText___aX6Nu {
1499
- font-size: 16px;
1500
- line-height: 24px;
1501
- font-weight: 700;
1502
- color: #3d3935;
1503
- margin: 0 0 44px;
1504
- }
1505
-
1506
- .EmptyCart-module__emptySubText___P504H {
1507
- font-size: 14px;
1508
- line-height: 20px;
1509
- color: #787472;
1510
- margin: 0 0 8px;
1511
- }
1512
-
1513
- .EmptyCart-module__categoryLinks___J9tic {
1514
- display: flex;
1515
- gap: 12px;
1516
- width: 100%;
1517
- justify-content: center;
1518
- }
1519
-
1520
- .EmptyCart-module__categoryLink___YxsmA {
1521
- display: flex;
1522
- flex-direction: column;
1523
- align-items: center;
1524
- justify-content: center;
1525
- gap: 6px;
1526
- flex: 1;
1527
- padding: 12px 8px;
1528
- background-color: #ffffff;
1529
- border: none;
1530
- border-radius: 8px;
1531
- text-decoration: none;
1532
- color: #3d3935;
1533
- font-size: 12px;
1534
- line-height: 16px;
1535
- font-weight: 500;
1536
- text-align: center;
1537
- transition: background-color 0.15s ease;
1538
- }
1539
- .EmptyCart-module__categoryLink___YxsmA:hover {
1540
- background-color: #f8f8f8;
1541
- text-decoration: none;
1542
- color: #3d3935;
1543
- }
1544
- .EmptyCart-module__categoryLink___YxsmA:focus-visible {
1545
- outline: 2px solid #e6003c;
1546
- outline-offset: 2px;
1547
- }
1548
-
1549
- .EmptyCart-module__categoryLinkIcon___HjhbO {
1550
- display: flex;
1551
- align-items: center;
1552
- justify-content: center;
1553
- }
1554
-
1555
- .EmptyCart-module__categoryLinkLabel___1dS9s {
1556
- line-height: 1.3;
1557
- }
1558
-
1559
1429
  /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/FalconHeader/BusinessCustomerLinkOut/BusinessCustomerLinkOut.module.scss */
1560
1430
  /* center a block element */
1561
1431
  /* use this to any of the pseudo elements as these are the mandatory properties */
@@ -1871,160 +1741,134 @@
1871
1741
  outline-offset: 2px;
1872
1742
  }
1873
1743
 
1874
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss */
1744
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartHeader/CartHeader.module.scss */
1875
1745
  /* center a block element */
1876
1746
  /* use this to any of the pseudo elements as these are the mandatory properties */
1877
1747
  /* setting styles in separate formats for cross browser support */
1878
1748
  /* specify the max width for an element and apply ellipses and truncate the overflow */
1879
1749
  /* vertically center alilgn any HTML element */
1880
1750
  /* add basePath to assets */
1881
- .CartItems-module__container___9xcV- {
1751
+ .CartHeader-module__headerTitle___35F6g {
1882
1752
  display: flex;
1883
- flex-direction: column;
1884
- flex: 1;
1885
- }
1886
-
1887
- .CartItems-module__itemList___CK3U1 {
1888
- list-style: none;
1889
- margin: 0;
1890
- padding: 0;
1891
- }
1892
-
1893
- .CartItems-module__item___A6nFF {
1894
- border-bottom: 1px solid #e6e3df;
1895
- background-color: #f7f6f5;
1896
- }
1897
- .CartItems-module__item___A6nFF:last-child {
1898
- border-bottom: none;
1753
+ align-items: center;
1754
+ gap: 8px;
1899
1755
  }
1900
1756
 
1901
- .CartItems-module__itemContent___DaQhK {
1902
- display: flex;
1903
- flex-direction: row;
1904
- align-items: flex-start;
1905
- gap: 16px;
1906
- padding: 16px 24px;
1757
+ .CartHeader-module__headerItemCount___g1Ynd {
1758
+ font-size: 24px;
1759
+ line-height: 32px;
1760
+ font-weight: 400;
1761
+ color: #3d3935;
1907
1762
  }
1908
- @media (max-width: 767px) {
1909
- .CartItems-module__itemContent___DaQhK {
1910
- padding: 16px;
1763
+ @media (max-width: 1023px) {
1764
+ .CartHeader-module__headerItemCount___g1Ynd {
1765
+ font-size: 20px;
1766
+ line-height: 28px;
1911
1767
  }
1912
1768
  }
1913
1769
 
1914
- .CartItems-module__itemIcon___pk1NU {
1915
- display: flex;
1916
- align-items: center;
1917
- justify-content: center;
1918
- flex-shrink: 0;
1919
- width: 40px;
1920
- height: 40px;
1921
- color: #86807c;
1922
- }
1923
- .CartItems-module__itemIcon___pk1NU .CartItems-module__itemIconImage___q1IQJ {
1924
- width: 40px;
1925
- height: 40px;
1926
- object-fit: contain;
1927
- border-radius: 4px;
1770
+ .CartHeader-module__clearAllButton___B3bNF {
1771
+ display: inline;
1772
+ background: none;
1773
+ border: none;
1774
+ padding: 0;
1775
+ cursor: pointer;
1776
+ font-size: 14px;
1777
+ line-height: 20px;
1778
+ font-weight: 400;
1779
+ color: #da291c;
1780
+ text-decoration: underline;
1781
+ text-underline-offset: 2px;
1928
1782
  }
1929
-
1930
- .CartItems-module__itemBody___leOoI {
1931
- display: flex;
1932
- flex-direction: column;
1933
- gap: 4px;
1934
- flex: 1;
1935
- min-width: 0;
1783
+ .CartHeader-module__clearAllButton___B3bNF:hover {
1784
+ color: #961c13;
1936
1785
  }
1937
-
1938
- .CartItems-module__itemRow___owvC2 {
1939
- display: flex;
1940
- justify-content: space-between;
1941
- align-items: flex-start;
1942
- gap: 16px;
1786
+ .CartHeader-module__clearAllButton___B3bNF:focus-visible {
1787
+ outline: 2px solid #da291c;
1788
+ outline-offset: 2px;
1789
+ border-radius: 2px;
1943
1790
  }
1944
1791
 
1945
- .CartItems-module__itemDetails___vQu14 {
1792
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/EmptyCart/EmptyCart.module.scss */
1793
+ /* center a block element */
1794
+ /* use this to any of the pseudo elements as these are the mandatory properties */
1795
+ /* setting styles in separate formats for cross browser support */
1796
+ /* specify the max width for an element and apply ellipses and truncate the overflow */
1797
+ /* vertically center alilgn any HTML element */
1798
+ /* add basePath to assets */
1799
+ .EmptyCart-module__emptyState___HtCXJ {
1946
1800
  display: flex;
1947
1801
  flex-direction: column;
1948
- gap: 2px;
1949
- min-width: 0;
1802
+ align-items: center;
1803
+ justify-content: center;
1950
1804
  flex: 1;
1805
+ padding: 32px 24px 24px;
1806
+ text-align: center;
1951
1807
  }
1952
1808
 
1953
- .CartItems-module__categoryLabel___gSZid {
1954
- font-size: 12px;
1955
- line-height: 16px;
1956
- color: #86807c;
1809
+ .EmptyCart-module__emptyIcon___A7F8f {
1810
+ margin-bottom: 8px;
1957
1811
  }
1958
1812
 
1959
- .CartItems-module__productName___yYFNw {
1960
- font-size: 14px;
1961
- line-height: 20px;
1813
+ .EmptyCart-module__emptyText___aX6Nu {
1814
+ font-size: 16px;
1815
+ line-height: 24px;
1962
1816
  font-weight: 700;
1963
1817
  color: #3d3935;
1818
+ margin: 0 0 44px;
1964
1819
  }
1965
1820
 
1966
- .CartItems-module__variantText___saarn {
1967
- font-size: 12px;
1968
- line-height: 16px;
1969
- color: #86807c;
1970
- }
1971
-
1972
- .CartItems-module__downPaymentLabel___9sOP7 {
1973
- font-size: 12px;
1974
- line-height: 16px;
1975
- color: #86807c;
1821
+ .EmptyCart-module__emptySubText___P504H {
1822
+ font-size: 14px;
1823
+ line-height: 20px;
1824
+ color: #787472;
1825
+ margin: 0 0 8px;
1976
1826
  }
1977
1827
 
1978
- .CartItems-module__downPaymentRow___9a5jS {
1828
+ .EmptyCart-module__categoryLinks___J9tic {
1979
1829
  display: flex;
1830
+ gap: 12px;
1980
1831
  width: 100%;
1981
- justify-content: space-between;
1982
- align-items: center;
1832
+ justify-content: center;
1983
1833
  }
1984
1834
 
1985
- .CartItems-module__itemPricing___7gEuf {
1835
+ .EmptyCart-module__categoryLink___YxsmA {
1986
1836
  display: flex;
1987
1837
  flex-direction: column;
1988
- align-items: flex-end;
1989
- gap: 2px;
1990
- flex-shrink: 0;
1991
- white-space: nowrap;
1992
- }
1993
-
1994
- .CartItems-module__monthlyPrice___G6sH6 {
1995
- font-size: 14px;
1996
- line-height: 20px;
1997
- font-weight: 700;
1838
+ align-items: center;
1839
+ justify-content: center;
1840
+ gap: 6px;
1841
+ flex: 1;
1842
+ padding: 12px 8px;
1843
+ background-color: #ffffff;
1844
+ border: none;
1845
+ border-radius: 8px;
1846
+ text-decoration: none;
1998
1847
  color: #3d3935;
1999
- }
2000
-
2001
- .CartItems-module__originalPrice___LsGAC {
2002
1848
  font-size: 12px;
2003
1849
  line-height: 16px;
2004
- color: #86807c;
2005
- text-decoration: line-through;
1850
+ font-weight: 500;
1851
+ text-align: center;
1852
+ transition: background-color 0.15s ease;
2006
1853
  }
2007
-
2008
- .CartItems-module__downPaymentAmount___3K98L {
2009
- font-size: 12px;
2010
- line-height: 16px;
2011
- font-weight: 700;
1854
+ .EmptyCart-module__categoryLink___YxsmA:hover {
1855
+ background-color: #f8f8f8;
1856
+ text-decoration: none;
2012
1857
  color: #3d3935;
2013
1858
  }
1859
+ .EmptyCart-module__categoryLink___YxsmA:focus-visible {
1860
+ outline: 2px solid #e6003c;
1861
+ outline-offset: 2px;
1862
+ }
2014
1863
 
2015
- .CartItems-module__disclaimer___mOvek {
2016
- font-size: 12px;
2017
- line-height: 16px;
2018
- color: #86807c;
2019
- padding: 16px 24px;
2020
- margin: 0;
2021
- background-color: #f7f6f5;
2022
- border-top: 1px solid #e6e3df;
1864
+ .EmptyCart-module__categoryLinkIcon___HjhbO {
1865
+ display: flex;
1866
+ align-items: center;
1867
+ justify-content: center;
2023
1868
  }
2024
- @media (max-width: 767px) {
2025
- .CartItems-module__disclaimer___mOvek {
2026
- padding: 16px;
2027
- }
1869
+
1870
+ .EmptyCart-module__categoryLinkLabel___1dS9s {
1871
+ line-height: 1.3;
2028
1872
  }
2029
1873
 
2030
1874
  /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartClearConfirm/CartClearConfirm.module.scss */
@@ -2205,3 +2049,159 @@
2205
2049
  .active-link .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf {
2206
2050
  display: block;
2207
2051
  }
2052
+
2053
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss */
2054
+ /* center a block element */
2055
+ /* use this to any of the pseudo elements as these are the mandatory properties */
2056
+ /* setting styles in separate formats for cross browser support */
2057
+ /* specify the max width for an element and apply ellipses and truncate the overflow */
2058
+ /* vertically center alilgn any HTML element */
2059
+ /* add basePath to assets */
2060
+ .CartItems-module__container___9xcV- {
2061
+ display: flex;
2062
+ flex-direction: column;
2063
+ flex: 1;
2064
+ }
2065
+
2066
+ .CartItems-module__itemList___CK3U1 {
2067
+ list-style: none;
2068
+ margin: 0;
2069
+ padding: 0;
2070
+ }
2071
+
2072
+ .CartItems-module__item___A6nFF {
2073
+ border-bottom: 1px solid #e6e3df;
2074
+ background-color: #f7f6f5;
2075
+ }
2076
+ .CartItems-module__item___A6nFF:last-child {
2077
+ border-bottom: none;
2078
+ }
2079
+
2080
+ .CartItems-module__itemContent___DaQhK {
2081
+ display: flex;
2082
+ flex-direction: row;
2083
+ align-items: flex-start;
2084
+ gap: 16px;
2085
+ padding: 16px 24px;
2086
+ }
2087
+ @media (max-width: 767px) {
2088
+ .CartItems-module__itemContent___DaQhK {
2089
+ padding: 16px;
2090
+ }
2091
+ }
2092
+
2093
+ .CartItems-module__itemIcon___pk1NU {
2094
+ display: flex;
2095
+ align-items: center;
2096
+ justify-content: center;
2097
+ flex-shrink: 0;
2098
+ width: 40px;
2099
+ height: 40px;
2100
+ color: #86807c;
2101
+ }
2102
+ .CartItems-module__itemIcon___pk1NU .CartItems-module__itemIconImage___q1IQJ {
2103
+ width: 40px;
2104
+ height: 40px;
2105
+ object-fit: contain;
2106
+ border-radius: 4px;
2107
+ }
2108
+
2109
+ .CartItems-module__itemBody___leOoI {
2110
+ display: flex;
2111
+ flex-direction: column;
2112
+ gap: 4px;
2113
+ flex: 1;
2114
+ min-width: 0;
2115
+ }
2116
+
2117
+ .CartItems-module__itemRow___owvC2 {
2118
+ display: flex;
2119
+ justify-content: space-between;
2120
+ align-items: flex-start;
2121
+ gap: 16px;
2122
+ }
2123
+
2124
+ .CartItems-module__itemDetails___vQu14 {
2125
+ display: flex;
2126
+ flex-direction: column;
2127
+ gap: 2px;
2128
+ min-width: 0;
2129
+ flex: 1;
2130
+ }
2131
+
2132
+ .CartItems-module__categoryLabel___gSZid {
2133
+ font-size: 12px;
2134
+ line-height: 16px;
2135
+ color: #86807c;
2136
+ }
2137
+
2138
+ .CartItems-module__productName___yYFNw {
2139
+ font-size: 14px;
2140
+ line-height: 20px;
2141
+ font-weight: 700;
2142
+ color: #3d3935;
2143
+ }
2144
+
2145
+ .CartItems-module__variantText___saarn {
2146
+ font-size: 12px;
2147
+ line-height: 16px;
2148
+ color: #86807c;
2149
+ }
2150
+
2151
+ .CartItems-module__downPaymentLabel___9sOP7 {
2152
+ font-size: 12px;
2153
+ line-height: 16px;
2154
+ color: #86807c;
2155
+ }
2156
+
2157
+ .CartItems-module__downPaymentRow___9a5jS {
2158
+ display: flex;
2159
+ width: 100%;
2160
+ justify-content: space-between;
2161
+ align-items: center;
2162
+ }
2163
+
2164
+ .CartItems-module__itemPricing___7gEuf {
2165
+ display: flex;
2166
+ flex-direction: column;
2167
+ align-items: flex-end;
2168
+ gap: 2px;
2169
+ flex-shrink: 0;
2170
+ white-space: nowrap;
2171
+ }
2172
+
2173
+ .CartItems-module__monthlyPrice___G6sH6 {
2174
+ font-size: 14px;
2175
+ line-height: 20px;
2176
+ font-weight: 700;
2177
+ color: #3d3935;
2178
+ }
2179
+
2180
+ .CartItems-module__originalPrice___LsGAC {
2181
+ font-size: 12px;
2182
+ line-height: 16px;
2183
+ color: #86807c;
2184
+ text-decoration: line-through;
2185
+ }
2186
+
2187
+ .CartItems-module__downPaymentAmount___3K98L {
2188
+ font-size: 12px;
2189
+ line-height: 16px;
2190
+ font-weight: 700;
2191
+ color: #3d3935;
2192
+ }
2193
+
2194
+ .CartItems-module__disclaimer___mOvek {
2195
+ font-size: 12px;
2196
+ line-height: 16px;
2197
+ color: #86807c;
2198
+ padding: 16px 24px;
2199
+ margin: 0;
2200
+ background-color: #f7f6f5;
2201
+ border-top: 1px solid #e6e3df;
2202
+ }
2203
+ @media (max-width: 767px) {
2204
+ .CartItems-module__disclaimer___mOvek {
2205
+ padding: 16px;
2206
+ }
2207
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunrise-upc/sales-static-components",
3
- "version": "3.8.7-beta.18",
3
+ "version": "3.8.7-beta.19",
4
4
  "description": "Static Reusable Components Library",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",