@takuma-ru/vue-swipe-modal
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -90,7 +90,11 @@ module.exports = | ||
/***/ "06a8": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
/***/ "451c": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
// extracted by mini-css-extract-plugin | ||
"use strict"; | ||
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_id_e1a0e99a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c5d5"); | ||
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_id_e1a0e99a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_id_e1a0e99a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); | ||
/* unused harmony reexport * */ | ||
/***/ }), | ||
@@ -222,11 +226,7 @@ | ||
/***/ "aa5c": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
/***/ "c5d5": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("06a8"); | ||
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__); | ||
/* unused harmony reexport * */ | ||
// extracted by mini-css-extract-plugin | ||
/***/ }), | ||
@@ -266,3 +266,3 @@ | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"22ad4f7a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/SwipeModal.vue?vue&type=template&id=65313bad& | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3aed9f18-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/SwipeModal.vue?vue&type=template&id=e1a0e99a&scoped=true& | ||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":"modal"},on:{"mousemove":_vm.mouseMove,"mouseup":_vm.mouseUp}},[_c('transition',{attrs:{"name":"swipe_modal_background"}},[(_vm.modal)?_c('div',{staticClass:"modal_background",style:({ | ||
@@ -296,3 +296,3 @@ backgroundColor: _vm.backgroundColor, | ||
// CONCATENATED MODULE: ./src/SwipeModal.vue?vue&type=template&id=65313bad& | ||
// CONCATENATED MODULE: ./src/SwipeModal.vue?vue&type=template&id=e1a0e99a&scoped=true& | ||
@@ -528,4 +528,4 @@ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/SwipeModal.vue?vue&type=script&lang=js& | ||
/* harmony default export */ var src_SwipeModalvue_type_script_lang_js_ = (SwipeModalvue_type_script_lang_js_); | ||
// EXTERNAL MODULE: ./src/SwipeModal.vue?vue&type=style&index=0&lang=scss& | ||
var SwipeModalvue_type_style_index_0_lang_scss_ = __webpack_require__("aa5c"); | ||
// EXTERNAL MODULE: ./src/SwipeModal.vue?vue&type=style&index=0&id=e1a0e99a&lang=scss&scoped=true& | ||
var SwipeModalvue_type_style_index_0_id_e1a0e99a_lang_scss_scoped_true_ = __webpack_require__("451c"); | ||
@@ -647,3 +647,3 @@ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js | ||
null, | ||
null, | ||
"e1a0e99a", | ||
null | ||
@@ -650,0 +650,0 @@ |
@@ -99,7 +99,11 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
/***/ "06a8": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
/***/ "451c": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
// extracted by mini-css-extract-plugin | ||
"use strict"; | ||
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_id_e1a0e99a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("c5d5"); | ||
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_id_e1a0e99a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_id_e1a0e99a_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__); | ||
/* unused harmony reexport * */ | ||
/***/ }), | ||
@@ -231,11 +235,7 @@ | ||
/***/ "aa5c": | ||
/***/ (function(module, __webpack_exports__, __webpack_require__) { | ||
/***/ "c5d5": | ||
/***/ (function(module, exports, __webpack_require__) { | ||
"use strict"; | ||
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("06a8"); | ||
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SwipeModal_vue_vue_type_style_index_0_lang_scss___WEBPACK_IMPORTED_MODULE_0__); | ||
/* unused harmony reexport * */ | ||
// extracted by mini-css-extract-plugin | ||
/***/ }), | ||
@@ -275,3 +275,3 @@ | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"22ad4f7a-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/SwipeModal.vue?vue&type=template&id=65313bad& | ||
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"3aed9f18-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/SwipeModal.vue?vue&type=template&id=e1a0e99a&scoped=true& | ||
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":"modal"},on:{"mousemove":_vm.mouseMove,"mouseup":_vm.mouseUp}},[_c('transition',{attrs:{"name":"swipe_modal_background"}},[(_vm.modal)?_c('div',{staticClass:"modal_background",style:({ | ||
@@ -305,3 +305,3 @@ backgroundColor: _vm.backgroundColor, | ||
// CONCATENATED MODULE: ./src/SwipeModal.vue?vue&type=template&id=65313bad& | ||
// CONCATENATED MODULE: ./src/SwipeModal.vue?vue&type=template&id=e1a0e99a&scoped=true& | ||
@@ -537,4 +537,4 @@ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/SwipeModal.vue?vue&type=script&lang=js& | ||
/* harmony default export */ var src_SwipeModalvue_type_script_lang_js_ = (SwipeModalvue_type_script_lang_js_); | ||
// EXTERNAL MODULE: ./src/SwipeModal.vue?vue&type=style&index=0&lang=scss& | ||
var SwipeModalvue_type_style_index_0_lang_scss_ = __webpack_require__("aa5c"); | ||
// EXTERNAL MODULE: ./src/SwipeModal.vue?vue&type=style&index=0&id=e1a0e99a&lang=scss&scoped=true& | ||
var SwipeModalvue_type_style_index_0_id_e1a0e99a_lang_scss_scoped_true_ = __webpack_require__("451c"); | ||
@@ -656,3 +656,3 @@ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js | ||
null, | ||
null, | ||
"e1a0e99a", | ||
null | ||
@@ -659,0 +659,0 @@ |
@@ -1,2 +0,2 @@ | ||
(function(t,o){"object"===typeof exports&&"object"===typeof module?module.exports=o():"function"===typeof define&&define.amd?define([],o):"object"===typeof exports?exports["swipemodal"]=o():t["swipemodal"]=o()})("undefined"!==typeof self?self:this,(function(){return function(t){var o={};function e(n){if(o[n])return o[n].exports;var i=o[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=o,e.d=function(t,o,n){e.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:n})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,o){if(1&o&&(t=e(t)),8&o)return t;if(4&o&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var i in t)e.d(n,i,function(o){return t[o]}.bind(null,i));return n},e.n=function(t){var o=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},e.p="",e(e.s="fb15")}({"06a8":function(t,o,e){},"46c2":function(t,o,e){"use strict";(function(t){e.d(o,"b",(function(){return i}));var n=e("d285");function i(t){i.installed||(i.installed=!0,t.component("swipe-modal",n["a"]))}const r={install:i};let s=null;"undefined"!==typeof window?s=window.Vue:"undefined"!==typeof t&&(s=t.Vue),s&&s.use(r),o["a"]=n["a"]}).call(this,e("c8ba"))},8875:function(t,o,e){var n,i,r;(function(e,s){i=[],n=s,r="function"===typeof n?n.apply(o,i):n,void 0===r||(t.exports=r)})("undefined"!==typeof self&&self,(function(){function t(){var o=Object.getOwnPropertyDescriptor(document,"currentScript");if(!o&&"currentScript"in document&&document.currentScript)return document.currentScript;if(o&&o.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(h){var e,n,i,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,u=r.exec(h.stack)||s.exec(h.stack),c=u&&u[1]||!1,a=u&&u[2]||!1,d=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");c===d&&(e=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(a-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=e.replace(n,"$1").trim());for(var p=0;p<l.length;p++){if("interactive"===l[p].readyState)return l[p];if(l[p].src===c)return l[p];if(c===d&&l[p].innerHTML&&l[p].innerHTML.trim()===i)return l[p]}return null}}return t}))},aa5c:function(t,o,e){"use strict";e("06a8")},c8ba:function(t,o){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(n){"object"===typeof window&&(e=window)}t.exports=e},d285:function(t,o,e){"use strict";var n=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{attrs:{id:"modal"},on:{mousemove:t.mouseMove,mouseup:t.mouseUp}},[e("transition",{attrs:{name:"swipe_modal_background"}},[t.modal?e("div",{staticClass:"modal_background",style:{backgroundColor:t.backgroundColor},on:{mouseup:function(o){!t.persistent&&t.close()}}}):t._e()]),e("transition",{attrs:{name:"swipe_modal_contents"}},[t.modal?e("div",{ref:"modal_contents",staticClass:"modal_contents",style:{width:t.contentsWidth,"--contents-height":t.fullscreen?"100%":t.modalHeight>0?t.modalHeight+"px":t.contentsHeight,borderTopLeftRadius:t.fullscreen?"0px":t.borderTopRadius?t.borderTopRadius:t.borderTopLeftRadius,borderTopRightRadius:t.fullscreen?"0px":t.borderTopRadius?t.borderTopRadius:t.borderTopRightRadius,backgroundColor:t.dark?t.darkContentsColor:t.contentsColor,color:t.dark?"white":"back","--contents-bottom-position":t.contentsBottomPosition},on:{touchstart:t.touchStart,touchmove:t.touchMove,touchend:t.touchEnd}},[t.noTip?t._e():e("div",{staticClass:"modal_contents_chip",style:{"--tip-color":t.tipColor},on:{mousedown:t.mouseDown}}),t._t("default")],2):t._e()])],1)},i=[],r={model:{prop:"modal",event:"change-modal"},props:{modal:Boolean,dark:Boolean,persistent:Boolean,backgroundColor:{type:String,default:"#80808080"},fullscreen:Boolean,noTip:Boolean,contentsWidth:{type:String,default:"100%"},contentsHeight:{type:String,default:"30vh"},borderTopRadius:{type:String,default:null},borderTopLeftRadius:{type:String,default:"0px"},borderTopRightRadius:{type:String,default:"0px"},contentsColor:{type:String,default:"white"},tipColor:{type:String,default:"#c8c8c8"},darkContentsColor:{type:String,default:"black"}},data(){return{isMouseDown:!1,isTouch:!1,modalQuery:null,modalHeight:0,contentsBottomPosition:0,startMovePosition:0,nowMovePosition:0}},computed:{},watch:{modal(t){t&&this.open()}},methods:{open(){this.init(),document.documentElement.style.overflowY="hidden"},close(){this.isMouseDown=!1,this.isTouch=!1,document.documentElement.style.overflowY="auto",this.$emit("change-modal",!1)},init(){this.isMouseDown=!1,this.isTouch=!1,this.modalQuery=null,this.modalHeight=0,this.contentsBottomPosition=0,this.startMovePosition=0,this.nowMovePosition=0},touchStart(t){this.modalQuery=document.querySelector(".modal_contents"),this.modalHeight=this.modalQuery.getBoundingClientRect().height,this.modalQuery.scrollTop<=0&&(this.moveStartPosition=t.touches[0].pageY,this.isTouch=!0)},touchMove(t){this.isTouch&&(this.nowMovePosition=t.touches[0].pageY,this.moveStartPosition-this.nowMovePosition<=0?this.contentsBottomPosition=this.moveStartPosition-this.nowMovePosition:this.contentsBottomPosition="0px",this.contentsBottomPosition=(this.moveStartPosition-this.nowMovePosition<=0?this.moveStartPosition-this.nowMovePosition:0)+"px")},touchEnd(){this.isTouch=!1,-1*(this.moveStartPosition-this.nowMovePosition)>this.modalHeight*(1/8)?this.close():this.contentsBottomPosition="0px"},mouseDown(t){this.modalQuery=document.querySelector(".modal_contents"),this.modalHeight=this.modalQuery.getBoundingClientRect().height,this.moveStartPosition=t.pageY,this.isMouseDown=!0},mouseMove(t){this.isMouseDown&&(this.nowMovePosition=t.pageY,this.contentsBottomPosition=(this.moveStartPosition-this.nowMovePosition<=0?this.moveStartPosition-this.nowMovePosition:0)+"px")},mouseUp(){this.isMouseDown=!1,-1*(this.moveStartPosition-this.nowMovePosition)>this.modalHeight*(1/8)?this.close():this.contentsBottomPosition="0px"}}},s=r;e("aa5c");function u(t,o,e,n,i,r,s,u){var c,a="function"===typeof t?t.options:t;if(o&&(a.render=o,a.staticRenderFns=e,a._compiled=!0),n&&(a.functional=!0),r&&(a._scopeId="data-v-"+r),s?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},a._ssrRegister=c):i&&(c=u?function(){i.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(a.functional){a._injectStyles=c;var d=a.render;a.render=function(t,o){return c.call(o),d(t,o)}}else{var l=a.beforeCreate;a.beforeCreate=l?[].concat(l,c):[c]}return{exports:t,options:a}}var c=u(s,n,i,!1,null,null,null);o["a"]=c.exports},fb15:function(t,o,e){"use strict";if(e.r(o),e.d(o,"install",(function(){return s["b"]})),"undefined"!==typeof window){var n=window.document.currentScript,i=e("8875");n=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(e.p=r[1])}var s=e("46c2");o["default"]=s["a"]}})})); | ||
(function(t,o){"object"===typeof exports&&"object"===typeof module?module.exports=o():"function"===typeof define&&define.amd?define([],o):"object"===typeof exports?exports["swipemodal"]=o():t["swipemodal"]=o()})("undefined"!==typeof self?self:this,(function(){return function(t){var o={};function e(n){if(o[n])return o[n].exports;var i=o[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=o,e.d=function(t,o,n){e.o(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:n})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,o){if(1&o&&(t=e(t)),8&o)return t;if(4&o&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&o&&"string"!=typeof t)for(var i in t)e.d(n,i,function(o){return t[o]}.bind(null,i));return n},e.n=function(t){var o=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,o){return Object.prototype.hasOwnProperty.call(t,o)},e.p="",e(e.s="fb15")}({"451c":function(t,o,e){"use strict";e("c5d5")},"46c2":function(t,o,e){"use strict";(function(t){e.d(o,"b",(function(){return i}));var n=e("d285");function i(t){i.installed||(i.installed=!0,t.component("swipe-modal",n["a"]))}const r={install:i};let s=null;"undefined"!==typeof window?s=window.Vue:"undefined"!==typeof t&&(s=t.Vue),s&&s.use(r),o["a"]=n["a"]}).call(this,e("c8ba"))},8875:function(t,o,e){var n,i,r;(function(e,s){i=[],n=s,r="function"===typeof n?n.apply(o,i):n,void 0===r||(t.exports=r)})("undefined"!==typeof self&&self,(function(){function t(){var o=Object.getOwnPropertyDescriptor(document,"currentScript");if(!o&&"currentScript"in document&&document.currentScript)return document.currentScript;if(o&&o.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(h){var e,n,i,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,s=/@([^@]*):(\d+):(\d+)\s*$/gi,c=r.exec(h.stack)||s.exec(h.stack),u=c&&c[1]||!1,a=c&&c[2]||!1,d=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");u===d&&(e=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(a-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=e.replace(n,"$1").trim());for(var p=0;p<l.length;p++){if("interactive"===l[p].readyState)return l[p];if(l[p].src===u)return l[p];if(u===d&&l[p].innerHTML&&l[p].innerHTML.trim()===i)return l[p]}return null}}return t}))},c5d5:function(t,o,e){},c8ba:function(t,o){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(n){"object"===typeof window&&(e=window)}t.exports=e},d285:function(t,o,e){"use strict";var n=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{attrs:{id:"modal"},on:{mousemove:t.mouseMove,mouseup:t.mouseUp}},[e("transition",{attrs:{name:"swipe_modal_background"}},[t.modal?e("div",{staticClass:"modal_background",style:{backgroundColor:t.backgroundColor},on:{mouseup:function(o){!t.persistent&&t.close()}}}):t._e()]),e("transition",{attrs:{name:"swipe_modal_contents"}},[t.modal?e("div",{ref:"modal_contents",staticClass:"modal_contents",style:{width:t.contentsWidth,"--contents-height":t.fullscreen?"100%":t.modalHeight>0?t.modalHeight+"px":t.contentsHeight,borderTopLeftRadius:t.fullscreen?"0px":t.borderTopRadius?t.borderTopRadius:t.borderTopLeftRadius,borderTopRightRadius:t.fullscreen?"0px":t.borderTopRadius?t.borderTopRadius:t.borderTopRightRadius,backgroundColor:t.dark?t.darkContentsColor:t.contentsColor,color:t.dark?"white":"back","--contents-bottom-position":t.contentsBottomPosition},on:{touchstart:t.touchStart,touchmove:t.touchMove,touchend:t.touchEnd}},[t.noTip?t._e():e("div",{staticClass:"modal_contents_chip",style:{"--tip-color":t.tipColor},on:{mousedown:t.mouseDown}}),t._t("default")],2):t._e()])],1)},i=[],r={model:{prop:"modal",event:"change-modal"},props:{modal:Boolean,dark:Boolean,persistent:Boolean,backgroundColor:{type:String,default:"#80808080"},fullscreen:Boolean,noTip:Boolean,contentsWidth:{type:String,default:"100%"},contentsHeight:{type:String,default:"30vh"},borderTopRadius:{type:String,default:null},borderTopLeftRadius:{type:String,default:"0px"},borderTopRightRadius:{type:String,default:"0px"},contentsColor:{type:String,default:"white"},tipColor:{type:String,default:"#c8c8c8"},darkContentsColor:{type:String,default:"black"}},data(){return{isMouseDown:!1,isTouch:!1,modalQuery:null,modalHeight:0,contentsBottomPosition:0,startMovePosition:0,nowMovePosition:0}},computed:{},watch:{modal(t){t&&this.open()}},methods:{open(){this.init(),document.documentElement.style.overflowY="hidden"},close(){this.isMouseDown=!1,this.isTouch=!1,document.documentElement.style.overflowY="auto",this.$emit("change-modal",!1)},init(){this.isMouseDown=!1,this.isTouch=!1,this.modalQuery=null,this.modalHeight=0,this.contentsBottomPosition=0,this.startMovePosition=0,this.nowMovePosition=0},touchStart(t){this.modalQuery=document.querySelector(".modal_contents"),this.modalHeight=this.modalQuery.getBoundingClientRect().height,this.modalQuery.scrollTop<=0&&(this.moveStartPosition=t.touches[0].pageY,this.isTouch=!0)},touchMove(t){this.isTouch&&(this.nowMovePosition=t.touches[0].pageY,this.moveStartPosition-this.nowMovePosition<=0?this.contentsBottomPosition=this.moveStartPosition-this.nowMovePosition:this.contentsBottomPosition="0px",this.contentsBottomPosition=(this.moveStartPosition-this.nowMovePosition<=0?this.moveStartPosition-this.nowMovePosition:0)+"px")},touchEnd(){this.isTouch=!1,-1*(this.moveStartPosition-this.nowMovePosition)>this.modalHeight*(1/8)?this.close():this.contentsBottomPosition="0px"},mouseDown(t){this.modalQuery=document.querySelector(".modal_contents"),this.modalHeight=this.modalQuery.getBoundingClientRect().height,this.moveStartPosition=t.pageY,this.isMouseDown=!0},mouseMove(t){this.isMouseDown&&(this.nowMovePosition=t.pageY,this.contentsBottomPosition=(this.moveStartPosition-this.nowMovePosition<=0?this.moveStartPosition-this.nowMovePosition:0)+"px")},mouseUp(){this.isMouseDown=!1,-1*(this.moveStartPosition-this.nowMovePosition)>this.modalHeight*(1/8)?this.close():this.contentsBottomPosition="0px"}}},s=r;e("451c");function c(t,o,e,n,i,r,s,c){var u,a="function"===typeof t?t.options:t;if(o&&(a.render=o,a.staticRenderFns=e,a._compiled=!0),n&&(a.functional=!0),r&&(a._scopeId="data-v-"+r),s?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},a._ssrRegister=u):i&&(u=c?function(){i.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(a.functional){a._injectStyles=u;var d=a.render;a.render=function(t,o){return u.call(o),d(t,o)}}else{var l=a.beforeCreate;a.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:a}}var u=c(s,n,i,!1,null,"e1a0e99a",null);o["a"]=u.exports},fb15:function(t,o,e){"use strict";if(e.r(o),e.d(o,"install",(function(){return s["b"]})),"undefined"!==typeof window){var n=window.document.currentScript,i=e("8875");n=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(e.p=r[1])}var s=e("46c2");o["default"]=s["a"]}})})); | ||
//# sourceMappingURL=swipemodal.umd.min.js.map |
{ | ||
"name": "@takuma-ru/vue-swipe-modal", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"private": false, | ||
@@ -35,3 +35,3 @@ "main": "dist/swipemodal.umd.js", | ||
"url": "https://github.com/takuma-ru/vue_SwipeModal/issues", | ||
"email" : "kcattdev@gmail.com" | ||
"email": "kcattdev@gmail.com" | ||
}, | ||
@@ -47,6 +47,6 @@ "homepage": "https://vue-swipe-modal.vercel.app/", | ||
"core-js": "^3.6.5", | ||
"vue": "^2.6.11", | ||
"fibers": "^5.0.0" | ||
"vue": "^2.6.11" | ||
}, | ||
"devDependencies": { | ||
"fibers": "^5.0.0", | ||
"@vue/cli-plugin-babel": "~4.5.0", | ||
@@ -53,0 +53,0 @@ "@vue/cli-plugin-eslint": "~4.5.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148739
2
1253
10
- Removedfibers@^5.0.0
- Removeddetect-libc@1.0.3(transitive)
- Removedfibers@5.0.3(transitive)