@sunrise-upc/sales-static-components 3.8.7-beta.17 → 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.
- package/dist/cjs/components/Constants.js +1 -1
- package/dist/cjs/components/Constants.js.map +1 -1
- package/dist/cjs/components/FalconButtonV3/FalconButtonV3.css +18 -0
- package/dist/cjs/components/FalconButtonV3/FalconButtonV3.js +1 -1
- package/dist/cjs/components/FalconButtonV3/FalconButtonV3.js.map +1 -1
- package/dist/cjs/components/FalconButtonV3/FalconButtonV3.module.scss.css +18 -0
- package/dist/cjs/services/customerSegmentSync.js +1 -1
- package/dist/cjs/services/customerSegmentSync.js.map +1 -1
- package/dist/esm/components/Constants.js +1 -1
- package/dist/esm/components/Constants.js.map +1 -1
- package/dist/esm/components/FalconButtonV3/FalconButtonV3.css +18 -0
- package/dist/esm/components/FalconButtonV3/FalconButtonV3.js +1 -1
- package/dist/esm/components/FalconButtonV3/FalconButtonV3.js.map +1 -1
- package/dist/esm/components/FalconButtonV3/FalconButtonV3.module.scss.css +18 -0
- package/dist/esm/services/customerSegmentSync.js +1 -1
- package/dist/esm/services/customerSegmentSync.js.map +1 -1
- package/dist/navigation.css +500 -500
- package/package.json +1 -1
|
@@ -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,
|
|
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"}
|
|
@@ -48,15 +48,19 @@
|
|
|
48
48
|
}
|
|
49
49
|
.FalconButtonV3-module__secondaryV1___i5p3W:hover {
|
|
50
50
|
color: #961c13 !important;
|
|
51
|
+
background-color: transparent;
|
|
51
52
|
}
|
|
52
53
|
.FalconButtonV3-module__secondaryV1___i5p3W:active {
|
|
53
54
|
color: #c7355f !important;
|
|
55
|
+
background-color: transparent;
|
|
54
56
|
}
|
|
55
57
|
.FalconButtonV3-module__secondaryV1___i5p3W:focus {
|
|
56
58
|
color: #da291c !important;
|
|
59
|
+
background-color: transparent;
|
|
57
60
|
}
|
|
58
61
|
.FalconButtonV3-module__secondaryV1___i5p3W:disabled {
|
|
59
62
|
color: #b3aeaa;
|
|
63
|
+
background-color: transparent;
|
|
60
64
|
cursor: default;
|
|
61
65
|
}
|
|
62
66
|
.FalconButtonV3-module__secondaryV1___i5p3W {
|
|
@@ -74,15 +78,19 @@
|
|
|
74
78
|
}
|
|
75
79
|
.FalconButtonV3-module__secondaryV4___fMLrY:hover {
|
|
76
80
|
color: #961c13 !important;
|
|
81
|
+
background-color: transparent;
|
|
77
82
|
}
|
|
78
83
|
.FalconButtonV3-module__secondaryV4___fMLrY:active {
|
|
79
84
|
color: #c7355f !important;
|
|
85
|
+
background-color: transparent;
|
|
80
86
|
}
|
|
81
87
|
.FalconButtonV3-module__secondaryV4___fMLrY:focus {
|
|
82
88
|
color: #da291c !important;
|
|
89
|
+
background-color: transparent;
|
|
83
90
|
}
|
|
84
91
|
.FalconButtonV3-module__secondaryV4___fMLrY:disabled {
|
|
85
92
|
color: #b3aeaa;
|
|
93
|
+
background-color: transparent;
|
|
86
94
|
cursor: default;
|
|
87
95
|
}
|
|
88
96
|
.FalconButtonV3-module__secondaryV4___fMLrY {
|
|
@@ -120,6 +128,11 @@
|
|
|
120
128
|
padding: 12px 24px;
|
|
121
129
|
border: 2px solid #ffffff;
|
|
122
130
|
}
|
|
131
|
+
.FalconButtonV3-module__secondaryWhite___q8QCS:hover, .FalconButtonV3-module__secondaryWhite___q8QCS:active, .FalconButtonV3-module__secondaryWhite___q8QCS:focus {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: #ffffff !important;
|
|
134
|
+
border-color: #ffffff;
|
|
135
|
+
}
|
|
123
136
|
|
|
124
137
|
.FalconButtonV3-module__secondaryRed___D2Pbg {
|
|
125
138
|
background-color: transparent;
|
|
@@ -127,6 +140,11 @@
|
|
|
127
140
|
padding: 12px 24px;
|
|
128
141
|
border: 2px solid #da291c;
|
|
129
142
|
}
|
|
143
|
+
.FalconButtonV3-module__secondaryRed___D2Pbg:hover, .FalconButtonV3-module__secondaryRed___D2Pbg:active, .FalconButtonV3-module__secondaryRed___D2Pbg:focus {
|
|
144
|
+
background-color: transparent;
|
|
145
|
+
color: #ffffff !important;
|
|
146
|
+
border-color: #da291c;
|
|
147
|
+
}
|
|
130
148
|
|
|
131
149
|
.FalconButtonV3-module__primaryDarkV1___y3XvF {
|
|
132
150
|
background: #5f5955;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
require('./FalconButtonV3.css');
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./FalconButtonV3.module.scss.js");const a=e=>{switch(e){case"
|
|
2
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./FalconButtonV3.module.scss.js");const a=e=>(e||"").trim().toLowerCase().replace(/[\s_]+/g,"-").replace(/-+/g,"-"),r=e=>{switch(a(e)){case"primary-v1":default:return t.default.button;case"secondary-v1":return`${t.default.button} ${t.default.secondaryV1}`;case"secondary-v4":return`${t.default.button} ${t.default.secondaryV4}`;case"secondary-dark":return`${t.default.button} ${t.default.secondaryDark}`;case"primary-dark-v1":return`${t.default.button} ${t.default.primaryDarkV1}`;case"primary-dark-v2":return`${t.default.button} ${t.default.primaryDarkV2}`;case"secondary-v5":return`${t.default.button} ${t.default.secondaryV5}`;case"secondary-white":return`${t.default.button} ${t.default.secondaryWhite}`;case"secondary-red":return`${t.default.button} ${t.default.secondaryRed}`;case"primary-white-v1":return`${t.default.button} ${t.default.primaryWhiteV1}`}};exports.default=({href:s,label:n,buttonType:u,isSlim:l,target:d,rel:o,onClick:c,iconFilename:i,iconPosition:f,wrapperClassName:y,buttonClassName:m,iconClassName:$})=>{const h=a(u||"").startsWith("secondary"),b=[r(u||""),l?t.default.slimButton:"",l&&h?t.default.slimButtonSecondary:"",m||""].filter(Boolean).join(" "),p=i&&"before"===f,g=i&&"after"===f,v=`${t.default.icon} ${$||""}`.trim();return e.jsx("div",{className:y,children:e.jsx("a",{href:s,target:null!=d?d:"",rel:o,onClick:c,children:e.jsxs("div",{className:b,children:[p&&e.jsx("img",{className:`${v} ${t.default.beforeIcon}`,src:i,alt:"",width:19,height:19,decoding:"async"}),n,g&&e.jsx("img",{className:`${v} ${t.default.afterIcon}`,src:i,alt:"",width:19,height:19,decoding:"async"})]})})})},exports.getFalconButtonClass=r;
|
|
3
3
|
//# sourceMappingURL=FalconButtonV3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FalconButtonV3.js","sources":["../../../../../src/components/FalconButtonV3/FalconButtonV3.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"FalconButtonV3.js","sources":["../../../../../src/components/FalconButtonV3/FalconButtonV3.tsx"],"sourcesContent":[null],"names":["normalizeButtonType","type","trim","toLowerCase","replace","getFalconButtonClass","Styles","button","secondaryV1","secondaryV4","secondaryDark","primaryDarkV1","primaryDarkV2","secondaryV5","secondaryWhite","secondaryRed","primaryWhiteV1","href","label","buttonType","isSlim","target","rel","onClick","iconFilename","iconPosition","wrapperClassName","buttonClassName","iconClassName","isSecondaryButton","startsWith","buttonClass","slimButton","slimButtonSecondary","filter","Boolean","join","shouldShowBeforeIcon","shouldShowAfterIcon","iconBaseClass","icon","_jsx","className","children","_jsxs","beforeIcon","src","alt","width","height","decoding","afterIcon"],"mappings":"oJAGA,MAAMA,EAAuBC,IAC1BA,GAAQ,IACNC,OACAC,cACAC,QAAQ,UAAW,KACnBA,QAAQ,MAAO,KAEPC,EAAwBJ,IACnC,OAAQD,EAAoBC,IAC1B,IAAK,aA8BL,QACE,OAAOK,EAAAA,QAAOC,OA5BhB,IAAK,eACH,MAAO,GAAGD,EAAAA,QAAOC,UAAUD,EAAAA,QAAOE,cAEpC,IAAK,eACH,MAAO,GAAGF,EAAAA,QAAOC,UAAUD,EAAAA,QAAOG,cAEpC,IAAK,iBACH,MAAO,GAAGH,EAAAA,QAAOC,UAAUD,EAAAA,QAAOI,gBAEpC,IAAK,kBACH,MAAO,GAAGJ,EAAAA,QAAOC,UAAUD,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ACJC,MAAO,GACPC,OAAQ,GACRC,SAAS"}
|
|
@@ -48,15 +48,19 @@
|
|
|
48
48
|
}
|
|
49
49
|
.FalconButtonV3-module__secondaryV1___i5p3W:hover {
|
|
50
50
|
color: #961c13 !important;
|
|
51
|
+
background-color: transparent;
|
|
51
52
|
}
|
|
52
53
|
.FalconButtonV3-module__secondaryV1___i5p3W:active {
|
|
53
54
|
color: #c7355f !important;
|
|
55
|
+
background-color: transparent;
|
|
54
56
|
}
|
|
55
57
|
.FalconButtonV3-module__secondaryV1___i5p3W:focus {
|
|
56
58
|
color: #da291c !important;
|
|
59
|
+
background-color: transparent;
|
|
57
60
|
}
|
|
58
61
|
.FalconButtonV3-module__secondaryV1___i5p3W:disabled {
|
|
59
62
|
color: #b3aeaa;
|
|
63
|
+
background-color: transparent;
|
|
60
64
|
cursor: default;
|
|
61
65
|
}
|
|
62
66
|
.FalconButtonV3-module__secondaryV1___i5p3W {
|
|
@@ -74,15 +78,19 @@
|
|
|
74
78
|
}
|
|
75
79
|
.FalconButtonV3-module__secondaryV4___fMLrY:hover {
|
|
76
80
|
color: #961c13 !important;
|
|
81
|
+
background-color: transparent;
|
|
77
82
|
}
|
|
78
83
|
.FalconButtonV3-module__secondaryV4___fMLrY:active {
|
|
79
84
|
color: #c7355f !important;
|
|
85
|
+
background-color: transparent;
|
|
80
86
|
}
|
|
81
87
|
.FalconButtonV3-module__secondaryV4___fMLrY:focus {
|
|
82
88
|
color: #da291c !important;
|
|
89
|
+
background-color: transparent;
|
|
83
90
|
}
|
|
84
91
|
.FalconButtonV3-module__secondaryV4___fMLrY:disabled {
|
|
85
92
|
color: #b3aeaa;
|
|
93
|
+
background-color: transparent;
|
|
86
94
|
cursor: default;
|
|
87
95
|
}
|
|
88
96
|
.FalconButtonV3-module__secondaryV4___fMLrY {
|
|
@@ -120,6 +128,11 @@
|
|
|
120
128
|
padding: 12px 24px;
|
|
121
129
|
border: 2px solid #ffffff;
|
|
122
130
|
}
|
|
131
|
+
.FalconButtonV3-module__secondaryWhite___q8QCS:hover, .FalconButtonV3-module__secondaryWhite___q8QCS:active, .FalconButtonV3-module__secondaryWhite___q8QCS:focus {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: #ffffff !important;
|
|
134
|
+
border-color: #ffffff;
|
|
135
|
+
}
|
|
123
136
|
|
|
124
137
|
.FalconButtonV3-module__secondaryRed___D2Pbg {
|
|
125
138
|
background-color: transparent;
|
|
@@ -127,6 +140,11 @@
|
|
|
127
140
|
padding: 12px 24px;
|
|
128
141
|
border: 2px solid #da291c;
|
|
129
142
|
}
|
|
143
|
+
.FalconButtonV3-module__secondaryRed___D2Pbg:hover, .FalconButtonV3-module__secondaryRed___D2Pbg:active, .FalconButtonV3-module__secondaryRed___D2Pbg:focus {
|
|
144
|
+
background-color: transparent;
|
|
145
|
+
color: #ffffff !important;
|
|
146
|
+
border-color: #da291c;
|
|
147
|
+
}
|
|
130
148
|
|
|
131
149
|
.FalconButtonV3-module__primaryDarkV1___y3XvF {
|
|
132
150
|
background: #5f5955;
|
|
@@ -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),
|
|
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","
|
|
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,EA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,KAC9CC,EAAiB,EAsCrB,MAAO,CACLC,iCArCuC,IAAmC/B,EAAAA,eAAA,OAAA,OAAA,EAAA,YAC1E,GAAsB,oBAAX7C,OACT,OAAO,KA/GgB,IAAOmB,EAoHhC,SApHgCA,EAkHLyB,EAAQzB,WAlHyC0B,EAAAA,eAAA,OAAA,OAAA,EAAA,YAC9E,GAAsB,oBAAX7C,QAA0BmB,IACnC,OAGF,MAAM0D,EAAWlD,KAAKC,MA5BY,IA6BlC,MAAQT,KAAgBQ,KAAKC,MAAQiD,SAC7B,IAAIC,QAASC,GAAY/E,OAAOgF,WAAWD,EA7BpB,KA+BjC,IA2GQL,EACF,OAAOA,EAIT,GADY/C,KAAKC,MACP+C,EAjJgC,IAiJI,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,2 +1,2 @@
|
|
|
1
|
-
const e="center",t="left",s="right",r="transparent",o="00",c="#da291c",
|
|
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"}
|
|
@@ -48,15 +48,19 @@
|
|
|
48
48
|
}
|
|
49
49
|
.FalconButtonV3-module__secondaryV1___i5p3W:hover {
|
|
50
50
|
color: #961c13 !important;
|
|
51
|
+
background-color: transparent;
|
|
51
52
|
}
|
|
52
53
|
.FalconButtonV3-module__secondaryV1___i5p3W:active {
|
|
53
54
|
color: #c7355f !important;
|
|
55
|
+
background-color: transparent;
|
|
54
56
|
}
|
|
55
57
|
.FalconButtonV3-module__secondaryV1___i5p3W:focus {
|
|
56
58
|
color: #da291c !important;
|
|
59
|
+
background-color: transparent;
|
|
57
60
|
}
|
|
58
61
|
.FalconButtonV3-module__secondaryV1___i5p3W:disabled {
|
|
59
62
|
color: #b3aeaa;
|
|
63
|
+
background-color: transparent;
|
|
60
64
|
cursor: default;
|
|
61
65
|
}
|
|
62
66
|
.FalconButtonV3-module__secondaryV1___i5p3W {
|
|
@@ -74,15 +78,19 @@
|
|
|
74
78
|
}
|
|
75
79
|
.FalconButtonV3-module__secondaryV4___fMLrY:hover {
|
|
76
80
|
color: #961c13 !important;
|
|
81
|
+
background-color: transparent;
|
|
77
82
|
}
|
|
78
83
|
.FalconButtonV3-module__secondaryV4___fMLrY:active {
|
|
79
84
|
color: #c7355f !important;
|
|
85
|
+
background-color: transparent;
|
|
80
86
|
}
|
|
81
87
|
.FalconButtonV3-module__secondaryV4___fMLrY:focus {
|
|
82
88
|
color: #da291c !important;
|
|
89
|
+
background-color: transparent;
|
|
83
90
|
}
|
|
84
91
|
.FalconButtonV3-module__secondaryV4___fMLrY:disabled {
|
|
85
92
|
color: #b3aeaa;
|
|
93
|
+
background-color: transparent;
|
|
86
94
|
cursor: default;
|
|
87
95
|
}
|
|
88
96
|
.FalconButtonV3-module__secondaryV4___fMLrY {
|
|
@@ -120,6 +128,11 @@
|
|
|
120
128
|
padding: 12px 24px;
|
|
121
129
|
border: 2px solid #ffffff;
|
|
122
130
|
}
|
|
131
|
+
.FalconButtonV3-module__secondaryWhite___q8QCS:hover, .FalconButtonV3-module__secondaryWhite___q8QCS:active, .FalconButtonV3-module__secondaryWhite___q8QCS:focus {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: #ffffff !important;
|
|
134
|
+
border-color: #ffffff;
|
|
135
|
+
}
|
|
123
136
|
|
|
124
137
|
.FalconButtonV3-module__secondaryRed___D2Pbg {
|
|
125
138
|
background-color: transparent;
|
|
@@ -127,6 +140,11 @@
|
|
|
127
140
|
padding: 12px 24px;
|
|
128
141
|
border: 2px solid #da291c;
|
|
129
142
|
}
|
|
143
|
+
.FalconButtonV3-module__secondaryRed___D2Pbg:hover, .FalconButtonV3-module__secondaryRed___D2Pbg:active, .FalconButtonV3-module__secondaryRed___D2Pbg:focus {
|
|
144
|
+
background-color: transparent;
|
|
145
|
+
color: #ffffff !important;
|
|
146
|
+
border-color: #da291c;
|
|
147
|
+
}
|
|
130
148
|
|
|
131
149
|
.FalconButtonV3-module__primaryDarkV1___y3XvF {
|
|
132
150
|
background: #5f5955;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import './FalconButtonV3.css';
|
|
2
|
-
import{jsx as r,jsxs as e}from"react/jsx-runtime";import t from"./FalconButtonV3.module.scss.js";const a=r=>{switch(r){case"
|
|
2
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import t from"./FalconButtonV3.module.scss.js";const a=r=>(r||"").trim().toLowerCase().replace(/[\s_]+/g,"-").replace(/-+/g,"-"),n=r=>{switch(a(r)){case"primary-v1":default:return t.button;case"secondary-v1":return`${t.button} ${t.secondaryV1}`;case"secondary-v4":return`${t.button} ${t.secondaryV4}`;case"secondary-dark":return`${t.button} ${t.secondaryDark}`;case"primary-dark-v1":return`${t.button} ${t.primaryDarkV1}`;case"primary-dark-v2":return`${t.button} ${t.primaryDarkV2}`;case"secondary-v5":return`${t.button} ${t.secondaryV5}`;case"secondary-white":return`${t.button} ${t.secondaryWhite}`;case"secondary-red":return`${t.button} ${t.secondaryRed}`;case"primary-white-v1":return`${t.button} ${t.primaryWhiteV1}`}},s=({href:s,label:o,buttonType:c,isSlim:i,target:d,rel:l,onClick:u,iconFilename:m,iconPosition:y,wrapperClassName:$,buttonClassName:h,iconClassName:b})=>{const p=a(c||"").startsWith("secondary"),f=[n(c||""),i?t.slimButton:"",i&&p?t.slimButtonSecondary:"",h||""].filter(Boolean).join(" "),g=m&&"before"===y,v=m&&"after"===y,k=`${t.icon} ${b||""}`.trim();return r("div",{className:$,children:r("a",{href:s,target:null!=d?d:"",rel:l,onClick:u,children:e("div",{className:f,children:[g&&r("img",{className:`${k} ${t.beforeIcon}`,src:m,alt:"",width:19,height:19,decoding:"async"}),o,v&&r("img",{className:`${k} ${t.afterIcon}`,src:m,alt:"",width:19,height:19,decoding:"async"})]})})})};export{s as default,n as getFalconButtonClass};
|
|
3
3
|
//# sourceMappingURL=FalconButtonV3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FalconButtonV3.js","sources":["../../../../../src/components/FalconButtonV3/FalconButtonV3.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"FalconButtonV3.js","sources":["../../../../../src/components/FalconButtonV3/FalconButtonV3.tsx"],"sourcesContent":[null],"names":["normalizeButtonType","type","trim","toLowerCase","replace","getFalconButtonClass","Styles","button","secondaryV1","secondaryV4","secondaryDark","primaryDarkV1","primaryDarkV2","secondaryV5","secondaryWhite","secondaryRed","primaryWhiteV1","FalconButtonV3","href","label","buttonType","isSlim","target","rel","onClick","iconFilename","iconPosition","wrapperClassName","buttonClassName","iconClassName","isSecondaryButton","startsWith","buttonClass","slimButton","slimButtonSecondary","filter","Boolean","join","shouldShowBeforeIcon","shouldShowAfterIcon","iconBaseClass","icon","_jsx","className","children","_jsxs","beforeIcon","src","alt","width","height","decoding","afterIcon"],"mappings":"iGAGA,MAAMA,EAAuBC,IAC1BA,GAAQ,IACNC,OACAC,cACAC,QAAQ,UAAW,KACnBA,QAAQ,MAAO,KAEPC,EAAwBJ,IACnC,OAAQD,EAAoBC,IAC1B,IAAK,aA8BL,QACE,OAAOK,EAAOC,OA5BhB,IAAK,eACH,MAAO,GAAGD,EAAOC,UAAUD,EAAOE,cAEpC,IAAK,eACH,MAAO,GAAGF,EAAOC,UAAUD,EAAOG,cAEpC,IAAK,iBACH,MAAO,GAAGH,EAAOC,UAAUD,EAAOI,gBAEpC,IAAK,kBACH,MAAO,GAAGJ,EAAOC,UAAUD,EAAOK,gBAEpC,IAAK,kBACH,MAAO,GAAGL,EAAOC,UAAUD,EAAOM,gBAEpC,IAAK,eACH,MAAO,GAAGN,EAAOC,UAAUD,EAAOO,cAEpC,IAAK,kBACH,MAAO,GAAGP,EAAOC,UAAUD,EAAOQ,iBAEpC,IAAK,gBACH,MAAO,GAAGR,EAAOC,UAAUD,EAAOS,eAEpC,IAAK,mBACH,MAAO,GAAGT,EAAOC,UAAUD,EAAOU,mBAsBlCC,EAAiB,EACrBC,OACAC,QACAC,aACAC,SACAC,SACAC,MACAC,UACAC,eACAC,eACAC,mBACAC,kBACAC,oBAEA,MAAMC,EAAoB9B,EAAoBoB,GAAc,IAAIW,WAAW,aACrEC,EAAc,CAClB3B,EAAqBe,GAAc,IACnCC,EAASf,EAAO2B,WAAa,GAC7BZ,GAAUS,EAAoBxB,EAAO4B,oBAAsB,GAC3DN,GAAmB,IAElBO,OAAOC,SACPC,KAAK,KACFC,EAAuBb,GAAiC,WAAjBC,EACvCa,EAAsBd,GAAiC,UAAjBC,EACtCc,EAAgB,GAAGlC,EAAOmC,QAAQZ,GAAiB,KAAK3B,OAE9D,OACEwC,EAAA,MAAA,CAAKC,UAAWhB,WACde,EAAA,IAAA,CAAGxB,KAAMA,EAAMI,OAAQA,QAAAA,EAAU,GAAIC,IAAKA,EAAKC,QAASA,EAAOoB,SAC7DC,EAAA,MAAA,CAAKF,UAAWX,YACbM,GACCI,EAAA,MAAA,CACEC,UAAW,GAAGH,KAAiBlC,EAAOwC,aACtCC,IAAKtB,EACLuB,IAAI,GACJC,MAAO,GACPC,OAAQ,GACRC,SAAS,UAGZhC,EACAoB,GACCG,EAAA,MAAA,CACEC,UAAW,GAAGH,KAAiBlC,EAAO8C,YACtCL,IAAKtB,EACLuB,IAAI,GACJC,MAAO,GACPC,OAAQ,GACRC,SAAS"}
|
|
@@ -48,15 +48,19 @@
|
|
|
48
48
|
}
|
|
49
49
|
.FalconButtonV3-module__secondaryV1___i5p3W:hover {
|
|
50
50
|
color: #961c13 !important;
|
|
51
|
+
background-color: transparent;
|
|
51
52
|
}
|
|
52
53
|
.FalconButtonV3-module__secondaryV1___i5p3W:active {
|
|
53
54
|
color: #c7355f !important;
|
|
55
|
+
background-color: transparent;
|
|
54
56
|
}
|
|
55
57
|
.FalconButtonV3-module__secondaryV1___i5p3W:focus {
|
|
56
58
|
color: #da291c !important;
|
|
59
|
+
background-color: transparent;
|
|
57
60
|
}
|
|
58
61
|
.FalconButtonV3-module__secondaryV1___i5p3W:disabled {
|
|
59
62
|
color: #b3aeaa;
|
|
63
|
+
background-color: transparent;
|
|
60
64
|
cursor: default;
|
|
61
65
|
}
|
|
62
66
|
.FalconButtonV3-module__secondaryV1___i5p3W {
|
|
@@ -74,15 +78,19 @@
|
|
|
74
78
|
}
|
|
75
79
|
.FalconButtonV3-module__secondaryV4___fMLrY:hover {
|
|
76
80
|
color: #961c13 !important;
|
|
81
|
+
background-color: transparent;
|
|
77
82
|
}
|
|
78
83
|
.FalconButtonV3-module__secondaryV4___fMLrY:active {
|
|
79
84
|
color: #c7355f !important;
|
|
85
|
+
background-color: transparent;
|
|
80
86
|
}
|
|
81
87
|
.FalconButtonV3-module__secondaryV4___fMLrY:focus {
|
|
82
88
|
color: #da291c !important;
|
|
89
|
+
background-color: transparent;
|
|
83
90
|
}
|
|
84
91
|
.FalconButtonV3-module__secondaryV4___fMLrY:disabled {
|
|
85
92
|
color: #b3aeaa;
|
|
93
|
+
background-color: transparent;
|
|
86
94
|
cursor: default;
|
|
87
95
|
}
|
|
88
96
|
.FalconButtonV3-module__secondaryV4___fMLrY {
|
|
@@ -120,6 +128,11 @@
|
|
|
120
128
|
padding: 12px 24px;
|
|
121
129
|
border: 2px solid #ffffff;
|
|
122
130
|
}
|
|
131
|
+
.FalconButtonV3-module__secondaryWhite___q8QCS:hover, .FalconButtonV3-module__secondaryWhite___q8QCS:active, .FalconButtonV3-module__secondaryWhite___q8QCS:focus {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: #ffffff !important;
|
|
134
|
+
border-color: #ffffff;
|
|
135
|
+
}
|
|
123
136
|
|
|
124
137
|
.FalconButtonV3-module__secondaryRed___D2Pbg {
|
|
125
138
|
background-color: transparent;
|
|
@@ -127,6 +140,11 @@
|
|
|
127
140
|
padding: 12px 24px;
|
|
128
141
|
border: 2px solid #da291c;
|
|
129
142
|
}
|
|
143
|
+
.FalconButtonV3-module__secondaryRed___D2Pbg:hover, .FalconButtonV3-module__secondaryRed___D2Pbg:active, .FalconButtonV3-module__secondaryRed___D2Pbg:focus {
|
|
144
|
+
background-color: transparent;
|
|
145
|
+
color: #ffffff !important;
|
|
146
|
+
border-color: #da291c;
|
|
147
|
+
}
|
|
130
148
|
|
|
131
149
|
.FalconButtonV3-module__primaryDarkV1___y3XvF {
|
|
132
150
|
background: #5f5955;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e}from"../node_modules/tslib/tslib.es6.js";import{
|
|
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","
|
|
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,GAAqB,iBAAVA,EACT,OAAO,KAGT,MAAMC,EAAaD,EAAME,OACzB,OAAOD,EAAWE,OAAS,EAAIF,EAAa,MAGjCG,EAAmCC,YAC9C,MAAMC,EAAsBP,EAAuBM,aAAO,EAAPA,EAAS3B,eAC5D,GAAI4B,EACF,OAAOA,EAGT,MAAMC,EAAsBR,EAAi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