{"version":3,"sources":["webpack:///../WCC.UI/App/components/progressRing/progressRing.html?a920","webpack:///../WCC.UI/App/components/progressRing/progressRing.scss?11fb","webpack:///../WCC.UI/App/components/progressRing/progressRing.ts","webpack:///../WCC.UI/App/webpack/runtime/htmlExposer.js","webpack:///../WCC.UI/App/components/progressRing/progressRing.scss","webpack:///../WCC.UI/App/components/progressRing/progressRing.html"],"names":["content","expose","__esModule","default","api","module","i","options","exports","locals","ProgressRingVM","constructor","config","info","value","ko","flattenComputed","this","strokeWidth","size","color","backgroundColor","center","pureComputed","radius","circumference","Math","PI","strokeDashArray","strokeDashOffset","backgroundStrokeDashOffset","isReady","applyBindingsToNode","element","toPx","__decorate","injectable","__param","inject","wccModules","componentConfig","componentInfo","system","SystemHelpers","html","getTemplatesAndResources","forEach","node","document","head","appendChild","___CSS_LOADER_API_IMPORT___","push"],"mappings":"6IAAA,UAAO,CACC,6GACA,wDAIC,KAJyC,EAAF,SAAYA,EAASC,GAGzD,OADAA,EADAD,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,GAE1CA,GACV,4B,0ECNT,IAAII,EAAM,EAAQ,gFACFJ,EAAU,EAAQ,wJAIC,iBAFvBA,EAAUA,EAAQE,WAAaF,EAAQG,QAAUH,KAG/CA,EAAU,CAAC,CAACK,EAAOC,EAAIN,EAAS,MAG9C,IAAIO,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAEPH,EAAIJ,EAASO,GAI1BF,EAAOG,QAAUR,EAAQS,QAAU,I,2wBCFnC,IAAqBC,EAArB,MAeIC,YACwCC,EACFC,GAElC,MAAMC,EAAQC,EAAGC,gBAAgBJ,EAAOE,MAAO,GAC/CG,KAAKC,YAAcH,EAAGC,gBAAgBJ,EAAOM,YAAa,GAC1DD,KAAKE,KAAOJ,EAAGC,gBAAgBJ,EAAOO,KAAM,KAC5CF,KAAKG,MAAQL,EAAGC,gBAAgBJ,EAAOQ,MAAO,QAC9CH,KAAKI,gBAAkBN,EAAGC,gBAAgBJ,EAAOS,iBAEjDJ,KAAKK,OAASP,EAAGQ,aAAa,IAAMN,KAAKE,OAAS,GAClDF,KAAKO,OAAST,EAAGQ,aAAa,IAAMN,KAAKK,SAAWL,KAAKC,cAAgB,GACzE,MAAMO,EAAgBV,EAAGQ,aAAa,IAAsB,EAAhBN,KAAKO,SAAeE,KAAKC,IACrEV,KAAKW,gBAAkBb,EAAGQ,aAAa,IAAME,IAAkB,IAAMA,KACrER,KAAKY,iBAAmBd,EAAGQ,aAAa,IAAME,IAAkBX,IAAU,IAAMW,KAChFR,KAAKa,2BAA6Bf,EAAGQ,aAAa,KAAOT,IAAU,IAAMW,KAEzER,KAAKc,QAAUhB,EAAGQ,aAAa,IAAMN,KAAKO,SAAW,GAErDT,EAAGiB,oBAAoBnB,EAAKoB,QAAS,CACjC,IAAO,CACH,iBAAiB,GAGrB,MAAS,CACL,MAAShB,KAAKE,KAAKe,OACnB,OAAUjB,KAAKE,KAAKe,YAzCfxB,EAAcyB,EAAA,CADlCC,cAiBQC,EAAA,EAAAC,YAAOC,IAAWC,kBAClBH,EAAA,EAAAC,YAAOC,IAAWE,iBAjBN/B,gB,sIChBrB,WAOC,KAPD,aACI,MAAMgC,EAAS,EAAQ,mCAAkBC,cAEzC,OAAO,SAAUC,GACbF,EAAOG,yBAAyBD,GAC3BE,SAAQ,SAAUC,GAAQC,SAASC,KAAKC,YAAYH,QAEhE,+B,wKCLDvC,EADkC,EAAQ,wDAChC2C,EAA4B,IAE9BC,KAAK,CAAC/C,EAAOC,EAAI,gPAAiP,KAE1QD,EAAOG,QAAUA,G,wHCHjBH,EAAOG,QAFI","file":"309.2548dad081b60865df26.js","sourcesContent":["define([\n \"!!../../../node_modules/html-loader/dist/cjs.js??ref--26-1!./progressRing.html\", \n \"!../../webpack/runtime/htmlExposer.js\"], function (content, expose) {\n content = content.__esModule ? content.default : content;\n expose(content);\n return content;\n });","var api = require(\"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n var content = require(\"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./progressRing.scss\");\n\n content = content.__esModule ? content.default : content;\n\n if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nmodule.exports = content.locals || {};","import { wccModules } from 'enums/wccModules';\r\nimport { inject, injectable } from 'inversify';\r\nimport { Subscribable, SubscribableOrNullableValue } from 'knockout';\r\nimport './progressRing.html';\r\nimport './progressRing.scss';\r\n\nexport interface ProgressRingVMConfig {\n value: SubscribableOrNullableValue\r\n\r\n strokeWidth?: SubscribableOrNullableValue\r\n color?: SubscribableOrNullableValue\r\n backgroundColor?: SubscribableOrNullableValue\r\n size?: SubscribableOrNullableValue\r\n}\n\n@injectable()\nexport default class ProgressRingVM {\n color: Subscribable\n backgroundColor: Subscribable\n\n size: Subscribable\n center: Subscribable\n radius: Subscribable\n\n strokeWidth: Subscribable\n strokeDashArray: Subscribable\n strokeDashOffset: Subscribable\n backgroundStrokeDashOffset: Subscribable\n\n isReady: Subscribable\n\n constructor(\r\n @inject(wccModules.componentConfig) config: ProgressRingVMConfig,\r\n @inject(wccModules.componentInfo) info: ko.components.ComponentInfo\r\n ) {\r\n const value = ko.flattenComputed(config.value, 0);\n this.strokeWidth = ko.flattenComputed(config.strokeWidth, 2);\n this.size = ko.flattenComputed(config.size, 120);\n this.color = ko.flattenComputed(config.color, '#fff');\n this.backgroundColor = ko.flattenComputed(config.backgroundColor);\n\n this.center = ko.pureComputed(() => this.size() / 2);\n this.radius = ko.pureComputed(() => this.center() - this.strokeWidth() / 2);\n const circumference = ko.pureComputed(() => this.radius() * 2 * Math.PI);\n this.strokeDashArray = ko.pureComputed(() => circumference() + ' ' + circumference());\n this.strokeDashOffset = ko.pureComputed(() => circumference() - value() / 100 * circumference());\n this.backgroundStrokeDashOffset = ko.pureComputed(() => -value() / 100 * circumference());\n\n this.isReady = ko.pureComputed(() => this.radius() > 0);\n\n ko.applyBindingsToNode(info.element, {\n 'css': {\n 'progress-ring': true\n },\n\n 'style': {\n 'width': this.size.toPx(),\n 'height': this.size.toPx()\n }\n });\n }\r\n}","define(function () {\r\n const system = require('helpers/system').SystemHelpers;\r\n\r\n return function (html) {\r\n system.getTemplatesAndResources(html)\r\n .forEach(function (node) { document.head.appendChild(node) });\r\n }\r\n});","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \".progress-ring{position:relative;display:inline-block}.progress-ring__layer{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center}.progress-ring__circle{transition:350ms stroke-dashoffset}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// Module\nvar code = \"\";\n// Exports\nmodule.exports = code;"],"sourceRoot":""}