-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathvue2-loading-bar.js.map
1 lines (1 loc) · 7.92 KB
/
vue2-loading-bar.js.map
1
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap bf92c4fb90a3ae3ef5f7","webpack:///./src/js/components/index.js"],"names":["module","exports","name","props","id","String","customClass","progress","type","Number","default","direction","error","Boolean","onErrorDone","Function","required","onProgressDone","data","show","full","width","wait","myError","render","h","styling","watch","val","old","setTimeout","isFull","methods"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA;;;;;;;AAOAA,QAAOC,OAAP,GAAiB;AACfC,SAAM,YADS;;AAGfC,UAAO;AACLC,SAAIC,MADC;AAELC,kBAAaD,MAFR;;AAILE,eAAU;AACRC,aAAMC,MADE;AAERC,gBAAS;AAFD,MAJL;;AASL;AACAC,gBAAW;AACTH,aAAMH,MADG;AAETK,gBAAS;AAFA,MAVN;;AAeLE,YAAOC,OAfF,EAeW;;AAEhBC,kBAAa;AACXN,aAAMO,QADK;AAEXC,iBAAU;AAFC,MAjBR;;AAsBLC,qBAAgB;AACdT,aAAMO,QADQ;AAEdC,iBAAU;AAFI;;AAtBX,IAHQ;;AAgCfE,OAhCe,kBAgCR;;AAEL,YAAO;AACL;AACAC,aAAM,IAFD;;AAIL;AACAC,aAAM,EALD;;AAOL;AACAC,cAAO,CARF;;AAUL;AACAC,aAAM,KAXD;;AAaL;AACAC,gBAAS;AAdJ,MAAP;AAgBD,IAlDc;AAoDfC,SApDe,kBAoDRC,CApDQ,EAoDL;AAAA,SAENd,SAFM,GAIM,IAJN,CAENA,SAFM;AAAA,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5B;;AAEA;AACA,WAAGU,MAAH,EAAU;AACR;AACA,cAAKT,IAAL,GAAY,IAAZ;;AAEA;AACAQ,oBAAW,YAAM;;AAEf;AACA,kBAAKV,IAAL,GAAY,IAAZ;AACA,kBAAKG,OAAL,GAAe,KAAf;;AAEA,kBAAKT,WAAL;;AAEAgB,sBAAW,YAAM;AACf;AACA,oBAAKX,IAAL,GAAY,KAAZ;AACA;AACA,oBAAKE,KAAL,GAAa,CAAb;AACA,oBAAKC,IAAL,GAAY,KAAZ;;AAEAQ,wBAAW,YAAM;;AAEf;AACA,sBAAKV,IAAL,GAAY,EAAZ;AACA,sBAAKD,IAAL,GAAY,IAAZ;;AAEA,sBAAKF,cAAL;AAED,cARD;;AAUF;AACC,YAlBD,EAkBE,GAlBF;;AAoBF;AACC,UA7BD,EA6BE,GA7BF;AA8BD;AACF,MA3CM;AA6CPS,YA7CO,qBA6CE;AACP;AACA,WAAG,CAAC,KAAKJ,IAAT,EAAc;AACZ,gBAAO,EAAED,OAAU,KAAKA,KAAf,MAAF,EAAP;AACF;AACC,QAHD,MAGK;AACH;AACA,gBAAM,EAAEA,aAAF,EAAN;AACD;AACF;AAtDM;;AArGM,EAAjB,C","file":"vue2-loading-bar.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"LoadingBar\"] = factory();\n\telse\n\t\troot[\"LoadingBar\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./build/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap bf92c4fb90a3ae3ef5f7\n **/","/*! Copyright (c) 2016 Naufal Rabbani (http://github.com/BosNaufal)\n* Licensed Under MIT (http://opensource.org/licenses/MIT)\n*\n* Vue 2 Loading Bar - Version 0.0.1\n*\n*/\n\nmodule.exports = {\n name: \"LoadingBar\",\n\n props: {\n id: String,\n customClass: String,\n\n progress: {\n type: Number,\n default: 0\n },\n\n // the direction of loading bar\n direction: {\n type: String,\n default: \"right\"\n },\n\n error: Boolean, // Loading Bar error state\n\n onErrorDone: {\n type: Function,\n required: true\n },\n\n onProgressDone: {\n type: Function,\n required: true\n },\n\n },\n\n data() {\n\n return {\n // To show\n show: true,\n\n // binding class when it end\n full: '',\n\n // state to animate the width of loading bar\n width: 0,\n\n // indicate the loading bar is in 100% ( so, wait it till gone )\n wait: false,\n\n // Error State\n myError: false\n }\n },\n\n render(h) {\n let {\n direction, customClass, id,\n width, show, full, myError,\n styling } = this\n\n return(\n <div>\n { show ?\n <div\n id={ id ? id : null }\n class={\n 'LoadingBar LoadingBar--to_' + direction + ' ' +\n ( customClass ? customClass : '' ) +\n ( myError ? 'LoadingBar--error' : '' ) +\n ( full ? 'LoadingBar--full' : '')\n }\n style={ styling() }>\n <div class=\"LoadingBar-glow\"></div>\n </div>\n : null }\n </div>\n )\n },\n\n watch:{\n progress(val,old){\n if(old !== val){\n this.width = val\n setTimeout(() => {\n this.isFull()\n })\n }\n },\n\n error(val,old){\n if(old !== val) {\n if(val) {\n this.width = 100\n this.myError = true\n setTimeout(() => {\n this.isFull()\n })\n }\n }\n }\n\n },\n\n methods: {\n // Check whether the proggress is full\n isFull() {\n // Full Indicator\n let isFull = this.width === 100\n\n // When the progress end or full\n if(isFull){\n // Prevent new progress change\n this.wait = true\n\n // Start animate it\n setTimeout(() => {\n\n // animate when element removed\n this.full = true\n this.myError = false\n\n this.onErrorDone()\n\n setTimeout(() => {\n //remove bar element\n this.show = false\n // New Element is available to create now\n this.width = 0\n this.wait = false\n\n setTimeout(() => {\n\n // Show Bar\n this.full = ''\n this.show = true\n\n this.onProgressDone()\n\n });\n\n // Duration to Waiting for slick hiding animation\n },250);\n\n // Duration is depend on css animation-duration of loading-bar\n },700);\n }\n },\n\n styling(){\n // When loading bar still in progress\n if(!this.wait){\n return { width: `${this.width}%` };\n // When loading bar end\n }else{\n // Make it stuck at 100 to waiting the animation\n return{ width: `100%` };\n }\n }\n },\n\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/js/components/index.js\n **/"],"sourceRoot":""}