Socket
Socket
Sign inDemoInstall

bestnihon-react-components

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bestnihon-react-components - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

es/NavBar/NavBar.css

6

es/NavBar/NavBar.js

@@ -20,3 +20,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

NavBar.prototype.render = function render() {
return React.createElement('div', null);
return React.createElement(
'div',
null,
'\u6D4B\u8BD5\u7528\u7684\u5BFC\u822A\u680F'
);
};

@@ -23,0 +27,0 @@

@@ -29,3 +29,7 @@ 'use strict';

NavBar.prototype.render = function render() {
return _react2.default.createElement('div', null);
return _react2.default.createElement(
'div',
null,
'\u6D4B\u8BD5\u7528\u7684\u5BFC\u822A\u680F'
);
};

@@ -32,0 +36,0 @@

2

package.json
{
"name": "bestnihon-react-components",
"version": "1.0.1",
"version": "1.0.2",
"description": "bestnihon-react-components React component",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

/*!
* bestnihon-react-components v1.0.1
* bestnihon-react-components v1.0.2
* MIT Licensed

@@ -424,3 +424,7 @@ */

NavBar.prototype.render = function render() {
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement('div', null);
return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(
'div',
null,
'\u6D4B\u8BD5\u7528\u7684\u5BFC\u822A\u680F'
);
};

@@ -427,0 +431,0 @@

/*!
* bestnihon-react-components v1.0.1
* bestnihon-react-components v1.0.2
* MIT Licensed
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.Y=t(require("react")):e.Y=t(e.React)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(t,n){t.exports=e},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3);n.d(t,"TabContainer",function(){return o.a});var r=n(5);n.d(t,"TabContainerItem",function(){return r.a});var i=n(7);n.d(t,"NavBar",function(){return i.a})},function(e,t,n){"use strict";var o=n(0),r=n.n(o),i=n(4);n.n(i);var c="left",s="right",a="top",u="down",l=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return o.slideStart=function(e){console.log(e.changedTouches[0].pageX),o.startX=e.changedTouches[0].pageX,o.startY=e.changedTouches[0].pageY,o.quiescingTouch()},o.slideMove=function(e){var t=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY,r=t-o.startX,i=n-o.startY;Math.abs(r)>Math.abs(i)&&r>0?(console.log("向右",r,o.container.scrollLeft),o.touchDes=s,0!==o.index&&(o.container.scrollLeft=o.index*o.itemWidth-r)):Math.abs(r)>Math.abs(i)&&r<0?(console.log("向左",r,o.container.scrollLeft),o.touchDes=c,o.index!==o.props.children.length-1&&(o.container.scrollLeft=o.index*o.itemWidth-r)):Math.abs(i)>Math.abs(r)&&i>0?(console.log("向下"),o.touchDes=u):Math.abs(i)>Math.abs(r)&&i<0?(console.log("向上"),o.touchDes=a):console.log("没有发生滑动")},o.slideEnd=function(e){o.endX=e.changedTouches[0].clientX,console.log("touch 结束"),o.timer||(console.log("没有进行中 timer 进入 check"),o.checkTouch())},o.checkTouch=function(){if(o.touchDes===s||o.touchDes===c){var e={right:function(){0!==o.index&&o.index--},left:function(){o.index!==o.props.children.length-1&&o.index++}};Math.abs(o.endX-o.startX)>=o.interval&&e[o.touchDes]()}o.animate()},o.animate=function(){var e=o.itemWidth*o.index;console.log("目标的 scrollleft ==> "+e),o.timer=setInterval(function(){var t=(e-o.container.scrollLeft)/5;t=t>0?Math.ceil(t):Math.floor(t),o.container.scrollLeft+=t,Math.abs(e-o.container.scrollLeft)<=Math.abs(t)&&(clearInterval(o.timer),o.timer=void 0,o.container.scrollLeft=e,console.log("进入销毁程序",o.container.scrollLeft,e))},10)},o.itemWidth=window.screen.width,o.interval=n.interval||parseInt(o.itemWidth/3),o.index=n.index||0,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){this.container.scrollLeft=this.index*this.itemWidth,this.container.addEventListener("touchstart",this.slideStart)},t.prototype.componentWillUnmount=function(){this.container.removeEventListener("touchstart",this.slideStart),this.container.removeEventListener("touchmove",this.slideMove),this.container.removeEventListener("touchend",this.slideEnd)},t.prototype.quiescingTouch=function(){this.startX<30?(this.container.removeEventListener("touchmove",this.slideMove),this.container.removeEventListener("touchend",this.slideEnd),this.hideLi(),this.wrap.style.overflow="hidden"):(console.log("我应该进入这个"),this.showLi(),this.wrap.style.overflow="visible",this.container.addEventListener("touchmove",this.slideMove),this.container.addEventListener("touchend",this.slideEnd))},t.prototype.hideLi=function(){for(var e=this.wrap.children,t=0,n=e.length;t<n;t++)t!==this.index&&(e[t].style.display="none")},t.prototype.showLi=function(){for(var e=this.wrap.children,t=0,n=e.length;t<n;t++)e[t].style.display="inline-block"},t.prototype.render=function(){var e=this;return r.a.createElement("div",{className:"tab-container-root",ref:function(t){e.container=t}},r.a.createElement("ul",{className:"tab-container",ref:function(t){e.wrap=t}},this.props.children))},t}(o.Component);t.a=l},function(e,t){},function(e,t,n){"use strict";var o=n(0),r=n.n(o),i=n(6);n.n(i);var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){},t.prototype.render=function(){var e=this,t=this.props.style;return r.a.createElement("li",{className:"TabContainerItem",style:t,ref:function(t){return e.el=t}},this.props.children)},t}(o.Component);t.a=c},function(e,t){},function(e,t,n){"use strict";var o=n(0),r=n.n(o),i=n(8);n.n(i);var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return r.a.createElement("div",null)},t}(o.Component);t.a=c},function(e,t){}]).default});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.Y=t(require("react")):e.Y=t(e.React)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(t,n){t.exports=e},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3);n.d(t,"TabContainer",function(){return o.a});var r=n(5);n.d(t,"TabContainerItem",function(){return r.a});var i=n(7);n.d(t,"NavBar",function(){return i.a})},function(e,t,n){"use strict";var o=n(0),r=n.n(o),i=n(4);n.n(i);var c="left",s="right",a="top",u="down",l=function(e){function t(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,n));return o.slideStart=function(e){console.log(e.changedTouches[0].pageX),o.startX=e.changedTouches[0].pageX,o.startY=e.changedTouches[0].pageY,o.quiescingTouch()},o.slideMove=function(e){var t=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY,r=t-o.startX,i=n-o.startY;Math.abs(r)>Math.abs(i)&&r>0?(console.log("向右",r,o.container.scrollLeft),o.touchDes=s,0!==o.index&&(o.container.scrollLeft=o.index*o.itemWidth-r)):Math.abs(r)>Math.abs(i)&&r<0?(console.log("向左",r,o.container.scrollLeft),o.touchDes=c,o.index!==o.props.children.length-1&&(o.container.scrollLeft=o.index*o.itemWidth-r)):Math.abs(i)>Math.abs(r)&&i>0?(console.log("向下"),o.touchDes=u):Math.abs(i)>Math.abs(r)&&i<0?(console.log("向上"),o.touchDes=a):console.log("没有发生滑动")},o.slideEnd=function(e){o.endX=e.changedTouches[0].clientX,console.log("touch 结束"),o.timer||(console.log("没有进行中 timer 进入 check"),o.checkTouch())},o.checkTouch=function(){if(o.touchDes===s||o.touchDes===c){var e={right:function(){0!==o.index&&o.index--},left:function(){o.index!==o.props.children.length-1&&o.index++}};Math.abs(o.endX-o.startX)>=o.interval&&e[o.touchDes]()}o.animate()},o.animate=function(){var e=o.itemWidth*o.index;console.log("目标的 scrollleft ==> "+e),o.timer=setInterval(function(){var t=(e-o.container.scrollLeft)/5;t=t>0?Math.ceil(t):Math.floor(t),o.container.scrollLeft+=t,Math.abs(e-o.container.scrollLeft)<=Math.abs(t)&&(clearInterval(o.timer),o.timer=void 0,o.container.scrollLeft=e,console.log("进入销毁程序",o.container.scrollLeft,e))},10)},o.itemWidth=window.screen.width,o.interval=n.interval||parseInt(o.itemWidth/3),o.index=n.index||0,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){this.container.scrollLeft=this.index*this.itemWidth,this.container.addEventListener("touchstart",this.slideStart)},t.prototype.componentWillUnmount=function(){this.container.removeEventListener("touchstart",this.slideStart),this.container.removeEventListener("touchmove",this.slideMove),this.container.removeEventListener("touchend",this.slideEnd)},t.prototype.quiescingTouch=function(){this.startX<30?(this.container.removeEventListener("touchmove",this.slideMove),this.container.removeEventListener("touchend",this.slideEnd),this.hideLi(),this.wrap.style.overflow="hidden"):(console.log("我应该进入这个"),this.showLi(),this.wrap.style.overflow="visible",this.container.addEventListener("touchmove",this.slideMove),this.container.addEventListener("touchend",this.slideEnd))},t.prototype.hideLi=function(){for(var e=this.wrap.children,t=0,n=e.length;t<n;t++)t!==this.index&&(e[t].style.display="none")},t.prototype.showLi=function(){for(var e=this.wrap.children,t=0,n=e.length;t<n;t++)e[t].style.display="inline-block"},t.prototype.render=function(){var e=this;return r.a.createElement("div",{className:"tab-container-root",ref:function(t){e.container=t}},r.a.createElement("ul",{className:"tab-container",ref:function(t){e.wrap=t}},this.props.children))},t}(o.Component);t.a=l},function(e,t){},function(e,t,n){"use strict";var o=n(0),r=n.n(o),i=n(6);n.n(i);var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentDidMount=function(){},t.prototype.render=function(){var e=this,t=this.props.style;return r.a.createElement("li",{className:"TabContainerItem",style:t,ref:function(t){return e.el=t}},this.props.children)},t}(o.Component);t.a=c},function(e,t){},function(e,t,n){"use strict";var o=n(0),r=n.n(o),i=n(8);n.n(i);var c=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.render=function(){return r.a.createElement("div",null,"测试用的导航栏")},t}(o.Component);t.a=c},function(e,t){}]).default});
//# sourceMappingURL=bestnihon-react-components.min.js.map

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc