Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bee-calendar

Package Overview
Dependencies
Maintainers
15
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bee-calendar - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

.npmignore

1

build/Calendar.js

@@ -85,2 +85,3 @@ 'use strict';

return _react2["default"].createElement(_FullCalendar2["default"], _extends({
prefixCls: 'u-calendar',
Select: _rcSelect2["default"],

@@ -87,0 +88,0 @@ defaultValue: now,

@@ -0,0 +0,0 @@ import Calendar from '../src/index';

4

demo/demolist/Demo1.js

@@ -10,7 +10,7 @@

import React, { Component } from 'react';
import Calendar from '../../src';
import Calendar from '../../src/index';
function onSelect(value) {
console.log('select', value.format(format));
console.log(value);
}

@@ -17,0 +17,0 @@

@@ -10,7 +10,7 @@

import React, { Component } from 'react';
import Calendar from '../../src';
import Calendar from '../../src/index';
function onSelect(value) {
console.log('select', value.format(format));
console.log(value);
}

@@ -17,0 +17,0 @@

@@ -1,8 +0,6 @@

import { Con, Row, Col } from 'bee-layout';
import { Panel } from 'bee-panel';
import {Col, Row} from 'bee-layout';
import {Panel} from 'bee-panel';
import Button from 'bee-button';
import React, { Component } from 'react';
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import Calendar from '../src';

@@ -18,3 +16,3 @@

class Demo extends Component {
constructor(props){
constructor(props) {
super(props);

@@ -26,23 +24,29 @@ this.state = {

}
handleClick() {
this.setState({ open: !this.state.open })
this.setState({open: !this.state.open})
}
render () {
const { title, example, code, desc } = this.props;
render() {
const {title, example, code, desc, scss_code} = this.props;
let caret = this.state.open ? CARETUP : CARET;
let text = this.state.open ? "隐藏代码" : "查看代码";
const footer = (
<Button shape="block" onClick={ this.handleClick }>
{ caret }
{ text }
</Button>
const header = (
<div>
{example}
<Button style={{"marginTop": "10px"}} shape="block" onClick={this.handleClick}>
{caret}
{text}
</Button>
</div>
);
return (
<Col md={12} >
<h3>{ title }</h3>
<p>{ desc }</p>
<Panel collapsible headerContent expanded={ this.state.open } colors='bordered' header={ example } footer={footer} footerStyle = {{padding: 0}}>
<pre><code className="hljs javascript">{ code }</code></pre>
<Col md={12}>
<h3>{title}</h3>
<p>{desc}</p>
<Panel collapsible headerContent expanded={this.state.open} colors='bordered' header={header}
footerStyle={{padding: 0}}>
<pre><code className="hljs javascript">{code}</code></pre>
{!!scss_code ? <pre><code className="hljs css">{scss_code}</code></pre> : null}
</Panel>

@@ -55,16 +59,18 @@ </Col>

class DemoGroup extends Component {
constructor(props){
constructor(props) {
super(props)
}
render () {
render() {
return (
<Row>
{DemoArray.map((child,index) => {
<Row>
{DemoArray.map((child, index) => {
return (
<Demo example= {child.example} title= {child.title} code= {child.code} desc= {child.desc} key= {index}/>
)
return (
<Demo example={child.example} title={child.title} code={child.code} scss_code={child.scss_code}
desc={child.desc} key={index}/>
)
})}
</Row>
})}
</Row>
)

@@ -74,2 +80,2 @@ }

ReactDOM.render(<DemoGroup/>, document.getElementById('tinperBeeDemo'));
ReactDOM.render(<DemoGroup/>, document.getElementById('tinperBeeDemo'));

@@ -1,8 +0,6 @@

import { Con, Row, Col } from 'bee-layout';
import { Panel } from 'bee-panel';
import {Col, Row} from 'bee-layout';
import {Panel} from 'bee-panel';
import Button from 'bee-button';
import React, { Component } from 'react';
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import Calendar from '../src';

@@ -15,7 +13,7 @@

var Demo1 = require("./demolist/Demo1");var Demo2 = require("./demolist/Demo2");var DemoArray = [{"example":<Demo1 />,"title":" 卡片模式","code":"\n/**\n *\n * @title 卡片模式\n * @description 用于嵌套在空间有限的容器中\n *\n */\n\nimport React, { Component } from 'react';\nimport Calendar from 'bee-calendar';\n\n\nfunction onSelect(value) {\n console.log('select', value.format(format));\n}\n\n\nclass Demo1 extends Component {\n render() {\n return (\n <div>\n <Calendar\n style={{ margin: 10 }}\n fullscreen={false}\n onSelect={onSelect}\n />\n </div>\n )\n }\n}\n\n\n","desc":" 用于嵌套在空间有限的容器中"},{"example":<Demo2 />,"title":" 选择日历","code":"\n/**\n *\n * @title 选择日历\n * @description 一个通用的日历面板,支持年/月切换。\n *\n */\n\nimport React, { Component } from 'react';\nimport Calendar from 'bee-calendar';\n\n\nfunction onSelect(value) {\n console.log('select', value.format(format));\n}\n\nclass Demo2 extends Component {\n\n constructor(props, context) {\n super(props, context);\n\n this.state = {\n type:'month',\n }\n }\n\n onTypeChange(type) {\n this.setState({\n type,\n });\n }\n\n render() {\n return (\n <div>\n <Calendar\n style={{ margin: 10 }}\n fullscreen\n\n onSelect={onSelect}\n type={this.state.type}\n onTypeChange={this.onTypeChange.bind(this)}\n\n />\n </div>\n )\n }\n}\n\n","desc":" 一个通用的日历面板,支持年/月切换。"}]
var Demo1 = require("./demolist/Demo1");var Demo2 = require("./demolist/Demo2");var DemoArray = [{"example":<Demo1 />,"title":" 卡片模式","code":"\r\n/**\r\n *\r\n * @title 卡片模式\r\n * @description 用于嵌套在空间有限的容器中\r\n *\r\n */\r\n\r\nimport React, { Component } from 'react';\r\nimport Calendar from \"tinper-bee/lib/Calendar\";\r\n\r\n\r\nfunction onSelect(value) {\r\n console.log(value);\r\n}\r\n\r\n\r\nclass Demo1 extends Component {\r\n render() {\r\n return (\r\n <div>\r\n <Calendar\r\n style={{ margin: 10 }}\r\n fullscreen={false}\r\n onSelect={onSelect}\r\n />\r\n </div>\r\n )\r\n }\r\n}\r\n\r\n\r\n","desc":" 用于嵌套在空间有限的容器中"},{"example":<Demo2 />,"title":" 选择日历","code":"\r\n/**\r\n *\r\n * @title 选择日历\r\n * @description 一个通用的日历面板,支持年/月切换。\r\n *\r\n */\r\n\r\nimport React, { Component } from 'react';\r\nimport Calendar from \"tinper-bee/lib/Calendar\";\r\n\r\n\r\nfunction onSelect(value) {\r\n console.log(value);\r\n}\r\n\r\nclass Demo2 extends Component {\r\n\r\n constructor(props, context) {\r\n super(props, context);\r\n\r\n this.state = {\r\n type:'month',\r\n }\r\n }\r\n\r\n onTypeChange(type) {\r\n this.setState({\r\n type,\r\n });\r\n }\r\n\r\n render() {\r\n return (\r\n <div>\r\n <Calendar\r\n style={{ margin: 10 }}\r\n fullscreen\r\n\r\n onSelect={onSelect}\r\n type={this.state.type}\r\n onTypeChange={this.onTypeChange.bind(this)}\r\n\r\n />\r\n </div>\r\n )\r\n }\r\n}\r\n\r\n","desc":" 一个通用的日历面板,支持年/月切换。"}]
class Demo extends Component {
constructor(props){
constructor(props) {
super(props);

@@ -27,23 +25,29 @@ this.state = {

}
handleClick() {
this.setState({ open: !this.state.open })
this.setState({open: !this.state.open})
}
render () {
const { title, example, code, desc } = this.props;
render() {
const {title, example, code, desc, scss_code} = this.props;
let caret = this.state.open ? CARETUP : CARET;
let text = this.state.open ? "隐藏代码" : "查看代码";
const footer = (
<Button shape="block" onClick={ this.handleClick }>
{ caret }
{ text }
</Button>
const header = (
<div>
{example}
<Button style={{"marginTop": "10px"}} shape="block" onClick={this.handleClick}>
{caret}
{text}
</Button>
</div>
);
return (
<Col md={12} >
<h3>{ title }</h3>
<p>{ desc }</p>
<Panel collapsible headerContent expanded={ this.state.open } colors='bordered' header={ example } footer={footer} footerStyle = {{padding: 0}}>
<pre><code className="hljs javascript">{ code }</code></pre>
<Col md={12}>
<h3>{title}</h3>
<p>{desc}</p>
<Panel collapsible headerContent expanded={this.state.open} colors='bordered' header={header}
footerStyle={{padding: 0}}>
<pre><code className="hljs javascript">{code}</code></pre>
{!!scss_code ? <pre><code className="hljs css">{scss_code}</code></pre> : null}
</Panel>

@@ -56,16 +60,18 @@ </Col>

class DemoGroup extends Component {
constructor(props){
constructor(props) {
super(props)
}
render () {
render() {
return (
<Row>
{DemoArray.map((child,index) => {
<Row>
{DemoArray.map((child, index) => {
return (
<Demo example= {child.example} title= {child.title} code= {child.code} desc= {child.desc} key= {index}/>
)
return (
<Demo example={child.example} title={child.title} code={child.code} scss_code={child.scss_code}
desc={child.desc} key={index}/>
)
})}
</Row>
})}
</Row>
)

@@ -75,2 +81,2 @@ }

ReactDOM.render(<DemoGroup/>, document.getElementById('tinperBeeDemo'));
ReactDOM.render(<DemoGroup/>, document.getElementById('tinperBeeDemo'));

@@ -0,0 +0,0 @@ ## Calendar

@@ -0,0 +0,0 @@ # Calendar

{
"name": "bee-calendar",
"version": "1.0.0",
"version": "2.0.0",
"description": "Calendar ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

@@ -0,0 +0,0 @@ # bee-calendar

@@ -0,0 +0,0 @@ # bee-calendar

@@ -44,2 +44,3 @@ import React, { Component } from 'react';

<FullCalendar
prefixCls = "u-calendar"
Select={Select}

@@ -46,0 +47,0 @@ defaultValue={now}

import Calendar from './Calendar';
export default Calendar;

@@ -0,0 +0,0 @@ import React from 'react';

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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