diff --git a/CHANGELOG.md b/CHANGELOG.md index da206e4..9e00add 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [0.1.0](https://github.com/ittus/vue-long-click/compare/v0.0.4...v0.1.0) (2021-09-03) + + +### Features + +* add semantic release ([#33](https://github.com/ittus/vue-long-click/issues/33)) ([8453e00](https://github.com/ittus/vue-long-click/commit/8453e00c605a99920b5ec8b460455feb1dab6bfa)) + # [0.1.0-beta.1](https://github.com/ittus/vue-long-click/compare/v0.0.4...v0.1.0-beta.1) (2021-09-03) diff --git a/dist/docs/index.html b/dist/docs/index.html index 070db64..d3876de 100644 --- a/dist/docs/index.html +++ b/dist/docs/index.html @@ -1 +1 @@ -vue-long-click
\ No newline at end of file +vue-long-click
\ No newline at end of file diff --git a/dist/docs/js/app.5d752d92.js b/dist/docs/js/app.ef2dde6d.js similarity index 99% rename from dist/docs/js/app.5d752d92.js rename to dist/docs/js/app.ef2dde6d.js index c5537b6..1307de4 100644 --- a/dist/docs/js/app.5d752d92.js +++ b/dist/docs/js/app.ef2dde6d.js @@ -1,2 +1,2 @@ (function(n){function t(t){for(var o,u,a=t[0],i=t[1],l=t[2],f=0,p=[];f changeValue(1)"}],on:{click:function(t){return n.changeValue(1)}}},[n._v("+")]),e("button",{directives:[{name:"longclick",rawName:"v-longclick",value:function(){return n.changeValue(-1)},expression:"() => changeValue(-1)"}],on:{click:function(){return n.changeValue(-1)}}},[n._v("-")])])])])])},a=[],i={name:"HelloWorld",props:{msg:String},data:function(){return{counter:0}},methods:{changeValue:function(n){console.log("Change amount by ".concat(n)),this.counter=this.counter+n}}},l=i,s=(e("bfa7"),e("2877")),f=Object(s["a"])(l,u,a,!1,null,"b31dd1f8",null),p=f.exports,d={name:"app",components:{Demo:p}},v=d,g=(e("034f"),Object(s["a"])(v,r,c,!1,null,null,null)),h=g.exports,b=(e("ac6a"),e("7f7f"),function(n){var t=n.delay,e=void 0===t?400:t,o=n.interval,r=void 0===o?50:o;return{bind:function(n,t,o){if("function"!==typeof t.value){var c=o.context.name,u="[longclick:] provided expression '".concat(t.expression,"' is not a function, but has to be");c&&(u+="Found in component '".concat(c,"' ")),console.warn(u)}var a=null,i=null,l=function(n){"click"===n.type&&0!==n.button||null===a&&(a=setTimeout((function(){r&&r>0&&(i=setInterval((function(){f()}),r)),f()}),e))},s=function(){null!==a&&(clearTimeout(a),a=null),i&&(clearInterval(i),i=null)},f=function(n){t.value(n)};["mousedown","touchstart"].forEach((function(t){return n.addEventListener(t,l)})),["click","mouseout","touchend","touchcancel"].forEach((function(t){return n.addEventListener(t,s)}))}}}),m=b;o["a"].config.productionTip=!1;var y=m({delay:400,interval:50});o["a"].directive("longclick",y),new o["a"]({render:function(n){return n(h)}}).$mount("#app")},"64a9":function(n,t,e){},bfa7:function(n,t,e){"use strict";e("4284")},cf05:function(n,t,e){n.exports=e.p+"img/logo.82b9c7a5.png"}}); -//# sourceMappingURL=app.5d752d92.js.map \ No newline at end of file +//# sourceMappingURL=app.ef2dde6d.js.map \ No newline at end of file diff --git a/dist/docs/js/app.5d752d92.js.map b/dist/docs/js/app.ef2dde6d.js.map similarity index 99% rename from dist/docs/js/app.5d752d92.js.map rename to dist/docs/js/app.ef2dde6d.js.map index 2d75130..b6809fa 100644 --- a/dist/docs/js/app.5d752d92.js.map +++ b/dist/docs/js/app.ef2dde6d.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/App.vue?4241","webpack:///./src/App.vue?3e18","webpack:///./src/components/Demo.vue?8ebd","webpack:///src/components/Demo.vue","webpack:///./src/components/Demo.vue?9a6b","webpack:///./src/components/Demo.vue?cd6b","webpack:///src/App.vue","webpack:///./src/App.vue?1160","webpack:///./src/App.vue?bff9","webpack:///./src/directives/longclick.js","webpack:///./src/index.js","webpack:///./src/main.js","webpack:///./src/components/Demo.vue?d18d","webpack:///./src/assets/logo.png"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","_v","_m","staticRenderFns","_s","counter","directives","rawName","changeValue","expression","on","$event","props","msg","String","methods","console","log","amount","component","components","Demo","delay","interval","el","binding","vNode","compName","context","warn","pressTimer","pressInterval","start","e","type","button","setTimeout","setInterval","handler","cancel","clearTimeout","clearInterval","forEach","addEventListener","longClickDirective","longClick","Vue","config","productionTip","longClickInstance","directive","render","h","App","$mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EA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,GAA6B,oBAAlBD,EAAQhD,MAAsB,CACvC,IAAMkD,EAAWD,EAAME,QAAQ5D,KAC3B6D,EAAO,qCAAH,OAAwCJ,EAAQhB,WAAhD,sCACJkB,IAAYE,GAAQ,uBAAJ,OAA2BF,EAA3B,OACpBX,QAAQa,KAAKA,GAGf,IAAIC,EAAa,KACbC,EAAgB,KAEdC,EAAQ,SAACC,GACE,UAAXA,EAAEC,MAAiC,IAAbD,EAAEE,QAIT,OAAfL,IACFA,EAAaM,YAAW,WAClBb,GAAYA,EAAW,IACzBQ,EAAgBM,aAAY,WAC1BC,MACCf,IAELe,MACChB,KAKDiB,EAAS,WACM,OAAfT,IACFU,aAAaV,GACbA,EAAa,MAEXC,IACFU,cAAcV,GACdA,EAAgB,OAIdO,EAAU,SAACL,GACfR,EAAQhD,MAAMwD,IAGf,CAAC,YAAa,cAAcS,SAAQ,SAAAT,GAAC,OAAIT,EAAGmB,iBAAiBV,EAAGD,MAChE,CAAC,QAAS,WAAY,WAAY,eAAeU,SAAQ,SAAAT,GAAC,OAAIT,EAAGmB,iBAAiBV,EAAGM,UC5C7EK,EAAqBC,ECElCC,OAAIC,OAAOC,eAAgB,EAE3B,IAAMC,EAAoBL,EAAmB,CAACtB,MAAO,IAAKC,SAAU,KACpEuB,OAAII,UAAU,YAAaD,GAE3B,IAAIH,OAAI,CACNK,OAAQ,SAAAC,GAAC,OAAIA,EAAEC,MACdC,OAAO,S,2DCXV,W,qBCAA3F,EAAOD,QAAU,IAA0B","file":"js/app.5d752d92.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\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 \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\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.l = 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// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/vue-long-click/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('div',{staticClass:\"content\"},[_c('img',{attrs:{\"alt\":\"Vue logo\",\"src\":require(\"./assets/logo.png\")}}),_c('h3',[_vm._v(\"Vue long-click (longpress) demo \")]),_c('demo')],1),_vm._m(0)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('footer',{staticClass:\"footer\"},[_c('a',{attrs:{\"href\":\"https://github.com/ittus/vue-long-click\",\"target\":\"_blank\"}},[_c('strong',[_vm._v(\"https://github.com/ittus/vue-long-click\")])])])}]\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"center\"},[_c('div',{staticClass:\"container\"},[_c('p',{staticClass:\"counter\"},[_vm._v(_vm._s(_vm.counter))]),_c('div',{staticClass:\"actions\"},[_c('div',{staticClass:\"actions-inner\"},[_c('button',{directives:[{name:\"longclick\",rawName:\"v-longclick\",value:(function () { return _vm.changeValue(1); }),expression:\"() => changeValue(1)\"}],on:{\"click\":function($event){return _vm.changeValue(1)}}},[_vm._v(\"+\")]),_c('button',{directives:[{name:\"longclick\",rawName:\"v-longclick\",value:(function () { return _vm.changeValue(-1); }),expression:\"() => changeValue(-1)\"}],on:{\"click\":function () { return _vm.changeValue(-1); }}},[_vm._v(\"-\")])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Demo.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Demo.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Demo.vue?vue&type=template&id=b31dd1f8&scoped=true&\"\nimport script from \"./Demo.vue?vue&type=script&lang=js&\"\nexport * from \"./Demo.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Demo.vue?vue&type=style&index=0&id=b31dd1f8&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b31dd1f8\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=c82a922c&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export default ({delay = 400, interval = 50}) => ({\n bind: function (el, binding, vNode) {\n if (typeof binding.value !== 'function') {\n const compName = vNode.context.name\n let warn = `[longclick:] provided expression '${binding.expression}' is not a function, but has to be`\n if (compName) { warn += `Found in component '${compName}' ` }\n console.warn(warn) // eslint-disable-line\n }\n\n let pressTimer = null\n let pressInterval = null\n\n const start = (e) => {\n if (e.type === 'click' && e.button !== 0) {\n return\n }\n\n if (pressTimer === null) {\n pressTimer = setTimeout(() => {\n if (interval && interval > 0) {\n pressInterval = setInterval(() => {\n handler()\n }, interval)\n }\n handler()\n }, delay)\n }\n }\n\n // Cancel Timeout\n const cancel = () => {\n if (pressTimer !== null) {\n clearTimeout(pressTimer)\n pressTimer = null\n }\n if (pressInterval) {\n clearInterval(pressInterval)\n pressInterval = null\n }\n }\n // Run Function\n const handler = (e) => {\n binding.value(e)\n }\n\n ;['mousedown', 'touchstart'].forEach(e => el.addEventListener(e, start))\n ;['click', 'mouseout', 'touchend', 'touchcancel'].forEach(e => el.addEventListener(e, cancel))\n }\n})\n","import longClick from './directives/longclick'\n\nexport const longClickDirective = longClick\n","import Vue from 'vue'\nimport App from './App.vue'\nimport { longClickDirective } from './index'\n\nVue.config.productionTip = false\n\nconst longClickInstance = longClickDirective({delay: 400, interval: 50})\nVue.directive('longclick', longClickInstance)\n\nnew Vue({\n render: h => h(App),\n}).$mount('#app')\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Demo.vue?vue&type=style&index=0&id=b31dd1f8&scoped=true&lang=css&\"","module.exports = __webpack_public_path__ + \"img/logo.82b9c7a5.png\";"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/App.vue?4241","webpack:///./src/App.vue?c09b","webpack:///./src/components/Demo.vue?adbd","webpack:///src/components/Demo.vue","webpack:///./src/components/Demo.vue?9a6b","webpack:///./src/components/Demo.vue?cd6b","webpack:///src/App.vue","webpack:///./src/App.vue?1160","webpack:///./src/App.vue?bff9","webpack:///./src/directives/longclick.js","webpack:///./src/index.js","webpack:///./src/main.js","webpack:///./src/components/Demo.vue?d18d","webpack:///./src/assets/logo.png"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","_v","_m","staticRenderFns","_s","counter","directives","rawName","changeValue","expression","on","$event","props","msg","String","methods","console","log","amount","component","components","Demo","delay","interval","el","binding","vNode","compName","context","warn","pressTimer","pressInterval","start","e","type","button","setTimeout","setInterval","handler","cancel","clearTimeout","clearInterval","forEach","addEventListener","longClickDirective","longClick","Vue","config","productionTip","longClickInstance","directive","render","h","App","$mount"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAG/Be,GAAqBA,EAAoBhB,GAE5C,MAAMO,EAASC,OACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,EAAkB,CACrB,IAAO,GAGJK,EAAkB,GAGtB,SAASS,EAAoB1B,GAG5B,GAAG4B,EAAiB5B,GACnB,OAAO4B,EAAiB5B,GAAU6B,QAGnC,IAAIC,EAASF,E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AW,WAClBb,GAAYA,EAAW,IACzBQ,EAAgBM,aAAY,WAC1BC,MACCf,IAELe,MACChB,KAKDiB,EAAS,WACM,OAAfT,IACFU,aAAaV,GACbA,EAAa,MAEXC,IACFU,cAAcV,GACdA,EAAgB,OAIdO,EAAU,SAACL,GACfR,EAAQhD,MAAMwD,IAGf,CAAC,YAAa,cAAcS,SAAQ,SAAAT,GAAC,OAAIT,EAAGmB,iBAAiBV,EAAGD,MAChE,CAAC,QAAS,WAAY,WAAY,eAAeU,SAAQ,SAAAT,GAAC,OAAIT,EAAGmB,iBAAiBV,EAAGM,UC5C7EK,EAAqBC,ECElCC,OAAIC,OAAOC,eAAgB,EAE3B,IAAMC,EAAoBL,EAAmB,CAACtB,MAAO,IAAKC,SAAU,KACpEuB,OAAII,UAAU,YAAaD,GAE3B,IAAIH,OAAI,CACNK,OAAQ,SAAAC,GAAC,OAAIA,EAAEC,MACdC,OAAO,S,2DCXV,W,qBCAA3F,EAAOD,QAAU,IAA0B","file":"js/app.ef2dde6d.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"app\": 0\n \t};\n\n \tvar deferredModules = [];\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 \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\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.l = 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// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/vue-long-click/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"app\"}},[_c('div',{staticClass:\"content\"},[_c('img',{attrs:{\"alt\":\"Vue logo\",\"src\":require(\"./assets/logo.png\")}}),_c('h3',[_vm._v(\"Vue long-click (longpress) demo \")]),_c('demo')],1),_vm._m(0)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('footer',{staticClass:\"footer\"},[_c('a',{attrs:{\"href\":\"https://github.com/ittus/vue-long-click\",\"target\":\"_blank\"}},[_c('strong',[_vm._v(\"https://github.com/ittus/vue-long-click\")])])])}]\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"center\"},[_c('div',{staticClass:\"container\"},[_c('p',{staticClass:\"counter\"},[_vm._v(_vm._s(_vm.counter))]),_c('div',{staticClass:\"actions\"},[_c('div',{staticClass:\"actions-inner\"},[_c('button',{directives:[{name:\"longclick\",rawName:\"v-longclick\",value:(function () { return _vm.changeValue(1); }),expression:\"() => changeValue(1)\"}],on:{\"click\":function($event){return _vm.changeValue(1)}}},[_vm._v(\"+\")]),_c('button',{directives:[{name:\"longclick\",rawName:\"v-longclick\",value:(function () { return _vm.changeValue(-1); }),expression:\"() => changeValue(-1)\"}],on:{\"click\":function () { return _vm.changeValue(-1); }}},[_vm._v(\"-\")])])])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Demo.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Demo.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Demo.vue?vue&type=template&id=b31dd1f8&scoped=true&\"\nimport script from \"./Demo.vue?vue&type=script&lang=js&\"\nexport * from \"./Demo.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Demo.vue?vue&type=style&index=0&id=b31dd1f8&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"b31dd1f8\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=c82a922c&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export default ({delay = 400, interval = 50}) => ({\n bind: function (el, binding, vNode) {\n if (typeof binding.value !== 'function') {\n const compName = vNode.context.name\n let warn = `[longclick:] provided expression '${binding.expression}' is not a function, but has to be`\n if (compName) { warn += `Found in component '${compName}' ` }\n console.warn(warn) // eslint-disable-line\n }\n\n let pressTimer = null\n let pressInterval = null\n\n const start = (e) => {\n if (e.type === 'click' && e.button !== 0) {\n return\n }\n\n if (pressTimer === null) {\n pressTimer = setTimeout(() => {\n if (interval && interval > 0) {\n pressInterval = setInterval(() => {\n handler()\n }, interval)\n }\n handler()\n }, delay)\n }\n }\n\n // Cancel Timeout\n const cancel = () => {\n if (pressTimer !== null) {\n clearTimeout(pressTimer)\n pressTimer = null\n }\n if (pressInterval) {\n clearInterval(pressInterval)\n pressInterval = null\n }\n }\n // Run Function\n const handler = (e) => {\n binding.value(e)\n }\n\n ;['mousedown', 'touchstart'].forEach(e => el.addEventListener(e, start))\n ;['click', 'mouseout', 'touchend', 'touchcancel'].forEach(e => el.addEventListener(e, cancel))\n }\n})\n","import longClick from './directives/longclick'\n\nexport const longClickDirective = longClick\n","import Vue from 'vue'\nimport App from './App.vue'\nimport { longClickDirective } from './index'\n\nVue.config.productionTip = false\n\nconst longClickInstance = longClickDirective({delay: 400, interval: 50})\nVue.directive('longclick', longClickInstance)\n\nnew Vue({\n render: h => h(App),\n}).$mount('#app')\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Demo.vue?vue&type=style&index=0&id=b31dd1f8&scoped=true&lang=css&\"","module.exports = __webpack_public_path__ + \"img/logo.82b9c7a5.png\";"],"sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index 55fc9d8..ea9d8a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-long-click", - "version": "0.1.0-beta.1", + "version": "0.1.0", "private": false, "author": "Vu Minh Thang ", "description": "Long click (longpress) directive library for VueJS",