All files / projects-dev/apps/storybook/storybook-static Components-Progress-stories.59b0d95c.iframe.bundle.js

0% Statements 0/1
0% Branches 0/1
0% Functions 0/1
0% Lines 0/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 
(self.webpackChunkstorybook=self.webpackChunkstorybook||[]).push([[355],{"./stories/Components/Progress.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,WithoutLabel:()=>WithoutLabel,WithoutMax:()=>WithoutMax,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});__webpack_require__("../../libs/ui/progress/public/build/bundle.js");const __WEBPACK_DEFAULT_EXPORT__={title:"Components/Progress"},Default=(({label,value,max})=>`\n        <jga-ui-progress\n            label="${label}"\n            value="${value}"\n            max="${max}"\n        >\n        </jga-ui-progress>\n    `).bind({});Default.args={label:"Default",value:"70",max:"100"};const WithoutLabel=(({value,max})=>`\n        <jga-ui-progress\n            value="${value}"\n            max="${max}"\n        >\n        </jga-ui-progress>\n    `).bind({});WithoutLabel.args={value:"55",max:"100"};const WithoutMax=(({value})=>`\n        <jga-ui-progress\n            value="${value}"\n        >\n        </jga-ui-progress>\n    `).bind({});WithoutMax.args={value:"25"},Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:'({\n  label,\n  value,\n  max\n}) => {\n  return `\n        <jga-ui-progress\n            label="${label}"\n            value="${value}"\n            max="${max}"\n        >\n        </jga-ui-progress>\n    `;\n}',...Default.parameters?.docs?.source}}},WithoutLabel.parameters={...WithoutLabel.parameters,docs:{...WithoutLabel.parameters?.docs,source:{originalSource:'({\n  value,\n  max\n}) => {\n  return `\n        <jga-ui-progress\n            value="${value}"\n            max="${max}"\n        >\n        </jga-ui-progress>\n    `;\n}',...WithoutLabel.parameters?.docs?.source}}},WithoutMax.parameters={...WithoutMax.parameters,docs:{...WithoutMax.parameters?.docs,source:{originalSource:'({\n  value\n}) => {\n  return `\n        <jga-ui-progress\n            value="${value}"\n        >\n        </jga-ui-progress>\n    `;\n}',...WithoutMax.parameters?.docs?.source}}};const __namedExportsOrder=["Default","WithoutLabel","WithoutMax"]},"../../libs/ui/progress/public/build/bundle.js":()=>{!function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function s(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function i(t,e){t.appendChild(e)}function c(t,e,n){t.insertBefore(e,n||null)}function a(t){t.parentNode&&t.parentNode.removeChild(t)}function u(t){return document.createElement(t)}function l(t){return document.createTextNode(t)}function h(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function d(t,e){e=""+e,t.data!==e&&(t.data=e)}let f;function p(t){f=t}const m=[],b=[];let _=[];const x=[],v=Promise.resolve();let y=!1;function w(t){_.push(t)}const E=new Set;let P=0;function j(){if(0!==P)return;const t=f;do{try{for(;P<m.length;){const t=m[P];P++,p(t),k(t.$$)}}catch(t){throw m.length=0,P=0,t}for(p(null),m.length=0,P=0;b.length;)b.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];E.has(e)||(E.add(e),e())}_.length=0}while(m.length);for(;x.length;)x.pop()();y=!1,E.clear(),p(t)}function k(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(w)}}const N=new Set;function M(t,e){-1===t.$$.dirty[0]&&(m.push(t),y||(y=!0,v.then(j)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function A(o,i,$,c,u,l,h=null,d=[-1]){const g=f;p(o);const m=o.$$={fragment:null,ctx:[],props:l,update:t,not_equal:u,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(i.context||(g?g.$$.context:[])),callbacks:n(),dirty:d,skip_bound:!1,root:i.target||g.$$.root};h&&h(m.root);let b=!1;if(m.ctx=$?$(o,i.props||{},((t,e,...n)=>{const r=n.length?n[0]:e;return m.ctx&&u(m.ctx[t],m.ctx[t]=r)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](r),b&&M(o,t)),e})):[],m.update(),b=!0,r(m.before_update),m.fragment=!!c&&c(m.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);m.fragment&&m.fragment.l(t),t.forEach(a)}else m.fragment&&m.fragment.c();i.intro&&(_=o.$$.fragment)&&_.i&&(N.delete(_),_.i(undefined)),function(t,n,o){const{fragment:i,after_update:$}=t.$$;i&&i.m(n,o),w((()=>{const n=t.$$.on_mount.map(e).filter(s);t.$$.on_destroy?t.$$.on_destroy.push(...n):r(n),t.$$.on_mount=[]})),$.forEach(w)}(o,i.target,i.anchor),j()}var _;p(g)}let C;function L(t,e,n,r){const s=n[t]?.type;if(e="Boolean"===s&&"boolean"!=typeof e?null!=e:e,!r||!n[t])return e;if("toAttribute"===r)switch(s){case"Object":case"Array":return null==e?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return null==e?null:e;default:return e}else switch(s){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":default:return e;case"Number":return null!=e?+e:e}}"function"==typeof HTMLElement&&(C=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;constructor(t,e,n){super(),this.$$ctor=t,this.$$s=e,n&&this.attachShadow({mode:"open"})}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const t=this.$$l_u.get(e);t&&(t(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn)return;function t(t){return()=>{let e;return{c:function(){e=u("slot"),"default"!==t&&h(e,"name",t)},m:function(t,n){c(t,e,n)},d:function(t){t&&a(e)}}}}const e={},n=function(t){const e={};return t.childNodes.forEach((t=>{e[t.slot||"default"]=!0})),e}(this);for(const s of this.$$s)s in n&&(e[s]=[t(s)]);for(const o of this.attributes){const i=this.$$g_p(o.name);i in this.$$d||(this.$$d[i]=L(i,o.value,this.$$p_d,"toProp"))}for(const $ in this.$$p_d)$ in this.$$d||void 0===this[$]||(this.$$d[$]=this[$],delete this[$]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:e,$$scope:{ctx:[]}}});const r=()=>{this.$$r=!0;for(const t in this.$$p_d)if(this.$$d[t]=this.$$c.$$.ctx[this.$$c.$$.props[t]],this.$$p_d[t].reflect){const e=L(t,this.$$d[t],this.$$p_d,"toAttribute");null==e?this.removeAttribute(this.$$p_d[t].attribute||t):this.setAttribute(this.$$p_d[t].attribute||t,e)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const l in this.$$l)for(const d of this.$$l[l]){const f=this.$$c.$on(l,d);this.$$l_u.set(d,f)}this.$$l={}}}attributeChangedCallback(t,e,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=L(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then((()=>{this.$$cn||(this.$$c.$destroy(),this.$$c=void 0)}))}$$g_p(t){return Object.keys(this.$$p_d).find((e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t))||t}});class V{$$=void 0;$$set=void 0;$destroy(){(function O(t,e){const n=t.$$;null!==n.fragment&&(function(t){const e=[],n=[];_.forEach((r=>-1===t.indexOf(r)?e.push(r):n.push(r))),n.forEach((t=>t())),_=e}(n.after_update),r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])})(this,1),this.$destroy=t}$on(e,n){if(!s(n))return t;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const t=r.indexOf(n);-1!==t&&r.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function S(t){!function $(t,e,n){const r=function(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}(t);if(!r.getElementById(e)){const t=u("style");t.id=e,t.textContent=n,function(t,e){i(t.head||t,e),e.sheet}(r,t)}}(t,"svelte-3b6zaj","progress.svelte-3b6zaj:hover::after{content:attr(data-percentage);float:right;font-size:0.7em;font-weight:900;text-align:right}")}function z(t){let e,n;return{c(){e=u("label"),n=l(t[3]),h(e,"for","progress")},m(t,r){c(t,e,r),i(e,n)},p(t,e){8&e&&d(n,t[3])},d(t){t&&a(e)}}}function B(e){let n,r,s,o,$=""!==e[3]&&z(e);return{c(){$&&$.c(),n=l(" "),r=u("progress"),s=l(e[2]),o=l(" %"),h(r,"id","progress"),h(r,"max",e[1]),r.value=e[0],h(r,"data-percentage",e[2]),h(r,"class","svelte-3b6zaj")},m(t,e){$&&$.m(t,e),c(t,n,e),c(t,r,e),i(r,s),i(r,o)},p(t,[e]){""!==t[3]?$?$.p(t,e):($=z(t),$.c(),$.m(n.parentNode,n)):$&&($.d(1),$=null),4&e&&d(s,t[2]),2&e&&h(r,"max",t[1]),1&e&&(r.value=t[0]),4&e&&h(r,"data-percentage",t[2])},i:t,o:t,d(t){t&&(a(n),a(r)),$&&$.d(t)}}}function F(t,e,n){let{label:r=""}=e,{value:s=0}=e,{max:o=100}=e,{progressValue:i=0}=e,{progressMax:$=0}=e,{progressPercentage:c=0}=e;return function g(t){(function(){if(!f)throw new Error("Function called outside component initialization");return f})().$$.on_mount.push(t)}((()=>{n(0,i=Number.parseFloat(s)),n(1,$=Number.parseFloat(o)),n(2,c=`${(i/$*100).toLocaleString()} %`)})),t.$$set=t=>{"label"in t&&n(3,r=t.label),"value"in t&&n(4,s=t.value),"max"in t&&n(5,o=t.max),"progressValue"in t&&n(0,i=t.progressValue),"progressMax"in t&&n(1,$=t.progressMax),"progressPercentage"in t&&n(2,c=t.progressPercentage)},[i,$,c,r,s,o]}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class R extends V{constructor(t){super(),A(this,t,F,B,o,{label:3,value:4,max:5,progressValue:0,progressMax:1,progressPercentage:2},S)}get label(){return this.$$.ctx[3]}set label(t){this.$$set({label:t}),j()}get value(){return this.$$.ctx[4]}set value(t){this.$$set({value:t}),j()}get max(){return this.$$.ctx[5]}set max(t){this.$$set({max:t}),j()}get progressValue(){return this.$$.ctx[0]}set progressValue(t){this.$$set({progressValue:t}),j()}get progressMax(){return this.$$.ctx[1]}set progressMax(t){this.$$set({progressMax:t}),j()}get progressPercentage(){return this.$$.ctx[2]}set progressPercentage(t){this.$$set({progressPercentage:t}),j()}}customElements.define("jga-ui-progress",function(t,e,n,r,s,o){let i=class extends C{constructor(){super(t,n,true),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map((t=>(e[t].attribute||t).toLowerCase()))}};return Object.keys(e).forEach((t=>{Object.defineProperty(i.prototype,t,{get(){return this.$$c&&t in this.$$c?this.$$c[t]:this.$$d[t]},set(n){n=L(t,n,e),this.$$d[t]=n,this.$$c?.$set({[t]:n})}})})),[].forEach((t=>{Object.defineProperty(i.prototype,t,{get(){return this.$$c?.[t]}})})),t.element=i,i}(R,{label:{},value:{},max:{},progressValue:{},progressMax:{},progressPercentage:{}},[]))}()}}]);