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

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";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;
1
+ "use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("../components/Constants.js"),r=require("cookies-next"),o=require("./CustomerService.js");const n="customerSegmentRefreshChannel",s=()=>{const e=w(t.CUSTOMER_GROUP_STORAGE_KEY);return null!=e?e:t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE},i=e=>{if("undefined"==typeof window)return()=>{};const r=t=>{e(t)};let o=null;const i=e=>{const r="number"==typeof(null==e?void 0:e.refreshedAt)&&Number.isFinite(e.refreshedAt)?e.refreshedAt:Date.now();if(o===r)return;o=r;const n=e.customerGroup===t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE?t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE:E(e.customerGroup);S(t.CUSTOMER_GROUP_STORAGE_KEY,n),d(n,r)},u=e=>{if(e.key===t.CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY&&e.newValue)try{const t=JSON.parse(e.newValue);i(t)}catch(e){d(s())}},l="undefined"!=typeof BroadcastChannel?new BroadcastChannel(n):null,c=e=>{const t=(null==e?void 0:e.data)||{};i(t)};return window.addEventListener(t.CUSTOMER_SEGMENT_REFRESH_EVENT,r),window.addEventListener("storage",u),null==l||l.addEventListener("message",c),C({fetchCustomerGroup:a,isLoggedIn:m,onError:()=>{}}),()=>{window.removeEventListener(t.CUSTOMER_SEGMENT_REFRESH_EVENT,r),window.removeEventListener("storage",u),null==l||l.removeEventListener("message",c),null==l||l.close()}},u=e=>{if("undefined"==typeof window)return;const r=Date.now();try{window.localStorage.setItem(t.CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY,JSON.stringify({customerGroup:e,refreshedAt:r}))}catch(e){}d(e,r);try{if("undefined"!=typeof BroadcastChannel){const t=new BroadcastChannel(n);t.postMessage({customerGroup:e,refreshedAt:r}),t.close()}}catch(e){}},d=(e,r=Date.now())=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(t.CUSTOMER_SEGMENT_REFRESH_EVENT,{detail:{customerGroup:e,refreshedAt:r}}))},E=e=>{if("string"!=typeof e)return null;const t=e.trim();return t.length>0?t:null},l=e=>{var t,r;const o=E(null==e?void 0:e.customerGroup);if(o)return o;const n=E(null===(r=null===(t=null==e?void 0:e.relatedParty)||void 0===t?void 0:t[0])||void 0===r?void 0:r.segment);return n||null},c=t=>()=>e.__awaiter(void 0,void 0,void 0,function*(){const e=yield t.fetchCustomerProfile();return l(e||{})}),a=c({fetchCustomerProfile:o.customerGroup}),f=new Map,_=new Set(["MOBILE","FIXNET","FIXNET_MOBILE","DEFAULT"]),m=()=>Boolean(r.getCookie(t.AUTHCOOKIE)),w=e=>"undefined"==typeof window?null:E(window.localStorage.getItem(e)),S=(e,t)=>{"undefined"!=typeof window&&(t?window.localStorage.setItem(e,t):window.localStorage.removeItem(e))},R=r=>e.__awaiter(void 0,void 0,void 0,function*(){const o=t.CUSTOMER_GROUP_STORAGE_KEY,n=t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE;if("undefined"==typeof window)return null;if(!r.isLoggedIn())return S(o,n),n;if(!r.forceRefresh){const e=w(o);if((e=>{const t=(r=e)?r.trim().toUpperCase():null;var r;return Boolean(t&&_.has(t))})(e))return e}const s=f.get(o);if(s)return s;const i=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=E(yield r.fetchCustomerGroup());return S(o,e),e}catch(e){return r.onError&&r.onError(e),w(o)}finally{f.delete(o)}});return f.set(o,i),i}),C=t=>e.__awaiter(void 0,void 0,void 0,function*(){const e=yield R(t);return u(e),e});exports.createCustomerGroupFetcher=c,exports.createCustomerSegmentSync=r=>{const o=t.CUSTOMER_GROUP_STORAGE_KEY;let n=null,s=0;return{refreshCustomerSegmentAfterLogin:()=>e.__awaiter(void 0,void 0,void 0,function*(){if("undefined"==typeof window)return null;var t;if(yield(t=r.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()-s<8e3){const e=w(o);return u(e),e}return n=e.__awaiter(void 0,void 0,void 0,function*(){try{const e=yield C({fetchCustomerGroup:r.fetchCustomerGroup,isLoggedIn:r.isLoggedIn,forceRefresh:!0,onError:r.onError});return s=Date.now(),e}finally{n=null}}),n}),subscribeToCustomerSegmentRefresh:i,dispatchCustomerSegmentRefreshEvent:u}},exports.dispatchCustomerSegmentRefreshEvent=u,exports.extractCustomerGroupFromProfile=l,exports.getCurrentCustomerSegment=s,exports.resolveCustomerGroup=R,exports.setCustomerSegment=e=>{const r=e===t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE?t.CUSTOMER_GROUP_NEW_CUSTOMER_VALUE:E(e);return S(t.CUSTOMER_GROUP_STORAGE_KEY,r),u(r),r},exports.subscribeToCustomerSegmentRefresh=i,exports.syncCustomerSegment=C;
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","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,GA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I,CAC5C,MAAMjF,EAAsBC,EAAuB4D,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
+ {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["CUSTOMER_SEGMENT_REFRESH_BROADCAST_CHANNEL","getCurrentCustomerSegment","cachedCustomerGroup","getCachedCustomerGroup","CUSTOMER_GROUP_STORAGE_KEY","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","subscribeToCustomerSegmentRefresh","handler","window","eventListener","event","lastHandledRefreshAt","handleIncomingRefresh","detail","refreshedAt","Number","isFinite","Date","now","nextCustomerGroup","customerGroup","normalizeCustomerGroup","setCachedCustomerGroup","emitCustomerSegmentRefreshEvent","storageListener","key","CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY","newValue","parsed","JSON","parse","_a","broadcastChannel","BroadcastChannel","broadcastListener","data","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","syncCustomerSegment","fetchCustomerGroup","defaultFetchCustomerGroup","isLoggedIn","defaultIsLoggedIn","onError","removeEventListener","close","dispatchCustomerSegmentRefreshEvent","localStorage","setItem","stringify","postMessage","_b","dispatchEvent","CustomEvent","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","removeItem","resolveCustomerGroup","newCustomerValue","forceRefresh","customerGroupValue","normalizedCustomerGroup","toUpperCase","has","isAllowedCachedCustomerGroup","inFlightCustomerGroup","get","customerGroupPromise","resolvedCustomerGroup","error","delete","set","inFlightSync","lastSyncedAtMs","refreshCustomerSegmentAfterLogin","deadline","Promise","resolve","setTimeout"],"mappings":"qKAeA,MAAMA,EAA6C,gCAgCtCC,EAA4B,KACvC,MAAMC,EAAsBC,EAAuBC,8BAEnD,OAAOF,QAAAA,EAAuBG,EAAAA,mCAGnBC,EACXC,IAEA,GAAsB,oBAAXC,OACT,MAAO,OAGT,MAAMC,EAAgCC,IACpCH,EAAQG,IAGV,IAAIC,EAAsC,KAE1C,MAAMC,EAAyBC,IAC7B,MAAMC,EAC2B,iBAAxBD,aAAM,EAANA,EAAQC,cAA4BC,OAAOC,SAASH,EAAOC,aAC9DD,EAAOC,YACPG,KAAKC,MAEX,GAAIP,IAAyBG,EAC3B,OAGFH,EAAuBG,EAEvB,MAAMK,EACJN,EAAOO,gBAAkBf,EAAAA,kCACrBA,EAAAA,kCACAgB,EAAuBR,EAAOO,eAEpCE,EAAuBlB,EAAAA,2BAA4Be,GACnDI,EAAgCJ,EAAmBL,IAG/CU,EAAmBd,IACvB,GAAIA,EAAMe,MAAQC,EAAAA,sCAAyChB,EAAMiB,SAIjE,IACE,MAAMC,EAASC,KAAKC,MAAMpB,EAAMiB,UAChCf,EAAsBgB,EACxB,CAAE,MAAAG,GACAR,EAAgCtB,IAClC,GAGI+B,EACwB,oBAArBC,iBACH,IAAIA,iBAAiBjC,GACrB,KAEAkC,EAAqBxB,IACzB,MAAMG,GAAUH,aAAK,EAALA,EAAOyB,OAAQ,GAC/BvB,EAAsBC,IAcxB,OAXAL,OAA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-1,2 +1,2 @@
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};
1
+ import{__awaiter as e}from"../node_modules/tslib/tslib.es6.js";import{CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY as n,CUSTOMER_GROUP_NEW_CUSTOMER_VALUE as o,CUSTOMER_GROUP_STORAGE_KEY as t,CUSTOMER_SEGMENT_REFRESH_EVENT as r,AUTHCOOKIE as i}from"../components/Constants.js";import{getCookie as s}from"cookies-next";import{customerGroup as d}from"./CustomerService.js";const u="customerSegmentRefreshChannel",l=()=>{const e=E(t);return null!=e?e:o},f=e=>{if("undefined"==typeof window)return()=>{};const i=n=>{e(n)};let s=null;const d=e=>{const n="number"==typeof(null==e?void 0:e.refreshedAt)&&Number.isFinite(e.refreshedAt)?e.refreshedAt:Date.now();if(s===n)return;s=n;const r=e.customerGroup===o?o:w(e.customerGroup);C(t,r),a(r,n)},f=e=>{if(e.key===n&&e.newValue)try{const n=JSON.parse(e.newValue);d(n)}catch(e){a(l())}},c="undefined"!=typeof BroadcastChannel?new BroadcastChannel(u):null,m=e=>{const n=(null==e?void 0:e.data)||{};d(n)};return window.addEventListener(r,i),window.addEventListener("storage",f),null==c||c.addEventListener("message",m),S({fetchCustomerGroup:p,isLoggedIn:y,onError:()=>{}}),()=>{window.removeEventListener(r,i),window.removeEventListener("storage",f),null==c||c.removeEventListener("message",m),null==c||c.close()}},c=e=>{if("undefined"==typeof window)return;const o=Date.now();try{window.localStorage.setItem(n,JSON.stringify({customerGroup:e,refreshedAt:o}))}catch(e){}a(e,o);try{if("undefined"!=typeof BroadcastChannel){const n=new BroadcastChannel(u);n.postMessage({customerGroup:e,refreshedAt:o}),n.close()}}catch(e){}},a=(e,n=Date.now())=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(r,{detail:{customerGroup:e,refreshedAt:n}}))},w=e=>{if("string"!=typeof e)return null;const n=e.trim();return n.length>0?n:null},m=e=>{var n,o;const t=w(null==e?void 0:e.customerGroup);if(t)return t;const r=w(null===(o=null===(n=null==e?void 0:e.relatedParty)||void 0===n?void 0:n[0])||void 0===o?void 0:o.segment);return r||null},v=n=>()=>e(void 0,void 0,void 0,function*(){const e=yield n.fetchCustomerProfile();return m(e||{})}),p=v({fetchCustomerProfile:d}),h=new Map,g=new Set(["MOBILE","FIXNET","FIXNET_MOBILE","DEFAULT"]),y=()=>Boolean(s(i)),E=e=>"undefined"==typeof window?null:w(window.localStorage.getItem(e)),C=(e,n)=>{"undefined"!=typeof window&&(n?window.localStorage.setItem(e,n):window.localStorage.removeItem(e))},L=e=>{const n=e===o?o:w(e);return C(t,n),c(n),n},I=n=>e(void 0,void 0,void 0,function*(){const r=t,i=o;if("undefined"==typeof window)return null;if(!n.isLoggedIn())return C(r,i),i;if(!n.forceRefresh){const e=E(r);if((e=>{const n=(o=e)?o.trim().toUpperCase():null;var o;return Boolean(n&&g.has(n))})(e))return e}const s=h.get(r);if(s)return s;const d=e(void 0,void 0,void 0,function*(){try{const e=w(yield n.fetchCustomerGroup());return C(r,e),e}catch(e){return n.onError&&n.onError(e),E(r)}finally{h.delete(r)}});return h.set(r,d),d}),S=n=>e(void 0,void 0,void 0,function*(){const e=yield I(n);return c(e),e}),G=n=>{const o=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=n.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=E(o);return c(e),e}return r=e(void 0,void 0,void 0,function*(){try{const e=yield S({fetchCustomerGroup:n.fetchCustomerGroup,isLoggedIn:n.isLoggedIn,forceRefresh:!0,onError:n.onError});return i=Date.now(),e}finally{r=null}}),r}),subscribeToCustomerSegmentRefresh:f,dispatchCustomerSegmentRefreshEvent:c}};export{v as createCustomerGroupFetcher,G as createCustomerSegmentSync,c as dispatchCustomerSegmentRefreshEvent,m as extractCustomerGroupFromProfile,l as getCurrentCustomerSegment,I as resolveCustomerGroup,L as setCustomerSegment,f as subscribeToCustomerSegmentRefresh,S 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","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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T,OAAO,KA/GgB,IAAOmB,EAoHhC,SApHgCA,EAkHLyB,EAAQzB,WAlHyC0B,OAAA,OAAA,OAAA,EAAA,YAC9E,GAAsB,oBAAX7C,QAA0BmB,IACnC,OAGF,MAAM4D,EAAWpD,KAAKC,MA5BY,IA6BlC,MAAQT,KAAgBQ,KAAKC,MAAQmD,SAC7B,IAAIC,QAASC,GAAYjF,OAAOkF,WAAWD,EA7BpB,KA+BjC,IA2GQL,EACF,OAAOA,EAIT,GADYjD,KAAKC,MACPiD,EAjJgC,IAiJI,CAC5C,MAAMnF,EAAsBC,EAAuB4D,GAEnD,OADA7C,EAAoChB,GAC7BA,CACT,CAiBA,OAfAkF,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"}
1
+ {"version":3,"file":"customerSegmentSync.js","sources":["../../../../src/services/customerSegmentSync.ts"],"sourcesContent":[null],"names":["CUSTOMER_SEGMENT_REFRESH_BROADCAST_CHANNEL","getCurrentCustomerSegment","cachedCustomerGroup","getCachedCustomerGroup","CUSTOMER_GROUP_STORAGE_KEY","CUSTOMER_GROUP_NEW_CUSTOMER_VALUE","subscribeToCustomerSegmentRefresh","handler","window","eventListener","event","lastHandledRefreshAt","handleIncomingRefresh","detail","refreshedAt","Number","isFinite","Date","now","nextCustomerGroup","customerGroup","normalizeCustomerGroup","setCachedCustomerGroup","emitCustomerSegmentRefreshEvent","storageListener","key","CUSTOMER_SEGMENT_REFRESH_STORAGE_KEY","newValue","parsed","JSON","parse","_a","broadcastChannel","BroadcastChannel","broadcastListener","data","addEventListener","CUSTOMER_SEGMENT_REFRESH_EVENT","syncCustomerSegment","fetchCustomerGroup","defaultFetchCustomerGroup","isLoggedIn","defaultIsLoggedIn","onError","removeEventListener","close","dispatchCustomerSegmentRefreshEvent","localStorage","setItem","stringify","postMessage","_b","dispatchEvent","CustomEvent","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","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":"0WAeA,MAAMA,EAA6C,gCAgCtCC,EAA4B,KACvC,MAAMC,EAAsBC,EAAuBC,GAEnD,OAAOF,QAAAA,EAAuBG,GAGnBC,EACXC,IAEA,GAAsB,oBAAXC,OACT,MAAO,OAGT,MAAMC,EAAgCC,IACpCH,EAAQG,IAGV,IAAIC,EAAsC,KAE1C,MAAMC,EAAyBC,IAC7B,MAAMC,EAC2B,iBAAxBD,aAAM,EAANA,EAAQC,cAA4BC,OAAOC,SAASH,EAAOC,aAC9DD,EAAOC,YACPG,KAAKC,MAEX,GAAIP,IAAyBG,EAC3B,OAGFH,EAAuBG,EAEvB,MAAMK,EACJN,EAAOO,gBAAkBf,EACrBA,EACAgB,EAAuBR,EAAOO,eAEpCE,EAAuBlB,EAA4Be,GACnDI,EAAgCJ,EAAmBL,IAG/CU,EAAmBd,IACvB,GAAIA,EAAMe,MAAQC,GAAyChB,EAAMiB,SAIjE,IACE,MAAMC,EAASC,KAAKC,MAAMpB,EAAMiB,UAChCf,EAAsBgB,EACxB,CAAE,MAAAG,GACAR,EAAgCtB,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,GAIE1F,oCACAwC"}
@@ -1,3 +1,137 @@
1
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/MinimizedHeader/MinimizedHeader.module.scss */
2
+ /* center a block element */
3
+ /* use this to any of the pseudo elements as these are the mandatory properties */
4
+ /* setting styles in separate formats for cross browser support */
5
+ /* specify the max width for an element and apply ellipses and truncate the overflow */
6
+ /* vertically center alilgn any HTML element */
7
+ /* add basePath to assets */
8
+ @media (min-width: 768px) {
9
+ .MinimizedHeader-module__outer___JOzJC {
10
+ background-color: #ffffff;
11
+ border-top: 4px solid #da291c;
12
+ box-shadow: 0px 2px 4px rgba(87, 84, 82, 0.2);
13
+ height: 72px;
14
+ }
15
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__s20-header__version-number___vI9Rr {
16
+ position: fixed;
17
+ top: 0;
18
+ left: 0;
19
+ padding: 4px 8px;
20
+ font-size: 14px;
21
+ z-index: 10000;
22
+ color: #5f5955;
23
+ background: #ffffff;
24
+ }
25
+ }
26
+ @media (min-width: 768px) and (max-width: 850px) {
27
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__s20-header__version-number___vI9Rr {
28
+ padding: 0 4px;
29
+ font-size: 8px;
30
+ }
31
+ }
32
+ @media (min-width: 768px) {
33
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X {
34
+ width: 100%;
35
+ display: inline-block;
36
+ }
37
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO {
38
+ display: flex;
39
+ float: left;
40
+ align-items: center;
41
+ margin: 10px 0;
42
+ }
43
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__title___4dK49 {
44
+ padding-left: 10px;
45
+ }
46
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- {
47
+ float: right;
48
+ display: flex;
49
+ margin: 24px 0 24px 0;
50
+ }
51
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- .MinimizedHeader-module__profile-icon___LlK8O {
52
+ background-image: url("/ecom-int/HeaderIcons/new_profile_icon1.svg");
53
+ background-repeat: no-repeat;
54
+ background-size: contain;
55
+ display: block;
56
+ height: 24px;
57
+ margin-right: 6px;
58
+ width: 24px;
59
+ }
60
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- .MinimizedHeader-module__profile-name___Kh-fd {
61
+ color: #da291c;
62
+ font-weight: 700;
63
+ font-size: 18px;
64
+ line-height: 24px;
65
+ }
66
+ }
67
+ @media (max-width: 767px) {
68
+ .MinimizedHeader-module__outer___JOzJC {
69
+ background-color: #ffffff;
70
+ border-top: 4px solid #da291c;
71
+ box-shadow: 0px 2px 4px rgba(87, 84, 82, 0.2);
72
+ height: 48px;
73
+ }
74
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X {
75
+ width: 100%;
76
+ display: inline-block;
77
+ }
78
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO {
79
+ display: flex;
80
+ float: left;
81
+ }
82
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__icon___wYr8J {
83
+ margin-top: 12px;
84
+ }
85
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__icon___wYr8J > img {
86
+ height: 24px;
87
+ width: 24px;
88
+ float: left;
89
+ }
90
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__title___4dK49 {
91
+ margin-top: 8px;
92
+ padding-left: 6px;
93
+ }
94
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__title___4dK49 > img {
95
+ height: 20px;
96
+ }
97
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- {
98
+ float: right;
99
+ display: flex;
100
+ margin: 12px 0 12px 0;
101
+ }
102
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- .MinimizedHeader-module__profile-icon___LlK8O {
103
+ background-image: url("/ecom-int/HeaderIcons/new_profile_icon1.svg");
104
+ background-repeat: no-repeat;
105
+ background-size: contain;
106
+ display: block;
107
+ height: 20px;
108
+ margin-right: 6px;
109
+ width: 20px;
110
+ }
111
+ .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- .MinimizedHeader-module__profile-name___Kh-fd {
112
+ color: #da291c;
113
+ font-weight: 700;
114
+ font-size: 18px;
115
+ line-height: 24px;
116
+ }
117
+ }
118
+ .MinimizedHeader-module__s20-header__version-number___vI9Rr {
119
+ position: fixed;
120
+ top: 0;
121
+ left: 0;
122
+ padding: 4px 8px;
123
+ font-size: 14px;
124
+ z-index: 10000;
125
+ color: #5f5955;
126
+ background: #ffffff;
127
+ }
128
+ @media (max-width: 850px) {
129
+ .MinimizedHeader-module__s20-header__version-number___vI9Rr {
130
+ padding: 0 4px;
131
+ font-size: 8px;
132
+ }
133
+ }
134
+
1
135
  /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/FalconMainNavigation.module.scss */
2
136
  /* center a block element */
3
137
  /* use this to any of the pseudo elements as these are the mandatory properties */
@@ -784,185 +918,51 @@
784
918
  text-align: center;
785
919
  }
786
920
 
787
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/MinimizedHeader/MinimizedHeader.module.scss */
921
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/FalconHeader/LocaleSelector/LocaleSelector.module.scss */
788
922
  /* center a block element */
789
923
  /* use this to any of the pseudo elements as these are the mandatory properties */
790
924
  /* setting styles in separate formats for cross browser support */
791
925
  /* specify the max width for an element and apply ellipses and truncate the overflow */
792
926
  /* vertically center alilgn any HTML element */
793
927
  /* add basePath to assets */
794
- @media (min-width: 768px) {
795
- .MinimizedHeader-module__outer___JOzJC {
796
- background-color: #ffffff;
797
- border-top: 4px solid #da291c;
798
- box-shadow: 0px 2px 4px rgba(87, 84, 82, 0.2);
799
- height: 72px;
800
- }
801
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__s20-header__version-number___vI9Rr {
802
- position: fixed;
803
- top: 0;
804
- left: 0;
805
- padding: 4px 8px;
806
- font-size: 14px;
807
- z-index: 10000;
808
- color: #5f5955;
809
- background: #ffffff;
810
- }
928
+ .LocaleSelector-module__button___0LEXR {
929
+ position: relative;
811
930
  }
812
- @media (min-width: 768px) and (max-width: 850px) {
813
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__s20-header__version-number___vI9Rr {
814
- padding: 0 4px;
815
- font-size: 8px;
816
- }
931
+ .LocaleSelector-module__button___0LEXR button {
932
+ background-color: transparent;
933
+ color: #3d3935;
934
+ border: 0;
935
+ border-radius: 4px;
936
+ padding-bottom: 5px;
937
+ cursor: pointer;
938
+ height: 42px;
939
+ font-size: 14px;
940
+ line-height: 20px;
941
+ width: 100%;
817
942
  }
818
- @media (min-width: 768px) {
819
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X {
820
- width: 100%;
821
- display: inline-block;
822
- }
823
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO {
824
- display: flex;
825
- float: left;
826
- align-items: center;
827
- margin: 10px 0;
828
- }
829
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__title___4dK49 {
830
- padding-left: 10px;
831
- }
832
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- {
833
- float: right;
834
- display: flex;
835
- margin: 24px 0 24px 0;
836
- }
837
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- .MinimizedHeader-module__profile-icon___LlK8O {
838
- background-image: url("/ecom-int/HeaderIcons/new_profile_icon1.svg");
839
- background-repeat: no-repeat;
840
- background-size: contain;
841
- display: block;
842
- height: 24px;
843
- margin-right: 6px;
844
- width: 24px;
845
- }
846
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- .MinimizedHeader-module__profile-name___Kh-fd {
847
- color: #da291c;
848
- font-weight: 700;
849
- font-size: 18px;
850
- line-height: 24px;
851
- }
943
+ .LocaleSelector-module__button___0LEXR .LocaleSelector-module__chevron___o3l3R {
944
+ background-position: center center;
945
+ background-repeat: no-repeat;
946
+ height: 8px;
947
+ margin-left: 10px;
948
+ margin-top: 2px;
949
+ transition: transform 0.2s ease, -webkit-transform 0.2s ease;
950
+ width: 14px;
852
951
  }
853
- @media (max-width: 767px) {
854
- .MinimizedHeader-module__outer___JOzJC {
855
- background-color: #ffffff;
856
- border-top: 4px solid #da291c;
857
- box-shadow: 0px 2px 4px rgba(87, 84, 82, 0.2);
858
- height: 48px;
859
- }
860
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X {
861
- width: 100%;
862
- display: inline-block;
863
- }
864
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO {
865
- display: flex;
866
- float: left;
867
- }
868
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__icon___wYr8J {
869
- margin-top: 12px;
870
- }
871
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__icon___wYr8J > img {
872
- height: 24px;
873
- width: 24px;
874
- float: left;
875
- }
876
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__title___4dK49 {
877
- margin-top: 8px;
878
- padding-left: 6px;
879
- }
880
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__wrap___rUhGO .MinimizedHeader-module__title___4dK49 > img {
881
- height: 20px;
882
- }
883
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- {
884
- float: right;
885
- display: flex;
886
- margin: 12px 0 12px 0;
887
- }
888
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- .MinimizedHeader-module__profile-icon___LlK8O {
889
- background-image: url("/ecom-int/HeaderIcons/new_profile_icon1.svg");
890
- background-repeat: no-repeat;
891
- background-size: contain;
892
- display: block;
893
- height: 20px;
894
- margin-right: 6px;
895
- width: 20px;
896
- }
897
- .MinimizedHeader-module__outer___JOzJC .MinimizedHeader-module__align___yv11X .MinimizedHeader-module__after-login___-BGe- .MinimizedHeader-module__profile-name___Kh-fd {
898
- color: #da291c;
899
- font-weight: 700;
900
- font-size: 18px;
901
- line-height: 24px;
902
- }
903
- }
904
- .MinimizedHeader-module__s20-header__version-number___vI9Rr {
905
- position: fixed;
906
- top: 0;
907
- left: 0;
908
- padding: 4px 8px;
909
- font-size: 14px;
910
- z-index: 10000;
911
- color: #5f5955;
912
- background: #ffffff;
913
- }
914
- @media (max-width: 850px) {
915
- .MinimizedHeader-module__s20-header__version-number___vI9Rr {
916
- padding: 0 4px;
917
- font-size: 8px;
918
- }
919
- }
920
-
921
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/FalconHeader/LocaleSelector/LocaleSelector.module.scss */
922
- /* center a block element */
923
- /* use this to any of the pseudo elements as these are the mandatory properties */
924
- /* setting styles in separate formats for cross browser support */
925
- /* specify the max width for an element and apply ellipses and truncate the overflow */
926
- /* vertically center alilgn any HTML element */
927
- /* add basePath to assets */
928
- .LocaleSelector-module__button___0LEXR {
929
- position: relative;
930
- }
931
- .LocaleSelector-module__button___0LEXR button {
932
- background-color: transparent;
933
- color: #3d3935;
934
- border: 0;
935
- border-radius: 4px;
936
- padding-bottom: 5px;
937
- cursor: pointer;
938
- height: 42px;
939
- font-size: 14px;
940
- line-height: 20px;
941
- width: 100%;
942
- }
943
- .LocaleSelector-module__button___0LEXR .LocaleSelector-module__chevron___o3l3R {
944
- background-position: center center;
945
- background-repeat: no-repeat;
946
- height: 8px;
947
- margin-left: 10px;
948
- margin-top: 2px;
949
- transition: transform 0.2s ease, -webkit-transform 0.2s ease;
950
- width: 14px;
951
- }
952
- .LocaleSelector-module__button___0LEXR .LocaleSelector-module__chevron___o3l3R.active {
953
- -webkit-transform: rotate(-180deg);
954
- -moz-transform: rotate(-180deg);
955
- -o-transform: rotate(-180deg);
956
- transform: rotate(-180deg);
957
- }
958
- .LocaleSelector-module__button___0LEXR .LocaleSelector-module__pop-up___HV8Ta {
959
- padding: 24px 32px;
960
- background-color: #ffffff;
961
- transform: matrix(1, 0, 0, 1, -96.6667, 0) translateY(0px) translateX(-57px) !important;
962
- }
963
- @media (max-width: 1023px) {
964
- .LocaleSelector-module__button___0LEXR .LocaleSelector-module__pop-up___HV8Ta {
965
- transform: matrix(1, 0, 0, 1, -96.6667, 0) translateY(0px) translateX(7px) !important;
952
+ .LocaleSelector-module__button___0LEXR .LocaleSelector-module__chevron___o3l3R.active {
953
+ -webkit-transform: rotate(-180deg);
954
+ -moz-transform: rotate(-180deg);
955
+ -o-transform: rotate(-180deg);
956
+ transform: rotate(-180deg);
957
+ }
958
+ .LocaleSelector-module__button___0LEXR .LocaleSelector-module__pop-up___HV8Ta {
959
+ padding: 24px 32px;
960
+ background-color: #ffffff;
961
+ transform: matrix(1, 0, 0, 1, -96.6667, 0) translateY(0px) translateX(-57px) !important;
962
+ }
963
+ @media (max-width: 1023px) {
964
+ .LocaleSelector-module__button___0LEXR .LocaleSelector-module__pop-up___HV8Ta {
965
+ transform: matrix(1, 0, 0, 1, -96.6667, 0) translateY(0px) translateX(7px) !important;
966
966
  }
967
967
  }
968
968
  .LocaleSelector-module__button___0LEXR .LocaleSelector-module__pop-up___HV8Ta {
@@ -1368,6 +1368,54 @@
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
+
1371
1419
  /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/MobileNavigation/MobileMenuItem/MobileMenuItem.module.scss */
1372
1420
  /* center a block element */
1373
1421
  /* use this to any of the pseudo elements as these are the mandatory properties */
@@ -1426,6 +1474,88 @@
1426
1474
  filter: brightness(0) invert(0.9);
1427
1475
  }
1428
1476
 
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
+
1429
1559
  /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/FalconHeader/BusinessCustomerLinkOut/BusinessCustomerLinkOut.module.scss */
1430
1560
  /* center a block element */
1431
1561
  /* use this to any of the pseudo elements as these are the mandatory properties */
@@ -1513,37 +1643,122 @@
1513
1643
  background-color: #1f1f1f;
1514
1644
  }
1515
1645
 
1516
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/SubNavigation/SubNavigation.module.scss */
1646
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartClearConfirm/CartClearConfirm.module.scss */
1517
1647
  /* center a block element */
1518
1648
  /* use this to any of the pseudo elements as these are the mandatory properties */
1519
1649
  /* setting styles in separate formats for cross browser support */
1520
1650
  /* specify the max width for an element and apply ellipses and truncate the overflow */
1521
1651
  /* vertically center alilgn any HTML element */
1522
1652
  /* add basePath to assets */
1523
- .SubNavigation-module__container___Wb5XN {
1524
- background-color: #ffffff;
1525
- color: #575452;
1526
- border-radius: 0px 0px 8px 8px;
1527
- margin: 0 auto;
1528
- max-width: 1308px;
1529
- min-height: 47px;
1530
- -webkit-align-items: center;
1531
- -moz-align-items: center;
1532
- -o-align-items: center;
1653
+ .CartClearConfirm-module__overlay___sxCOO {
1654
+ position: absolute;
1655
+ inset: 0;
1656
+ z-index: 10;
1657
+ background: rgba(0, 0, 0, 0.42);
1658
+ display: flex;
1533
1659
  align-items: center;
1660
+ justify-content: center;
1661
+ padding: 24px;
1534
1662
  }
1535
- .SubNavigation-module__container___Wb5XN .SubNavigation-module__item___c32EK {
1536
- font-size: 14px;
1537
- line-height: 20px;
1538
- font-weight: 700;
1663
+
1664
+ .CartClearConfirm-module__dialog___UWokE {
1665
+ background: transparent;
1666
+ border-radius: 16px;
1667
+ padding: 24px;
1668
+ width: 100%;
1669
+ max-width: 320px;
1670
+ display: flex;
1671
+ flex-direction: column;
1672
+ gap: 24px;
1539
1673
  }
1540
- .SubNavigation-module__container___Wb5XN .SubNavigation-module__item___c32EK a {
1541
- margin-left: 0 !important;
1542
- margin-top: 0 !important;
1674
+
1675
+ .CartClearConfirm-module__message___vd9VO {
1543
1676
  font-size: 18px;
1544
- line-height: 24px;
1545
- font-weight: 400;
1546
- display: block !important;
1677
+ line-height: 26px;
1678
+ font-weight: 700;
1679
+ color: #ffffff;
1680
+ text-align: center;
1681
+ }
1682
+
1683
+ .CartClearConfirm-module__actions___X0-0w {
1684
+ display: flex;
1685
+ gap: 12px;
1686
+ }
1687
+
1688
+ .CartClearConfirm-module__cancelButton___LYopb {
1689
+ flex: 1;
1690
+ height: 48px;
1691
+ background: none;
1692
+ border: 2px solid #ffffff;
1693
+ border-radius: 28px;
1694
+ font-size: 16px;
1695
+ line-height: 24px;
1696
+ font-weight: 600;
1697
+ color: #ffffff;
1698
+ cursor: pointer;
1699
+ transition: background-color 0.15s ease;
1700
+ }
1701
+ .CartClearConfirm-module__cancelButton___LYopb:hover {
1702
+ background-color: rgba(255, 255, 255, 0.1);
1703
+ }
1704
+ .CartClearConfirm-module__cancelButton___LYopb:focus-visible {
1705
+ outline: 2px solid #ffffff;
1706
+ outline-offset: 2px;
1707
+ }
1708
+
1709
+ .CartClearConfirm-module__confirmButton___KgPKy {
1710
+ flex: 1;
1711
+ height: 48px;
1712
+ background: #ffffff;
1713
+ border: 2px solid #ffffff;
1714
+ border-radius: 28px;
1715
+ font-size: 16px;
1716
+ line-height: 24px;
1717
+ font-weight: 600;
1718
+ color: #3d3935;
1719
+ cursor: pointer;
1720
+ transition: background-color 0.15s ease;
1721
+ }
1722
+ .CartClearConfirm-module__confirmButton___KgPKy:hover {
1723
+ background-color: #e6e3df;
1724
+ border-color: #e6e3df;
1725
+ }
1726
+ .CartClearConfirm-module__confirmButton___KgPKy:focus-visible {
1727
+ outline: 2px solid #ffffff;
1728
+ outline-offset: 2px;
1729
+ }
1730
+
1731
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/SubNavigation/SubNavigation.module.scss */
1732
+ /* center a block element */
1733
+ /* use this to any of the pseudo elements as these are the mandatory properties */
1734
+ /* setting styles in separate formats for cross browser support */
1735
+ /* specify the max width for an element and apply ellipses and truncate the overflow */
1736
+ /* vertically center alilgn any HTML element */
1737
+ /* add basePath to assets */
1738
+ .SubNavigation-module__container___Wb5XN {
1739
+ background-color: #ffffff;
1740
+ color: #575452;
1741
+ border-radius: 0px 0px 8px 8px;
1742
+ margin: 0 auto;
1743
+ max-width: 1308px;
1744
+ min-height: 47px;
1745
+ -webkit-align-items: center;
1746
+ -moz-align-items: center;
1747
+ -o-align-items: center;
1748
+ align-items: center;
1749
+ }
1750
+ .SubNavigation-module__container___Wb5XN .SubNavigation-module__item___c32EK {
1751
+ font-size: 14px;
1752
+ line-height: 20px;
1753
+ font-weight: 700;
1754
+ }
1755
+ .SubNavigation-module__container___Wb5XN .SubNavigation-module__item___c32EK a {
1756
+ margin-left: 0 !important;
1757
+ margin-top: 0 !important;
1758
+ font-size: 18px;
1759
+ line-height: 24px;
1760
+ font-weight: 400;
1761
+ display: block !important;
1547
1762
  }
1548
1763
  .SubNavigation-module__container___Wb5XN .SubNavigation-module__item___c32EK:not(:last-child) {
1549
1764
  padding-bottom: 28px;
@@ -1741,315 +1956,6 @@
1741
1956
  outline-offset: 2px;
1742
1957
  }
1743
1958
 
1744
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartHeader/CartHeader.module.scss */
1745
- /* center a block element */
1746
- /* use this to any of the pseudo elements as these are the mandatory properties */
1747
- /* setting styles in separate formats for cross browser support */
1748
- /* specify the max width for an element and apply ellipses and truncate the overflow */
1749
- /* vertically center alilgn any HTML element */
1750
- /* add basePath to assets */
1751
- .CartHeader-module__headerTitle___35F6g {
1752
- display: flex;
1753
- align-items: center;
1754
- gap: 8px;
1755
- }
1756
-
1757
- .CartHeader-module__headerItemCount___g1Ynd {
1758
- font-size: 24px;
1759
- line-height: 32px;
1760
- font-weight: 400;
1761
- color: #3d3935;
1762
- }
1763
- @media (max-width: 1023px) {
1764
- .CartHeader-module__headerItemCount___g1Ynd {
1765
- font-size: 20px;
1766
- line-height: 28px;
1767
- }
1768
- }
1769
-
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;
1782
- }
1783
- .CartHeader-module__clearAllButton___B3bNF:hover {
1784
- color: #961c13;
1785
- }
1786
- .CartHeader-module__clearAllButton___B3bNF:focus-visible {
1787
- outline: 2px solid #da291c;
1788
- outline-offset: 2px;
1789
- border-radius: 2px;
1790
- }
1791
-
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 {
1800
- display: flex;
1801
- flex-direction: column;
1802
- align-items: center;
1803
- justify-content: center;
1804
- flex: 1;
1805
- padding: 32px 24px 24px;
1806
- text-align: center;
1807
- }
1808
-
1809
- .EmptyCart-module__emptyIcon___A7F8f {
1810
- margin-bottom: 8px;
1811
- }
1812
-
1813
- .EmptyCart-module__emptyText___aX6Nu {
1814
- font-size: 16px;
1815
- line-height: 24px;
1816
- font-weight: 700;
1817
- color: #3d3935;
1818
- margin: 0 0 44px;
1819
- }
1820
-
1821
- .EmptyCart-module__emptySubText___P504H {
1822
- font-size: 14px;
1823
- line-height: 20px;
1824
- color: #787472;
1825
- margin: 0 0 8px;
1826
- }
1827
-
1828
- .EmptyCart-module__categoryLinks___J9tic {
1829
- display: flex;
1830
- gap: 12px;
1831
- width: 100%;
1832
- justify-content: center;
1833
- }
1834
-
1835
- .EmptyCart-module__categoryLink___YxsmA {
1836
- display: flex;
1837
- flex-direction: column;
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;
1847
- color: #3d3935;
1848
- font-size: 12px;
1849
- line-height: 16px;
1850
- font-weight: 500;
1851
- text-align: center;
1852
- transition: background-color 0.15s ease;
1853
- }
1854
- .EmptyCart-module__categoryLink___YxsmA:hover {
1855
- background-color: #f8f8f8;
1856
- text-decoration: none;
1857
- color: #3d3935;
1858
- }
1859
- .EmptyCart-module__categoryLink___YxsmA:focus-visible {
1860
- outline: 2px solid #e6003c;
1861
- outline-offset: 2px;
1862
- }
1863
-
1864
- .EmptyCart-module__categoryLinkIcon___HjhbO {
1865
- display: flex;
1866
- align-items: center;
1867
- justify-content: center;
1868
- }
1869
-
1870
- .EmptyCart-module__categoryLinkLabel___1dS9s {
1871
- line-height: 1.3;
1872
- }
1873
-
1874
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartClearConfirm/CartClearConfirm.module.scss */
1875
- /* center a block element */
1876
- /* use this to any of the pseudo elements as these are the mandatory properties */
1877
- /* setting styles in separate formats for cross browser support */
1878
- /* specify the max width for an element and apply ellipses and truncate the overflow */
1879
- /* vertically center alilgn any HTML element */
1880
- /* add basePath to assets */
1881
- .CartClearConfirm-module__overlay___sxCOO {
1882
- position: absolute;
1883
- inset: 0;
1884
- z-index: 10;
1885
- background: rgba(0, 0, 0, 0.42);
1886
- display: flex;
1887
- align-items: center;
1888
- justify-content: center;
1889
- padding: 24px;
1890
- }
1891
-
1892
- .CartClearConfirm-module__dialog___UWokE {
1893
- background: transparent;
1894
- border-radius: 16px;
1895
- padding: 24px;
1896
- width: 100%;
1897
- max-width: 320px;
1898
- display: flex;
1899
- flex-direction: column;
1900
- gap: 24px;
1901
- }
1902
-
1903
- .CartClearConfirm-module__message___vd9VO {
1904
- font-size: 18px;
1905
- line-height: 26px;
1906
- font-weight: 700;
1907
- color: #ffffff;
1908
- text-align: center;
1909
- }
1910
-
1911
- .CartClearConfirm-module__actions___X0-0w {
1912
- display: flex;
1913
- gap: 12px;
1914
- }
1915
-
1916
- .CartClearConfirm-module__cancelButton___LYopb {
1917
- flex: 1;
1918
- height: 48px;
1919
- background: none;
1920
- border: 2px solid #ffffff;
1921
- border-radius: 28px;
1922
- font-size: 16px;
1923
- line-height: 24px;
1924
- font-weight: 600;
1925
- color: #ffffff;
1926
- cursor: pointer;
1927
- transition: background-color 0.15s ease;
1928
- }
1929
- .CartClearConfirm-module__cancelButton___LYopb:hover {
1930
- background-color: rgba(255, 255, 255, 0.1);
1931
- }
1932
- .CartClearConfirm-module__cancelButton___LYopb:focus-visible {
1933
- outline: 2px solid #ffffff;
1934
- outline-offset: 2px;
1935
- }
1936
-
1937
- .CartClearConfirm-module__confirmButton___KgPKy {
1938
- flex: 1;
1939
- height: 48px;
1940
- background: #ffffff;
1941
- border: 2px solid #ffffff;
1942
- border-radius: 28px;
1943
- font-size: 16px;
1944
- line-height: 24px;
1945
- font-weight: 600;
1946
- color: #3d3935;
1947
- cursor: pointer;
1948
- transition: background-color 0.15s ease;
1949
- }
1950
- .CartClearConfirm-module__confirmButton___KgPKy:hover {
1951
- background-color: #e6e3df;
1952
- border-color: #e6e3df;
1953
- }
1954
- .CartClearConfirm-module__confirmButton___KgPKy:focus-visible {
1955
- outline: 2px solid #ffffff;
1956
- outline-offset: 2px;
1957
- }
1958
-
1959
- /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/MobileNavigation/MobileSubNavigation/MobileSubNavigation.module.scss */
1960
- /* center a block element */
1961
- /* use this to any of the pseudo elements as these are the mandatory properties */
1962
- /* setting styles in separate formats for cross browser support */
1963
- /* specify the max width for an element and apply ellipses and truncate the overflow */
1964
- /* vertically center alilgn any HTML element */
1965
- /* add basePath to assets */
1966
- .MobileSubNavigation-module__container___1tQpO {
1967
- max-height: 0px;
1968
- overflow: hidden;
1969
- transition: -webkit-max-height 0.1s cubic-bezier(0.75, 0, 0.75, 0.9);
1970
- transition: max-height 0.1s cubic-bezier(0.75, 0, 0.75, 0.9);
1971
- transition: max-height 0.1s cubic-bezier(0.75, 0, 0.75, 0.9), -webkit-max-height 0.1s cubic-bezier(0.75, 0, 0.75, 0.9);
1972
- width: 100%;
1973
- }
1974
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__title___f2AKU {
1975
- cursor: unset;
1976
- padding: 20px 10px 4px;
1977
- color: #858585;
1978
- letter-spacing: 1px;
1979
- text-transform: uppercase;
1980
- font-size: 14px;
1981
- line-height: 20px;
1982
- font-weight: 500;
1983
- }
1984
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__sub-title___ADRB3 {
1985
- background-color: #ffffff;
1986
- padding: 10px;
1987
- }
1988
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__sub-title___ADRB3.MobileSubNavigation-module__new-style___xPfpe {
1989
- border: 1px solid #e8e8e8;
1990
- }
1991
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__sub-title___ADRB3 {
1992
- color: #333333;
1993
- font-weight: 500;
1994
- font-size: 16px;
1995
- line-height: 24px;
1996
- }
1997
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-icon___o7ngJ {
1998
- margin-left: 4px;
1999
- flex-shrink: 0;
2000
- height: 24px;
2001
- width: 24px;
2002
- }
2003
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-icon-left___CSu9C {
2004
- margin-left: 0;
2005
- margin-right: 4px;
2006
- }
2007
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-text-tail___yKZNS {
2008
- white-space: nowrap;
2009
- display: inline-flex;
2010
- align-items: center;
2011
- }
2012
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-text-left___Ry-va {
2013
- display: flex;
2014
- align-items: flex-start;
2015
- gap: 4px;
2016
- white-space: normal;
2017
- max-width: 100%;
2018
- }
2019
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-text___-pZdP {
2020
- white-space: normal;
2021
- min-width: 0;
2022
- }
2023
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf {
2024
- display: none;
2025
- }
2026
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf a {
2027
- display: block;
2028
- height: auto;
2029
- }
2030
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf ul {
2031
- padding: 0 0 24px 16px;
2032
- }
2033
- .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf ul li:not(:last-child) {
2034
- padding-bottom: 4px;
2035
- }
2036
-
2037
- .MobileSubNavigation-module__container___1tQpO.MobileSubNavigation-module__inverted___OotxO .MobileSubNavigation-module__title___f2AKU {
2038
- color: #f2f2f2;
2039
- }
2040
- .MobileSubNavigation-module__container___1tQpO.MobileSubNavigation-module__inverted___OotxO .MobileSubNavigation-module__sub-title___ADRB3 {
2041
- background-color: #1f1f1f;
2042
- border: 1px solid #2c2c2c;
2043
- color: #ffffff;
2044
- }
2045
-
2046
- .active-link .MobileSubNavigation-module__container___1tQpO {
2047
- max-height: 200vh;
2048
- }
2049
- .active-link .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf {
2050
- display: block;
2051
- }
2052
-
2053
1959
  /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/CartOverlay/CartItems/CartItems.module.scss */
2054
1960
  /* center a block element */
2055
1961
  /* use this to any of the pseudo elements as these are the mandatory properties */
@@ -2205,3 +2111,97 @@
2205
2111
  padding: 16px;
2206
2112
  }
2207
2113
  }
2114
+
2115
+ /* /Users/filipe.cruz2/Projects/sunrise-ch-b2c-sales-static-components/src/components/FalconMainNavigation/MobileNavigation/MobileSubNavigation/MobileSubNavigation.module.scss */
2116
+ /* center a block element */
2117
+ /* use this to any of the pseudo elements as these are the mandatory properties */
2118
+ /* setting styles in separate formats for cross browser support */
2119
+ /* specify the max width for an element and apply ellipses and truncate the overflow */
2120
+ /* vertically center alilgn any HTML element */
2121
+ /* add basePath to assets */
2122
+ .MobileSubNavigation-module__container___1tQpO {
2123
+ max-height: 0px;
2124
+ overflow: hidden;
2125
+ transition: -webkit-max-height 0.1s cubic-bezier(0.75, 0, 0.75, 0.9);
2126
+ transition: max-height 0.1s cubic-bezier(0.75, 0, 0.75, 0.9);
2127
+ transition: max-height 0.1s cubic-bezier(0.75, 0, 0.75, 0.9), -webkit-max-height 0.1s cubic-bezier(0.75, 0, 0.75, 0.9);
2128
+ width: 100%;
2129
+ }
2130
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__title___f2AKU {
2131
+ cursor: unset;
2132
+ padding: 20px 10px 4px;
2133
+ color: #858585;
2134
+ letter-spacing: 1px;
2135
+ text-transform: uppercase;
2136
+ font-size: 14px;
2137
+ line-height: 20px;
2138
+ font-weight: 500;
2139
+ }
2140
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__sub-title___ADRB3 {
2141
+ background-color: #ffffff;
2142
+ padding: 10px;
2143
+ }
2144
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__sub-title___ADRB3.MobileSubNavigation-module__new-style___xPfpe {
2145
+ border: 1px solid #e8e8e8;
2146
+ }
2147
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__sub-title___ADRB3 {
2148
+ color: #333333;
2149
+ font-weight: 500;
2150
+ font-size: 16px;
2151
+ line-height: 24px;
2152
+ }
2153
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-icon___o7ngJ {
2154
+ margin-left: 4px;
2155
+ flex-shrink: 0;
2156
+ height: 24px;
2157
+ width: 24px;
2158
+ }
2159
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-icon-left___CSu9C {
2160
+ margin-left: 0;
2161
+ margin-right: 4px;
2162
+ }
2163
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-text-tail___yKZNS {
2164
+ white-space: nowrap;
2165
+ display: inline-flex;
2166
+ align-items: center;
2167
+ }
2168
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-text-left___Ry-va {
2169
+ display: flex;
2170
+ align-items: flex-start;
2171
+ gap: 4px;
2172
+ white-space: normal;
2173
+ max-width: 100%;
2174
+ }
2175
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__promo-text___-pZdP {
2176
+ white-space: normal;
2177
+ min-width: 0;
2178
+ }
2179
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf {
2180
+ display: none;
2181
+ }
2182
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf a {
2183
+ display: block;
2184
+ height: auto;
2185
+ }
2186
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf ul {
2187
+ padding: 0 0 24px 16px;
2188
+ }
2189
+ .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf ul li:not(:last-child) {
2190
+ padding-bottom: 4px;
2191
+ }
2192
+
2193
+ .MobileSubNavigation-module__container___1tQpO.MobileSubNavigation-module__inverted___OotxO .MobileSubNavigation-module__title___f2AKU {
2194
+ color: #f2f2f2;
2195
+ }
2196
+ .MobileSubNavigation-module__container___1tQpO.MobileSubNavigation-module__inverted___OotxO .MobileSubNavigation-module__sub-title___ADRB3 {
2197
+ background-color: #1f1f1f;
2198
+ border: 1px solid #2c2c2c;
2199
+ color: #ffffff;
2200
+ }
2201
+
2202
+ .active-link .MobileSubNavigation-module__container___1tQpO {
2203
+ max-height: 200vh;
2204
+ }
2205
+ .active-link .MobileSubNavigation-module__container___1tQpO .MobileSubNavigation-module__content___Cl7sf {
2206
+ display: block;
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.19",
3
+ "version": "3.8.7-beta.20",
4
4
  "description": "Static Reusable Components Library",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",