@everymatrix/general-icon-progress-bar 1.8.1 → 1.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -576,5 +576,5 @@ t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
576
576
  /*div0_binding*/e[14](null),
577
577
  /*div1_binding*/e[15](null)}}}function er(t,e,r){let n;var i,o;i=Qe,o=t=>r(20,n=t),t.$$.on_destroy.push(s(i,o));let a,h,u,c,l,f,p,{currentstep:g=0}=e,{total:b=1}=e,{showaspercent:d}=e,{lang:y="en"}=e,{status:v}=e,{translationurl:H=""}=e,{progressfractiondigit:T=1}=e,{triggerreset:B}=e,_="0px",A="active";!function({withLocale:t,translations:e}){$e.subscribe((r=>{null==r&&(He.set(e),$e.set(t))}));// maybe we will need this to make sure that the i18n is set up only once
578
578
  /*dictionary.set(translations);
579
- locale.set(_locale);*/}({withLocale:"en",translations:{}});Object.keys(qe).forEach((t=>{Je(t,qe[t])}));const P=()=>{var t;t=y,$e.set(t)},S=()=>{let t=(g/b*100).toFixed(T);setTimeout((()=>{r(3,c=d||"true"===d?`${t}%`:`${g}/${b} ${n("progressBar.bets")}`)}),c?573:0),0==t||100==t?(f="0px",p="0px",_=100==t?"3px":"0px"):(f=`${a.offsetHeight}px`,l=f,p=a.offsetHeight/3+"px",_="0px"),h.style.setProperty("--parentElementHeight",l),u.style.setProperty("--currentStep",t+"%"),u.style.setProperty("--triangleHeight",f),u.style.setProperty("--halfOfTriangleHeight",p),u.style.setProperty("--stepBarBorderRadius",_)};return m((()=>{S()})),t.$$set=t=>{"currentstep"in t&&r(5,g=t.currentstep),"total"in t&&r(6,b=t.total),"showaspercent"in t&&r(7,d=t.showaspercent),"lang"in t&&r(8,y=t.lang),"status"in t&&r(9,v=t.status),"translationurl"in t&&r(10,H=t.translationurl),"progressfractiondigit"in t&&r(11,T=t.progressfractiondigit),"triggerreset"in t&&r(12,B=t.triggerreset)},t.$$.update=()=>{/*triggerreset, total*/4160&t.$$.dirty&&B&&b&&S(),/*lang*/256&t.$$.dirty&&y&&P(),/*status*/512&t.$$.dirty&&v&&r(4,A="active"==v?"":"inactive"),/*translationurl*/1024&t.$$.dirty&&H&&fetch(H).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{Je(e,t[e])}))})).catch((t=>{console.log(t)}))},[a,h,u,c,A,g,b,d,y,v,H,T,B,function(t){E[t?"unshift":"push"]((()=>{h=t,r(1,h)}))},function(t){E[t?"unshift":"push"]((()=>{u=t,r(2,u)}))},function(t){E[t?"unshift":"push"]((()=>{a=t,r(0,a)}))}]}class rr extends I{constructor(t){super(),this.shadowRoot.innerHTML="<style>:host{font-family:system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.general-icon-progress-bar{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #FFFFFF);height:100%;background:rgba(0, 0, 0, 0.8);border-radius:3px}.stepBar.inactive::after{border-color:#a6a4a1 transparent transparent transparent}.stepBar.inactive{background:linear-gradient(270deg, #a2a09e 8.82%, #aba9ad 99.63%)}.stepBar.inactive span{color:rgba(112, 106, 106, 0.8)}.stepBar span{font-weight:700;font-size:11px;line-height:var(--parentElementHeight, 20px);align-items:center;color:#fff;text-align:right;position:relative;z-index:1}.stepBar::after{content:' ';position:absolute;top:0;border-width:20px 10px 20px 0;border-top-width:var(--triangleHeight, 20px);border-right-width:var(--halfOfTriangleHeight, 10px);border-bottom-width:var(--triangleHeight, 20px);border-style:solid;border-color:#FCA452 transparent transparent transparent;text-align:right}.stepBar{position:relative;width:var(--currentStep, 0);height:100%;background:linear-gradient(270deg, #FCA452 8.82%, #600062 99.63%);text-align:right;border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-right-radius:var(--stepBarBorderRadius, 0px);border-bottom-right-radius:var(--stepBarBorderRadius, 0px);transition-property:width;transition-duration:0.18s;transition-timing-function:cubic-bezier(0.43, 0.8, 0.95, 0.88);transition-delay:0.3s}</style>",N(this,{target:this.shadowRoot,props:f(this.attributes),customElement:!0},er,tr,o,{currentstep:5,total:6,showaspercent:7,lang:8,status:9,translationurl:10,progressfractiondigit:11,triggerreset:12},null),t&&(t.target&&h(t.target,this,t.anchor),t.props&&(this.$set(t.props),A()))}static get observedAttributes(){return["currentstep","total","showaspercent","lang","status","translationurl","progressfractiondigit","triggerreset"]}get currentstep(){return this.$$.ctx[5]}set currentstep(t){this.$$set({currentstep:t}),A()}get total(){return this.$$.ctx[6]}set total(t){this.$$set({total:t}),A()}get showaspercent(){return this.$$.ctx[7]}set showaspercent(t){this.$$set({showaspercent:t}),A()}get lang(){return this.$$.ctx[8]}set lang(t){this.$$set({lang:t}),A()}get status(){return this.$$.ctx[9]}set status(t){this.$$set({status:t}),A()}get translationurl(){return this.$$.ctx[10]}set translationurl(t){this.$$set({translationurl:t}),A()}get progressfractiondigit(){return this.$$.ctx[11]}set progressfractiondigit(t){this.$$set({progressfractiondigit:t}),A()}get triggerreset(){return this.$$.ctx[12]}set triggerreset(t){this.$$set({triggerreset:t}),A()}}return!customElements.get("general-icon-progress-bar")&&customElements.define("general-icon-progress-bar",rr),rr}));
579
+ locale.set(_locale);*/}({withLocale:"en",translations:{}});Object.keys(qe).forEach((t=>{Je(t,qe[t])}));const P=()=>{var t;t=y,$e.set(t)},S=()=>{let t=(g/b*100).toFixed(T);setTimeout((()=>{r(3,c=d||"true"===d?`${t}%`:`${g}/${b} ${n("progressBar.bets")}`)}),c?573:0),0==t||100==t?(f="0px",p="0px",_=100==t?"3px":"0px"):(f=`${a.offsetHeight}px`,l=f,p=a.offsetHeight/3+"px",_="0px"),h.style.setProperty("--parentElementHeight",l),u.style.setProperty("--currentStep",t+"%"),u.style.setProperty("--triangleHeight",f),u.style.setProperty("--halfOfTriangleHeight",p),u.style.setProperty("--stepBarBorderRadius",_)};return m((()=>{S()})),t.$$set=t=>{"currentstep"in t&&r(5,g=t.currentstep),"total"in t&&r(6,b=t.total),"showaspercent"in t&&r(7,d=t.showaspercent),"lang"in t&&r(8,y=t.lang),"status"in t&&r(9,v=t.status),"translationurl"in t&&r(10,H=t.translationurl),"progressfractiondigit"in t&&r(11,T=t.progressfractiondigit),"triggerreset"in t&&r(12,B=t.triggerreset)},t.$$.update=()=>{/*triggerreset, total*/4160&t.$$.dirty&&B&&b&&S(),/*lang*/256&t.$$.dirty&&y&&P(),/*status*/512&t.$$.dirty&&v&&r(4,A="active"==v?"":"inactive"),/*translationurl*/1024&t.$$.dirty&&H&&fetch(H).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{Je(e,t[e])}))})).catch((t=>{console.log(t)}))},[a,h,u,c,A,g,b,d,y,v,H,T,B,function(t){E[t?"unshift":"push"]((()=>{h=t,r(1,h)}))},function(t){E[t?"unshift":"push"]((()=>{u=t,r(2,u)}))},function(t){E[t?"unshift":"push"]((()=>{a=t,r(0,a)}))}]}class rr extends I{constructor(t){super(),this.shadowRoot.innerHTML='<style>:host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.general-icon-progress-bar{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #FFFFFF);height:100%;background:rgba(0, 0, 0, 0.8);border-radius:3px}.stepBar.inactive::after{border-color:#a6a4a1 transparent transparent transparent}.stepBar.inactive{background:linear-gradient(270deg, #a2a09e 8.82%, #aba9ad 99.63%)}.stepBar.inactive span{color:rgba(112, 106, 106, 0.8)}.stepBar span{font-weight:700;font-size:11px;line-height:var(--parentElementHeight, 20px);align-items:center;color:#fff;text-align:right;position:relative;z-index:1}.stepBar::after{content:" ";position:absolute;top:0;border-width:20px 10px 20px 0;border-top-width:var(--triangleHeight, 20px);border-right-width:var(--halfOfTriangleHeight, 10px);border-bottom-width:var(--triangleHeight, 20px);border-style:solid;border-color:#FCA452 transparent transparent transparent;text-align:right}.stepBar{position:relative;width:var(--currentStep, 0);height:100%;background:linear-gradient(270deg, #FCA452 8.82%, #600062 99.63%);text-align:right;border-top-left-radius:3px;border-bottom-left-radius:3px;border-top-right-radius:var(--stepBarBorderRadius, 0px);border-bottom-right-radius:var(--stepBarBorderRadius, 0px);transition-property:width;transition-duration:0.18s;transition-timing-function:cubic-bezier(0.43, 0.8, 0.95, 0.88);transition-delay:0.3s}</style>',N(this,{target:this.shadowRoot,props:f(this.attributes),customElement:!0},er,tr,o,{currentstep:5,total:6,showaspercent:7,lang:8,status:9,translationurl:10,progressfractiondigit:11,triggerreset:12},null),t&&(t.target&&h(t.target,this,t.anchor),t.props&&(this.$set(t.props),A()))}static get observedAttributes(){return["currentstep","total","showaspercent","lang","status","translationurl","progressfractiondigit","triggerreset"]}get currentstep(){return this.$$.ctx[5]}set currentstep(t){this.$$set({currentstep:t}),A()}get total(){return this.$$.ctx[6]}set total(t){this.$$set({total:t}),A()}get showaspercent(){return this.$$.ctx[7]}set showaspercent(t){this.$$set({showaspercent:t}),A()}get lang(){return this.$$.ctx[8]}set lang(t){this.$$set({lang:t}),A()}get status(){return this.$$.ctx[9]}set status(t){this.$$set({status:t}),A()}get translationurl(){return this.$$.ctx[10]}set translationurl(t){this.$$set({translationurl:t}),A()}get progressfractiondigit(){return this.$$.ctx[11]}set progressfractiondigit(t){this.$$set({progressfractiondigit:t}),A()}get triggerreset(){return this.$$.ctx[12]}set triggerreset(t){this.$$set({triggerreset:t}),A()}}return!customElements.get("general-icon-progress-bar")&&customElements.define("general-icon-progress-bar",rr),rr}));
580
580
  //# sourceMappingURL=general-icon-progress-bar.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-icon-progress-bar",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "main": "index.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "e558ed5234cd858fa71696743229caa273752a2e"
39
+ "gitHead": "15df0a4bc1195017b7df65675dfd40261b5dbe8b"
40
40
  }