@ikas/loyalty-widget-renderer 1.0.0-alpha.25 → 1.0.0-alpha.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import e from"react";var t=function(t){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e.createElement("path",{d:"M12.7287 10.0002L17.2219 7.19194C17.8199 6.81816 18.1832 6.16265 18.1832 5.4574V3.86381C18.1832 2.73414 17.2675 1.81836 16.1378 1.81836H12.7287L12.0469 5.90927L12.7287 10.0002Z",fill:"url(#paint0_linear_14681_7916)"}),e.createElement("path",{d:"M7.27095 1.81836H3.86186C2.73219 1.81836 1.81641 2.73414 1.81641 3.86381V5.4574C1.81641 6.16265 2.17972 6.81816 2.77777 7.19194L7.27095 10.0002L7.95277 5.90927L7.27095 1.81836Z",fill:"url(#paint1_linear_14681_7916)"}),e.createElement("path",{d:"M12.728 1.81836H7.27344V10.0002L8.91662 11.0272C9.5799 11.4417 10.4215 11.4417 11.0848 11.0272L12.728 10.0002V1.81836Z",fill:"url(#paint2_linear_14681_7916)"}),e.createElement("path",{d:"M14.092 14.0909C14.092 16.3503 12.2604 18.1818 10.0011 18.1818C7.74172 18.1818 5.91016 16.3503 5.91016 14.0909C5.91016 11.8316 7.74172 10 10.0011 10C12.2604 10 14.092 11.8316 14.092 14.0909Z",fill:"url(#paint3_radial_14681_7916)"}),e.createElement("path",{d:"M9.99858 19.0909C12.509 19.0909 14.544 17.0558 14.544 14.5455C14.544 12.0351 12.509 10 9.99858 10C7.48819 10 5.45312 12.0351 5.45312 14.5455C5.45312 17.0558 7.48819 19.0909 9.99858 19.0909Z",fill:"url(#paint4_linear_14681_7916)"}),e.createElement("path",{d:"M9.99715 18.299C12.071 18.299 13.7521 16.6178 13.7521 14.544C13.7521 12.4702 12.071 10.7891 9.99715 10.7891C7.92334 10.7891 6.24219 12.4702 6.24219 14.544C6.24219 16.6178 7.92334 18.299 9.99715 18.299Z",fill:"url(#paint5_linear_14681_7916)"}),e.createElement("path",{d:"M10.0001 17.9046C11.8555 17.9046 13.3596 16.4005 13.3596 14.5451C13.3596 12.6896 11.8555 11.1855 10.0001 11.1855C8.14473 11.1855 6.64062 12.6896 6.64062 14.5451C6.64062 16.4005 8.14473 17.9046 10.0001 17.9046Z",fill:"url(#paint6_linear_14681_7916)"}),e.createElement("path",{d:"M8.50316 14.9411L7.19531 13.5667L9.06143 13.2233L9.96432 11.5547L10.8676 13.2233L12.7337 13.5667L11.4259 14.9411L11.6763 16.822L9.96432 16.0026L8.25316 16.822L8.50316 14.9411Z",fill:"url(#paint7_linear_14681_7916)"}),e.createElement("path",{d:"M9.96289 11.8145L10.7852 13.3339L12.4844 13.6467L11.2931 14.8983L11.5212 16.6107L9.96289 15.8649L8.40422 16.6107L8.63232 14.8983L7.44141 13.6467L9.14058 13.3339L9.96289 11.8145Z",fill:"url(#paint8_linear_14681_7916)"}),e.createElement("path",{d:"M9.97014 15.1779L9.17717 15.5573L9.29328 14.6858L8.6875 14.0494L9.55196 13.8899L9.97014 13.1172L10.3892 13.8899L11.2532 14.0494L10.6474 14.6858L10.7635 15.5573L9.97014 15.1779Z",fill:"url(#paint9_linear_14681_7916)"}),e.createElement("path",{d:"M7.44141 13.6468L8.67984 14.0493L9.5443 13.8898L9.14058 13.334L7.44141 13.6468Z",fill:"url(#paint10_linear_14681_7916)"}),e.createElement("path",{d:"M9.97075 11.8184V13.12L9.5534 13.8927L9.14844 13.3349L9.86745 12.0126L9.97075 11.8184Z",fill:"url(#paint11_linear_14681_7916)"}),e.createElement("path",{d:"M10.7872 13.3349L10.3822 13.8927L9.96484 13.12V11.8184L10.0764 12.025L10.7872 13.3349Z",fill:"url(#paint12_linear_14681_7916)"}),e.createElement("path",{d:"M10.3828 13.8898L11.2469 14.0493L12.4857 13.6468L10.7865 13.334L10.3828 13.8898Z",fill:"url(#paint13_linear_14681_7916)"}),e.createElement("path",{d:"M10.6445 14.6853L11.2978 14.8981L12.4892 13.6465L11.2503 14.049L10.6445 14.6853Z",fill:"url(#paint14_linear_14681_7916)"}),e.createElement("path",{d:"M9.96883 15.8649L9.96842 15.1777L9.17545 15.5571L8.41016 16.6108L9.96883 15.8649Z",fill:"url(#paint15_linear_14681_7916)"}),e.createElement("path",{d:"M9.96484 15.1777L10.7582 15.5571L11.5235 16.6108L9.96526 15.8649L9.96484 15.1777Z",fill:"url(#paint16_linear_14681_7916)"}),e.createElement("path",{d:"M10.6445 14.6875L10.7606 15.559L11.5259 16.6127L11.2978 14.9003L10.6445 14.6875Z",fill:"url(#paint17_linear_14681_7916)"}),e.createElement("path",{d:"M8.63826 14.9003L9.29156 14.6875L9.17545 15.559L8.41016 16.6127L8.63826 14.9003Z",fill:"url(#paint18_linear_14681_7916)"}),e.createElement("path",{d:"M7.44141 13.6465L8.67984 14.049L9.28562 14.6853L8.63232 14.8981L7.44141 13.6465Z",fill:"url(#paint19_linear_14681_7916)"}),e.createElement("path",{d:"M9.99858 19.0909C12.509 19.0909 14.544 17.0558 14.544 14.5455C14.544 12.0351 12.509 10 9.99858 10C7.48819 10 5.45312 12.0351 5.45312 14.5455C5.45312 17.0558 7.48819 19.0909 9.99858 19.0909Z",fill:"url(#paint20_radial_14681_7916)"}),e.createElement("path",{d:"M9.99715 18.299C12.071 18.299 13.7521 16.6178 13.7521 14.544C13.7521 12.4702 12.071 10.7891 9.99715 10.7891C7.92334 10.7891 6.24219 12.4702 6.24219 14.544C6.24219 16.6178 7.92334 18.299 9.99715 18.299Z",fill:"url(#paint21_radial_14681_7916)"}),e.createElement("path",{d:"M9.99715 18.299C12.071 18.299 13.7521 16.6178 13.7521 14.544C13.7521 12.4702 12.071 10.7891 9.99715 10.7891C7.92334 10.7891 6.24219 12.4702 6.24219 14.544C6.24219 16.6178 7.92334 18.299 9.99715 18.299Z",fill:"url(#paint22_radial_14681_7916)"}),e.createElement("defs",null,e.createElement("linearGradient",{id:"paint0_linear_14681_7916",x1:"18.1832",y1:"2.54586",x2:"12.2343",y2:"9.06149",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#52D17C"}),e.createElement("stop",{offset:"1",stopColor:"#1A7F7C"})),e.createElement("linearGradient",{id:"paint1_linear_14681_7916",x1:"1.81641",y1:"4.02205",x2:"7.88105",y2:"8.17236",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#52D17C"}),e.createElement("stop",{offset:"1",stopColor:"#1A7F7C"})),e.createElement("linearGradient",{id:"paint2_linear_14681_7916",x1:"10.0007",y1:"0.627741",x2:"13.5024",y2:"10.0346",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#76EB95"}),e.createElement("stop",{offset:"1",stopColor:"#1EC8B0"})),e.createElement("radialGradient",{id:"paint3_radial_14681_7916",cx:"0",cy:"0",r:"1",gradientTransform:"matrix(25.1299 38.1331 -35.5287 17.1684 -11.7684 -18.6364)",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{offset:"0.771547",stopColor:"#FFCD0F"}),e.createElement("stop",{offset:"0.990707",stopColor:"#E67505"})),e.createElement("linearGradient",{id:"paint4_linear_14681_7916",x1:"5.69362",y1:"9.55248",x2:"13.2197",y2:"18.2814",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint5_linear_14681_7916",x1:"13.3174",y1:"17.8643",x2:"6.0112",y2:"10.5581",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint6_linear_14681_7916",x1:"7.13029",y1:"11.1438",x2:"12.8274",y2:"17.8959",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE787"}),e.createElement("stop",{offset:"0.525",stopColor:"#FFE16E"}),e.createElement("stop",{offset:"1",stopColor:"#F0BC13"})),e.createElement("linearGradient",{id:"paint7_linear_14681_7916",x1:"1.46143",y1:"8.42039",x2:"14.2635",y2:"18.022",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFDD5D"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint8_linear_14681_7916",x1:"7.41579",y1:"11.6529",x2:"12.6559",y2:"17.6665",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFDD5D"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint9_linear_14681_7916",x1:"8.5656",y1:"12.0961",x2:"12.0474",y2:"17.8106",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFDD5D"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint10_linear_14681_7916",x1:"7.6443",y1:"12.5861",x2:"9.65752",y2:"15.3906",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint11_linear_14681_7916",x1:"10.7009",y1:"11.2605",x2:"5.89017",y2:"19.432",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE996"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"0.797",stopColor:"#F0A013"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint12_linear_14681_7916",x1:"12.1818",y1:"10.5014",x2:"9.52641",y2:"13.6142",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint13_linear_14681_7916",x1:"12.6506",y1:"14.1274",x2:"7.6857",y2:"12.6608",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE996"}),e.createElement("stop",{offset:"0.158",stopColor:"#F8D55A"}),e.createElement("stop",{offset:"0.31",stopColor:"#F2C327"}),e.createElement("stop",{offset:"0.384",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"0.797",stopColor:"#F0A013"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint14_linear_14681_7916",x1:"13.4057",y1:"11.001",x2:"11.1991",y2:"14.799",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.491",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.664",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.779",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"0.852",stopColor:"#F0AA13"}),e.createElement("stop",{offset:"0.941",stopColor:"#F09B13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint15_linear_14681_7916",x1:"6.72255",y1:"16.5881",x2:"9.94239",y2:"15.6823",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.436",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.54",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.61",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint16_linear_14681_7916",x1:"13.9297",y1:"17.5815",x2:"9.43922",y2:"15.2273",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint17_linear_14681_7916",x1:"10.3747",y1:"9.50403",x2:"11.2379",y2:"16.9701",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint18_linear_14681_7916",x1:"8.84611",y1:"17.6495",x2:"8.85933",y2:"12.0445",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE996"}),e.createElement("stop",{offset:"0.507",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"0.797",stopColor:"#F0A013"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint19_linear_14681_7916",x1:"7.97281",y1:"10.7849",x2:"8.56413",y2:"15.9019",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("radialGradient",{id:"paint20_radial_14681_7916",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.499 15.1045) scale(6.30579)"},e.createElement("stop",{stopColor:"#FFE477","stop-opacity":"0"}),e.createElement("stop",{offset:"0.725",stopColor:"#FFE477","stop-opacity":"0"}),e.createElement("stop",{offset:"0.83",stopColor:"#FFEEAB"}),e.createElement("stop",{offset:"0.962",stopColor:"#FFE477","stop-opacity":"0"})),e.createElement("radialGradient",{id:"paint21_radial_14681_7916",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.1641 13.7837) scale(5.65413)"},e.createElement("stop",{stopColor:"#FFE477","stop-opacity":"0"}),e.createElement("stop",{offset:"0.725",stopColor:"#FFE477","stop-opacity":"0"}),e.createElement("stop",{offset:"0.83",stopColor:"#FFEEAB"}),e.createElement("stop",{offset:"0.962",stopColor:"#FFE477","stop-opacity":"0"})),e.createElement("radialGradient",{id:"paint22_radial_14681_7916",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.1641 13.7837) scale(5.65413)"},e.createElement("stop",{stopColor:"#FFE477","stop-opacity":"0"}),e.createElement("stop",{offset:"0.725",stopColor:"#FFE477","stop-opacity":"0"}),e.createElement("stop",{offset:"0.83",stopColor:"#FFEEAB"}),e.createElement("stop",{offset:"0.962",stopColor:"#FFE477","stop-opacity":"0"}))))};export{t as Medal};
1
+ import e from"react";var t=function(t){return e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},e.createElement("path",{d:"M12.7287 10.0002L17.2219 7.19194C17.8199 6.81816 18.1832 6.16265 18.1832 5.4574V3.86381C18.1832 2.73414 17.2675 1.81836 16.1378 1.81836H12.7287L12.0469 5.90927L12.7287 10.0002Z",fill:"url(#paint0_linear_14681_7916)"}),e.createElement("path",{d:"M7.27095 1.81836H3.86186C2.73219 1.81836 1.81641 2.73414 1.81641 3.86381V5.4574C1.81641 6.16265 2.17972 6.81816 2.77777 7.19194L7.27095 10.0002L7.95277 5.90927L7.27095 1.81836Z",fill:"url(#paint1_linear_14681_7916)"}),e.createElement("path",{d:"M12.728 1.81836H7.27344V10.0002L8.91662 11.0272C9.5799 11.4417 10.4215 11.4417 11.0848 11.0272L12.728 10.0002V1.81836Z",fill:"url(#paint2_linear_14681_7916)"}),e.createElement("path",{d:"M14.092 14.0909C14.092 16.3503 12.2604 18.1818 10.0011 18.1818C7.74172 18.1818 5.91016 16.3503 5.91016 14.0909C5.91016 11.8316 7.74172 10 10.0011 10C12.2604 10 14.092 11.8316 14.092 14.0909Z",fill:"url(#paint3_radial_14681_7916)"}),e.createElement("path",{d:"M9.99858 19.0909C12.509 19.0909 14.544 17.0558 14.544 14.5455C14.544 12.0351 12.509 10 9.99858 10C7.48819 10 5.45312 12.0351 5.45312 14.5455C5.45312 17.0558 7.48819 19.0909 9.99858 19.0909Z",fill:"url(#paint4_linear_14681_7916)"}),e.createElement("path",{d:"M9.99715 18.299C12.071 18.299 13.7521 16.6178 13.7521 14.544C13.7521 12.4702 12.071 10.7891 9.99715 10.7891C7.92334 10.7891 6.24219 12.4702 6.24219 14.544C6.24219 16.6178 7.92334 18.299 9.99715 18.299Z",fill:"url(#paint5_linear_14681_7916)"}),e.createElement("path",{d:"M10.0001 17.9046C11.8555 17.9046 13.3596 16.4005 13.3596 14.5451C13.3596 12.6896 11.8555 11.1855 10.0001 11.1855C8.14473 11.1855 6.64062 12.6896 6.64062 14.5451C6.64062 16.4005 8.14473 17.9046 10.0001 17.9046Z",fill:"url(#paint6_linear_14681_7916)"}),e.createElement("path",{d:"M8.50316 14.9411L7.19531 13.5667L9.06143 13.2233L9.96432 11.5547L10.8676 13.2233L12.7337 13.5667L11.4259 14.9411L11.6763 16.822L9.96432 16.0026L8.25316 16.822L8.50316 14.9411Z",fill:"url(#paint7_linear_14681_7916)"}),e.createElement("path",{d:"M9.96289 11.8145L10.7852 13.3339L12.4844 13.6467L11.2931 14.8983L11.5212 16.6107L9.96289 15.8649L8.40422 16.6107L8.63232 14.8983L7.44141 13.6467L9.14058 13.3339L9.96289 11.8145Z",fill:"url(#paint8_linear_14681_7916)"}),e.createElement("path",{d:"M9.97014 15.1779L9.17717 15.5573L9.29328 14.6858L8.6875 14.0494L9.55196 13.8899L9.97014 13.1172L10.3892 13.8899L11.2532 14.0494L10.6474 14.6858L10.7635 15.5573L9.97014 15.1779Z",fill:"url(#paint9_linear_14681_7916)"}),e.createElement("path",{d:"M7.44141 13.6468L8.67984 14.0493L9.5443 13.8898L9.14058 13.334L7.44141 13.6468Z",fill:"url(#paint10_linear_14681_7916)"}),e.createElement("path",{d:"M9.97075 11.8184V13.12L9.5534 13.8927L9.14844 13.3349L9.86745 12.0126L9.97075 11.8184Z",fill:"url(#paint11_linear_14681_7916)"}),e.createElement("path",{d:"M10.7872 13.3349L10.3822 13.8927L9.96484 13.12V11.8184L10.0764 12.025L10.7872 13.3349Z",fill:"url(#paint12_linear_14681_7916)"}),e.createElement("path",{d:"M10.3828 13.8898L11.2469 14.0493L12.4857 13.6468L10.7865 13.334L10.3828 13.8898Z",fill:"url(#paint13_linear_14681_7916)"}),e.createElement("path",{d:"M10.6445 14.6853L11.2978 14.8981L12.4892 13.6465L11.2503 14.049L10.6445 14.6853Z",fill:"url(#paint14_linear_14681_7916)"}),e.createElement("path",{d:"M9.96883 15.8649L9.96842 15.1777L9.17545 15.5571L8.41016 16.6108L9.96883 15.8649Z",fill:"url(#paint15_linear_14681_7916)"}),e.createElement("path",{d:"M9.96484 15.1777L10.7582 15.5571L11.5235 16.6108L9.96526 15.8649L9.96484 15.1777Z",fill:"url(#paint16_linear_14681_7916)"}),e.createElement("path",{d:"M10.6445 14.6875L10.7606 15.559L11.5259 16.6127L11.2978 14.9003L10.6445 14.6875Z",fill:"url(#paint17_linear_14681_7916)"}),e.createElement("path",{d:"M8.63826 14.9003L9.29156 14.6875L9.17545 15.559L8.41016 16.6127L8.63826 14.9003Z",fill:"url(#paint18_linear_14681_7916)"}),e.createElement("path",{d:"M7.44141 13.6465L8.67984 14.049L9.28562 14.6853L8.63232 14.8981L7.44141 13.6465Z",fill:"url(#paint19_linear_14681_7916)"}),e.createElement("path",{d:"M9.99858 19.0909C12.509 19.0909 14.544 17.0558 14.544 14.5455C14.544 12.0351 12.509 10 9.99858 10C7.48819 10 5.45312 12.0351 5.45312 14.5455C5.45312 17.0558 7.48819 19.0909 9.99858 19.0909Z",fill:"url(#paint20_radial_14681_7916)"}),e.createElement("path",{d:"M9.99715 18.299C12.071 18.299 13.7521 16.6178 13.7521 14.544C13.7521 12.4702 12.071 10.7891 9.99715 10.7891C7.92334 10.7891 6.24219 12.4702 6.24219 14.544C6.24219 16.6178 7.92334 18.299 9.99715 18.299Z",fill:"url(#paint21_radial_14681_7916)"}),e.createElement("path",{d:"M9.99715 18.299C12.071 18.299 13.7521 16.6178 13.7521 14.544C13.7521 12.4702 12.071 10.7891 9.99715 10.7891C7.92334 10.7891 6.24219 12.4702 6.24219 14.544C6.24219 16.6178 7.92334 18.299 9.99715 18.299Z",fill:"url(#paint22_radial_14681_7916)"}),e.createElement("defs",null,e.createElement("linearGradient",{id:"paint0_linear_14681_7916",x1:"18.1832",y1:"2.54586",x2:"12.2343",y2:"9.06149",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#52D17C"}),e.createElement("stop",{offset:"1",stopColor:"#1A7F7C"})),e.createElement("linearGradient",{id:"paint1_linear_14681_7916",x1:"1.81641",y1:"4.02205",x2:"7.88105",y2:"8.17236",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#52D17C"}),e.createElement("stop",{offset:"1",stopColor:"#1A7F7C"})),e.createElement("linearGradient",{id:"paint2_linear_14681_7916",x1:"10.0007",y1:"0.627741",x2:"13.5024",y2:"10.0346",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#76EB95"}),e.createElement("stop",{offset:"1",stopColor:"#1EC8B0"})),e.createElement("radialGradient",{id:"paint3_radial_14681_7916",cx:"0",cy:"0",r:"1",gradientTransform:"matrix(25.1299 38.1331 -35.5287 17.1684 -11.7684 -18.6364)",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{offset:"0.771547",stopColor:"#FFCD0F"}),e.createElement("stop",{offset:"0.990707",stopColor:"#E67505"})),e.createElement("linearGradient",{id:"paint4_linear_14681_7916",x1:"5.69362",y1:"9.55248",x2:"13.2197",y2:"18.2814",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint5_linear_14681_7916",x1:"13.3174",y1:"17.8643",x2:"6.0112",y2:"10.5581",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint6_linear_14681_7916",x1:"7.13029",y1:"11.1438",x2:"12.8274",y2:"17.8959",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE787"}),e.createElement("stop",{offset:"0.525",stopColor:"#FFE16E"}),e.createElement("stop",{offset:"1",stopColor:"#F0BC13"})),e.createElement("linearGradient",{id:"paint7_linear_14681_7916",x1:"1.46143",y1:"8.42039",x2:"14.2635",y2:"18.022",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFDD5D"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint8_linear_14681_7916",x1:"7.41579",y1:"11.6529",x2:"12.6559",y2:"17.6665",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFDD5D"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint9_linear_14681_7916",x1:"8.5656",y1:"12.0961",x2:"12.0474",y2:"17.8106",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFDD5D"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint10_linear_14681_7916",x1:"7.6443",y1:"12.5861",x2:"9.65752",y2:"15.3906",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint11_linear_14681_7916",x1:"10.7009",y1:"11.2605",x2:"5.89017",y2:"19.432",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE996"}),e.createElement("stop",{offset:"0.485",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"0.797",stopColor:"#F0A013"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint12_linear_14681_7916",x1:"12.1818",y1:"10.5014",x2:"9.52641",y2:"13.6142",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint13_linear_14681_7916",x1:"12.6506",y1:"14.1274",x2:"7.6857",y2:"12.6608",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE996"}),e.createElement("stop",{offset:"0.158",stopColor:"#F8D55A"}),e.createElement("stop",{offset:"0.31",stopColor:"#F2C327"}),e.createElement("stop",{offset:"0.384",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"0.797",stopColor:"#F0A013"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint14_linear_14681_7916",x1:"13.4057",y1:"11.001",x2:"11.1991",y2:"14.799",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.491",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.664",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.779",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"0.852",stopColor:"#F0AA13"}),e.createElement("stop",{offset:"0.941",stopColor:"#F09B13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint15_linear_14681_7916",x1:"6.72255",y1:"16.5881",x2:"9.94239",y2:"15.6823",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.436",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.54",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.61",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint16_linear_14681_7916",x1:"13.9297",y1:"17.5815",x2:"9.43922",y2:"15.2273",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint17_linear_14681_7916",x1:"10.3747",y1:"9.50403",x2:"11.2379",y2:"16.9701",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint18_linear_14681_7916",x1:"8.84611",y1:"17.6495",x2:"8.85933",y2:"12.0445",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE996"}),e.createElement("stop",{offset:"0.507",stopColor:"#F0BC13"}),e.createElement("stop",{offset:"0.797",stopColor:"#F0A013"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("linearGradient",{id:"paint19_linear_14681_7916",x1:"7.97281",y1:"10.7849",x2:"8.56413",y2:"15.9019",gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#FFE16E"}),e.createElement("stop",{offset:"0.352",stopColor:"#FFD226"}),e.createElement("stop",{offset:"0.453",stopColor:"#FDCD23"}),e.createElement("stop",{offset:"0.579",stopColor:"#F6BD1B"}),e.createElement("stop",{offset:"0.663",stopColor:"#F0AF13"}),e.createElement("stop",{offset:"1",stopColor:"#F08D13"})),e.createElement("radialGradient",{id:"paint20_radial_14681_7916",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.499 15.1045) scale(6.30579)"},e.createElement("stop",{stopColor:"#FFE477",stopOpacity:"0"}),e.createElement("stop",{offset:"0.725",stopColor:"#FFE477",stopOpacity:"0"}),e.createElement("stop",{offset:"0.83",stopColor:"#FFEEAB"}),e.createElement("stop",{offset:"0.962",stopColor:"#FFE477",stopOpacity:"0"})),e.createElement("radialGradient",{id:"paint21_radial_14681_7916",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.1641 13.7837) scale(5.65413)"},e.createElement("stop",{stopColor:"#FFE477",stopOpacity:"0"}),e.createElement("stop",{offset:"0.725",stopColor:"#FFE477",stopOpacity:"0"}),e.createElement("stop",{offset:"0.83",stopColor:"#FFEEAB"}),e.createElement("stop",{offset:"0.962",stopColor:"#FFE477",stopOpacity:"0"})),e.createElement("radialGradient",{id:"paint22_radial_14681_7916",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.1641 13.7837) scale(5.65413)"},e.createElement("stop",{stopColor:"#FFE477",stopOpacity:"0"}),e.createElement("stop",{offset:"0.725",stopColor:"#FFE477",stopOpacity:"0"}),e.createElement("stop",{offset:"0.83",stopColor:"#FFEEAB"}),e.createElement("stop",{offset:"0.962",stopColor:"#FFE477",stopOpacity:"0"}))))};export{t as Medal};
@@ -1 +1 @@
1
- import{makeObservable as o,observable as i}from"mobx";import{WidgetPositionEnum as r,LoyaltyWidgetLayoutTypeEnum as e,WidgetIconTypeEnum as t,BadgeIconTypeEnum as p}from"../types/index.js";var d=function(d){var s;void 0===d&&(d={}),this.position=d.position||r.RIGHT,this.type=d.type||e.WIDGET,this.primaryColor=d.primaryColor||null,this.cartBorderRadius=null!==(s=d.cartBorderRadius)&&void 0!==s?s:0,this.widgetIconType=d.widgetIconType||t.NORMAL,this.badgeIconLevel=d.badgeIconLevel||p.LEVEL_1,o(this,{position:i,type:i,primaryColor:i,cartBorderRadius:i,widgetIconType:i,badgeIconLevel:i})};export{d as LoyaltyWidgetSettings};
1
+ import{makeObservable as o,observable as i}from"mobx";import{WidgetPositionEnum as r,LoyaltyWidgetLayoutTypeEnum as e,WidgetIconTypeEnum as t,BadgeIconTypeEnum as p}from"../types/index.js";var d=function(d){var s;void 0===d&&(d={}),this.position=d.position||r.RIGHT,this.type=d.type||e.DRAWER,this.primaryColor=d.primaryColor||null,this.cartBorderRadius=null!==(s=d.cartBorderRadius)&&void 0!==s?s:0,this.widgetIconType=d.widgetIconType||t.NORMAL,this.badgeIconLevel=d.badgeIconLevel||p.LEVEL_1,o(this,{position:i,type:i,primaryColor:i,cartBorderRadius:i,widgetIconType:i,badgeIconLevel:i})};export{d as LoyaltyWidgetSettings};
@@ -1 +1 @@
1
- import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import{WidgetIconTypeEnum as e}from"../../../models/loyalty-widget/types/index.js";import t,{css as r}from"styled-components";import{textSMMedium as i,textSM as o}from"../style/typography.js";var a,s,d,p,l,f,c,x,g,u,m,b=t.div(a||(a=n(["\n display: flex;\n padding: ",";\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n border-radius: ","px;\n border: 1px solid #eef2f6;\n background: #fff;\n opacity: ",";\n user-select: none;\n"],["\n display: flex;\n padding: ",";\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n border-radius: ","px;\n border: 1px solid #eef2f6;\n background: #fff;\n opacity: ",";\n user-select: none;\n"])),function(n){return n.$padding||"16px 14px"},function(n){return n.$borderRadius},function(n){return n.$isCompleted?"0.8":"1"}),y=t.div(s||(s=n(["\n display: flex;\n align-items: center;\n gap: 12px;\n align-self: stretch;\n width: 100%;\n"],["\n display: flex;\n align-items: center;\n gap: 12px;\n align-self: stretch;\n width: 100%;\n"]))),h=t.div(l||(l=n(["\n display: flex;\n width: 36px;\n height: 36px;\n\n justify-content: center;\n align-items: center;\n\n ","\n\n ","\n"],["\n display: flex;\n width: 36px;\n height: 36px;\n\n justify-content: center;\n align-items: center;\n\n ","\n\n ","\n"])),function(t){return t.$iconType===e.ILLUSTRATION&&r(d||(d=n(["\n border-radius: 40px;\n background: #f6f6f6;\n "],["\n border-radius: 40px;\n background: #f6f6f6;\n "])))},function(t){return t.$iconType===e.NORMAL&&r(p||(p=n(["\n border-radius: 8px;\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow: 0 -3px 1px 0 rgba(238, 242, 246, 0.5) inset,\n 0 4px 1px 0 rgba(38, 69, 109, 0), 0 2px 1px 0 rgba(38, 69, 109, 0.01),\n 0 1px 1px 0 rgba(38, 69, 109, 0.02), 0 1px 1px 0 rgba(38, 69, 109, 0.03);\n\n svg {\n color: #4b5565;\n }\n "],["\n border-radius: 8px;\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow: 0 -3px 1px 0 rgba(238, 242, 246, 0.5) inset,\n 0 4px 1px 0 rgba(38, 69, 109, 0), 0 2px 1px 0 rgba(38, 69, 109, 0.01),\n 0 1px 1px 0 rgba(38, 69, 109, 0.02), 0 1px 1px 0 rgba(38, 69, 109, 0.03);\n\n svg {\n color: #4b5565;\n }\n "])))}),w=t.div(f||(f=n(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n flex: 1 0 0;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n flex: 1 0 0;\n"]))),v=t.div(c||(c=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),i),$=t.div(x||(x=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),o),j=t.div(g||(g=n(["\n display: grid;\n grid-template-rows: ",";\n transition: grid-template-rows 300ms ease-in-out;\n width: 100%;\n"],["\n display: grid;\n grid-template-rows: ",";\n transition: grid-template-rows 300ms ease-in-out;\n width: 100%;\n"])),function(n){return n.$isOpen?"1fr":"0fr"}),k=t.div(u||(u=n(["\n overflow: hidden;\n color: #4b5565;\n ","\n\n /* Spacing: We need 20px from header. */\n padding-top: ",";\n\n /* Optional: fade content in/out */\n opacity: ",";\n transition: opacity 300ms ease-in-out, padding-top 300ms ease-in-out;\n"],["\n overflow: hidden;\n color: #4b5565;\n ","\n\n /* Spacing: We need 20px from header. */\n padding-top: ",";\n\n /* Optional: fade content in/out */\n opacity: ",";\n transition: opacity 300ms ease-in-out, padding-top 300ms ease-in-out;\n"])),o,function(n){return n.$isOpen?"20px":"0px"},function(n){return n.$isOpen?1:0}),O=t.button(m||(m=n(["\n border: none;\n background: none;\n cursor: pointer;\n transform: rotate(",");\n transition: transform 0.2s ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9aa4b2;\n padding: 4px;\n"],["\n border: none;\n background: none;\n cursor: pointer;\n transform: rotate(",");\n transition: transform 0.2s ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9aa4b2;\n padding: 4px;\n"])),function(n){return n.$isOpen?"270deg":"180deg"});export{k as AccordionInner,j as AccordionWrapper,O as ArrowButton,b as Container,w as Content,$ as Description,y as Header,h as IconWrapper,v as Title};
1
+ import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import{WidgetIconTypeEnum as e}from"../../../models/loyalty-widget/types/index.js";import r,{css as o}from"styled-components";import{textSMMedium as i,textSM as t}from"../style/typography.js";import{iconWrapperShape as a}from"../style/icon-wrapper.js";var s,p,d,l,f,c,x,g,u,m,b,y=r.div(s||(s=n(["\n display: flex;\n padding: ",";\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n border-radius: ","px;\n border: 1px solid #eef2f6;\n background: #fff;\n opacity: ",";\n user-select: none;\n"],["\n display: flex;\n padding: ",";\n flex-direction: column;\n align-items: flex-start;\n align-self: stretch;\n border-radius: ","px;\n border: 1px solid #eef2f6;\n background: #fff;\n opacity: ",";\n user-select: none;\n"])),function(n){return n.$padding||"16px 14px"},function(n){return n.$borderRadius},function(n){return n.$isCompleted?"0.8":"1"}),h=r.div(p||(p=n(["\n display: flex;\n align-items: center;\n gap: 12px;\n align-self: stretch;\n width: 100%;\n"],["\n display: flex;\n align-items: center;\n gap: 12px;\n align-self: stretch;\n width: 100%;\n"]))),w=r.div(f||(f=n(["\n ","\n\n ","\n\n ","\n"],["\n ","\n\n ","\n\n ","\n"])),a,function(r){return r.$iconType===e.ILLUSTRATION&&o(d||(d=n(["\n border-radius: 40px;\n background: #f6f6f6;\n "],["\n border-radius: 40px;\n background: #f6f6f6;\n "])))},function(r){return r.$iconType===e.NORMAL&&o(l||(l=n(["\n border-radius: 8px;\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow: 0 -3px 1px 0 rgba(238, 242, 246, 0.5) inset,\n 0 4px 1px 0 rgba(38, 69, 109, 0), 0 2px 1px 0 rgba(38, 69, 109, 0.01),\n 0 1px 1px 0 rgba(38, 69, 109, 0.02), 0 1px 1px 0 rgba(38, 69, 109, 0.03);\n\n svg {\n color: #4b5565;\n }\n "],["\n border-radius: 8px;\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow: 0 -3px 1px 0 rgba(238, 242, 246, 0.5) inset,\n 0 4px 1px 0 rgba(38, 69, 109, 0), 0 2px 1px 0 rgba(38, 69, 109, 0.01),\n 0 1px 1px 0 rgba(38, 69, 109, 0.02), 0 1px 1px 0 rgba(38, 69, 109, 0.03);\n\n svg {\n color: #4b5565;\n }\n "])))}),v=r.div(c||(c=n(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n flex: 1 0 0;\n"],["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 4px;\n flex: 1 0 0;\n"]))),$=r.div(x||(x=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),i),k=r.div(g||(g=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),t),O=r.div(u||(u=n(["\n display: grid;\n grid-template-rows: ",";\n transition: grid-template-rows 300ms ease-in-out;\n width: 100%;\n"],["\n display: grid;\n grid-template-rows: ",";\n transition: grid-template-rows 300ms ease-in-out;\n width: 100%;\n"])),function(n){return n.$isOpen?"1fr":"0fr"}),j=r.div(m||(m=n(["\n overflow: hidden;\n color: #4b5565;\n ","\n\n /* Spacing: We need 20px from header. */\n padding-top: ",";\n\n /* Optional: fade content in/out */\n opacity: ",";\n transition: opacity 300ms ease-in-out, padding-top 300ms ease-in-out;\n"],["\n overflow: hidden;\n color: #4b5565;\n ","\n\n /* Spacing: We need 20px from header. */\n padding-top: ",";\n\n /* Optional: fade content in/out */\n opacity: ",";\n transition: opacity 300ms ease-in-out, padding-top 300ms ease-in-out;\n"])),t,function(n){return n.$isOpen?"20px":"0px"},function(n){return n.$isOpen?1:0}),T=r.button(b||(b=n(["\n border: none;\n background: none;\n cursor: pointer;\n transform: rotate(",");\n transition: transform 0.2s ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9aa4b2;\n padding: 4px;\n"],["\n border: none;\n background: none;\n cursor: pointer;\n transform: rotate(",");\n transition: transform 0.2s ease-in-out;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #9aa4b2;\n padding: 4px;\n"])),function(n){return n.$isOpen?"270deg":"180deg"});export{j as AccordionInner,O as AccordionWrapper,T as ArrowButton,y as Container,v as Content,k as Description,h as Header,w as IconWrapper,$ as Title};
@@ -0,0 +1,4 @@
1
+ import { WidgetIconTypeEnum } from "models/loyalty-widget/types";
2
+ export declare const iconWrapperShape: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<{
3
+ $iconType: WidgetIconTypeEnum;
4
+ }, any>>;
@@ -0,0 +1 @@
1
+ import{__makeTemplateObject as n}from'./../../../ext/tslib/tslib.es6.mjs.js';import{css as e}from"styled-components";import{WidgetIconTypeEnum as t}from"../../../models/loyalty-widget/types/index.js";var i,r=e(i||(i=n(["\n display: flex;\n width: ",";\n height: ",";\n justify-content: center;\n align-items: center;\n border-radius: ",";\n"],["\n display: flex;\n width: ",";\n height: ",";\n justify-content: center;\n align-items: center;\n border-radius: ",";\n"])),function(n){return n.$iconType===t.ILLUSTRATION?"40px":"36px"},function(n){return n.$iconType===t.ILLUSTRATION?"40px":"36px"},function(n){return n.$iconType===t.ILLUSTRATION?"40px":"8px"});export{r as iconWrapperShape};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as t,__spreadArray as n}from'./../ext/tslib/tslib.es6.mjs.js';import r,{useState as o,useRef as i,useEffect as s}from"react";import{observer as c}from"mobx-react";import'./../ext/react-i18next/dist/es/context.js';import{I18nextProvider as a}from'./../ext/react-i18next/dist/es/I18nextProvider.js';import l from"./utils/i18n.js";import{LoyaltyWidgetScreenTypeEnum as d,EarningMethodTypeEnum as u,LoyaltyProgramFilterTypeEnum as f,LoyaltyProgramMethodSpendingTypeEnum as m}from"../models/types/index.js";import p from"./screens/main-screen/index.js";import y from"./screens/credit-spending-methods-screen/index.js";import E from"./screens/credit-earning-methods-screen/index.js";import g from"./screens/credit-history-screen/index.js";import h from"./screens/loyalty-level-screen/index.js";import{LoyaltyWidgetViewModel as v}from"../models/index.js";import{LoyaltyWidget as C}from"../models/loyalty-widget/index.js";import{LoyaltyProgramSpendingMethod as R}from"../models/loyalty-program-spending-method/index.js";import{LoyaltyCustomerInfo as b}from"../models/loyalty-customer-info/index.js";import{LoyaltyProgramEarningMethod as I}from"../models/loyalty-program-earning-method/index.js";import{LoyaltyProgramPointHistory as S}from"../models/loyalty-program-point-history/index.js";import{Container as _,Drawer as k,ScreenWrapper as A}from"./style.js";var N=c(function(c){var N,w=c.config,T=o(function(){var e=w||window.ikasLoyaltyWidgetConfig;return new v({cartId:(null==e?void 0:e.cartId)||null},(null==e?void 0:e.cdnURL)||"",(null==e?void 0:e.merchantId)||"",(null==e?void 0:e.currency)||"",(null==e?void 0:e.locale)||"",null==e?void 0:e.callbacks)})[0],M=i(!0);s(function(){e(void 0,void 0,void 0,function(){var e,r,o,i,s,c,a,l,d,p,y,E,g,h;return t(this,function(t){switch(t.label){case 0:if(!T.callbacks)return[3,6];t.label=1;case 1:return t.trys.push([1,4,5,6]),e=[T.callbacks.getLoyaltyWidget(),T.callbacks.listEarningMethods(),T.callbacks.listLoyaltyProgramTier({includeDeleted:!1})],T.cartId&&(e.push(T.callbacks.listSpendingMethodsByCartId(T.cartId)),e.push(T.callbacks.getLoyaltyCustomerInfo()),e.push(T.callbacks.listLoyaltyProgramPointHistory({}))),[4,Promise.all(e)];case 2:return r=t.sent(),o=r[0],i=r[1],s=r[2],c=[],a=null,l=[],T.cartId&&(c=r[3],a=r[4],l=r[5]),T.loyaltyWidget=o instanceof C?o:new C(o||{}),T.earningMethods=i.map(function(e){return new I(e)}),T.tiers=s||[],T.cartId&&(T.spendingMethods=c.map(function(e){return new R(e)}),T.user=a?new b(a):null,T.pointHistory=l?l.map(function(e){return new S(e)}):[]),d=new Set,p=new Set,y=new Set,E=new Set,T.earningMethods.forEach(function(e){var t,r;e.methodType===u.ORDER_CREATE&&n(n([],(null===(t=e.orderSettings)||void 0===t?void 0:t.productFilters)||[],!0),(null===(r=e.productSettings)||void 0===r?void 0:r.productFilters)||[],!0).forEach(function(e){e.type===f.PRODUCT_AND_VARIANT?e.idList.forEach(function(e){return d.add(e)}):e.type===f.CATEGORY?e.idList.forEach(function(e){return p.add(e)}):e.type===f.PRODUCT_BRAND?e.idList.forEach(function(e){return y.add(e)}):e.type===f.PRODUCT_TAG&&e.idList.forEach(function(e){return E.add(e)})})}),T.spendingMethods&&T.spendingMethods.forEach(function(e){var t,n;e.type===m.FREE_PRODUCT&&(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)&&d.add(e.discountSettings.freeProductId),null===(n=e.productFilters)||void 0===n||n.forEach(function(e){e.type===f.PRODUCT_AND_VARIANT?e.idList.forEach(function(e){return d.add(e)}):e.type===f.CATEGORY?e.idList.forEach(function(e){return p.add(e)}):e.type===f.PRODUCT_BRAND?e.idList.forEach(function(e){return y.add(e)}):e.type===f.PRODUCT_TAG&&e.idList.forEach(function(e){return E.add(e)})})}),g=[],d.size>0&&T.callbacks.getProducts&&g.push(T.callbacks.getProducts(Array.from(d)).then(function(e){return T.products=e})),p.size>0&&T.callbacks.getCategories&&g.push(T.callbacks.getCategories(Array.from(p)).then(function(e){return T.categories=e})),y.size>0&&T.callbacks.getBrands&&g.push(T.callbacks.getBrands(Array.from(y)).then(function(e){return T.brands=e})),E.size>0&&T.callbacks.getTags&&g.push(T.callbacks.getTags(Array.from(E)).then(function(e){return T.tags=e})),[4,Promise.all(g)];case 3:return t.sent(),[3,6];case 4:return h=t.sent(),console.error("Failed to initialize loyalty data",h),[3,6];case 5:return M.current=!1,[7];case 6:return[2]}})})},[]),s(function(){if(!M.current){e(void 0,void 0,void 0,function(){var e,n,r,o,i;return t(this,function(t){switch(t.label){case 0:if(!T.callbacks)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Promise.all([T.callbacks.listSpendingMethodsByCartId(T.cartId),T.callbacks.getLoyaltyCustomerInfo(),T.callbacks.listLoyaltyProgramPointHistory({})])];case 2:return e=t.sent(),n=e[0],r=e[1],o=e[2],T.spendingMethods=n.map(function(e){return new R(e)}),T.user=r?new b(r):null,T.pointHistory=o?o.map(function(e){return new S(e)}):[],[3,4];case 3:return i=t.sent(),console.error("Failed to fetch cart dependent data",i),[3,4];case 4:return[2]}})})}},[T.cartId]);var L=function(e){T.selectedScreen=e},P=function(){var e;(null===(e=T.callbacks)||void 0===e?void 0:e.onWidgetClose)&&T.callbacks.onWidgetClose()},x=T.selectedScreen===d.MAIN_SCREEN,D=o(null),j=D[0],O=D[1];s(function(){T.selectedScreen!==d.MAIN_SCREEN&&O(T.selectedScreen)},[T.selectedScreen]);var B=x?j:T.selectedScreen;return r.createElement(a,{i18n:l},r.createElement(_,{$position:(null==w?void 0:w.position)||(null===(N=window.ikasLoyaltyWidgetConfig)||void 0===N?void 0:N.position)||"fixed"},r.createElement(k,null,r.createElement(A,{$isActive:x,$isMain:!0},r.createElement(p,{viewModel:T,onClose:P,onNavigate:L})),r.createElement(A,{$isActive:!x,$isMain:!1},function(){switch(B){case d.CREDIT_SPENDING_METHODS_SCREEN:return r.createElement(y,{viewModel:T,onBack:function(){return L(d.MAIN_SCREEN)},onClose:P});case d.CREDIT_EARNING_METHODS_SCREEN:return r.createElement(E,{viewModel:T,onBack:function(){return L(d.MAIN_SCREEN)},onClose:P});case d.CREDIT_HISTORY_SCREEN:return r.createElement(g,{viewModel:T,onBack:function(){return L(d.MAIN_SCREEN)},onClose:P});case d.LOYALTY_LEVEL_SCREEN:return r.createElement(h,{viewModel:T,onBack:function(){return L(d.MAIN_SCREEN)},onClose:P});default:return null}}()))))});export{N as default};
1
+ import{__awaiter as e,__generator as t,__spreadArray as n}from'./../ext/tslib/tslib.es6.mjs.js';import r,{useState as o,useRef as i,useEffect as s}from"react";import{observer as a}from"mobx-react";import'./../ext/react-i18next/dist/es/context.js';import{I18nextProvider as c}from'./../ext/react-i18next/dist/es/I18nextProvider.js';import l from"./utils/i18n.js";import{LoyaltyWidgetScreenTypeEnum as d,EarningMethodTypeEnum as u,LoyaltyProgramFilterTypeEnum as m,LoyaltyProgramMethodSpendingTypeEnum as f}from"../models/types/index.js";import{WidgetPositionEnum as p,LoyaltyWidgetLayoutTypeEnum as y}from"../models/loyalty-widget/types/index.js";import E from"./screens/main-screen/index.js";import g from"./screens/credit-spending-methods-screen/index.js";import h from"./screens/credit-earning-methods-screen/index.js";import v from"./screens/credit-history-screen/index.js";import C from"./screens/loyalty-level-screen/index.js";import{LoyaltyWidgetViewModel as R}from"../models/index.js";import{LoyaltyWidget as I}from"../models/loyalty-widget/index.js";import{LoyaltyProgramSpendingMethod as b}from"../models/loyalty-program-spending-method/index.js";import{LoyaltyCustomerInfo as S}from"../models/loyalty-customer-info/index.js";import{LoyaltyProgramEarningMethod as _}from"../models/loyalty-program-earning-method/index.js";import{LoyaltyProgramPointHistory as k}from"../models/loyalty-program-point-history/index.js";import{Container as w,Panel as A,ScreenWrapper as T}from"./style.js";var N=a(function(a){var N,M=a.config,P=o(function(){var e=M||window.ikasLoyaltyWidgetConfig;return new R({cartId:(null==e?void 0:e.cartId)||null},(null==e?void 0:e.cdnURL)||"",(null==e?void 0:e.merchantId)||"",(null==e?void 0:e.currency)||"",(null==e?void 0:e.locale)||"",null==e?void 0:e.callbacks)})[0],L=i(!0);s(function(){e(void 0,void 0,void 0,function(){var e,r,o,i,s,a,c,l,d,p,y,E,g,h;return t(this,function(t){switch(t.label){case 0:if(!P.callbacks)return[3,6];t.label=1;case 1:return t.trys.push([1,4,5,6]),e=[P.callbacks.getLoyaltyWidget(),P.callbacks.listEarningMethods(),P.callbacks.listLoyaltyProgramTier({includeDeleted:!1})],P.cartId&&(e.push(P.callbacks.listSpendingMethodsByCartId(P.cartId)),e.push(P.callbacks.getLoyaltyCustomerInfo()),e.push(P.callbacks.listLoyaltyProgramPointHistory({}))),[4,Promise.all(e)];case 2:return r=t.sent(),o=r[0],i=r[1],s=r[2],a=[],c=null,l=[],P.cartId&&(a=r[3],c=r[4],l=r[5]),P.loyaltyWidget=o instanceof I?o:new I(o||{}),P.earningMethods=i.map(function(e){return new _(e)}),P.tiers=s||[],P.cartId&&(P.spendingMethods=a.map(function(e){return new b(e)}),P.user=c?new S(c):null,P.pointHistory=l?l.map(function(e){return new k(e)}):[]),d=new Set,p=new Set,y=new Set,E=new Set,P.earningMethods.forEach(function(e){var t,r;e.methodType===u.ORDER_CREATE&&n(n([],(null===(t=e.orderSettings)||void 0===t?void 0:t.productFilters)||[],!0),(null===(r=e.productSettings)||void 0===r?void 0:r.productFilters)||[],!0).forEach(function(e){e.type===m.PRODUCT_AND_VARIANT?e.idList.forEach(function(e){return d.add(e)}):e.type===m.CATEGORY?e.idList.forEach(function(e){return p.add(e)}):e.type===m.PRODUCT_BRAND?e.idList.forEach(function(e){return y.add(e)}):e.type===m.PRODUCT_TAG&&e.idList.forEach(function(e){return E.add(e)})})}),P.spendingMethods&&P.spendingMethods.forEach(function(e){var t,n;e.type===f.FREE_PRODUCT&&(null===(t=e.discountSettings)||void 0===t?void 0:t.freeProductId)&&d.add(e.discountSettings.freeProductId),null===(n=e.productFilters)||void 0===n||n.forEach(function(e){e.type===m.PRODUCT_AND_VARIANT?e.idList.forEach(function(e){return d.add(e)}):e.type===m.CATEGORY?e.idList.forEach(function(e){return p.add(e)}):e.type===m.PRODUCT_BRAND?e.idList.forEach(function(e){return y.add(e)}):e.type===m.PRODUCT_TAG&&e.idList.forEach(function(e){return E.add(e)})})}),g=[],d.size>0&&P.callbacks.getProducts&&g.push(P.callbacks.getProducts(Array.from(d)).then(function(e){return P.products=e})),p.size>0&&P.callbacks.getCategories&&g.push(P.callbacks.getCategories(Array.from(p)).then(function(e){return P.categories=e})),y.size>0&&P.callbacks.getBrands&&g.push(P.callbacks.getBrands(Array.from(y)).then(function(e){return P.brands=e})),E.size>0&&P.callbacks.getTags&&g.push(P.callbacks.getTags(Array.from(E)).then(function(e){return P.tags=e})),[4,Promise.all(g)];case 3:return t.sent(),[3,6];case 4:return h=t.sent(),console.error("Failed to initialize loyalty data",h),[3,6];case 5:return L.current=!1,[7];case 6:return[2]}})})},[]),s(function(){if(!L.current){e(void 0,void 0,void 0,function(){var e,n,r,o,i;return t(this,function(t){switch(t.label){case 0:if(!P.callbacks)return[3,4];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Promise.all([P.callbacks.listSpendingMethodsByCartId(P.cartId),P.callbacks.getLoyaltyCustomerInfo(),P.callbacks.listLoyaltyProgramPointHistory({})])];case 2:return e=t.sent(),n=e[0],r=e[1],o=e[2],P.spendingMethods=n.map(function(e){return new b(e)}),P.user=r?new S(r):null,P.pointHistory=o?o.map(function(e){return new k(e)}):[],[3,4];case 3:return i=t.sent(),console.error("Failed to fetch cart dependent data",i),[3,4];case 4:return[2]}})})}},[P.cartId]);var x=function(e){P.selectedScreen=e},D=function(){var e;(null===(e=P.callbacks)||void 0===e?void 0:e.onWidgetClose)&&P.callbacks.onWidgetClose()},j=P.selectedScreen===d.MAIN_SCREEN,O=o(null),B=O[0],W=O[1];s(function(){P.selectedScreen!==d.MAIN_SCREEN&&W(P.selectedScreen)},[P.selectedScreen]);var H=j?B:P.selectedScreen,U=P.loyaltyWidget.settings.position||p.RIGHT,$=P.loyaltyWidget.settings.type||y.DRAWER;return r.createElement(c,{i18n:l},r.createElement(w,{$layoutType:$,$widgetPosition:U,$position:(null==M?void 0:M.position)||(null===(N=window.ikasLoyaltyWidgetConfig)||void 0===N?void 0:N.position)||"fixed"},r.createElement(A,{$layoutType:$},r.createElement(T,{$isActive:j,$isMain:!0},r.createElement(E,{viewModel:P,onClose:D,onNavigate:x})),r.createElement(T,{$isActive:!j,$isMain:!1},function(){switch(H){case d.CREDIT_SPENDING_METHODS_SCREEN:return r.createElement(g,{viewModel:P,onBack:function(){return x(d.MAIN_SCREEN)},onClose:D});case d.CREDIT_EARNING_METHODS_SCREEN:return r.createElement(h,{viewModel:P,onBack:function(){return x(d.MAIN_SCREEN)},onClose:D});case d.CREDIT_HISTORY_SCREEN:return r.createElement(v,{viewModel:P,onBack:function(){return x(d.MAIN_SCREEN)},onClose:D});case d.LOYALTY_LEVEL_SCREEN:return r.createElement(C,{viewModel:P,onBack:function(){return x(d.MAIN_SCREEN)},onClose:D});default:return null}}()))))});export{N as default};
@@ -1 +1 @@
1
- import e from"react";import'./../../../../ext/react-i18next/dist/es/context.js';import{useTranslation as t}from'./../../../../ext/react-i18next/dist/es/useTranslation.js';import{observer as n}from"mobx-react";import{LoyaltyWidgetScreenTypeEnum as l}from"../../../../models/types/index.js";import{Container as r,GridContainer as o,SmallCard as m,SmallCardIconWrapper as a,SmallCardBottom as c,Title as i,ArrowWrapper as u,RowCard as E}from"./style.js";import{CouponPercent as s}from"../../../../assets/widget-icons/normal/couponPercent.js";import{MoneyAdd01 as d}from"../../../../assets/widget-icons/normal/moneyAdd01.js";var _=function(){return e.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"}))},f=n(function(n){var f=n.viewModel,p=n.onNavigate,C=t().t,v=!!f.user;return e.createElement(r,null,e.createElement(o,null,e.createElement(m,{onClick:function(){return null==p?void 0:p(l.CREDIT_EARNING_METHODS_SCREEN)}},e.createElement(a,null,e.createElement(d,null)),e.createElement(c,null,e.createElement(i,null,C("main_screen.earnPoints")),e.createElement(u,null,e.createElement(_,null)))),e.createElement(m,{onClick:function(){return null==p?void 0:p(l.CREDIT_SPENDING_METHODS_SCREEN)}},e.createElement(a,null,e.createElement(s,null)),e.createElement(c,null,e.createElement(i,null,C("main_screen.allRewards")),e.createElement(u,null,e.createElement(_,null))))),v&&e.createElement(e.Fragment,null,e.createElement(E,{onClick:function(){return null==p?void 0:p(l.LOYALTY_LEVEL_SCREEN)}},e.createElement(i,null,C("main_screen.tiers")),e.createElement(u,null,e.createElement(_,null))),e.createElement(E,{onClick:function(){return null==p?void 0:p(l.CREDIT_HISTORY_SCREEN)}},e.createElement(i,null,C("main_screen.pointHistory")),e.createElement(u,null,e.createElement(_,null)))))});export{f as default};
1
+ import e from"react";import'./../../../../ext/react-i18next/dist/es/context.js';import{useTranslation as t}from'./../../../../ext/react-i18next/dist/es/useTranslation.js';import{observer as n}from"mobx-react";import{LoyaltyWidgetScreenTypeEnum as l}from"../../../../models/types/index.js";import{WidgetIconTypeEnum as r}from"../../../../models/loyalty-widget/types/index.js";import{Container as o,GridContainer as i,SmallCard as E,SmallCardIconWrapper as a,SmallCardBottom as m,Title as c,ArrowWrapper as u,RowCard as s}from"./style.js";import{getScreenIcon as d}from"../../../../utils.js";var _=function(){return e.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"}))},T=n(function(n){var T=n.viewModel,p=n.onNavigate,C=t().t,N=!!T.user,R=T.loyaltyWidget.settings.widgetIconType;return e.createElement(o,null,e.createElement(i,null,e.createElement(E,{onClick:function(){return null==p?void 0:p(l.CREDIT_EARNING_METHODS_SCREEN)}},e.createElement(a,{$hasBgColor:R===r.ILLUSTRATION,$iconType:R},d(l.CREDIT_EARNING_METHODS_SCREEN,R)),e.createElement(m,null,e.createElement(c,null,C("main_screen.earnPoints")),e.createElement(u,null,e.createElement(_,null)))),e.createElement(E,{onClick:function(){return null==p?void 0:p(l.CREDIT_SPENDING_METHODS_SCREEN)}},e.createElement(a,{$hasBgColor:R===r.ILLUSTRATION,$iconType:R},d(l.CREDIT_SPENDING_METHODS_SCREEN,R)),e.createElement(m,null,e.createElement(c,null,C("main_screen.allRewards")),e.createElement(u,null,e.createElement(_,null))))),N&&e.createElement(e.Fragment,null,e.createElement(s,{onClick:function(){return null==p?void 0:p(l.LOYALTY_LEVEL_SCREEN)}},e.createElement(c,null,C("main_screen.tiers")),e.createElement(u,null,e.createElement(_,null))),e.createElement(s,{onClick:function(){return null==p?void 0:p(l.CREDIT_HISTORY_SCREEN)}},e.createElement(c,null,C("main_screen.pointHistory")),e.createElement(u,null,e.createElement(_,null)))))});export{T as default};
@@ -1,7 +1,11 @@
1
+ import { WidgetIconTypeEnum } from "models/loyalty-widget/types";
1
2
  export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
2
3
  export declare const GridContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
3
4
  export declare const SmallCard: import("styled-components").StyledComponent<"button", any, {}, never>;
4
- export declare const SmallCardIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
+ export declare const SmallCardIconWrapper: import("styled-components").StyledComponent<"div", any, {
6
+ $hasBgColor: boolean;
7
+ $iconType: WidgetIconTypeEnum;
8
+ }, never>;
5
9
  export declare const SmallCardBottom: import("styled-components").StyledComponent<"div", any, {}, never>;
6
10
  export declare const Title: import("styled-components").StyledComponent<"span", any, {}, never>;
7
11
  export declare const RowCard: import("styled-components").StyledComponent<"button", any, {}, never>;
@@ -1 +1 @@
1
- import{__makeTemplateObject as n}from'./../../../../ext/tslib/tslib.es6.mjs.js';import e from"styled-components";import{textSMMedium as i}from"../../../components/style/typography.js";var r,t,o,p,d,a,f,s,l=e.div(r||(r=n(["\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0 24px;\n"],["\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0 24px;\n"]))),x=e.div(t||(t=n(["\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 12px;\n"],["\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 12px;\n"]))),c=e.button(o||(o=n(["\n display: flex;\n flex-direction: column;\n padding: 12px;\n padding-left: 14px;\n gap: 12px;\n position: relative;\n border-radius: 12px;\n border: 1px solid #eef2f6;\n background: #fff;\n cursor: pointer;\n width: 100%;\n align-items: flex-start;\n\n &:hover {\n background: #f8fafc;\n }\n"],["\n display: flex;\n flex-direction: column;\n padding: 12px;\n padding-left: 14px;\n gap: 12px;\n position: relative;\n border-radius: 12px;\n border: 1px solid #eef2f6;\n background: #fff;\n cursor: pointer;\n width: 100%;\n align-items: flex-start;\n\n &:hover {\n background: #f8fafc;\n }\n"]))),g=e.div(p||(p=n(["\n display: flex;\n width: 36px;\n height: 36px;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n color: #4b5565;\n"],["\n display: flex;\n width: 36px;\n height: 36px;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n color: #4b5565;\n"]))),u=e.div(d||(d=n(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n"]))),b=e.span(a||(a=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),i),m=e.button(f||(f=n(["\n display: flex;\n padding: 12px 12px 12px 16px;\n justify-content: space-between;\n align-items: center;\n border-radius: 12px;\n border: 1px solid #eef2f6;\n background: #fff;\n cursor: pointer;\n width: 100%;\n\n &:hover {\n background: #f8fafc;\n }\n"],["\n display: flex;\n padding: 12px 12px 12px 16px;\n justify-content: space-between;\n align-items: center;\n border-radius: 12px;\n border: 1px solid #eef2f6;\n background: #fff;\n cursor: pointer;\n width: 100%;\n\n &:hover {\n background: #f8fafc;\n }\n"]))),y=e.div(s||(s=n(["\n display: flex;\n justify-content: center;\n align-items: center;\n color: #9AA4B2;\n"],["\n display: flex;\n justify-content: center;\n align-items: center;\n color: #9AA4B2;\n"])));export{y as ArrowWrapper,l as Container,x as GridContainer,m as RowCard,c as SmallCard,u as SmallCardBottom,g as SmallCardIconWrapper,b as Title};
1
+ import{__makeTemplateObject as n}from'./../../../../ext/tslib/tslib.es6.mjs.js';import e,{css as o}from"styled-components";import{textSMMedium as r}from"../../../components/style/typography.js";import{iconWrapperShape as i}from"../../../components/style/icon-wrapper.js";var p,d,t,a,f,s,l,c,x,g=e.div(p||(p=n(["\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0 24px;\n"],["\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 0 24px;\n"]))),b=e.div(d||(d=n(["\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 12px;\n"],["\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 12px;\n"]))),u=e.button(t||(t=n(["\n display: flex;\n flex-direction: column;\n padding: 12px;\n padding-left: 14px;\n gap: 12px;\n position: relative;\n border-radius: 12px;\n border: 1px solid #eef2f6;\n background: #fff;\n cursor: pointer;\n width: 100%;\n align-items: flex-start;\n\n &:hover {\n background: #f8fafc;\n }\n"],["\n display: flex;\n flex-direction: column;\n padding: 12px;\n padding-left: 14px;\n gap: 12px;\n position: relative;\n border-radius: 12px;\n border: 1px solid #eef2f6;\n background: #fff;\n cursor: pointer;\n width: 100%;\n align-items: flex-start;\n\n &:hover {\n background: #f8fafc;\n }\n"]))),m=e.div(f||(f=n(["\n ","\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n color: #4b5565;\n\n ","\n"],["\n ","\n border: 1px solid #e3e8ef;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n color: #4b5565;\n\n ","\n"])),i,function(e){return e.$hasBgColor&&o(a||(a=n(["\n padding: 10px;\n background: #f6f6f6;\n border: none;\n "],["\n padding: 10px;\n background: #f6f6f6;\n border: none;\n "])))}),y=e.div(s||(s=n(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n"]))),h=e.span(l||(l=n(["\n color: #121926;\n ","\n"],["\n color: #121926;\n ","\n"])),r),w=e.button(c||(c=n(["\n display: flex;\n padding: 12px 12px 12px 16px;\n justify-content: space-between;\n align-items: center;\n border-radius: 12px;\n border: 1px solid #eef2f6;\n background: #fff;\n cursor: pointer;\n width: 100%;\n\n &:hover {\n background: #f8fafc;\n }\n"],["\n display: flex;\n padding: 12px 12px 12px 16px;\n justify-content: space-between;\n align-items: center;\n border-radius: 12px;\n border: 1px solid #eef2f6;\n background: #fff;\n cursor: pointer;\n width: 100%;\n\n &:hover {\n background: #f8fafc;\n }\n"]))),k=e.div(x||(x=n(["\n display: flex;\n justify-content: center;\n align-items: center;\n color: #9aa4b2;\n"],["\n display: flex;\n justify-content: center;\n align-items: center;\n color: #9aa4b2;\n"])));export{k as ArrowWrapper,g as Container,b as GridContainer,w as RowCard,u as SmallCard,y as SmallCardBottom,m as SmallCardIconWrapper,h as Title};
@@ -1,7 +1,12 @@
1
+ import { LoyaltyWidgetLayoutTypeEnum, WidgetPositionEnum } from "models/loyalty-widget/types";
1
2
  export declare const Container: import("styled-components").StyledComponent<"div", any, {
2
3
  $position?: "fixed" | "absolute";
4
+ $layoutType: LoyaltyWidgetLayoutTypeEnum;
5
+ $widgetPosition: WidgetPositionEnum;
6
+ }, never>;
7
+ export declare const Panel: import("styled-components").StyledComponent<"div", any, {
8
+ $layoutType: LoyaltyWidgetLayoutTypeEnum;
3
9
  }, never>;
4
- export declare const Drawer: import("styled-components").StyledComponent<"div", any, {}, never>;
5
10
  export declare const ScreenWrapper: import("styled-components").StyledComponent<"div", any, {
6
11
  $isActive: boolean;
7
12
  $isMain: boolean;
@@ -1 +1 @@
1
- import{__makeTemplateObject as n}from'./../ext/tslib/tslib.es6.mjs.js';import o,{css as t}from"styled-components";var i,r,e,f,a,s=o.div(i||(i=n(["\n position: ",";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n"],["\n position: ",";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n"])),function(n){return n.$position||"fixed"}),d=o.div(r||(r=n(["\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n background-color: #ffffff;\n \n overflow-x: hidden;\n box-shadow: -2px 0 8px rgba(36, 30, 30, 0.15);\n\n width: 100%;\n @media (min-width: 381px) {\n width: 380px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n background-color: #ffffff;\n \n overflow-x: hidden;\n box-shadow: -2px 0 8px rgba(36, 30, 30, 0.15);\n\n width: 100%;\n @media (min-width: 381px) {\n width: 380px;\n }\n"]))),h=o.div(a||(a=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n transition: transform 0.3s ease-in-out;\n overflow-y: auto;\n\n ","\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n transition: transform 0.3s ease-in-out;\n overflow-y: auto;\n\n ","\n"])),function(o){var i=o.$isActive;return o.$isMain?t(e||(e=n(["\n transform: translateX(",");\n z-index: 1;\n "],["\n transform: translateX(",");\n z-index: 1;\n "])),i?"0%":"-100%"):t(f||(f=n(["\n transform: translateX(",");\n z-index: 2;\n "],["\n transform: translateX(",");\n z-index: 2;\n "])),i?"0%":"100%")});export{s as Container,d as Drawer,h as ScreenWrapper};
1
+ import{__makeTemplateObject as n}from'./../ext/tslib/tslib.es6.mjs.js';import t,{css as i}from"styled-components";import{WidgetPositionEnum as o,LoyaltyWidgetLayoutTypeEnum as a}from"../models/loyalty-widget/types/index.js";var r,e,x,p,d,s,f,l=t.div(r||(r=n(["\n position: ",";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: ",";\n max-height: ",";\n overflow: auto;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n\n display: flex;\n justify-content: ",";\n align-items: ",";\n padding: ",";\n box-sizing: border-box;\n\n @media (max-width: 600px) {\n padding: ",";\n }\n"],["\n position: ",";\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: ",";\n max-height: ",";\n overflow: auto;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: 9999;\n\n display: flex;\n justify-content: ",";\n align-items: ",";\n padding: ",";\n box-sizing: border-box;\n\n @media (max-width: 600px) {\n padding: ",";\n }\n"])),function(n){return n.$position||"fixed"},function(n){return"absolute"===n.$position?"100%":"100vh"},function(n){return"absolute"===n.$position?"100%":"100vh"},function(n){return n.$widgetPosition===o.LEFT?"flex-start":"flex-end"},function(n){return n.$layoutType===a.DRAWER?"stretch":"flex-start"},function(n){return n.$layoutType===a.DRAWER?"0":"40px 16px"},function(n){return n.$layoutType===a.DRAWER?"0":"24px"}),h=t.div(p||(p=n(["\n position: relative;\n display: block;\n width: 100%;\n max-width: 380px;\n height: 100%;\n background-color: #ffffff;\n overflow: hidden;\n align-self: ",";\n\n ","\n\n @media (max-width: 380px) {\n max-width: 100%;\n }\n"],["\n position: relative;\n display: block;\n width: 100%;\n max-width: 380px;\n height: 100%;\n background-color: #ffffff;\n overflow: hidden;\n align-self: ",";\n\n ","\n\n @media (max-width: 380px) {\n max-width: 100%;\n }\n"])),function(n){return n.$layoutType===a.DRAWER?"stretch":"flex-start"},function(t){return t.$layoutType===a.DRAWER?i(e||(e=n(["\n border-radius: 0;\n box-shadow: -2px 0 8px rgba(36, 30, 30, 0.15);\n "],["\n border-radius: 0;\n box-shadow: -2px 0 8px rgba(36, 30, 30, 0.15);\n "]))):i(x||(x=n(["\n border-radius: 12px;\n box-shadow: 0 136px 38px 0 rgba(0, 0, 0, 0),\n 0 87px 35px 0 rgba(0, 0, 0, 0.01),\n 0 49px 29px 0 rgba(0, 0, 0, 0.02),\n 0 22px 22px 0 rgba(0, 0, 0, 0.04),\n 0 5px 12px 0 rgba(0, 0, 0, 0.04);\n max-height: min(850px, calc(100vh - 80px));\n\n @media (max-width: 600px) {\n max-height: min(850px, calc(100vh - 48px));\n }\n "],["\n border-radius: 12px;\n box-shadow: 0 136px 38px 0 rgba(0, 0, 0, 0),\n 0 87px 35px 0 rgba(0, 0, 0, 0.01),\n 0 49px 29px 0 rgba(0, 0, 0, 0.02),\n 0 22px 22px 0 rgba(0, 0, 0, 0.04),\n 0 5px 12px 0 rgba(0, 0, 0, 0.04);\n max-height: min(850px, calc(100vh - 80px));\n\n @media (max-width: 600px) {\n max-height: min(850px, calc(100vh - 48px));\n }\n "])))}),u=t.div(f||(f=n(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n transition: transform 0.3s ease-in-out;\n overflow-y: auto;\n\n ","\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #ffffff;\n transition: transform 0.3s ease-in-out;\n overflow-y: auto;\n\n ","\n"])),function(t){var o=t.$isActive;return t.$isMain?i(d||(d=n(["\n transform: translateX(",");\n z-index: 1;\n "],["\n transform: translateX(",");\n z-index: 1;\n "])),o?"0%":"-100%"):i(s||(s=n(["\n transform: translateX(",");\n z-index: 2;\n "],["\n transform: translateX(",");\n z-index: 2;\n "])),o?"0%":"100%")});export{l as Container,h as Panel,u as ScreenWrapper};
package/build/utils.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
- import { EarningMethodTypeEnum, LoyaltyProgramMethodSpendingTypeEnum } from "models/types";
2
+ import { EarningMethodTypeEnum, LoyaltyProgramMethodSpendingTypeEnum, LoyaltyWidgetScreenTypeEnum } from "models/types";
3
3
  import { WidgetIconTypeEnum } from "models/loyalty-widget/types";
4
4
  import { LoyaltyProgramEarningMethod } from "models/loyalty-program-earning-method";
5
5
  import { LoyaltyProgramSpendingMethod } from "models/loyalty-program-spending-method";
6
+ export declare const getScreenIcon: (screenType: LoyaltyWidgetScreenTypeEnum, widgetIconType: WidgetIconTypeEnum) => React.JSX.Element;
6
7
  export declare const getEarningMethodIcon: (earningMethod: EarningMethodTypeEnum, widgetIconType: WidgetIconTypeEnum) => React.JSX.Element;
7
8
  export declare const getEarningMethodTitle: (earningMethod: LoyaltyProgramEarningMethod) => string;
8
9
  export declare const getSpendingMethodIcon: (spendingMethod: LoyaltyProgramMethodSpendingTypeEnum, widgetIconType: WidgetIconTypeEnum) => React.JSX.Element | null;
package/build/utils.js CHANGED
@@ -1 +1 @@
1
- import{__makeTemplateObject as e}from'./ext/tslib/tslib.es6.mjs.js';import t from"react";import{EarningMethodTypeEnum as n,LoyaltyProgramPointEarningTypeEnum as s,LoyaltyProgramMethodSpendingTypeEnum as r}from"./models/types/index.js";import{BubbleChatDone as i}from"./assets/widget-icons/normal/bubbleChatDone.js";import{CommentAdd01 as o}from"./assets/widget-icons/normal/commentAdd01.js";import{CouponPercent as l}from"./assets/widget-icons/normal/couponPercent.js";import{DiscountTag02 as a}from"./assets/widget-icons/normal/discountTag02.js";import{Gift as E}from"./assets/widget-icons/normal/gift.js";import{PackageDelivered as c}from"./assets/widget-icons/normal/packageDelivered.js";import{SaveMoneyDollar as d}from"./assets/widget-icons/normal/saveMoneyDollar.js";import{ShoppingBasketAdd02 as m}from"./assets/widget-icons/normal/shoppingBasketAdd02.js";import{UserAdd01 as u}from"./assets/widget-icons/normal/userAdd01.js";import{UsersIllustration as p}from"./assets/widget-icons/illustraions/usersIllustration.js";import{BubbleChatIllustration as R}from"./assets/widget-icons/illustraions/bubbleChatIllustration.js";import{ApprovedChatIllustration as T}from"./assets/widget-icons/illustraions/approvedChatIllustration.js";import{TshirtIllustration as g}from"./assets/widget-icons/illustraions/tshirtIllustration.js";import{GiftIllustration as f}from"./assets/widget-icons/illustraions/giftIllustration.js";import{ShippingBox as I}from"./assets/widget-icons/illustraions/shippingBox.js";import{ShoppingCartIllustration as O}from"./assets/widget-icons/illustraions/shoppingCartIllustration.js";import{WidgetIconTypeEnum as _}from"./models/loyalty-widget/types/index.js";import S from'./ext/i18next/dist/esm/i18next.js';import{BankCoin as M}from"./assets/widget-icons/illustraions/bankCoin.js";import'./ext/react-i18next/dist/es/context.js';import{useTranslation as C}from'./ext/react-i18next/dist/es/useTranslation.js';import{textSM as U}from"./renderer/components/style/typography.js";import N from"styled-components";var A,j,x,P,h,D,y=((A={})[_.ILLUSTRATION]=((j={})[n.CUSTOMER_REGISTER]=t.createElement(p,null),j[n.ENABLE_SUBSCRIPTION]=t.createElement(T,null),j[n.BUY_PRODUCT]=t.createElement(g,null),j[n.CUSTOMER_REVIEW]=t.createElement(R,null),j[n.CUSTOMER_SEGMENT]=t.createElement(l,null),j[n.ORDER_CREATE]=t.createElement(O,null),j),A[_.NORMAL]=((x={})[n.CUSTOMER_REGISTER]=t.createElement(u,null),x[n.ENABLE_SUBSCRIPTION]=t.createElement(i,null),x[n.BUY_PRODUCT]=t.createElement(d,null),x[n.CUSTOMER_REVIEW]=t.createElement(o,null),x[n.CUSTOMER_SEGMENT]=t.createElement(l,null),x[n.ORDER_CREATE]=t.createElement(m,null),x),A),w=function(e,t){return y[t][e]},b=function(e){var t=C().t;switch(e.methodType){case n.CUSTOMER_REGISTER:return t("earningMethods.CUSTOMER_REGISTER.title");case n.ENABLE_SUBSCRIPTION:return t("earningMethods.ENABLE_SUBSCRIPTION.title");case n.CUSTOMER_REVIEW:return t("earningMethods.CUSTOMER_REVIEW.title");case n.ORDER_CREATE:if(e.pointEarningType===s.DYNAMIC_ORDER_AMOUNT)return t("earningMethods.ORDER_CREATE.RECEIVE_POINTS_ON_SPEND.title");if(e.pointEarningType===s.STATIC)return t("earningMethods.ORDER_CREATE.BASE.title");case n.BUY_PRODUCT:return t("earningMethods.BUY_PRODUCT.title");case n.CUSTOMER_SEGMENT:return t("earningMethods.CUSTOMER_SEGMENT.title");default:return""}},v=function(e,n){var s,i,o;return n===_.NONE?null:((s={})[_.ILLUSTRATION]=((i={})[r.FIXED_AMOUNT]=t.createElement(M,null),i[r.RATIO]=t.createElement(M,null),i[r.FREE_PRODUCT]=t.createElement(f,null),i[r.FREE_SHIPPING]=t.createElement(I,null),i),s[_.NORMAL]=((o={})[r.FIXED_AMOUNT]=t.createElement(a,null),o[r.RATIO]=t.createElement(a,null),o[r.FREE_PRODUCT]=t.createElement(E,null),o[r.FREE_SHIPPING]=t.createElement(c,null),o),s)[n][e]},B=function(e){var t=C().t,n=S.language,s=e.translations.find(function(e){return e.locale===n});if(null==s?void 0:s.description)return s.description;if(e.description)return e.description;switch(e.type){case r.FIXED_AMOUNT:return t("spendingMethods.FIXED_AMOUNT.title");case r.RATIO:return t("spendingMethods.RATIO.title");case r.FREE_SHIPPING:return t("spendingMethods.FREE_SHIPPING.title");case r.FREE_PRODUCT:return t("spendingMethods.FREE_PRODUCT.title");default:return""}},F=N.span(P||(P=e(["\n display: flex;\n padding: 2px 8px;\n justify-content: center;\n align-items: center;\n gap: 6px;\n border-radius: 6px;\n border: 0.6px solid #cdd5df;\n opacity: 0.8;\n background: #f8fafc;\n ","\n color: #121926;\n"],["\n display: flex;\n padding: 2px 8px;\n justify-content: center;\n align-items: center;\n gap: 6px;\n border-radius: 6px;\n border: 0.6px solid #cdd5df;\n opacity: 0.8;\n background: #f8fafc;\n ","\n color: #121926;\n"])),U),G=N.span(h||(h=e(["\n ","\n color: #364152;\n"],["\n ","\n color: #364152;\n"])),U),L=N.span(D||(D=e(["\n color: #697586;\n"],["\n color: #697586;\n"]))),k=function(e,n){var s,i,o=C().t,l=(null===(s=e.discountSettings)||void 0===s?void 0:s.point)||0,a=null===(i=e.discountSettings)||void 0===i?void 0:i.discountAmount,E=function(e,s){return void 0===s&&(s=!1),t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},t.createElement(G,null,o("earningMethods.xPoints",{points:l})),t.createElement(L,null,"→"),t.createElement(F,null,e," ",s&&n))};return e.type===r.FIXED_AMOUNT&&a?E(a,!0):e.type===r.RATIO&&a?E("%".concat(a)):o("earningMethods.xPoints",{points:l})};export{w as getEarningMethodIcon,b as getEarningMethodTitle,k as getSpendingMethodDescription,v as getSpendingMethodIcon,B as getSpendingMethodTitle};
1
+ import{__makeTemplateObject as e}from'./ext/tslib/tslib.es6.mjs.js';import t from"react";import{EarningMethodTypeEnum as n,LoyaltyWidgetScreenTypeEnum as s,LoyaltyProgramPointEarningTypeEnum as r,LoyaltyProgramMethodSpendingTypeEnum as i}from"./models/types/index.js";import{BubbleChatDone as l}from"./assets/widget-icons/normal/bubbleChatDone.js";import{CommentAdd01 as o}from"./assets/widget-icons/normal/commentAdd01.js";import{CouponPercent as E}from"./assets/widget-icons/normal/couponPercent.js";import{DiscountTag02 as a}from"./assets/widget-icons/normal/discountTag02.js";import{Gift as m}from"./assets/widget-icons/normal/gift.js";import{MoneyAdd01 as c}from"./assets/widget-icons/normal/moneyAdd01.js";import{PackageDelivered as d}from"./assets/widget-icons/normal/packageDelivered.js";import{SaveMoneyDollar as u}from"./assets/widget-icons/normal/saveMoneyDollar.js";import{ShoppingBasketAdd02 as R}from"./assets/widget-icons/normal/shoppingBasketAdd02.js";import{UserAdd01 as p}from"./assets/widget-icons/normal/userAdd01.js";import{UsersIllustration as T}from"./assets/widget-icons/illustraions/usersIllustration.js";import{BubbleChatIllustration as _}from"./assets/widget-icons/illustraions/bubbleChatIllustration.js";import{ApprovedChatIllustration as I}from"./assets/widget-icons/illustraions/approvedChatIllustration.js";import{TshirtIllustration as S}from"./assets/widget-icons/illustraions/tshirtIllustration.js";import{Medal as g}from"./assets/widget-icons/illustraions/medal.js";import{GiftIllustration as f}from"./assets/widget-icons/illustraions/giftIllustration.js";import{ShippingBox as O}from"./assets/widget-icons/illustraions/shippingBox.js";import{BigSaleMedal as N}from"./assets/widget-icons/illustraions/bigSaleMedal.js";import{ShoppingCartIllustration as C}from"./assets/widget-icons/illustraions/shoppingCartIllustration.js";import{WidgetIconTypeEnum as M}from"./models/loyalty-widget/types/index.js";import A from'./ext/i18next/dist/esm/i18next.js';import{BankCoin as U}from"./assets/widget-icons/illustraions/bankCoin.js";import'./ext/react-i18next/dist/es/context.js';import{useTranslation as D}from'./ext/react-i18next/dist/es/useTranslation.js';import{textSM as j}from"./renderer/components/style/typography.js";import P from"styled-components";var x,h,y,w,v,L,b,G,B,F=((x={})[M.ILLUSTRATION]=((h={})[n.CUSTOMER_REGISTER]=t.createElement(T,null),h[n.ENABLE_SUBSCRIPTION]=t.createElement(I,null),h[n.BUY_PRODUCT]=t.createElement(S,null),h[n.CUSTOMER_REVIEW]=t.createElement(_,null),h[n.CUSTOMER_SEGMENT]=t.createElement(E,null),h[n.ORDER_CREATE]=t.createElement(C,null),h),x[M.NORMAL]=((y={})[n.CUSTOMER_REGISTER]=t.createElement(p,null),y[n.ENABLE_SUBSCRIPTION]=t.createElement(l,null),y[n.BUY_PRODUCT]=t.createElement(u,null),y[n.CUSTOMER_REVIEW]=t.createElement(o,null),y[n.CUSTOMER_SEGMENT]=t.createElement(E,null),y[n.ORDER_CREATE]=t.createElement(R,null),y),x),Y=((w={})[M.ILLUSTRATION]=((v={})[s.MAIN_SCREEN]=t.createElement("div",null),v[s.CREDIT_EARNING_METHODS_SCREEN]=t.createElement(g,null),v[s.CREDIT_SPENDING_METHODS_SCREEN]=t.createElement(N,null),v[s.CREDIT_HISTORY_SCREEN]=t.createElement("div",null),v[s.LOYALTY_LEVEL_SCREEN]=t.createElement("div",null),v),w[M.NORMAL]=((L={})[s.MAIN_SCREEN]=t.createElement("div",null),L[s.CREDIT_EARNING_METHODS_SCREEN]=t.createElement(c,null),L[s.CREDIT_SPENDING_METHODS_SCREEN]=t.createElement(E,null),L[s.CREDIT_HISTORY_SCREEN]=t.createElement("div",null),L[s.LOYALTY_LEVEL_SCREEN]=t.createElement("div",null),L),w),H=function(e,t){return Y[t][e]},V=function(e,t){return F[t][e]},k=function(e){var t=D().t;switch(e.methodType){case n.CUSTOMER_REGISTER:return t("earningMethods.CUSTOMER_REGISTER.title");case n.ENABLE_SUBSCRIPTION:return t("earningMethods.ENABLE_SUBSCRIPTION.title");case n.CUSTOMER_REVIEW:return t("earningMethods.CUSTOMER_REVIEW.title");case n.ORDER_CREATE:if(e.pointEarningType===r.DYNAMIC_ORDER_AMOUNT)return t("earningMethods.ORDER_CREATE.RECEIVE_POINTS_ON_SPEND.title");if(e.pointEarningType===r.STATIC)return t("earningMethods.ORDER_CREATE.BASE.title");case n.BUY_PRODUCT:return t("earningMethods.BUY_PRODUCT.title");case n.CUSTOMER_SEGMENT:return t("earningMethods.CUSTOMER_SEGMENT.title");default:return""}},X=function(e,n){var s,r,l;return n===M.NONE?null:((s={})[M.ILLUSTRATION]=((r={})[i.FIXED_AMOUNT]=t.createElement(U,null),r[i.RATIO]=t.createElement(U,null),r[i.FREE_PRODUCT]=t.createElement(f,null),r[i.FREE_SHIPPING]=t.createElement(O,null),r),s[M.NORMAL]=((l={})[i.FIXED_AMOUNT]=t.createElement(a,null),l[i.RATIO]=t.createElement(a,null),l[i.FREE_PRODUCT]=t.createElement(m,null),l[i.FREE_SHIPPING]=t.createElement(d,null),l),s)[n][e]},W=function(e){var t=D().t,n=A.language,s=e.translations.find(function(e){return e.locale===n});if(null==s?void 0:s.description)return s.description;if(e.description)return e.description;switch(e.type){case i.FIXED_AMOUNT:return t("spendingMethods.FIXED_AMOUNT.title");case i.RATIO:return t("spendingMethods.RATIO.title");case i.FREE_SHIPPING:return t("spendingMethods.FREE_SHIPPING.title");case i.FREE_PRODUCT:return t("spendingMethods.FREE_PRODUCT.title");default:return""}},q=P.span(b||(b=e(["\n display: flex;\n padding: 2px 8px;\n justify-content: center;\n align-items: center;\n gap: 6px;\n border-radius: 6px;\n border: 0.6px solid #cdd5df;\n opacity: 0.8;\n background: #f8fafc;\n ","\n color: #121926;\n"],["\n display: flex;\n padding: 2px 8px;\n justify-content: center;\n align-items: center;\n gap: 6px;\n border-radius: 6px;\n border: 0.6px solid #cdd5df;\n opacity: 0.8;\n background: #f8fafc;\n ","\n color: #121926;\n"])),j),z=P.span(G||(G=e(["\n ","\n color: #364152;\n"],["\n ","\n color: #364152;\n"])),j),J=P.span(B||(B=e(["\n color: #697586;\n"],["\n color: #697586;\n"]))),K=function(e,n){var s,r,l=D().t,o=(null===(s=e.discountSettings)||void 0===s?void 0:s.point)||0,E=null===(r=e.discountSettings)||void 0===r?void 0:r.discountAmount,a=function(e,s){return void 0===s&&(s=!1),t.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},t.createElement(z,null,l("earningMethods.xPoints",{points:o})),t.createElement(J,null,"→"),t.createElement(q,null,e," ",s&&n))};return e.type===i.FIXED_AMOUNT&&E?a(E,!0):e.type===i.RATIO&&E?a("%".concat(E)):l("earningMethods.xPoints",{points:o})};export{V as getEarningMethodIcon,k as getEarningMethodTitle,H as getScreenIcon,K as getSpendingMethodDescription,X as getSpendingMethodIcon,W as getSpendingMethodTitle};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/loyalty-widget-renderer",
3
- "version": "1.0.0-alpha.25",
3
+ "version": "1.0.0-alpha.27",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",