@everymatrix/general-icon-progress-bar 1.0.13 → 1.0.14
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.
|
@@ -567,14 +567,14 @@ t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"}
|
|
|
567
567
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
568
568
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
569
569
|
PERFORMANCE OF THIS SOFTWARE.
|
|
570
|
-
***************************************************************************** */function Ie(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}const Oe={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function we(){return Oe}const Ce=w(!1);let Re;const Me=w(null);function Ue(t){return t.split("-").map(((t,e,r)=>r.slice(0,e+1).join("-"))).reverse()}function Ge(t,e=we().fallbackLocale){const r=Ue(t);return e?[...new Set([...r,...Ue(e)])]:r}function De(){return null!=Re?Re:void 0}Me.subscribe((t=>{Re=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const $e=Object.assign(Object.assign({},Me),{set:t=>{if(t&&function(t){if(null==t)return;const e=Ge(t);for(let t=0;t<e.length;t++){const r=e[t];if(Te(r))return r}}(t)&&Se(t)){const{loadingDelay:e}=we();let r;return"undefined"!=typeof window&&null!=De()&&e?r=window.setTimeout((()=>Ce.set(!0)),e):Ce.set(!0),Ne(t).then((()=>{Me.set(t)})).finally((()=>{clearTimeout(r),Ce.set(!1)}))}return Me.set(t)}}),Fe=t=>{const e=Object.create(null);return r=>{const n=JSON.stringify(r);return n in e?e[n]:e[n]=t(r)}},ke=(t,e)=>{const{formats:r}=we();if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},xe=Fe((t=>{var{locale:e,format:r}=t,n=Ie(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(n=ke("number",r)),new Intl.NumberFormat(e,n)})),je=Fe((t=>{var{locale:e,format:r}=t,n=Ie(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?n=ke("date",r):0===Object.keys(n).length&&(n=ke("date","short")),new Intl.DateTimeFormat(e,n)})),Ve=Fe((t=>{var{locale:e,format:r}=t,n=Ie(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?n=ke("time",r):0===Object.keys(n).length&&(n=ke("time","short")),new Intl.DateTimeFormat(e,n)})),Xe=Fe(((t,e=De())=>new be(t,e,we().formats,{ignoreTag:we().ignoreTag}))),Ke=(t,e={})=>{var r,n,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:h=De(),default:u}=s;if(null==h)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=ye(t,h);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!==(o=null!==(i=null===(n=(r=we()).handleMissingMessage)||void 0===n?void 0:n.call(r,{locale:h,id:t,defaultValue:u}))&&void 0!==i?i:u)&&void 0!==o?o:t;if(!a)return c;let l=c;try{l=Xe(c,h).format(a)}catch(e){console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return l},Ye=(t,e)=>((t={})=>{var{locale:e=De()}=t,r=Ie(t,["locale"]);return Ve(Object.assign({locale:e},r))})(e).format(t),Ze=(t,e)=>((t={})=>{var{locale:e=De()}=t,r=Ie(t,["locale"]);return je(Object.assign({locale:e},r))})(e).format(t),ze=(t,e)=>((t={})=>{var{locale:e=De()}=t,r=Ie(t,["locale"]);return xe(Object.assign({locale:e},r))})(e).format(t),We=(t,e=De())=>ye(t,e),Qe=C([$e,He],(()=>Ke));C([$e],(()=>Ye)),C([$e],(()=>Ze)),C([$e],(()=>ze)),C([$e,He],(()=>We));const
|
|
571
|
-
/* src/GeneralIconProgressBar.svelte generated by Svelte v3.48.0 */function
|
|
572
|
-
/*span_binding*/e[
|
|
573
|
-
/*div0_binding*/e[
|
|
574
|
-
/*div1_binding*/e[
|
|
575
|
-
/*span_binding*/,e[
|
|
576
|
-
/*div0_binding*/e[
|
|
577
|
-
/*div1_binding*/e[
|
|
570
|
+
***************************************************************************** */function Ie(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}const Oe={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function we(){return Oe}const Ce=w(!1);let Re;const Me=w(null);function Ue(t){return t.split("-").map(((t,e,r)=>r.slice(0,e+1).join("-"))).reverse()}function Ge(t,e=we().fallbackLocale){const r=Ue(t);return e?[...new Set([...r,...Ue(e)])]:r}function De(){return null!=Re?Re:void 0}Me.subscribe((t=>{Re=null!=t?t:void 0,"undefined"!=typeof window&&null!=t&&document.documentElement.setAttribute("lang",t)}));const $e=Object.assign(Object.assign({},Me),{set:t=>{if(t&&function(t){if(null==t)return;const e=Ge(t);for(let t=0;t<e.length;t++){const r=e[t];if(Te(r))return r}}(t)&&Se(t)){const{loadingDelay:e}=we();let r;return"undefined"!=typeof window&&null!=De()&&e?r=window.setTimeout((()=>Ce.set(!0)),e):Ce.set(!0),Ne(t).then((()=>{Me.set(t)})).finally((()=>{clearTimeout(r),Ce.set(!1)}))}return Me.set(t)}}),Fe=t=>{const e=Object.create(null);return r=>{const n=JSON.stringify(r);return n in e?e[n]:e[n]=t(r)}},ke=(t,e)=>{const{formats:r}=we();if(t in r&&e in r[t])return r[t][e];throw new Error(`[svelte-i18n] Unknown "${e}" ${t} format.`)},xe=Fe((t=>{var{locale:e,format:r}=t,n=Ie(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(n=ke("number",r)),new Intl.NumberFormat(e,n)})),je=Fe((t=>{var{locale:e,format:r}=t,n=Ie(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?n=ke("date",r):0===Object.keys(n).length&&(n=ke("date","short")),new Intl.DateTimeFormat(e,n)})),Ve=Fe((t=>{var{locale:e,format:r}=t,n=Ie(t,["locale","format"]);if(null==e)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?n=ke("time",r):0===Object.keys(n).length&&(n=ke("time","short")),new Intl.DateTimeFormat(e,n)})),Xe=Fe(((t,e=De())=>new be(t,e,we().formats,{ignoreTag:we().ignoreTag}))),Ke=(t,e={})=>{var r,n,i,o;let s=e;"object"==typeof t&&(s=t,t=s.id);const{values:a,locale:h=De(),default:u}=s;if(null==h)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=ye(t,h);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!==(o=null!==(i=null===(n=(r=we()).handleMissingMessage)||void 0===n?void 0:n.call(r,{locale:h,id:t,defaultValue:u}))&&void 0!==i?i:u)&&void 0!==o?o:t;if(!a)return c;let l=c;try{l=Xe(c,h).format(a)}catch(e){console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,e.message)}return l},Ye=(t,e)=>((t={})=>{var{locale:e=De()}=t,r=Ie(t,["locale"]);return Ve(Object.assign({locale:e},r))})(e).format(t),Ze=(t,e)=>((t={})=>{var{locale:e=De()}=t,r=Ie(t,["locale"]);return je(Object.assign({locale:e},r))})(e).format(t),ze=(t,e)=>((t={})=>{var{locale:e=De()}=t,r=Ie(t,["locale"]);return xe(Object.assign({locale:e},r))})(e).format(t),We=(t,e=De())=>ye(t,e),Qe=C([$e,He],(()=>Ke));function Je(t,e){_e(t,e)}C([$e],(()=>Ye)),C([$e],(()=>Ze)),C([$e],(()=>ze)),C([$e,He],(()=>We));const qe={en:{progressBar:{bets:"bets"}},tr:{progressBar:{bets:"bets"}},el:{progressBar:{bets:"bets"}}};
|
|
571
|
+
/* src/GeneralIconProgressBar.svelte generated by Svelte v3.48.0 */function tr(e){let r,n,i,o,s;return{c(){var a;r=c("div"),n=c("div"),i=c("span"),a=/*progressText*/e[3],o=document.createTextNode(a),this.c=t,l(i,"part","progressText"),l(n,"class",s="stepBar "+/*curTatus*/e[4]),l(n,"part","stepBar"),l(r,"class","general-icon-progress-bar"),l(r,"part","totalBar")},m(t,s){h(t,r,s),a(r,n),a(n,i),a(i,o),
|
|
572
|
+
/*span_binding*/e[11](i),
|
|
573
|
+
/*div0_binding*/e[12](n),
|
|
574
|
+
/*div1_binding*/e[13](r)},p(t,[e]){/*progressText*/8&e&&function(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}(o,/*progressText*/t[3]),/*curTatus*/16&e&&s!==(s="stepBar "+/*curTatus*/t[4])&&l(n,"class",s)},i:t,o:t,d(t){t&&u(r)
|
|
575
|
+
/*span_binding*/,e[11](null),
|
|
576
|
+
/*div0_binding*/e[12](null),
|
|
577
|
+
/*div1_binding*/e[13](null)}}}function er(t,e,r){let n;var i,o;i=Qe,o=t=>r(18,n=t),t.$$.on_destroy.push(s(i,o));let a,h,u,c,l,f,p,{currentstep:m=0}=e,{total:b=1}=e,{showaspercent:d}=e,{lang:y="en"}=e,{status:v}=e,{translationUrl:H=""}=e,T="0px",B="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:{}})
|
|
579
|
+
locale.set(_locale);*/}({withLocale:"en",translations:{}});Object.keys(qe).forEach((t=>{Je(t,qe[t])}));const _=()=>{var t;t=y,$e.set(t)},A=()=>{let t=m/b*100;setTimeout((()=>{r(3,c=d||"true"===d?`${t}%`:`${m}/${b} ${n("progressBar.bets")}`)}),c?573:0),0==t||100==t?(f="0px",p="0px",T=100==t?"3px":"0px"):(f=`${a.offsetHeight}px`,l=f,p=a.offsetHeight/3+"px",T="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",T)};return g((()=>{A()})),t.$$set=t=>{"currentstep"in t&&r(5,m=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)},t.$$.update=()=>{/*currentstep, total*/96&t.$$.dirty&&m&&b&&A(),/*lang*/256&t.$$.dirty&&y&&_(),/*status*/512&t.$$.dirty&&v&&r(4,B="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,B,m,b,d,y,v,H,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:rgba(0, 0, 0, 0.8);text-align:right}.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},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"]}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()}}return!customElements.get("general-icon-progress-bar")&&customElements.define("general-icon-progress-bar",rr),rr}));
|
|
580
580
|
//# sourceMappingURL=general-icon-progress-bar.js.map
|